Source Code : Duplicated session varaibles

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Duplicated session varaibles

<jsp:useBean id="myBookBean"   class="com.java2s.Book"
             scope="session">
  <%-- The setProperty tag is only executed when a JavaBean is created --%>
  <jsp:setProperty name="myBookBean" property="author" value="Joe" />
</jsp:useBean>

<html>
  <head>
    <title>When a JavaBean already exists...</title>
  </head>
  <body>
    The author of your book is <jsp:getProperty name="myBookBean"
                                                property="author" /><P>

    Click <a href="beanAlreadyExists2.jsp">here</a> to see another page that
    declares a JavaBean that uses the same name and scope.
  </body>
</html>

//beanAlreadyExists2.jsp

<jsp:useBean id="myBookBean"   class="com.java2s.Book"
             scope="session" />

<html>
  <head>
    <title>When a JavaBean already exists...</title>
  </head>
  <body>
    This page redeclares the JavaBean, but does not set any of its properties.
    The same name and scope were used for the JavaBean, so the original bean
    is used.
    <P>
    The author of your book is <jsp:getProperty name="myBookBean"
                                                property="author" /><P>
  </body>
</html>


           
       

Thank with us