How to pass a value from one jsp to another jsp page?

前端 未结 4 1729
不知归路
不知归路 2020-11-27 06:29

I have two jsp pages: search.jsp and update.jsp.

When I run search.jsp then one value fetches from database and I store that

4条回答
  •  面向向阳花
    2020-11-27 07:18

    Use sessions

    On your search.jsp

    Put your scard in sessions using session.setAttribute("scard","scard")

    //the 1st variable is the string name that you will retrieve in ur next page,and the 2nd variable is the its value,i.e the scard value.

    And in your next page you retrieve it using session.getAttribute("scard")

    UPDATE

    "/>
    

提交回复
热议问题