RE: Help with servlet mapping

2001-02-09 Thread Wesley Ribeiro
Title: RE: Help with servlet mapping





I've solved it. It seems that the file $TOMCAT_HOME/conf/web.xml is no longer considered in Tomcat 3.2.1.
You have to put your web.xml in the Web-inf directory where your files are.
Now I have one more problem:
If I start Tomcat from the command-line, everything works fine. But, if I start it as a NT service, the servlets/JSP cannot

access the database. The following error message is given:


Starting tomcat. Check logs/tomcat.log for error messages 
SQL Exception opening DB connection:java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

URL: jdbc:odbc:workdb
UserName: PUBLIC
SQL State: IM002
Message: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Vendor: 0 


I have configured the wrapper.properties file according to the documentation, and everything but the database access seems to work.

Can anyone help ? Should I change something in the server.xml file ?
Thanks,


Wesley


PS: I'm using WinNT4sp6 and JDK1.3.0_01.


-Original Message-
From: Ribeiro, Wesley [CMPS:2852-A:EXCH] 
Sent: quinta-feira, 8 de fevereiro de 2001 13:28
To: Tomcat User mailing list
Subject: Help with servlet mapping


Hi !


Can you please help me solve the following problem (sorry if this is a naive
question) :


I'm trying to make Tomcat 3.2.1 to invoke a servlet (class myServlet in
package com.mycompany) 
whenever I use this URL: http://myServer/myServlet
In order to do that, I've added to the $TOMCAT_HOME/conf/web.xml:


 servlet
 servlet-name
  myServlet
 /servlet-name
 servlet-class
 com.mycompany.myServlet
 /servlet-class
 /servlet


 servlet-mapping
 servlet-name
 myServlet
 /servlet-name
 url-pattern
 /myServlet
 /url-pattern
 /servlet-mapping


However, all I get is a 404 error when I try the URL above mentioned. The
class com.mycompany.myServlet is in
the CLASSPATH, and this used to work with Tomcat 3.1, so I don't know what
I'm doing wrong.
One thing I noticed is that the classes
org.apache.tomcat.servlets.DefaultServlet and 
org.apache.tomcat.servlets.InvokerServlet are no longer part of
$TOMCAT_HOME/lib/webserver.jar, although they
continue to be mentioned in the default $TOMCAT_HOME/conf/web.xml file. Can
this be the cause of this problem ?
One other thing I noticed is that the $TOMCAT_HOME/conf/server.xml file has
an entry like:


 RequestInterceptor 
 className=org.apache.tomcat.request.InvokerInterceptor 
 debug=0 prefix=/servlet/ /


If I remove or comment that, the servlet examples which come with the
distribution stop working (i.e., the servlet 
examples work because of this entry, and not because of the
$TOMCAT_HOME/conf/web.xml file).
Thanks in advance for any help,


Wesley 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]





RE: Help with servlet mapping

2001-02-09 Thread Wesley Ribeiro
Title: RE: Help with servlet mapping





That solved it. Thanks a lot,


Wesley


-Original Message-
From: Luc Vanlerberghe [SMTP:[EMAIL PROTECTED]]
Sent: sexta-feira, 9 de fevereiro de 2001 11:43
To: [EMAIL PROTECTED]
Subject: Re: Help with servlet mapping


You probably configured workdb as a *User* DSN under ODBC.
Either configure your service to run using the same userid as the one
you defined your datasource for, or use a *System* DSN.


Luc Vanlerberghe


Wesley Ribeiro wrote:
 
 I've solved it. It seems that the file $TOMCAT_HOME/conf/web.xml is no
 longer considered in Tomcat 3.2.1.
 You have to put your web.xml in the Web-inf directory where your files
 are.
 Now I have one more problem:
 If I start Tomcat from the command-line, everything works fine. But,
 if I start it as a NT service, the servlets/JSP cannot
 
 access the database. The following error message is given:
 
 Starting tomcat. Check logs/tomcat.log for error messages
 SQL Exception opening DB connection:java.sql.SQLException:
 [Microsoft][ODBC Driver Manager] Data source name not found and no
 default driver specified
 
 URL: jdbc:odbc:workdb
 UserName: PUBLIC
 SQL State: IM002
 Message: [Microsoft][ODBC Driver Manager] Data source name not found
 and no default driver specified
 Vendor: 0
 
 I have configured the wrapper.properties file according to the
 documentation, and everything but the database access seems to work.
 
 Can anyone help ? Should I change something in the server.xml file ?
 Thanks,
 
 Wesley
 
 PS: I'm using WinNT4sp6 and JDK1.3.0_01.





Help with servlet mapping

2001-02-08 Thread Wesley Ribeiro

Hi !

Can you please help me solve the following problem (sorry if this is a naive
question) :

I'm trying to make Tomcat 3.2.1 to invoke a servlet (class myServlet in
package com.mycompany) 
whenever I use this URL: http://myServer/myServlet
In order to do that, I've added to the $TOMCAT_HOME/conf/web.xml:

servlet
servlet-name
myServlet
/servlet-name
servlet-class
com.mycompany.myServlet
/servlet-class
/servlet

servlet-mapping
servlet-name
myServlet
/servlet-name
url-pattern
/myServlet
/url-pattern
/servlet-mapping

However, all I get is a 404 error when I try the URL above mentioned. The
class com.mycompany.myServlet is in
the CLASSPATH, and this used to work with Tomcat 3.1, so I don't know what
I'm doing wrong.
One thing I noticed is that the classes
org.apache.tomcat.servlets.DefaultServlet and 
org.apache.tomcat.servlets.InvokerServlet are no longer part of
$TOMCAT_HOME/lib/webserver.jar, although they
continue to be mentioned in the default $TOMCAT_HOME/conf/web.xml file. Can
this be the cause of this problem ?
One other thing I noticed is that the $TOMCAT_HOME/conf/server.xml file has
an entry like:

RequestInterceptor 
className="org.apache.tomcat.request.InvokerInterceptor" 
debug="0" prefix="/servlet/" /

If I remove or comment that, the servlet examples which come with the
distribution stop working (i.e., the servlet 
examples work because of this entry, and not because of the
$TOMCAT_HOME/conf/web.xml file).
Thanks in advance for any help,

Wesley 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]