tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Williams" <...@csunv.com>
Subject RE: Directory Structure and Can't Find Resources in Tomcat
Date Sun, 21 May 2006 00:49:47 GMT
Sorry, it didn't work.  Once again, in my browser I have:

HTTP Status 404 - /login
Type: Status report
Message: /login
Description: The requested resource (/login) is not available.
Apache Tomcat/5.0
*************************************
Here is the suggested line directly from my login.jsp:

<form name="loginForm" method="post" action="/login">
*************************************
Here is my entire web.xml file:

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">

<web-app>
<servlet>
    <servlet-name>login</servlet-name>
    <servlet-class>UserConfig.login</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>login</servlet-name>
    <!-- url-pattern>/servlet/login</url-pattern -->
    <url-pattern>/login</url-pattern>
</servlet-mapping>
</web-app>

All the rest (directory structure, etc.) is as in my first post.

-----Original Message-----
From: Hassan Schroeder [mailto:hassan.schroeder@gmail.com]
Sent: Saturday, May 20, 2006 2:19 PM
To: Tomcat Users List
Subject: Re: Directory Structure and Can't Find Resources in Tomcat


On 5/19/06, Allen Williams <anw@csunv.com> wrote:

>         <form name="loginForm" method="post"
> action="WEB-INF/classes/UserConfig.login">

You can't directly address something under WEB-INF; your action
should be something like `action="/login"` with a mapping in your
web.xml like

<servlet>
   <servlet-name>login</servlet-name>
   <servlet-class>UserConfig.login</servlet-class>
</servlet>
<servlet-mapping>
   <servlet-name>login</servlet-name>
   <url-pattern>/login</url-pattern>
</servlet-mapping>

Note: NO "/servlet" in there -- read the Tomcat doc or google for
"Tomcat invoker servlet" to understand why...

HTH,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message