tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Can't figure out directory structure (again:-(
Date Mon, 24 Jul 2006 11:34:03 GMT
According to the configurations you posted, the full path of your login 
servlet is /smsinfo/smsinfo/login.  I doubt that was what you were 
really after.  The URL mapping in web.xml is relative to the webapp, not 
the root.

Also, if this is tomcat 5.x, you should put your <Context> definition in 
it's own xml file in conf/Catalina/localhost.  Context definitions in 
server.xml is discouraged in newer tomcat versions.

--David

aladdin wrote:

>I had this all working with some basic jsp pages and a (one) servlet.  I went
>to continue to build on my application, and all of a sudden, it broke again.
>
>I changed a lot of code (html, jsp, and java), but none of the configuration files,
>I don't think (but, you know how that goes).  All of a sudden, it can't find the
>"requested resource".  It gets through apache (so I'm assuming the workers
>stuff is OK), and the message comes from tomcat.  The problem starts on a
>jsp login page where the germane element is:
>
><form name="loginForm" method="post" action="/smsinfo/login">
>    <!--           rest of stuff in form                  -->
></form>
>
>Here is the germane part of the server.xml file:
>---------------------------------------------------------------
>
>      <Host name="localhost" appBase="/var/www/webapps"
>       unpackWARs="true" autoDeploy="true"
>       xmlValidation="false" xmlNamespaceAware="false">
>
>	<Context path="/smsinfo"
>	         docBase="smsinfo"
>		 crossContext="true"
>	         reloadable="true">
>
>             <Resource name="jdbc/smsinfo" auth="Container" type="javax.sql.DataSource"
>	               maxActive="20" maxIdle="5" maxWait="10000" username="anw"
>		       password="anw111" driverClassName="com.mysql.jdbc.Driver"
>		       url="jdbc:mysql://localhost:3306/smsinfo?autoReconnect=true"/>
>        </Context>
>
>      </Host>
>---------------------------------------------------------------------
>
>Here is the web.xml file:
>---------------------------------
><?xml version="1.0" encoding="ISO-8859-1"?>
>
><!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>
>
>  <!-- First, let's define the servlets and their mappings -->
>  <!-- User authentication and validation -->
>  <servlet>
>      <servlet-name>login</servlet-name>
>      <servlet-class>UserConfig.login</servlet-class>
>  </servlet>
>  <servlet-mapping>
>      <servlet-name>login</servlet-name>
>      <url-pattern>/smsinfo/login</url-pattern>
>  </servlet-mapping>
>
></web-app>
>---------------------------------------------------------------------------
>
>The login class in question is located in
>/var/www/webapps/smsinfo/WEB-INF/classes/UserConfig/login.class.
>
>This whole directory thing and where to find stuff with tomcat and apache
>is getting very frustrating.
>
>Thanks for any help!
>anw
>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@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