This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes when tomcat know Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "when tomcat know "*" as "any"?" Watch "when tomcat know "*" as "any"?" New topic
Author

when tomcat know "*" as "any"?

zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
hello
my "web.xml" as follow:


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>freak</servlet-name>
<servlet-class>FreakServlet</servlet-class>
<init-param>
<param-name>waitInterval</param-name>
<param-value>5</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>freak</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>

i confuse with the "url-pattern" tag,when i special "*.do",in the browser,"http://localhost:8080/freak/a.do" works well.
if "/*.do",then "http://localhost:8080/freak/a.do" don't work(page not found),but "http://localhost:8080/freak/*.do" works.
if "/*",all of them works.and you can cancatenate any string to "http://localhost:8080/freak/".

i wonder when the tomcat know the "*" as "any".
thanks in advance!
 
wood burning stoves
 
subject: when tomcat know "*" as "any"?
 
Similar Threads
Deploying the application
Can we use multiple Controllers in a single web-application?
config Implicit Variable - Major Doubt
Servlets with Tomcat 4
SERVLET MAP