This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create Session  RSS feed

 
Rameez Shaik
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I created a web application where i need to include Sessions management.

Lets consider three pages "Login.html", "Validation.java" (servlet) , "HomePage.jsp";

In the login.html form i have set action as Validation.java which is a servlet for validation of data from database.

And when Validation is successful then it directs to homepage.jsp . I want to know how to set Session for this application.

I have tried following steps but unable to go through.

> i have set the session in homepage.jsp as



But i get the session as null. please let me know if any thing i am missing?

Thanks
Rameez.



 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First validate user in Servlet and then write like this


get that session in jsp use JSTL not Scriptlets
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!