|
From: =?iso-8859-1?Q?<jp....@ti...> - 2003-08-22 10:15:36
|
Hi Martin,=0D=0A=0D=0AI use also wildcards in one of my Spring applicatio=
ns. I just set =0D=0Aproperty "alwaysUseFullPath" in the urlMapping as be=
low to handle=0D=0Aa scenario like yours in web.xml. Have you tried this?=
Solves this your issue?=0D=0A=0D=0A<bean id=3D"urlMapping" class=3D"org.=
springframework.web.servlet.handler.SimpleUrlHandlerMapping">=0D=0A. . . =
=0D=0A<property name=3D"alwaysUseFullPath"><value>true</value></property>=
=0D=0A</bean>=0D=0A=0D=0ARegards,=0D=0AJean-Pierre=0D=0A=0D=0A---------- =
Initial Header -----------=0D=0A=0D=0AFrom : springframework-develop=
er-...@li...=0D=0ATo : Spring Developer <sprin=
gfr...@li...>=0D=0ACc : =0D=0ADate=
: Thu, 21 Aug 2003 19:53:48 -0700=0D=0ASubject : [Springframework-d=
eveloper] URL Mapping with Wildcards=0D=0A=0D=0AHi,=0D=0A=0D=0AI am writi=
ng to the developer group for some guidance.=0D=0A=0D=0AI have been using=
the Spring framework for some time. I originally used the=0D=0Asource t=
hat came with Rod's great J2EE book along with a handful of custom=0D=0Ap=
ieces. Seeing how the work has turned into a viable framework I am=0D=0A=
migrating to the 0.9.1 release.=0D=0A=0D=0AWith the project I am working =
on I need to map URLs that end in wildcards to=0D=0Aservlets for processi=
ng. I have found the current release needs a bit of=0D=0Aupdating to wor=
k properly.=0D=0A=0D=0AThe current release does not seem to handle=0D=0A=0D=
=0A <servlet-mapping>=0D=0A <servlet-name>servletName</servlet-nam=
e>=0D=0A <url-pattern>/start/*</url-pattern>=0D=0A </servlet-mappi=
ng>=0D=0A =0D=0Avery well. To fix this problem I updated my local impl=
ementations of=0D=0AAbstractUrlHandlerMapping and PropertiesMethodNameRes=
olver and replaced=0D=0A=0D=0A String lookupPath =3D WebUtils.getLookupP=
athForRequest(request,=0D=0A this.alwaysUseFullPath);=0D=0A=0D=0Awith=0D=
=0A=0D=0A String lookupPath =3D request.getRequestURI();=0D=0A=0D=0Aafte=
r which the code maps the URL correctly. It is a hack and it works but=0D=
=0AI would like to see the framework correctly handle these type of reque=
st.=0D=0AAnother symptom of the current code was that it seemed to work f=
or /foo* or=0D=0Aeven /foo/bar* but not /foo/*.=0D=0A=0D=0AIs there anybo=
dy in the developer group that wants to tackle this issue?=0D=0AShould I =
look at CVS and submit a patch?=0D=0A=0D=0AThanks,=0D=0A=0D=0AMartin=0D=0A=
=0D=0A=0D=0A=0D=0A=0D=0A-------------------------------------------------=
------=0D=0AThis SF.net email is sponsored by: VM Ware=0D=0AWith VMware y=
ou can run multiple operating systems on a single machine.=0D=0AWITHOUT R=
EBOOTING! Mix Linux / Windows / Novell virtual machines=0D=0Aat the same =
time. Free trial click here:http://www.vmware.com/wl/offer/358/0=0D=0A___=
____________________________________________=0D=0ASpringframework-develop=
er mailing lis...@li...=0D=0A=
https://lists.sourceforge.net/lists/listinfo/springframework-developer=0D=
=0A=0A=0A********** L'ADSL A 20 EUR/MOIS**********=0ATiscali propose l'AD=
SL le moins cher du march=E9 : 20 EUR/mois et le modem ADSL offert ! =0AP=
our profiter de cette offre exceptionnelle, cliquez ici : http://register=
.tiscali.fr/adsl/=0AOffre soumise =E0 conditions.=0A
|