• 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

 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please tell me more about Web.xml, what i intend to do is there are 2 jsp pages , a.jsp and b.jsp . suppose any user tries to query b.jsp it should automatically redirected to a.jsp!!! is there a way to do this in web.xml file
 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In first JSP page at begining include following code...
<jsp:forward page="URL for JSP2">
<jsp aram name="paramname" value="paramvalue">
</jsp>
Second line is required only if u have any parameters to send...
Rgds
Manohar
 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no i think u did not yet understand my question!!! what i want is if a user queries b.jsp in the location bar of browser then he should be automatically taken to a.jsp thats what i need.
 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add following script at begining of b.jsp
<script type=text/javascript>
function doIt() {
if (navigator.appName.indexOf("Netscape") != -1)
window.location = "URL for JSPa";
if (navigator.appName.indexOf("Microsoft") != -1)
window.location = "URL for JSPa";
else{
document.location = "URL for JSPa";
}
}
onload=doIt;
</script>
 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi manohar,
Thanks a lot for that snippet code , it really works now !!! thanks once more for ur solution . will be back with some more problems
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic