• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Javascript redirect

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! This is my first post here, so I'm hopeful that someone can help me directly. (As opposed to all the wonderful indirect help I've gotten searching the archives before!)

I currently am trying to mimic a behavior that was set up on another internal website before I arrived at the company I work at. This behavior takes and redirects via javascript from an index.jsp page and sends it off to the Struts processes to display the proper information. (See code below)



As of now, I can easily get the redirection to work, however, I cannot get the Struts processes to execute when arriving at the intended uri. They *do* work on refreshing the page though. So I am completely confused!

Anyone have any ideas that I might find helpful?

Thanks,
-TerriLyn
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why is this being done on the client and not the server? seems strange to me.

It it is working on refresh, I am guessing that the page is cached in the browser and that refresh fetches a new version. If you clear the cache does it hit the server?

what if you try:


Eric
 
Terri Layman
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
Why is this being done on the client and not the server? seems strange to me.



The idea is to give the user the address of: http://www.exampleserver.com/florida then have the index.jsp in the /florida directory handle the shunt off to the florida module. (Does that make sense to you?)

It it is working on refresh, I am guessing that the page is cached in the browser and that refresh fetches a new version. If you clear the cache does it hit the server?



I hadn't tried that yet, but I don't think that'll fix it, as I seem to have the problem off a fresh session.


what if you try:


Eric



I just tried that and got the same result. *sigh* Is there a way to achieve the same goal all on the server side somehow?

If needed, I can post my ACTION code...

Thanks,
-Terri
 
Sheriff
Posts: 67537
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best way would be to set up your Struts action as the "welcome file" in the deployment descriptor.
 
Terri Layman
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
The best way would be to set up your Struts action as the "welcome file" in the deployment descriptor.



Ok, but how would that affect the rest of the site? I still need the regular /index.jsp to be the main welcome page for the site. This is a sub-site for a special contract group on this furniture line.
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic