cancel
Showing results for 
Search instead for 
Did you mean: 

Auto redirect HTMLB page

Former Member
0 Kudos

Guess you all know it. Just in case...

this.getDocument().setHeadRawText(<meta http-equiv=\"refresh\" content=\"SEC; url=" + URL+ "\" />");

where SEC = second to wait before redirect

URL = Redirect to this URL. URL could be url of the "this" HTMLB page (to keep it refreshing...)

Message was edited by: Rajeev Madnawat

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Has anyone managed to get this working?

Former Member
0 Kudos

mydocu.setHeadRawText("<meta http-equiv=\"refresh\" content=\"SEC; url=" + URL + "/>");

--- replace SEC by a numeric value and try again.

Former Member
0 Kudos

Hi Rajeev,

I write this code:

IPageContext myContext = PageContextFactory.createPageContext(request, response);

if (myContext == null) {

System.out.println("htmlb service did not start up as expected.");

}

String URL = "http://www.google.it";

Document mydocu = myContext.getDocument();

if (mydocu == null) {

mydocu = myContext.createDocument("Pagina da redirigere");

mydocu.setHeadRawText("<meta http-equiv=\"refresh\" content=\"SEC; url=" + URL + "/>");

but don't work!

Please could you tell me the correct instructions?

Stefano