This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes Need help with web.xml and .war file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need help with web.xml and .war file" Watch "Need help with web.xml and .war file" New topic
Author

Need help with web.xml and .war file

payal sharma
Ranch Hand

Joined: Oct 04, 2000
Posts: 57
Dear java guru's
Need help with web.xml and .war file.
I am using tomcat 3.2. I made change in my server.xml in conf directory of tomcat by adding
following lines.
<Context path="/assess"
docBase="assess"
crossContext="false"
debug="0"
reloadable="true"
trusted="false" >
</Context>
So now my context name is "assess".In this contest I created a package name "login".The structure of
it is like this
assess -->
login-->
*.jsp
Web-inf -->
web.xml
classes-->
login--->
*.class
The web.xml is the default xml I copied from tomcat conf directory and put it in web-inf
And some it is like this
<load-on-startup> -2147483646 </load-on-startup> </servlet> <servlet-mapping>
<servlet-name> invoker </servlet-name> <url-pattern> /servlet/*
</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name> jsp
</servlet-name> <url-pattern> *.jsp </url-pattern> </servlet-mapping>
<session-config> <session-timeout> 30 </session-timeout> </session-config>
Now for making .war file I run the following command.
from my contest assess> jar -cvf login.war *
then I delete all file from my context except login.war
Now when I run the following url http://localhost:8080/assess/login/index.jsp
I am getting this error
Error: 500
Location: /assess/login/index.jsp
Internal Servlet Error:
javax.servlet.ServletException: login/Retry
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

Root cause:
java.lang.NoClassDefFoundError: login/Retry
at
login._0002flogin_0002findex_0002ejspindex_jsp_0._jspService(_0002flogin_0002findex_0002ejs
pindex_jsp_0.java:64)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
login.Retry is first bean used in index.jsp
Now Help me where I am lagging
thanks in advance
payal sharma
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help with web.xml and .war file