html:error 出错! 原因在哪

在JSP页面中:
<html:form action="login.do">
password : <html:text property="password"/><html:errors property="password"/><br/>
username : <html:text property="username"/><html:errors property="username"/><br/>
<html:submit/><html:cancel/>
</html:form>

ActionForm中
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if(this.getUsername()=="")
errors.add("username",new ActionMessage("error.test"));

return errors;
}
配置文件为:error.test=user is null
struts-config.xml 也设置了 validate="true"
结果不输入username 程序报错
错误如下:

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.IllegalArgumentException: Path login.jsp does not start with a "/" character
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:988)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
如何删除所有工程翻译后的servlet
---我是新手麻烦多指教下

程序没问题,appche 出了问题 删除 所有工程翻译后的servlet.
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-04-23
从网上下载一个steam.dll文件放到c:\windows\system32目录下或是需要这个文件的程序目录下就可以了。

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网