how to pass value from one application to another

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shwetha M
    New Member
    • Dec 2011
    • 1

    how to pass value from one application to another

    Hi,

    I am trying to access the userid in application2 which was set in the application1 . But i am getting the value as null. Could someone help me out with this ?

    Thanks,
    Shwetha
  • Sivaranjani
    New Member
    • Dec 2011
    • 16

    #2
    Are u post the Userid from application1 to application2 via Url?

    Comment

    • swapnil shelar
      New Member
      • Dec 2011
      • 1

      #3
      page 1:
      Code:
      <html>
      <head>
      <title>Login Page of EMS</title>
      </head>
      <body bgcolor="green">
      <center>
      <h1>Welcome</h1>
      <form action="next.jsp">
      		User Name:<input type="text" name="t1" />
              <p/>
              Password:<input type="password" name="t2" />
              <p/> 
             <input type="submit">
      
      </form>
      </center>
      </body>
      </html>
      
      page 2:
      <html>
      <%
      int id=t1.getParameter();
      int pwd=t2.getParameter();
      
      if(id.equals("admin")&&pwd.equals("admin"))
          out.print("Success");
      else
          out.print("fail");
      %>
      </html>
      you can also use the get() and post() methods of html.
      Last edited by Niheel; Dec 30 '11, 02:59 PM.

      Comment

      Working...