W
wawa_piggy
I have a JSP page which will post to a servlet upon clicking the
"submit" button.
The servlet will perform some processing and then redirect back to the
JSP with all the original form fields prefilled.
Which means i need to have a means for "transferring" a fair amount of
data values from JSP to servlet back to JSP
so i cannot append the data as querystring behind my Url when i do a
response.sendRedirect() from my servlet to JSP.
In my servlet, i have the below code. I try to set the values into a
session before i use a response.sendRedirect() to
direct back to the JSP. But in the JSP, i don't seems to be able to
retrieve back the session values
that i have set in the servlet.
public void service ( HttpServletRequest request, HttpServletResponse
response )
throws ServletException, IOException
{
:
: // processing code
:
HttpSession session = request.getSession(false);
session.setAttribute("empID","TUU565");
:
:
response.sendRedirect(strEncodeUrl);
} // end of service() method
I am using SUNONE server. I need a way to pass values from the servlet
back to JSP.
What am I doing wrong? Or is there any other methods ??
Thank you very much.
"submit" button.
The servlet will perform some processing and then redirect back to the
JSP with all the original form fields prefilled.
Which means i need to have a means for "transferring" a fair amount of
data values from JSP to servlet back to JSP
so i cannot append the data as querystring behind my Url when i do a
response.sendRedirect() from my servlet to JSP.
In my servlet, i have the below code. I try to set the values into a
session before i use a response.sendRedirect() to
direct back to the JSP. But in the JSP, i don't seems to be able to
retrieve back the session values
that i have set in the servlet.
public void service ( HttpServletRequest request, HttpServletResponse
response )
throws ServletException, IOException
{
:
: // processing code
:
HttpSession session = request.getSession(false);
session.setAttribute("empID","TUU565");
:
:
response.sendRedirect(strEncodeUrl);
} // end of service() method
I am using SUNONE server. I need a way to pass values from the servlet
back to JSP.
What am I doing wrong? Or is there any other methods ??
Thank you very much.