Brian Woo

Greenhorn
+ Follow
since Feb 27, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brian Woo

That works!! Thanks very much for your help. Really appriecated.
19 years ago
I just got tomcat 5.5.7 setup and just did my testing servlet. The path to access the servlet is:

http://localhos:8080/servlet/HelloWorld
19 years ago
Thanks for your reply.

I have done what you told me: having "/testWml.html" in the url-pattern in web.xml.

I also have debug statements in the doFilter() but when I access http://server:8080/imsld/COMP200/testWml.html, there is nothing printed out.

Tomcat is not recognizing the url-pattern. Has anybody have the similar problem? Any solution?

Thanks.
19 years ago
Hi all,

I am trying to use a filter in Tomcat 4.1.30 (servlet 2.3 compatible). My problem is in the web.xml at the url-pattern tag.

I have the following filter and filter mapping:

<filter>
<filter-name>transcoderFilter</filter-name>
<filter-class>com.cj.h2w.transcoderFilter</filter-class>
<init-param>
<param-name>dir</param-name>
<param-value>/home/bwoo/workspace/imsld/COMP200_wml</param-value>
</init-param>
<init-param>
<param-name>url</param-name>
<param-value>http://192.168.2.6:8080/imsld/COMP200</param-value>;
</init-param>
</filter>
<filter-mapping>
<filter-name>transcoderFilter</filter-name>
<url-pattern>testWml.html</url-pattern>
</filter-mapping>

However, the filter will not startup and give the following exception:

SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> testWml.html in filter mapping
at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:1509)

But why? I have read the Sun's Servlet 2.3 Spec and it says it's possible to specify whole file name to match, but it's not working at all. Is it a bug in Tomcat 4.1.x?

Thanks very much.
19 years ago