• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with getting parameters from the URL and the fields within my JSP  RSS feed

 
phillip nash
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all.

I'm currently developing a system which allows the user to login to perform their activities.
As a requirement, I'm developing a way for the user to reset their password if they forget.
Now, my web service is tied to a database, where it generates a unique token (expires after a certain amount of time)
and emails this to the user, for them to click and reset their password etc. The URL (with the unique token) they click is a JSP page, where I have
two fields and a "Submit" button.

Something like this which gets email to the user http://localhost:8080/resetPassword.jsp?token=UNIQUE_TOKEN

As a security measure, I have two seperate JSP pages. One which is public accessible (contains the unique token, button, and two text fields),
and one that is inside the WEB-INF folder. I can forward the token parameter from the public accessible JSP to the JSP page inside the WEB-INF folder.


Is there a way that I can grab all of the parameters from the text fields on the JSP page and token, to send this off to my webservice.

Thanks
 
Saif Asif
Ranch Hand
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Philip,

Just a suggestion. How about you a form on the public page with 3 fields
1 hidden field -> your token. just populate it via JavaScript just as soon as the page loads
2 text fileds -> for name and password ( I am guessing its a password reset page from your URL)

Then submit this form to the JSP to WEB_INF one and you will get all the 3 params in that JSP.

However, this is just one way of doing it , there can be other.
 
Lalit Mehra
Ranch Hand
Posts: 384
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Philip,

First of all we can't access your localhost

Anyways,
Why don't you try getting to the jsp page through a servlet. In that get the token from the database and use it in your submission jsp.

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!