This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Websphere and the fly likes WAS 5.0 and Servlets (web.xml) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "WAS 5.0 and Servlets (web.xml)" Watch "WAS 5.0 and Servlets (web.xml)" New topic

WAS 5.0 and Servlets (web.xml)

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362

I am having a little trouble with Websphere 5.0 and a little login Servlet, basically I have created my loginservlet and jsp pages, zipped them all up into a .war file (the structure is correct) and installed it into WAS5.0 with no problem.

The problem comes when I click on the 'login' button. Now the jsp should call the login Servlet (LoginServlet) but instead I get a URL not found on this server, error.

Here is a brief description of what/where the files are kept and the web.xml

<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">

<web-app id="WebApp_1136296849094">
<servlet id="Servlet_1136296848734">
<servlet-mapping id="ServletMapping_1136296849094">

WAS 5.0 installed under:
C:\Program Files\WebSphere\AppServer

And my servlet is under:

login.jsp uses the following form:
<form name="frmLogin" action="/LoginServlet" method="POST">

The requested URL /LoginServlet was not found on this server.

Any help would be greatly appreciated, this is doing my nut!
Deepak Shankar

Joined: Dec 14, 2005
Posts: 12
Hi Secker,

What is the target url in the "html form", where you are doing a submit?

If your target url is /LoginServlet, then you should have an url entry in web.xml.




Make an entry for your target in the web.xml and try it.

[ January 03, 2006: Message edited by: Deepak Shankar ]
[ January 03, 2006: Message edited by: Deepak Shankar ]
I agree. Here's the link:
subject: WAS 5.0 and Servlets (web.xml)
It's not a secret anymore!