communication between two jsp's

anyone can help mei have one jsp page with two text fields(UNAME,PWORD).when i click a change-password link the values in these textfields should pass to the other jsp page.i used set and getAttribute methods but no result please help me
[258 byte] By [jameela] at [2007-10-2 23:59:51]
# 1

In stead of making the link a direct link to the change password page, turn the link into a javascript call that submits the form

<a href="javascript://" onClick="document.yourform.submit(); return false;">change password</a>

Make the form submit to your change password page.

gimbal2a at 2007-7-14 16:47:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

In addition to get parameters passed to a page/servlet you should use the request.getParameter() method and not request.getAttribute() one.

See http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html

You can test this by calling your target jsp page directly and adding the parameters to the URL.

e.g.

http://localhost/app/changePassword.jsp?UNAME=name&PASSWORD=mypassword

In your changePassword.jsp you can then get the values by calling

request.getParameter("UNAME");

request.getParameter("PASSWORD");

dapachecoa at 2007-7-14 16:47:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...