This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Open a JSP page without doing hardcoded the credential in hyperlink.  RSS feed

 
Suresh Raatoori
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one JSP page(a.jsp) and when I try to open this page it asks for username and password. I want to open this JSP page through a html page(b.html) with the help of hyperlink. One way is; If I hard coded the username and password in the hyperlink i.e. <a href="http://xyz.com:8080/rpt/a.jsp?USERNAME=admin&PASSWORD=admin"> Click here to check </a>. but this way is not secure.

Could someone please help me how can I open the JSP file without doing hardcoded the credential in hyperlink something like with the help of setting session attribute. Do let me know if any more clarification is needed.

Cheers!
 
vipul bondugula
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi suresh,

You can set in both request and session scope.
My Advice is to set in session scope.After using them you just remove them from session..
 
Suresh Raatoori
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vipul,

Thanks for your reply....
Can you please tell me the excat code to put the credential in session scope.

Regards,
Suresh
 
Arun Chidam
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Suresh,

Please read this link which explains about SessionManagement and check sample code examples here
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!