File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts Refresh Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Refresh Page" Watch "Struts Refresh Page" New topic

Struts Refresh Page

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704

What's the best way to do an HTML equivalent of a meta-refresh in struts? For example, to make a page to automatically refresh every 10 seconds.

One (good?) method would be just to use an HTML meta tag. The only difficulty is the URL value. Currently, when I construct a link, I use struts tags to fully resolve it. For example, in an html:form tag, the action value is converted from "/buildWidget" to "/myApp/buildWidget". Is there a struts tag I can use to insert the fully resolved URL inside the meta tag?

Or is there a better way to do page refreshes in struts all together?

My Blog: Down Home Country Coding with Scott Selikoff
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704

Nevermind about the inserting the URL part, I forgot I could use a c:url to insert the URL.

Back to my original question though, what is the best way for a page refresh in struts? Just an HTML meta tag?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'd suggest using the JSTL <c:url> tag, which also prepends the context to the url.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Struts Refresh Page