Re: tomcat servlet-mapping

2003-09-23 Thread Andoni
Hi Fred,

I have just recently had this problem and found the answer in Chapter 11 of
the servlet specification.

I am using Tomcat 4.0.4 which is Servlet spec. 2.3 which I find here:

http://www.jcp.org/aboutJava/communityprocess/final/jsr053/

also look for messages in this list with url-pattern in the subject.  If
you have not been downloading this list the archives are here:

http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2

If you still can't quite figure your situation out get back again.

Later,

Andoni.

- Original Message -
From: Fred Astaire [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:09 AM
Subject: tomcat servlet-mapping


 Hello guys!
 Is there anybody who could give me an advice in servlet-mapping?

 I got a web application which consists of a ControllerServlet which should
 handles all incoming request´s
 except 2 static html files (index.html which is an welcome file and
 abc.html)!

 First I mapped it like this:

 servlet-mapping
 servlet-nameController/servlet-name
 url-pattern//url-pattern
   /servlet-mapping

 but then the static html files are not reachable

 How could i configure my web.xml , that all requests besides index.html
and
 abc.html
 are mapped to the ControllerServlet?

 Greets
 Fred

 _
 Frustrated with dial-up? Get high-speed for as low as $29.95/month
 (depending on the local service providers in your area).
 https://broadband.msn.com


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




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



RE: tomcat servlet-mapping

2003-09-23 Thread Shapira, Yoav

Howdy,

Is there anybody who could give me an advice in servlet-mapping?

None of us have a clue ;)  Just kidding -- we can probably give it a decent shot.

I got a web application which consists of a ControllerServlet which should
handles all incoming request´s
except 2 static html files (index.html which is an welcome file and
abc.html)!

I've found that all ... except ... type of accesses can be easily handled by the 
servlet itself redirecting for things it can't handle.

Since your exceptions are static, you want tomcat's default servlet to handle them.  
Here's one way to do it:

1. Map the default servlet to url-pattern /static/*
2. Map your servlet to url-pattern /
3. In your servlet, look at the request URL.  If it's one of the two exceptions, 
redirect the request to /static/[whatever the request path was] so that tomcat's 
default servlet can serve it.

There are other approaches to this problem. A purely declarative solution, i.e. doing 
everything in web.xml, will be difficult.

Yoav Shapira




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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