Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

How do servlet mapping in web.xml that the path information is not lost  RSS feed

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my spring application I am using SiteMesh also.

I have a servlet mapping (web.xml) as given below for my dispatcher servlet


The site mesh filter is configured as given below


The decorator file for the site mesh contains the following mapping


The problem is when I use a URL with /excellink/screener/a.view It doesn't reach to the site mesh file which is excelScreenerShell.jsp.
but if I use a URL /screener/a.view it works !!!

That means the servlet mapping for NgpServlet removes the path /excellink

Is there any way to fix this with out touching the servlet mapping or changing the map in the decorator file ?

 
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anoop..

How about if you configure your Dispatcher Servlet like this :


try to remove "excellink"..
please correct me if i'm wrong..

 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leonardo ,
Thank you for taking time to look in to my problem.
I know this solution already but this will break another application

I am just looking for a solution in web.xml with out changing the existing mappings
 
Marshal
Posts: 67192
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Leonardo Carreira wrote:How about if you configure your Dispatcher Servlet like this :


mapping "/*" is never a good idea. That means that all requests, including those to images, CSS files, JavaScript files, JSP files and so one will be routed to the servlet.
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops sorry..

Thanks Bear for your attention..
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!