Thanks for the replies and info. nagrik
On 4/28/08, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > > Vinay, > > You are talking about two different things... First off, in the java > source file, the statement 'package tutorial;' relates to the following > > http://java.sun.com/docs/books/tutorial/java/package/packages.html > > In struts2, the package declaration is a way to logically organize your > actions. It is documented here - > > http://struts.apache.org/2.x/docs/package-configuration.html > > -Wes > > On Mon, 2008-04-28 at 17:32 -0700, Vinay Nagrik wrote: > > 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. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks Nagrik