Hi,
I'm having a page like below :

<html><head><body>
<FONT COLOR=RED SIZE=5>
<%@page import ="com.ui.CTransactionManager"%>
<%@page import ="com.ui.CUser"%>
<%
String UserId = request.getParameter("UserId");
CTransactionManager objmanager = new CTransactionManager();
CUser user = objmanager.getUser(UserId);
String m_staff_id = user.getStaffId();
out.print( "Staff Id : " +m_staff_id );
%>
</font></body></head></html>

here i want to pass the m_staff_id field to next page which i'm redirecting from here. Can any one advice how to achive this.

QueryString

<%
   String var="10";
   String url="page1.jsp?no=" + var;
   response.sendRedirect(url);
%>

code of page1.jsp should be,

<%
  String no=request.getParameter("no");
  ...
%>

Session,

<%
   session.setAttribute("name","Mr.X");
   response.sendRedirect("page2.jsp");
%>

code of page2.jsp will be,

<%
   String name=(String)session.getAttribute("name");
   ....
%>
This question has already been answered. Start a new discussion instead.