The moose likes Servlets and the fly likes setting a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "setting a servlet" Watch "setting a servlet" New topic

setting a servlet

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1183
I�m trying to convince my first servlet to work ;-)
My weblogic 5.1 serves the following � http://ny1715:7001/mywebapp/index.html
index.html has the following form �
<form action="/mywebapp/servlet/GreetingServlet" method="post">
In the directory - mywebapp\WEB-INF\classes I have the class GreetingServlet.class
The mywebapp\WEB-INF\web.xml contains the following �
When submitting the form I get a 404 page.
Any ideas?

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
BJ Grau
Ranch Hand

Joined: Jul 10, 2001
Posts: 234
I have never used Weblogic, so this might not be much help - but are you sure you are using port 7001? Also, does Weblogic have some sort of default page that comes up when you go to http://localhost:<portnumber>? Try seeing if it works first.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1183
http://ny1715:7001/mywebapp/index.html served the initial page.
The servlet wasn't reached.
Manohar Karamballi
Ranch Hand

Joined: Jul 17, 2001
Posts: 227
Hai Drich!
In addition to what u have given in xml file u also need to give following info,,,
Servlet Name goes here
URI u want

and then in action of form change URL to /UR applcation/URI u want .
Also check whether web component for ur application is registered in config.xml file of ur server
mocca az
Ranch Hand

Joined: Mar 07, 2001
Posts: 93
With Weblogic you also need to register servlet in file. This doesn't just apply for servlets, any beans also need to ber registered.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417
  29 is for WebLogic 5.1. The XML form took over in WLS 6.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: setting a servlet
jQuery in Action, 3rd edition