Erro de JspException

2 respostas
I

olà pessoal, estou traduzindo um forum (MVNForum).

tem dois arquivos nele que quando tento alterar dá a seguinte mensagem “javax.servlet.jsp.JspException: String index out of range: 1”, gostaria de saber se algué, sabe do que se trata.

Desde já agradeço a atenção.


Ilidio Paulo de Abreu
[email removido]

“Se a vida é uma brincadeira, porque ela é tão séria.”

2 Respostas

L

Coloque o código que vc está alterando aqui, e também o stack trace do erro completo.

Abraço.

I

Enviando o código.

<%–

  • $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/edittemplate.jsp,v 1.5 2005/01/18 11:01:37 minhnn Exp $
  • $Author: minhnn $
  • $Revision: 1.5 $
  • $Date: 2005/01/18 11:01:37 $
  • ====================================================================
  • Copyright © 2002-2005 by MyVietnam.net
  • This program is free software; you can redistribute it and/or
  • modify it under the terms of the GNU General Public License
  • as published by the Free Software Foundation; either version 2
  • of the License, or any later version.
  • All copyright notices regarding mvnForum MUST remain intact
  • in the scripts and in the outputted HTML.
  • The “powered by” text/logo with a link back to
  • http://www.mvnForum.com and http://www.MyVietnam.net in the
  • footer of the pages MUST remain visible when the pages
  • are viewed on the internet or intranet.
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU General Public License for more details.
  • You should have received a copy of the GNU General Public License
  • along with this program; if not, write to the Free Software
  • Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  • Support can be obtained from support forums at:
  • http://www.mvnForum.com/mvnforum/index
  • Correspondence and Marketing Questions can be sent to:
  • [email removido]
  • @author: Phong, Ta Quoc [email removido]
    –%>
    <%@ page contentType=“text/html;charset=utf-8” %>
    <%@ page errorPage=“fatalerror.jsp”%>
    <%@ page import=“com.mvnforum.db.*” %>
    <%@ page import=“com.mvnforum.MVNForumGlobal” %>

<%@ include file=“inc_common.jsp”%>
<fmt:bundle basename=“mvnForum_i18n”>

- Edit Email Templates <%@ include file="/mvnplugin/mvnforum/meta.jsp"%> <%@ include file="inc_js_checkvalid_myvietnamlib.jsp"%>
<%@ include file=header.jsp%>

<%

String subject = ParamUtil.getAttribute(request, TemplateSubject);

String body = ParamUtil.getAttribute(request, TemplateBody);

String template = ParamUtil.getParameter(request, template);

boolean success = (! ParamUtil.getAttribute(request, Successful).equals(""));

request.removeAttribute(Successful);

if (template.equals("")) {

template = MVNForumGlobal.TEMPLATE_SENDACTIVATECODE_PREFIX;

}

// note that we already check the template input in the Java Handler

%>
You can customize the content of template files, which used to send email for a certain purpose (recovery his password, activate his account, or inform the new watch.)
Note: You can using the predefined items which starts with "${" and ends with "}".
You could use the template items below:
<% if (template.equals(MVNForumGlobal.TEMPLATE_SENDACTIVATECODE_PREFIX)) {%> <%} else if (template.equals(MVNForumGlobal.TEMPLATE_WATCHMAIL_PREFIX)) {%> <%} else if (template.equals(MVNForumGlobal.TEMPLATE_FORGOTPASSWORD_PREFIX)) {%> <%}%>
Items Description and Usage
${memberName} Member Login Name
${serverName} Server Name
${MVNForumInfo} Forum Information
${activationUrl} Activation URL
${activateCode} Activation Code
${lastSent} The last watch mail sent date
${now} Now/Present
${forumBase} The forum Link
threadWatchList The thread watch list. Iterator over a list of thread watch list.
Usage: <#list threadWatchList as mailbeans > ...</#list>
forumName Above is the properties of the thread watch list :
Usage:
<#list threadWatchList as mailbeans >
<#if mailbeans.leader >
[Category: ${mailbeans.categoryName}]
  [Forum: ${mailbeans.forumName}]
</#if>
    Thread [${mailbeans.threadTopic}] given to us by ${mailbeans.memberName}
      last posted by ${mailbeans.lastPostMemberName} on ${mailbeans.threadLastPostDate}
      ${mailbeans.threadUrl}

</#list>


threadTopic Thread Topic. Usage: ${mailbeans.threadTopic}
memberName Thread Owner. Usage: ${mailbeans.memberName}
lastPostMemberName The last post member in the thread. Usage: ${mailbeans.lastPostMemberName}
threadLastPostDate The last post date in the thread. Usage: ${mailbeans.threadLastPostDate}
threadUrl Thread URL. Usage: ${mailbeans.threadUrl}
${memberName} Member Login Name
${serverName} Server Name
${MVNForumInfo} Forum Information
${passwordResetUrl} Resetting URL
${currentTempPassword} Current temporary Password
Please see template help at FreeMarker

<% if (success) {%> <% } %>
Edit Mail Template:
The template has been saved successfully.
* Template for selected <%}%>>Recovery Passwords selected <%}%>>Watch Mail selected <%}%> >Active Members
* Subject:
* Body: <%=body%>

<%@ include file="footer.jsp"%>
Criado 18 de dezembro de 2006
Ultima resposta 18 de dez. de 2006
Respostas 2
Participantes 2