|
Hi all !
I am using the following code....to do some
validation for user authentication.
/construct the requested
path
HttpUtils util=new HttpUtils(); LastUrl=new StringBuffer(""); LastUrl=util.getRequestURL(request); LastUrl.append("?" + request.getQueryString()); session.putValue("LastUrl",LastUrl.toString()); // check for user authentication
first
checkUser(); ( this method returns boolean valid
// Get the request-dispatcher, to send an order-summary to the
client
RequestDispatcher userForward = getServletContext().getRequestDispatcher("/Login.jrun");
// Have the servlet summarize the order; skip summary on
error.
if (userForward != null) { try { userForward.include(request, response); } catch (IOException e) { } catch (ServletException e) { } } } From the Login.jrun.In the doPost method I send out
the foolowing htm code
if(valid)
{
loginOut.write("<meta http-equiv=\"refresh\" content=\"4;" + (String)session.getValue("LastUrl") + "\">"); loginOut.newLine(); } But after 4 seconds, I get the same Login.jrun
page....What is wrong here ?
I tired to print the value for
(String)session.getValue("LastUrl") and it is what i want..but it does not
appear so !
Second how can i specify no-cache...!
Thanks all !
Gautam
|
