• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

need help with a JSP/Servlet project

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic