• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web.xml and Url-mapping.

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Studying for SCWCD, I'm on the partwith url mapping.

It doesn't seem that you can combine extension mappings and path mappings ?

Eg.

<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/MyApp/Myservlet1/*.jsp</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Servlet2</servlet-name>
<url-pattern>/MyApp/Myservlet1/*.someotherextension</url-pattern>
</servlet-mapping>
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't combine extension mappings with path mappings, as you said. However, you could get this same functionality if you just put all of your files with the same extension in a subfolder.

So, instead of

/myGenericFolder/*.jsp

You could use

/myGenericFolder/myJSPs/*
 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Very good solution!

Leena
 
reply
    Bookmark Topic Watch Topic
  • New Topic