E ae galera, blz?
Estou seguindo o tuto do Struts in Action.
Mas estou apanhando pra fazer o HelloWorld usando Struts.
Segue os arquivos que, creio eu,sejam relevantes pra alguem conseguir me ajudar:
StackTrace:
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet action threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)
root cause
java.lang.NullPointerException
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1003)
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
org.apache.struts.action.ActionServlet.init(ActionServlet.java:482)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)
struts-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources/>
<form-beans>
<form-bean name="registerForm" type="app.RegisterForm" />
</form-beans>
<global-exceptions/>
<global-forwards/>
<action-mappings>
<action path="/Struting" type="app.RegisterAction" name="registerForm">
<forward name="sucess" path="/HTML/sucess.html" />
<forward name="failure" path="/HTML/failure.html" />
</action>
</action-mappings>
<controller/>
</struts-config>
Meu jsp q deveria encaminhar a Action:
<%@ taglib uri="struts-html.tld" prefix="form" %>
<form:form action="Struting.do">
Username:<form:text property="userName" /><br />
Enter Password: <form:password property="password1" /><br />
Re-Enter password: <form:password property="password2" /><br />
<form:submit value="Register" />
</form:form>
O erro ocorre quando dou um SUBMIT nesse JSP.
Se precisarem d + fontes, favor avisar.
Tnx in advance
[]'s