Struts2 organization question
843840Jun 29 2010 — edited Jun 29 2010I'm just getting into Struts2, following some tutorials but I can't seem to find a consistent way of organizing projects, especially if I'm using eclipse which I am. I came up with one that I kind of think fits (as far as I can tell, just being a beginner) however I'm getting an error that an action isn't found. I think it has to do with where I put things.
Here's my folder structure:
Struts2HelloWorldXML
-build
--classes
---HelloWorld.class
-src
--HelloWorld.java
-WebContent
--META-INF
--WEB-INF
---jsp
----HelloWorld.jsp
----NameCollector.jsp
---lib
---xml
----struts.xml
----helloinclude.xml
---web.xml
--index.html
Here are the contents of struts.xml and helloinclude.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.devMode" value="true" />
<include file="helloinclude.xml"/>
</struts>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" namespace="/" extends="struts-default">
<action name="Name">
<result>/jsp/NameCollector.jsp</result>
</action>
<action name="HelloWorld" class="HelloWorld">
<result name="SUCCESS">/jsp/HelloWorld.jsp</result>
</action>
</package>
</struts>
The problem is, it can't find the Name action. I can post more, I'm just not sure what would be helpful other than the file structure and xml configurations. Does that look right?
Thanks