File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "web.xml" Watch "web.xml" New topic


william gates
Ranch Hand

Joined: Feb 21, 2007
Posts: 112
I changed one line in the web.xml file, redeployed it to the websphere 5.0 server and now I get an error message when I try to visit the website.

"Error 404: No target servlet configured for uri"

I thought maybe I did something wrong or deleted something I shouldn't have in the web.xml file or application.xml file. So I reverted back to what worked and low and behold, I got the same error. I'm not sure what's wrong now because what worked yesterday is no longer working today.

I searched some forums and topics, but I'm new to websphere, so i'm not sure what the issue is. And if you've read other posts I've written recently, I am not the server admin of websphere 5.0. I can't read the errors or logs and I can't even access anything on the server. I just ftp an ear file and from there the server admins scripts are run to install, update, or delete the application. So at this point, the server admin said nothing changed, and i'm stuck.

Not sure how to fix the,

Error 404: No target servlet configured for uri

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

What was the change that you made? Sounds like perhaps you wiped out the Servlet mapping. Could you post the web.xml file for the J2EE/WebSphere application, without comprising your application security? Maybe then we can help to troubleshoot the web module.

-Cameron McKenzie
william gates
Ranch Hand

Joined: Feb 21, 2007
Posts: 112
It seems to be working now, however the Login Form I've created is being completely ignored.

When i try to access the secure section, a prompt box automatically pops up rather than my jsp Form and I can type in the username and password and then forwards it to the next section or forwards it to some default websphere error page if unsuccessful.

I set the web.xml to FORM based but for whatever reason it seems to be automatically using Basic Authentication.

Here is what the web.xml file looks like with variables changed.

<?xml version="1.0" encoding="ISO-8859-1"?>
< !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">
<description>testing web application</description>
< !-- <distributable><distributable> -->
<param-value>jdbc dbc b2</param-value>
< !-- <filter></filter> -->
< !-- <filter-mapping></filter-mapping> -->
< !-- <listener></listener> -->







< !-- <mime-mapping></mime-mapping> -->




< !-- <resource-env-ref></resource-env-ref> -->

< !-- <resource-ref><br /> <res-ref-name>jdbc/abcTest</res-ref-name><br /> <res-type>javax.sql.dataSource</res-type><br /> <res-auth>Container</res-auth><br /> <res-sharing-scope>Shareable</res-sharing-scope><br /> </resource-ref><br /> -->

<display-name>Cims Login Security</display-name>
<web-resource-name>Login Protected Area</web-resource-name>
< !-- Define the context-relative URL(s) to be protected -->
< !-- If you list http methods, only those methods are protected -->
< !-- Anyone with one of the listed roles may access this area -->


< !-- Login configuration uses form-based authentication -->

< !-- <security-role></security-role> -->
< !-- <env-entry></env-entry> -->
< !-- <ejb-ref></ejb-ref> -->
< !-- <ejb-local-ref></ejb-local-ref> -->

Not sure why the jsp form is being completely ignored.

I agree. Here's the link:
subject: web.xml
It's not a secret anymore!