Hello Group,
I am working with the preliminary HelloWorld.java example and removed the
very first line in HelloWorld.java
i.e I commented out
package tutorial;
Thereafter I modified the struts.xml file and it looks like
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd"><struts>
<package name="" extends="struts-default">
<action name="HelloWorld" class="HelloWorld">
<result>/HelloWorld.jsp</result>
</action>
<!-- Add your actions here -->
</package></struts>
What does the name in
<package name="" extends="struts-default">
mean?
I compiled my HelloWorld.java and put the HelloWorld.class in the
WEB-INF/classes directory.
Then I tried deploying it through
localhost:8080/HelloWorld.action
It gives errors as
"The requested resoruce (/HelloWorld.action) is not available.
However, if I put the package name back in all those places and run it like
localhost:8080/tutorial/HelloWorld.action
Then it works perfectly.
For compiling I am always using
javac -d <classpath> <javafile>
Can someone please tell me what happens why does it not work if I take away
the package name from all the places.
--
Thanks
Nagrik