Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 25th, 2010, 10:10 PM
Authorized User
 
Join Date: May 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Display String value for given period

I have two string value

String string1="msg1";
String string2="msg2";

In my jsp i would like to display the string1 value for only 30 seconds(without refreshing the page), after 30 seconds completed i need to display only string2 value continuously.

How to achieve this ?

Last edited by cloudsuser; June 25th, 2010 at 10:33 PM..
 
Old June 25th, 2010, 11:28 PM
Authorized User
 
Join Date: May 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Example

I would like to execute this code in my jsp. how to do ?

public class ProgressBar extends Thread {

private String progressMessage = null;
private String statusMessage = null;

public ProgressBar(String progressMessage, String statusMessage) {
super(progressMessage);
this.progressMessage = progressMessage;
this.statusMessage = statusMessage;
}

@Override
public void run() {

try {
System.out.println(progressMessage);
Thread.sleep(30000);
System.out.println(statusMessage);


} catch (Exception e) {
}

}

public static void main(String[] args) {
ProgressBar s1 = new ProgressBar("In Progress", "Successfully executed...");
s1.start();
}
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
Display the Length of the String kulfi BOOK: Beginning Microsoft Visual Basic 2010 15 December 30th, 2010 04:41 PM
Display attribute and particular string in different color rangeshram XSLT 1 October 30th, 2009 06:49 PM
Display a string in GridView istead of DB dilipv General .NET 2 March 4th, 2008 04:57 AM
Trouble display complete string in table BrendonMelville ASP.NET 1.0 and 1.1 Basics 4 February 27th, 2006 10:58 AM
Display 0 currency as Null String echovue Access 5 August 11th, 2005 02:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.