RE: Redirect question

2001-01-22 Thread David Oxley

Ok. I knew that I could do it with a cookie. Thanks anyway. But is there
anyway of putting onto the request and doing an HTTP POST much like a form
submit?

Dave.
[EMAIL PROTECTED]

-Original Message-
From: Andy Nuss [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2001 22:43
To: '[EMAIL PROTECTED]'
Subject: RE: Redirect question



1)original jsp

HttpSession session = req.getSession(false);
MyParams params = new MyParams("a", "b", "c");
String retrieveid = "QUICK_RETRIEVE" + "/myredirect.jsp" + new
Object().hashCode();
session.setAttribute(retrieveid, params);
Cookie ck = new Cookie("QUICK_RETRIEVE", retrieveid);
ck.setPath("/myredirect.jsp");
resp.addCookie(ck);
resp.sendRedirect("/myredirect.jsp");

2)  redirected jsp

HttpSession session = req.getSession(false);
Cookie[] cks = req.getCookies();
Cookie ck = findCookieByNamePath(cks, "QUICK_RETRIEVE",
"/myredirect.jsp");
MyParams params = (MyParams)session.getAttribute(ck.getValue());


-Original Message-
From: David Oxley [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 21, 2001 6:02 AM
To: [EMAIL PROTECTED]
Subject: Redirect question


When sending a HttpServletResponse resp.sendRedirect how can I specify
parameters without having them appear on the URL in the browser address bar?

Thanks.
Dave.
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Redirect question

2001-01-22 Thread Michael Wentzel

I don't know how the flow of your webapp is working in this
situation but if you put the following in the referrer to 
the first jsp or possibly on your first jsp and ACTION="redirect.jsp"
depending on you work flow:

FORM ... ACTION="page1.jsp"
INPUT TYPE="hidden" NAME="var1" VALUE="value1"
INPUT TYPE="hidden" NAME="var2" VALUE="value2"
INPUT TYPE="hidden" NAME="var3" VALUE="value3"
...
/FORM

The values will be in the request if you handle navigation
by submitting the form.

The only reason this would be programmatically better than the
previous solution is if it can not be assumed that the user
has cookies enabled or if cookies are not even an option per
project specs.


---
Michael Wentzel
Software Developer
A HREF="http://www.aswethink.com"Software As We Think/A
A HREF="mailto:[EMAIL PROTECTED]"Michael Wentzel/A

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Redirect question

2001-01-21 Thread Andy Nuss


1)original jsp

HttpSession session = req.getSession(false);
MyParams params = new MyParams("a", "b", "c");
String retrieveid = "QUICK_RETRIEVE" + "/myredirect.jsp" + new
Object().hashCode();
session.setAttribute(retrieveid, params);
Cookie ck = new Cookie("QUICK_RETRIEVE", retrieveid);
ck.setPath("/myredirect.jsp");
resp.addCookie(ck);
resp.sendRedirect("/myredirect.jsp");

2)  redirected jsp

HttpSession session = req.getSession(false);
Cookie[] cks = req.getCookies();
Cookie ck = findCookieByNamePath(cks, "QUICK_RETRIEVE",
"/myredirect.jsp");
MyParams params = (MyParams)session.getAttribute(ck.getValue());


-Original Message-
From: David Oxley [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 21, 2001 6:02 AM
To: [EMAIL PROTECTED]
Subject: Redirect question


When sending a HttpServletResponse resp.sendRedirect how can I specify
parameters without having them appear on the URL in the browser address bar?

Thanks.
Dave.
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]