Link to home
Start Free TrialLog in
Avatar of smriti priyanka
smriti priyanka

asked on

How to forward object from Servlet to jsp in the Eclipse

How to forward one object from Servlet to Jsp page and display its content at the front End.What code to write in the servlet. I am using eclipse as the IDE.
Avatar of rrz
rrz
Flag of United States of America image

As you can see at
https://docs.oracle.com/cd/E19798-01/821-1841/6nmq2cov8/index.html   
You can share information between web components by using scope objects.
Are you creating a Session?
What type of object do you want to share?
As far as the word "forward" goes, you can forward a request. In a request, you can set an object in a request attribute.
Avatar of smriti priyanka
smriti priyanka

ASKER

@rrz yes I am creating a session.
I have user defined object and i want to display its content in the jsp page.
how to display contents of user defined object in jsp page,I have that object in the servlet and want to display its content in the jsp page.
@ rrz also please explain different types of scope object in Layman's language ,I am not able to differentiate between all these 4 types of scope object.
ASKER CERTIFIED SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial