Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


how to pass value from one jsp to another jsp page


how to pass value from one jsp to another jsp page  using -'java,jsp'

Hi i  have two jsp page   search.jsp,update.jsp.
when i run search.jsp then one value fetch from database and i store that value in a variable called scard now i want to use that variable value in another jsp page. i do not want to use request.getparameter()

here is my code

 <%
         String scard="";
         String id=request.getParameter("id");

try
                {


String selectStoredProc = "SELECT * FROM Councel WHERE CouncelRegNo ='"+id+"'";

                        PreparedStatement ps = cn.prepareStatement(selectStoredProc);
                    ResultSet rs=ps.executeQuery();
                    while(rs.next()) {
                  scard=rs.getString(23);

                    }
                    rs.close();
                    rs = null;
                }
                catch (Exception e) {
                    out.println(e.getLocalizedMessage());
                }
                finally {     
                }


          %>


how can i achieve this?

Thanks in advance
    

asked Oct 19, 2015 by bhavin
0 votes
6 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...