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

Problem in Deploying Servlet

sharada narayan

Joined: Nov 04, 2002
Posts: 7
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"

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

Joined: Mar 22, 2000
Posts: 13036
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 and read about the required directory layout for web applications.
sharada narayan

Joined: Nov 04, 2002
Posts: 7
I could able to deploy the servlet.I created servlet in a package.Updated web.xml.Thank you very much.
Sharada Narayan
I agree. Here's the link:
subject: Problem in Deploying Servlet
It's not a secret anymore!