Hi All,
Thanks to Jean-Pierre the for the alwaysUseFullPath suggestion. It did
solve my problem where I was mapping /foo/[a-z]* to a servlet, but I am
running into another quandary.
When I map longer URL's the code seems to break. I am trying to map
/journal/entry/2003-aug10/test/DSCN5023.jpg
to a web form. My project-servlet.xml looks like:
<bean id="urlMapping" class="...">
<property name="alwaysUseFullPath"><value>true</value></property>
<property name="mappings">
<props>
<prop key="/journal/entry.html">JournalEntryForm</prop>
<prop key="/journal/entry/*">JournalEntryForm</prop>
...
</props>
</property>
</bean>
and within my web.xml I use the following:
<servlet-mapping>
<servlet-name>project451</servlet-name>
<url-pattern>/journal/*</url-pattern>
</servlet-mapping>
I have tracked down the problem to PathMatcher.java where the conditional
"patIdxStart > patIdxEnd" seems to disallow my URL to be properly mapped.
As a test I just return true at that spot and everything is fine.
Am I doing something wrong or is there a problem with the path matcher?
Thanks,
Martin
---
PS Here's some debug output from within PathMatcher in that if statement:
looking for '/journal/entry/2003-aug10/test/DSCN5023.jpg' in
'/journal/entry/*'
pattern=/journal/entry/*
str=/journal/entry/2003-aug10/test/DSCN5023.jpg
patIdxStart=3
patIdxEnd=2
strIdxStart=3
strIdxEnd=4
returning false 3a
|