Re: web.xml, url-pattern

2005-09-12 Thread Mark Thomas

Trond Hersløv wrote:

But, if I try using wildcards, eg. url-pattern/*foxer/url-pattern it doesent 
work anymore.


Correct. Wildcards are not supported for mapping paths. Read the 
servlet spec for more details.



If I try to map the servlet so that it seems like a jsp-page 
url-pattern/foxer.jsp/url-pattern, it doesn't work at all.


Also correct. There is a server-wide mapping for *.jsp (wild cards are 
supported for extension mapping) in $TOMCAT_HOME/conf/web.xml



In the book I also read that I should be able to access the servlet even if 
it's not mapped up in web.xml. http://www.mymachine.no/servlet/foxer Ofcourse 
this does also not work.


This is using the invoker servlet, which is disabled by default.


Who can explain how to use the url-pattern and maybe tell me where I can find 
some documentation on how to configure web.xml


The servlet spec.



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



RE: web.xml, url-pattern

2005-09-12 Thread Trond Hersløv
Hi
Thanks a lot for clarifying that. At the bottom you say: the servlet spec.
Im reading The J2EE 1.4 Tutorial, for Sun Java System Application Server 
Platform. Isnt Tomcat the referential project for this technologi?

Can you please be so kind and explain what the servlet spec. has to do with 
configuring the deployment descriptor.

Could you give me a link to the servlet spec?

Thanks again,
Trond



-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: 12. september 2005 20:17
To: Tomcat Users List
Subject: Re: web.xml, url-pattern

Trond Hersløv wrote:
 But, if I try using wildcards, eg. url-pattern/*foxer/url-pattern it 
 doesent work anymore.

Correct. Wildcards are not supported for mapping paths. Read the 
servlet spec for more details.

 If I try to map the servlet so that it seems like a jsp-page 
 url-pattern/foxer.jsp/url-pattern, it doesn't work at all.

Also correct. There is a server-wide mapping for *.jsp (wild cards are 
supported for extension mapping) in $TOMCAT_HOME/conf/web.xml

 In the book I also read that I should be able to access the servlet even if 
 it's not mapped up in web.xml. http://www.mymachine.no/servlet/foxer Ofcourse 
 this does also not work.

This is using the invoker servlet, which is disabled by default.

 Who can explain how to use the url-pattern and maybe tell me where I can 
 find some documentation on how to configure web.xml

The servlet spec.



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


**
This email message has been swept by
MIMEsweeper for the presence of computer viruses.
**


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



Re: web.xml, url-pattern

2005-09-12 Thread Mark Thomas

Trond Hersløv wrote:

Can you please be so kind and explain what the servlet spec. has to do with 
configuring the deployment descriptor.


The servlet specification defines the format of the deployment 
descriptor and this therefore the definitive reference for what is, 
and is not, allowed.



Could you give me a link to the servlet spec?


Would it have killed you to do a Google or to search the Sun/Java
website?

http://java.sun.com/products/servlet/docs.html
http://java.sun.com/products/servlet/reference/api/index.html




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



Re: web.xml, url-pattern

2005-09-12 Thread Hassan Schroeder

Trond Hersløv wrote:

Can you please be so kind and explain what the servlet spec. has 

 to do with configuring the deployment descriptor.

Chapter SRV.13: Deployment Descriptor


Could you give me a link to the servlet spec?


Download from:
http://java.sun.com/products/servlet/reference/api/index.html

HTH!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



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



web.xml, url-pattern

2005-09-08 Thread Trond Hersløv
Hi! I'm running Tomcat 5.5.9 and I'm struggeling getting the grip of how to 
work with the deployment descriptor. 
If I do the following (the web.xml below) I can access the TestServlet with:
http://www.mymachine.no/foxer and I get the correct output.

But, if I try using wildcards, eg. url-pattern/*foxer/url-pattern it doesent 
work anymore. In fact it seems like the astrisk is not interpreted as a 
wildcard but a normal character. I can accsses the servlet with 
http://www.mymachine.no/*foxser.

If I try to map the servlet so that it seems like a jsp-page 
url-pattern/foxer.jsp/url-pattern, it doesn't work at all.

In the Java Servlet  JSP Cookbook by Bruce W. Perry from O`Reilly I have 
read what I know about web.xml, but maybe it has been som changes in how 
version 5.5.9 works.

In the book I also read that I should be able to access the servlet even if 
it's not mapped up in web.xml. http://www.mymachine.no/servlet/foxer Ofcourse 
this does also not work.

Who can explain how to use the url-pattern and maybe tell me where I can find 
some documentation on how to configure web.xml

Thanks in advance
Trond


?xml version=1.0 encoding=ISO-8859-1?
web-app
servlet
servlet-namefoobar/servlet-name
servlet-classcom.tdev.test.TestServlet/servlet-class
/servlet

servlet-mapping
servlet-namefoobar/servlet-name
url-pattern/foxer/url-pattern
/servlet-mapping
/web-app



**
This email message has been swept by
MIMEsweeper for the presence of computer viruses.
**


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



Tomcat web.xml url-pattern Apache httpd.conf VirtualHost xxx.com DocumentRoot

2003-09-17 Thread Bart Lenoir
Hi,

Currently i'm having virtual hosts (subdomains) on Apache-2:
abc.xxx.com
def.xxx.com
ghi.xxx.com
... with different DocumentRoots!

On Tomcat-5 i have a servlet 'file' with url-pattern/file/url-pattern

On workers2.properties i have [uri:/docs/*]

This makes that i got the following:
abc.xxx.com/docs/file
def.xxx.com/docs/file
ghi.xxx.com/docs/file
... and all three of them are showing the expected results.

But i only want:
abc.xxx.com/docs/file

and not:
def.xxx.com/docs/file
ghi.xxx.com/docs/file

What to do to make a servlet for one subdomain only?

Thanks,
b.


http://WWW.ADVENTUREFORUM.NET - Forum on World Travel and Adventure -

http://WWW.ADVENTUREFORUM.NET/worldfacts 

http://WWW.ADVENTUREFORUM.NET/worldnews


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



Tomcat web.xml url-pattern Apache httpd.conf VirtualHost xxx.com DocumentRoot

2003-09-16 Thread [EMAIL PROTECTED]
Hi,

Currently i'm having virtual hosts (subdomains) on Apache-2:
abc.xxx.com
def.xxx.com
ghi.xxx.com
... with different DocumentRoots!

On Tomcat-5 i have a servlet 'file' with url-pattern/file/url-pattern

On workers2.properties i have [uri:/docs/*]

This makes that i got the following:
abc.xxx.com/docs/file
def.xxx.com/docs/file
ghi.xxx.com/docs/file
... and all three of them are showing the expected results.

But i only want:
abc.xxx.com/docs/file

and not:
def.xxx.com/docs/file
ghi.xxx.com/docs/file

What to do to make a servlet for one subdomain only?

Thanks,
b.


http://WWW.ADVENTUREFORUM.NET - Forum on World Travel and Adventure -

http://WWW.ADVENTUREFORUM.NET/worldfacts 

http://WWW.ADVENTUREFORUM.NET/worldnews


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



web.xml url-pattern and apache conf

2001-05-17 Thread Mark Papiani


I am running the test servlets supplied with Tomcat but the url-pattern 
directives do not appear to work.

My context is /test/servlet and based on apache conf and web.xml below, the 
following work OK:

http://myhost:port/test/servlet/servlet1
http://myhost:port/test/servlet/servlet4

even this pattern works:

http://myhost:port/test/servlet/b.bop

which invokes servlet4 because of the mapping
servlet-nameservlet4/servlet-name
url-pattern*.bop/url-pattern

However, any pattern with a / in it does not work, e.g.

http://myhost:port/test/servlet/calendar
http://myhost:port/test/servlet/calendar/
http://myhost:port/test/servlet/baz/a

despite:
servlet-nameservlet2/servlet-name
url-pattern/baz/*/url-pattern
/servlet-mapping
servlet-mapping
servlet-nameservlet3/servlet-name
url-pattern/catalog/url-pattern


I would be very grateful for any suggestions.

Thanks
Mark
[EMAIL PROTECTED]

--


apache conf:

...
Alias /test /home/papiani/cmd/jakarta-tomcat-3.2.1/webapps/test
Directory /home/papiani/cmd/jakarta-tomcat-3.2.1/webapps/test
Options Indexes FollowSymLinks
/Directory
ApJServMount /test/servlet /test
Location /test/WEB-INF/
AllowOverride None
deny from all
/Location
Location /test/META-INF/
AllowOverride None
deny from all
/Location



---
web.xml
...
web-app
servlet
servlet-name
servlet1
/servlet-name
servlet-class
requestMap.Servlet1
/servlet-class
/servlet
servlet
servlet-name
servlet2
/servlet-name
servlet-class
requestMap.Servlet2
/servlet-class
/servlet
servlet
servlet-name
servlet3
/servlet-name
servlet-class
requestMap.Servlet3
/servlet-class
/servlet
servlet
servlet-name
servlet4
/servlet-name
servlet-class
requestMap.Servlet4
/servlet-class
/servlet

...

servlet-mapping
servlet-name
servlet1
/servlet-name
url-pattern
/foo/bar/*
/url-pattern
/servlet-mapping
servlet-mapping
servlet-name
servlet2
/servlet-name
url-pattern
/baz/*
/url-pattern
/servlet-mapping
servlet-mapping
servlet-name
servlet3
/servlet-name
url-pattern
/catalog
/url-pattern
/servlet-mapping
servlet-mapping
servlet-name
servlet4
/servlet-name
url-pattern
*.bop
/url-pattern
/servlet-mapping



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.