File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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

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"
trusted="false" >
So now my context name is "assess".In this contest I created a package name "login".The structure of
it is like this
assess -->
Web-inf -->
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(
at org.apache.tomcat.core.ServletWrapper.doService(
at org.apache.tomcat.core.Handler.service(
at org.apache.tomcat.core.ServletWrapper.service(

Root cause:
java.lang.NoClassDefFoundError: login/Retry
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
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:
subject: Need help with web.xml and .war file
It's not a secret anymore!