Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

need help with a JSP/Servlet project

 
Farooq Ali
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I am developing an office management/intranet based upon JSP/Servlets. I need urgent help!!
Heres the project
*-- the users are categorized in 3 cats
*-- when they log on thru web browser (intranet) they are directed to different JSP pages specific to their job designation.
*-- then there is series of JSP pages which are accessed by the users.
now I have created a Servlet(controller servlet) which first takes the login/pw from the http request, connects to the DB , verifies the login/pw then loads different JSP pages by checking the employee cat.
now first of all how do I maintain the session??
& second how do I send information regarding the employee from lets say
1.jsp to 2.jsp??
I would really appreciate the help
& should I use EJBs or would regular beans be ok

Farooq
 
Randall Twede
Ranch Hand
Posts: 4521
6
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You should actually use setAttribute() and getAttribute() since putValue() and getValue() are deprecated.
The javascript was just to get me out of frames.
Hope that helps

[This message has been edited by Randall Twede (edited March 24, 2001).]
 
Farooq Ali
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Randall
now another question....
*-- would this session object (created in the servlet) be accessible to all the jsp pages.
*-- & how can I forward the request recieved by the controlling servlet to the following jsp pages??
simply by passing them into the session object??
thanks alot
Farooq
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Farooq,
1. Yes, objects put in session are available to all jsp pages in the same web application
( provided your jsp pages participate in session. Any way , the default is all jsp pages participate in session unless you
purposly make in <@page session=false... %> in your jsp page! )
2.
Use either .forward or .include of RequestDispatcher. A sample code is

We can forward to .html/.jsp/anyServlet resource.
But the /Login/login.jsp is the virtual path of browser URL.
regds
maha anna

[This message has been edited by maha anna (edited March 26, 2001).]
 
Farooq Ali
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Maha
you guys have been a great help.
I just started doing a new job without any experience....
I am a mechanical engineer just switched to IT
& they have given me this project to do all by myself.
So I will be bugging my trusted buddies @ javaranch for guidance
who btw guided in clearing my SCJP exam
take care
Farooq
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!