Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

refresh a page using jsp

Posted on 2004-08-18
4
Medium Priority
?
898 Views
Last Modified: 2008-03-10
Is it possible to refresh a page using jsp?, or embed a html refresh within jsp?


0
Comment
Question by:OsdNA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 92

Expert Comment

by:objects
ID: 11837510
sure, a jsp outputs html so just add the html that you need to your page.
0
 
LVL 1

Accepted Solution

by:
DS_CL earned 200 total points
ID: 11837515
Yes.  There are many ways to do this.  It depends on what you mean by refresh the page.  Here are two examples to refresh a page, the first uses jsp to embed a meta tag to refresh the page continually.  The second uses the jsp header to refresh the page every time a user clicks the refresh button.

- Using jsp to create HTML meta tags (
<%
out.println("<meta http-equiv=\"refresh\" content=\"1\"/>")
out.println("<meta http-equiv=\"expires\" content=\"0\" />")
%>

- Removing cache so page always reloads
<%
response.setHeader( "Expires", "Tue, 19 August 2003 12:00:00 GMT" );
response.setHeader( "Cache-Control", "no-store, no-cache, must-revalidate" );
response.addHeader( "Cache-Control", "post-check=0, pre-check=0" );
response.setHeader( "Pragma", "no-cache" );
%>
0
 

Expert Comment

by:iglez
ID: 11897077
Html

<meta http-equiv="refresh" content="10; URL=http://url.com">

JSP

response.sendRedirect("URL");

Java Script

setTimeout("location.href='URL'",10000)

good luck
0
 

Author Comment

by:OsdNA
ID: 12198844

Thanks :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

WooCommerce is becoming the most powerful e-commerce plugin for Wordpress. And why not. The platform comprises of numerous core plugins that may come in handy, powerful options to make your website development task much easier.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question