This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSP and the fly likes response.sendRedirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "response.sendRedirect" Watch "response.sendRedirect" New topic


visa valli

Joined: Jan 09, 2007
Posts: 1
Hi All,

I am facing a problem while doing this redirection.

I have written two jsp files.
One is pleasewait.jsp and other Quote.jsp
Quote.jsp has for loop iteration.

The flow is from pleasewait to Quote.For each iteration of for loop in quote the loop variable value has to be displayed in pleasewait.jsp and again come back to quote.jsp to start the next iteration..

Can you please give suggestion to do this.I need the count variable value in quote.jsp to be displayed in pleasewait.jsp for each iteration.

I have tried some code please have a look

<form >

<h1>JSP Page</h1>

String j="";
int k=0;

System.out.println("Within please wait count"+j);


String j="";
int k=0;
int count=0;
for(int m=k; m<3 ;m++)
System.out.println("Count value "+count);


sessionvariable is global variable initialized to 0
pawank gupta
Ranch Hand

Joined: Jun 07, 2006
Posts: 34
pass script variable "count" as <%=count%> tag in your redirecting url
Rao Raghu
Ranch Hand

Joined: Jan 05, 2007
Posts: 100
You have not mentioned what problem you are facing or what exception you are getting. and also when you are retrieving a session object you have to cast it to java.lang.String and when setting a session object cast it to java.lang.Object.

RAGHU<br /> <br />"When the going gets tough, the tough get going"
I agree. Here's the link:
subject: response.sendRedirect
It's not a secret anymore!