• 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

Immediate page forwarding

 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a way with javascript that I can forward to another page?
I have an apache server automatically forwarding requests to an index.html page in my web app, and I am looking for that to be instantly forwarded to a jsp.
Any replies appreciated.
Cheers
George
 
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi George

But there's also a special meta-tag for it:
<meta http-equiv="refresh" content="0; URL=http://www.yourdomain.de/forward.jsp">
that better because js may be swiched off.
Also you can configure your webcontainer's welcome/default file list. In Tomcat 4 you find it in conf/web.xml at the very botton for general or in your webapps web-inf/web.xml for webapp-specific purpose
[ May 09, 2003: Message edited by: Christian Baron ]
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Christian,
I configured the web-app, but there's a combination of a weblogic apache plug-in and apache virtual hosting that seems to ignore my web app welcome list, and automatically forwards to the index.html page. Which is the reason this question cropped up.
So if I use the meta tag,should it still be surrounded by tags as in the following

or should it be just that line in the page by itself?
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just rigth, doesn't it work ?
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just tried it, it works perfectly, thanks
 
The moustache of a titan! The ad of a flea:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic