| Author |
Redirect URL Prefix
|
M. Siddiqui
Greenhorn
Joined: Dec 12, 2006
Posts: 3
|
|
I have a JSP with whole bunch of links (HREFs). Now instead of changing all the links is it possible for me to redirect all the links with a prefix. In other words, Suppose example.jsp has a is link to AnotherPage.asp But AnotherPage.asp is moved to a different folder. So obviously the URL changed. Now is it possible for to me to somehow forward all URLs with a specific prefix in my JSP. I would really appreciate some help. Thanks... [ December 12, 2006: Message edited by: Imad Siddiqui ]
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
If, in web.xml, you create servlet entries for each of your JSPs, (using jsp-file elements) you will be able to create servlet-mapping entries with any url-pattern you like. If you're not familiar with servlet-entries, there is a link to the servlet spec in my signature. Look at SRV 13.4.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
Front controllers are brialliant for such puposes as they (usually) abstract the references. See this article for an explanation.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Redirect URL Prefix
|
|
|