Salve! Ho creato con Eclipse un progetto java utilizzando le librerie di struts 1.3.8. Il mio struts-config è il seguente:
Ho una jsp home.jsp con dei form, i cui campi sono stati internazionalizzati attraverso il file ApplicationResources.codice:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://struts.apache.org/dtds/struts-config_1_3.dtd"> <struts-config> <form-beans > <form-bean name="homeForm" type="form.HomeForm" /> </form-beans> <global-exceptions /> <global-forwards /> <action-mappings > <action attribute="homeForm" name="homeForm" path="/home" scope="request" type="action.HomeAction" > <forward name= "success" path="/jsp/home.jsp"/> </action> </action-mappings> <message-resources parameter="ApplicationResources" /> </struts-config>
Quando cerco di avviare da tomcat questa action mi comprare questa eccezione che non riesco a capire:codice:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Home Esercitazione</title> </head> <body bgcolor="#FFE4E1"> <html:form> <font color="blue"><bean:message key="login.user"/></font>:<html:text property="user"/><html:errors property="user"/> <font color="blue"><bean:message key="login.password"/></font> <font color="red"><html:submit titleKey = "login.submit.value" /></font> </html:form> </body> </html>
Mi sapreste dire di che tipo d eccezione si tratta? Se occorre, posto le classi Form e Action...codice:description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NullPointerException org.apache.struts.taglib.TagUtils.getActionMappingName(TagUtils.java:583) org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:834) org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:467) org.apache.jsp.jsp.home_jsp._jspx_meth_html_005fform_005f0(home_jsp.java:102) org.apache.jsp.jsp.home_jsp._jspService(home_jsp.java:77) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
Grazie

Rispondi quotando