how to get session object in simple java class??

how to get session object in simple java class??

i am fallowing a simple mvc architecture.

actually my problem is....

i am using 4 classes in my work.

1) GroupDetails.jsp

2) GroupPojo.java (simple pojo class which have setters and getters)

3) GroupServlet.java (a servlet class for control)

4) GroupDetailsDao.java (it is also a simple java class which have the jdbc logic)

in JSP : accepting the groupid and groupname from the user. and i am setting the value to GroupPojo.java and set this pojo object into session. sending control to servlet.

in servlet : here i am checking that whether jsp want to insert data or update data or delete the data. base on the jsp request i am calling paticular method in the GroupDetailsDao.java only.

problem......................... is....................

now i need to get that session object (GroupPojo) into GroupDetailsDao.java and i need to perform some operations and finally i need set that grouid and groupname to GroupPojo.java and set this GroupPojo object into session.

so, please tell me, how to get the session object (GroupPojo) in a simple java class (GroupDetailsDao.java)

please help me....

View Answers









Related Tutorials/Questions & Answers:
how to get session object in simple java class??
get a session object - JSP-Servlet
Advertisements
In Java how to get size of class and object?
In Java how to get size of class and object?
Session Object
Session Object
session object
Accessing Session Object
ModuleNotFoundError: No module named 'classix'
Session Object from request
How many cookie object we can store in a session? is there any limit?
ModuleNotFoundError: No module named 'classad'
ModuleNotFoundError: No module named 'classad'
JSP Session Object
Java Get classes In Package
How are Anonymous (inner) classes used in Java?
How many ways can we get the value of current session id?
Get session value in javascript
Error in simple session bean ..................
Java example to get Object class name at runtime
how to get date format in string from date object containing real date in java
how to get date format in string from date object containing real date in java
JSP Implicit object "session"
Java classes
parsing XML file to get java object - XML
Video Tutorial - Classes and Objects in Java
How to get jSon object in servlet from jsp - JSP-Servlet
Java classes
Track user's session using 'session' object in JSP
EJB Deployment how to create a simple ejd session bean and how to do project setup
java classes
Hibernate 4.3.0.Final get session
Get values from session to array
Get values from session to array
how to create a jar file for java classes? - Java Interview Questions
Java example program to get the object's ID
How could we get log file as simple text format
ModuleNotFoundError: No module named 'simple-value-object'
Maven dependency for ch.qos.logback - logback-classic version 1.3.0-alpha14 is released. Learn to use logback-classic version 1.3.0-alpha14 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.4.1 is released. Learn to use logback-classic version 1.4.1 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.3.0-alpha14 is released. Learn to use logback-classic version 1.3.0-alpha14 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.4.5 is released. Learn to use logback-classic version 1.4.5 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.3.5 is released. Learn to use logback-classic version 1.3.5 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.2.11 is released. Learn to use logback-classic version 1.2.11 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.3.0-alpha13 is released. Learn to use logback-classic version 1.3.0-alpha13 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.3.0-alpha12 is released. Learn to use logback-classic version 1.3.0-alpha12 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.2.10 is released. Learn to use logback-classic version 1.2.10 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.3.0-alpha11 is released. Learn to use logback-classic version 1.3.0-alpha11 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 1.2.9 is released. Learn to use logback-classic version 1.2.9 in Maven based Java projects
Maven dependency for ch.qos.logback - logback-classic version 0.2.5 is released. Learn to use logback-classic version 0.2.5 in Maven based Java projects

Ads