Results 1 to 7 of 7
  1. #1
    ServletEst is offline Member
    Join Date
    Aug 2009
    Posts
    4
    Rep Power
    0

    Default Servlet calling a new html page within it.

    i have a servlet page that velidates a users login and welocmes the user.
    i want to call another page within the servlet when the user logs in

  2. #2
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    6

    Default

    what do you mean another page?
    you may use new URL(xxx) to make request to other pages

  3. #3
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    797
    Rep Power
    6

    Default

    u keep a flag.

    1.After logging in set the flag true.

    2.Then using sendirect RequestDispatcher object u call another page if the flag is true.
    Ramya:cool:

  4. #4
    ServletEst is offline Member
    Join Date
    Aug 2009
    Posts
    4
    Rep Power
    0

    Default

    thank u guy i ll try using one of those option and get back at u. tanks

  5. #5
    ServletEst is offline Member
    Join Date
    Aug 2009
    Posts
    4
    Rep Power
    0

    Default

    i gues i ll have to use the include method of the request dispatcher.

  6. #6
    dyapasrikanth is offline Member
    Join Date
    Sep 2009
    Posts
    11
    Rep Power
    0

    Default

    redirecting to the new html page is not recommended because it is a static page, their you doesn't hava any control.
    i.e if any one copy the new html page path then they will enter into that page without using the userlogin page.
    so use jsp page or servlet as a new html page

  7. #7
    amit_m04 is offline Member
    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    0

    Default

    use sendRedirect and also check the session i think that this should help you so even if the user tries to go to the userLogin page directly ovedr there check if the session is available or not.. i think that this should work..

Similar Threads

  1. calling up servlet from Html
    By mosto in forum Java Servlet
    Replies: 7
    Last Post: 10-18-2009, 03:38 PM
  2. how can i link html+servlet+xml to form servlet
    By balachandarr in forum Java Servlet
    Replies: 0
    Last Post: 04-15-2009, 04:06 PM
  3. Servlet should return a jsp page not html
    By hannehomuth in forum Advanced Java
    Replies: 1
    Last Post: 08-12-2008, 03:14 PM
  4. Servlet calling JSP page
    By gapper in forum Java Servlet
    Replies: 1
    Last Post: 01-15-2008, 04:00 PM
  5. MIDLet calling Servlet
    By ravian in forum Java Servlet
    Replies: 1
    Last Post: 12-06-2007, 12:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •