Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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

jsp refreshing the action class method

 
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I have a jsp page which refreshes after every 2 seconds like below.

<meta http-equiv="refresh" content="2;url="SomeAction.do">

Whenever the jsp is refreshed it should call the SomeAction's processAction method.

But right now, after every 2 seconds instead of refreshing the same JSP,
it takes me to the previous one.

what is wrong? Can some one please let me know as I am stuck with this for more that 2/3 days.

Thanks,
trupti
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the struts-config.xml

SomeAction is forwarding you to that page.
 
trupti nigam
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry I gave the wrong information..

<%@ page import= "com.web.action.*" %>
<meta http-equiv="refresh" content="2;url=SomeAction.do">

now after 2 seconds,
it displayes the below message:

The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

--------------------------------------------------------------------------------

Please try the following:

If you typed the page address in the Address bar, make sure that it is spelled correctly.

Open the localhost:7001 home page, and then look for links to the information you want.
Click the Back button to try another link.
Click Search to look for information on the Internet.


HTTP 400 - Bad Request
Internet Explorer


Please help me..

thanks,
Trupti
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
url should be an absolute, not relative
Here's a trick:


[ September 08, 2004: Message edited by: Marc Peabody ]
 
trupti nigam
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marc,

It worked..
Thanks a lot.
The mistake was I was not including the absolute path and in the action name there was small spelling mistake..

thanks,
Trupti
reply
    Bookmark Topic Watch Topic
  • New Topic