Just like to point out..doing it on a JSP page might cause an endless loop.
As it refreshes, it sees the header again and again each refresh. If you do
want to do this, I suggest putting a counter variable in the http session
and only refresh if it doesn't exist. The second time around it would see
the var is there and NOT return the <meta..> tag, but remove the session var
as well.


> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of TODD HARNEY
> Sent: Thursday, July 27, 2000 10:46 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How to refresh a JSP-Page
>
>
> You could try:
>
> In Servlets anyway,
>
> out.println( "<meta http-equiv=\"Refresh\" content=\"0\">" );
>
> I am sure JSP can do the same thing. The refresh HTTP header will
> cause the page to reload immediately (due to content=0);
>
> >>> [EMAIL PROTECTED] 7/27/00 8:03 >>>
> Hi All,
>
> I have a jsp-page with:
>
> <%@ page session="true"  import = "x.*" %>
> <jsp:useBean id="Bean1" class="x.Bean1" scope="page"/>
> ....
> <%= Bean1.getA() %>.
>
> Here A in Bean1 has the value 1.
> After that A in Bean1 changes to 2.
> So I am implementing a Refresh-Button with:
>
> <INPUT name=Refresh  type=button value=Refresh
> onClick="javascript:refresh()">
> <script language="javascript">
> function refresh(){  window.location.reload();  }
> </script>
>
> When I press the refresh-button, <%= Bean1.getA() %> should show
> a 2, but it
> always
> stays 1.
> I don't know how to manage a real refresh.
> So i hope anybody can tell me how to do this.
> Thanks a lot,
> Herb.
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to