Is the Java class being deployed to the proper location? If you just deleted
the package statement w/o moving the file to the appropriate directory you
might run into problems.

Do you have debugging turned up and/or struts.devMode turned on?

Dave

--- Vinay Nagrik <[EMAIL PROTECTED]> wrote:
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to