File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Problem in Deploying Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem in Deploying Servlet" Watch "Problem in Deploying Servlet" New topic
Author

Problem in Deploying Servlet

sharada narayan
Greenhorn

Joined: Nov 04, 2002
Posts: 7
Hello,
I am trying to deploy Servlet in Websphere Application Server V4.0 AES.I created MyServlet.ear using AAT.Created Servlet web component.I have added only one servlet.Context root is /webapp/MyServlet.In Servlet mapping URL Pattern is /MyServlet.I installed the Application.When I try to view MyServlet using http://localhost:9080/webapp/MyServlet/MyServlet I am getting following error. Error 500: Failed to load target servlet [MyServlet] In the log file it is saying Failed to load servlet´┐Żjava.lang.NoClassDefFoundError: MyServlet (wrong name: webapp/MyServlet)Can anybody please help in solving this? Your help is greatly appreciated.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Moving to Servlets.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
You should put your servlet in a package and put the compiled class files under MyServlet/WEB-INF/classes.
You should download the servlet API from java.sun.com and read about the required directory layout for web applications.
Bill
sharada narayan
Greenhorn

Joined: Nov 04, 2002
Posts: 7
Hi,
I could able to deploy the servlet.I created servlet in a package.Updated web.xml.Thank you very much.
Sharada Narayan
 
 
subject: Problem in Deploying Servlet