struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: Struts does not find the Action Form
Date Wed, 15 Mar 2006 03:47:40 GMT
I don't see anything wrong in your struts-config.xml but the error is 
probably in the JSP, which you didn't post. What does that look like?

L.

Lösekann wrote:
> Hello,
>  
> I am building a new Web App with the Struts 1.2.8 Action Framework and have a strange
problem. I have build a login page a dynaform and a Action class for my app and if I test
it I get the error that the form is Null ! I have misspelled the form name delibaretly and
it gave the error it could not find the form. It seems like Struts would parse it right but
does not put the form in the servlet. I hope someone can give me a hint because I am running
out of ideas. Here is the error message:
> org.apache.jasper.JasperException: Null attribute name
> 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
> 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
> 	org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
> 	org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1000)
> 	org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345)
> 	org.apache.struts.action.RequestProcessor.processForward(RequestProcessor..java:560)
> 	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
> 	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> 	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> And my struts-config.xml
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> 
> <!DOCTYPE struts-config PUBLIC
> 
> "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
> 
> "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
> 
>  
> 
> <struts-config>
> 
> <!-- ================================================ Form Bean Definitions -->
> 
> <form-beans>
> 
> <form-bean 
> 
> name="userLoginForm" 
> 
> type="org.apache.struts.action.DynaActionForm">
> 
> <form-property name="button" type="java.lang.String"/>
> 
> <form-property name="username" type="java.lang.String"/>
> 
> <form-property name="password" type="java.lang.String"/>
> 
> </form-bean>
> 
> </form-beans>
> 
>  
> 
> <!-- ========================================= Global Exception Definitions -->
> 
> <global-exceptions>
> 
> <!-- sample exception handler
> 
> <exception
> 
> key="expired.password"
> 
> type="app.ExpiredPasswordException"
> 
> path="/changePassword.jsp"/>
> 
> end sample -->
> 
> </global-exceptions>
> 
>  
> 
> <!-- =========================================== Global Forward Definitions -->
> 
> <global-forwards>
> 
> <!-- Default forward to "Welcome" action -->
> 
> <!-- Demonstrates using index.jsp to forward -->
> 
> <forward
> 
> name="welcome"
> 
> path="/Welcome.do"/>
> 
> </global-forwards>
> 
>  
> 
> <!-- =========================================== Action Mapping Definitions -->
> 
> <action-mappings>
> 
> <!-- Default "Welcome" action -->
> 
> <!-- Forwards to Welcome.jsp -->
> 
> <action
> 
> path="/Welcome"
> 
> forward="/pages/userLogin.jsp"/>
> 
> <action 
> 
> path="/UserLogin"
> 
> type="actions.UserLogin"
> 
> name="userLoginForm"
> 
> input="/pages/userLogin.jsp">
> 
> <forward name="success" path="/pages/userLogin.jsp"/>
> 
> <forward name="failure" path="/pages/userLogin.jsp"/>
> 
> </action>
> 
>  
> 
> </action-mappings>
> 
>  
> 
> <!-- ============================================= Controller Configuration -->
> 
> <controller
> 
> processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
> 
>  
> 
> <!-- ======================================== Message Resources Definitions -->
> 
> <message-resources parameter="MessageResources" />
> 
>  
> 
> <!-- =============================================== Plug Ins Configuration -->
> 
> <!-- ======================================================= Tiles plugin -->
> 
> <plug-in className="org.apache.struts.tiles.TilesPlugin" >
> 
> <!-- Path to XML definition file -->
> 
> <set-property property="definitions-config"
> 
> value="/WEB-INF/tiles-defs.xml" />
> 
> <!-- Set Module-awareness to true -->
> 
> <set-property property="moduleAware" value="true" />
> 
> </plug-in>
> 
>  
> 
> <!-- =================================================== Validator plugin -->
> 
> <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
> 
> <set-property
> 
> property="pathnames"
> 
> value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> 
> </plug-in>
> 
> </struts-config>
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message