Hi Jitin,

Get the privilage column value from the database.
if(privilage.equals("user"))
{
res.sendRedirect("http://hostname:8080/servlet/servlet1");
}
else
if(privilage.equals("admin"))
{
res.sendRedirect("http://hostname:8080/servlet/servlet2");
}


I hope this will serve your purpose.

Poornima Visvesvaran.



--- Jitin Narula <[EMAIL PROTECTED]> wrote:
> hi all,
> how do i redirect from a servlet to another servlet
> depending on the results
> from the database.
> actually i am making an user authentication form in
> servlest using oracle
> db. which would contain a privilage coloumn in it
> ,depending on the
> privilage coloumn result i have to redirect the user
> to another servlet.
>
> ____________________________________________
> Jitin Narula
> HCL TECHNOLOGIES LTD.
> A1CD,SECTOR-16,NOIDA - 201301(U.P.)INDIA
> Phone - 91-0118-4516321/28 EXT. - 1100.
> Fax - 91-0118-4516315
> E-Mail - [EMAIL PROTECTED]
> ____________________________________________
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to