You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lindomar <li...@bol.com.br> on 2002/09/19 15:13:56 UTC
web.xml
Hi everyone!
I have a problem with mapping to my servlets.
I have this structure in tomcat 4.1
myapp
|_WEB-INF
|_classes
|_subdir1
|_subdir2
|_ myServlet.class
I want to mapping this servlet this way: http://localhost:8080/myapp/oneid
I placed this code in web.xml on my app.
***
...
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>subdir1.subdir2.myServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/oneid</url-pattern>
</servlet-mapping>
</web-app>
..
***
What's wrong or missing?
Thanks in advanced.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: web.xml
Posted by Lindomar <li...@bol.com.br>.
Ok Vincent. Thanks.
But, i remove this problem...in fact, the problem is my web.xml file, the
mapping that i put, don't work.
If i write http://localhost:8080/teste/servlet/HelloWorldExample, works.
But, http://localhost:8080/teste/hi don't work.
And i search something in log, but i can't found anything.
It's really a problem...
----- Original Message -----
From: <Vi...@answare.fr>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Friday, September 20, 2002 5:31 AM
Subject: RE: web.xml
Hello,
I have found your error...
Your config files are correct!
The error became from the HelloWorld servlet.
If you enter on the code, to see what it really do ;-)
you can see that it use a LocalString properties file.
Your servlet cannot function because this file missing.
That's all.
By, Vincent.
-----Message d'origine-----
De : Lindomar [mailto:lindomar.silva@bol.com.br]
teste
|_index.html
|_WEB-INF
|_classes
|_HelloWorldExample.class
|_web.xml
***
<?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/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>myteste</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
myteste
</servlet-name>
<url-pattern>
/hi
</url-pattern>
</servlet-mapping>
</web-app>
***
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: web.xml
Posted by Vi...@answare.fr.
Hello,
I have found your error...
Your config files are correct!
The error became from the HelloWorld servlet.
If you enter on the code, to see what it really do ;-)
you can see that it use a LocalString properties file.
Your servlet cannot function because this file missing.
That's all.
By, Vincent.
-----Message d'origine-----
De : Lindomar [mailto:lindomar.silva@bol.com.br]
Envoyé : jeudi 19 septembre 2002 17:10
À : Tomcat Users List
Objet : Re: web.xml
I can't see file localhost_myapp_log, i only found localhost_examples_log,
localhost_admin_log and localhost_log.
I search something in localhost_log, but i don't find anything.
Let me take a few of your time.
Well, i created a new app (teste) :
teste
|_index.html
|_WEB-INF
|_classes
|_HelloWorldExample.class
|_web.xml
The class HelloWorldExample it's work in
localhost:8080/examples/servlet/HelloWorldExample, then i copied it.
The file web.xml is:
***
<?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/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>myteste</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
myteste
</servlet-name>
<url-pattern>
/hi
</url-pattern>
</servlet-mapping>
</web-app>
***
When i put http://localhost:8080/teste ->It's ok, i see my index.html
But when i put http://localhost:8080/teste/hi -> don't works!?
I see this on page:
##
HTTP Status 404 - /teste/hi
type Status report
message /teste/hi
description The requested resource (/teste/hi) is not available
##
And i can't found anything in log files about this exception.
What do i? I don't have an idea...i only install tomcat 4.1, i don't
configurate anything more.
Thank's for your attention.
----- Original Message -----
From: <Vi...@answare.fr>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Thursday, September 19, 2002 11:36 AM
Subject: RE: web.xml
Quer ter seu próprio endereço na Internet?
Garanta já o seu e ainda ganhe cinco e-mails personalizados.
DomíniosBOL - http://dominios.bol.com.br
What the tomcat's log say?
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: web.xml
Posted by Lindomar <li...@bol.com.br>.
I can't see file localhost_myapp_log, i only found localhost_examples_log,
localhost_admin_log and localhost_log.
I search something in localhost_log, but i don't find anything.
Let me take a few of your time.
Well, i created a new app (teste) :
teste
|_index.html
|_WEB-INF
|_classes
|_HelloWorldExample.class
|_web.xml
The class HelloWorldExample it's work in
localhost:8080/examples/servlet/HelloWorldExample, then i copied it.
The file web.xml is:
***
<?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/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>myteste</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
myteste
</servlet-name>
<url-pattern>
/hi
</url-pattern>
</servlet-mapping>
</web-app>
***
When i put http://localhost:8080/teste ->It's ok, i see my index.html
But when i put http://localhost:8080/teste/hi -> don't works!?
I see this on page:
##
HTTP Status 404 - /teste/hi
type Status report
message /teste/hi
description The requested resource (/teste/hi) is not available
##
And i can't found anything in log files about this exception.
What do i? I don't have an idea...i only install tomcat 4.1, i don't
configurate anything more.
Thank's for your attention.
----- Original Message -----
From: <Vi...@answare.fr>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Thursday, September 19, 2002 11:36 AM
Subject: RE: web.xml
Quer ter seu próprio endereço na Internet?
Garanta já o seu e ainda ganhe cinco e-mails personalizados.
DomíniosBOL - http://dominios.bol.com.br
What the tomcat's log say?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: web.xml
Posted by Vi...@answare.fr.
What the tomcat's log say?
-----Message d'origine-----
De : Lindomar [mailto:lindomar.silva@bol.com.br]
Envoyé : jeudi 19 septembre 2002 16:18
À : Tomcat Users List
Objet : Re: web.xml
Hi Vincet. Thanks for your reply.
My tomcat's example run.
The error is :
HTTP Status 404 - /myapp/oneid/
The requested resource (/myapp/oneid) is not available
Note: I got directory myapp of tomcat 3.2.3, and i placed on 4.1.
Thanks again!
----- Original Message -----
From: <Vi...@answare.fr>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Thursday, September 19, 2002 10:37 AM
Subject: RE: web.xml
Quer ter seu próprio endereço na Internet?
Garanta já o seu e ainda ganhe cinco e-mails personalizados.
DomíniosBOL - http://dominios.bol.com.br
Nothing's wrong, nothing's missing.
Your problem isn't here.
Does the Tomcat's examples run?
Which error do you get?
-----Message d'origine-----
De : Lindomar [mailto:lindomar.silva@bol.com.br]
Envoyé : jeudi 19 septembre 2002 15:14
À : Tomcat Users List
Objet : web.xml
Hi everyone!
I have a problem with mapping to my servlets.
I have this structure in tomcat 4.1
myapp
|_WEB-INF
|_classes
|_subdir1
|_subdir2
|_ myServlet.class
I want to mapping this servlet this way: http://localhost:8080/myapp/oneid
I placed this code in web.xml on my app.
***
...
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>subdir1.subdir2.myServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/oneid</url-pattern>
</servlet-mapping>
</web-app>
..
***
What's wrong or missing?
Thanks in advanced.
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: web.xml
Posted by Lindomar <li...@bol.com.br>.
Hi Vincet. Thanks for your reply.
My tomcat's example run.
The error is :
HTTP Status 404 - /myapp/oneid/
The requested resource (/myapp/oneid) is not available
Note: I got directory myapp of tomcat 3.2.3, and i placed on 4.1.
Thanks again!
----- Original Message -----
From: <Vi...@answare.fr>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Thursday, September 19, 2002 10:37 AM
Subject: RE: web.xml
Quer ter seu próprio endereço na Internet?
Garanta já o seu e ainda ganhe cinco e-mails personalizados.
DomíniosBOL - http://dominios.bol.com.br
Nothing's wrong, nothing's missing.
Your problem isn't here.
Does the Tomcat's examples run?
Which error do you get?
-----Message d'origine-----
De : Lindomar [mailto:lindomar.silva@bol.com.br]
Envoyé : jeudi 19 septembre 2002 15:14
À : Tomcat Users List
Objet : web.xml
Hi everyone!
I have a problem with mapping to my servlets.
I have this structure in tomcat 4.1
myapp
|_WEB-INF
|_classes
|_subdir1
|_subdir2
|_ myServlet.class
I want to mapping this servlet this way: http://localhost:8080/myapp/oneid
I placed this code in web.xml on my app.
***
...
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>subdir1.subdir2.myServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/oneid</url-pattern>
</servlet-mapping>
</web-app>
..
***
What's wrong or missing?
Thanks in advanced.
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: web.xml
Posted by Vi...@answare.fr.
Nothing's wrong, nothing's missing.
Your problem isn't here.
Does the Tomcat's examples run?
Which error do you get?
-----Message d'origine-----
De : Lindomar [mailto:lindomar.silva@bol.com.br]
Envoyé : jeudi 19 septembre 2002 15:14
À : Tomcat Users List
Objet : web.xml
Hi everyone!
I have a problem with mapping to my servlets.
I have this structure in tomcat 4.1
myapp
|_WEB-INF
|_classes
|_subdir1
|_subdir2
|_ myServlet.class
I want to mapping this servlet this way: http://localhost:8080/myapp/oneid
I placed this code in web.xml on my app.
***
...
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>subdir1.subdir2.myServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/oneid</url-pattern>
</servlet-mapping>
</web-app>
..
***
What's wrong or missing?
Thanks in advanced.
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: web.xml
Posted by Miguel Angel Mulero Martinez <mi...@mad.tecsidel.es>.
That's all ok for me. Take a look to the tomcat log files to see if there's
another error.
-----Mensaje original-----
De: Lindomar [mailto:lindomar.silva@bol.com.br]
Enviado el: jueves, 19 de septiembre de 2002 15:14
Para: Tomcat Users List
Asunto: web.xml
Hi everyone!
I have a problem with mapping to my servlets.
I have this structure in tomcat 4.1
myapp
|_WEB-INF
|_classes
|_subdir1
|_subdir2
|_ myServlet.class
I want to mapping this servlet this way: http://localhost:8080/myapp/oneid
I placed this code in web.xml on my app.
***
...
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>subdir1.subdir2.myServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/oneid</url-pattern>
</servlet-mapping>
</web-app>
..
***
What's wrong or missing?
Thanks in advanced.
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>