Re: login servlet ??

2001-03-01 Thread Nishit Trivedi

In your login servlet, have one init parameter for path (lets call it
'Path') to servletA
Now if your loginsevlet successfully validates things you want, then forward
control to 'Path/servletA'that's it...e.g

String servletAPath = request.getInitParameter("Path");
if(success){
  request.sendRedirect(servletPath+File.separator+"servletA");
}
else{
  //display error page
}


Nishit
-Original Message-
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 1:45 PM
To: [EMAIL PROTECTED]
Subject: login servlet ??


Hi, please don't be mad, I know for you guru it's an easy question, please
bear with me, I am still learning servlets
I am trying to have a login servlet, and other servlets, when I click to a
link of a servletA, I want to loginservlet get invoqued, my question is how
to save the url of the servletA so if the loginservlet success we will
return to servletA
thanks
God helps all
_
Get your FREE download of MSN Explorer at http://explorer.msn.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: login servlet ??

2001-03-01 Thread Vidyasagar Guduru

You can send the servletA's url as a query parameter
or as a hidden value to loginServlet.

--- sufi malak <[EMAIL PROTECTED]> wrote:
> Hi, please don't be mad, I know for you guru it's an
> easy question, please
> bear with me, I am still learning servlets
> I am trying to have a login servlet, and other
> servlets, when I click to a
> link of a servletA, I want to loginservlet get
> invoqued, my question is how
> to save the url of the servletA so if the
> loginservlet success we will
> return to servletA
> thanks
> God helps all
>
_
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body:
> "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: OT Re: login servlet ??

2001-03-01 Thread Geert Van Damme

Like I mailed you personally,
no, it doesn't ;-)
I really like Resin. It's about as good as Orion ;-)

Geert Van Damme

> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Joseph Ottinger
> Sent: donderdag 1 maart 2001 20:50
> To: [EMAIL PROTECTED]
> Subject: OT Re: login servlet ??
>
>
> Oh, come off it, Geert, you KNOW resin sucks!
>
> >From: Geert Van Damme <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: Re: login servlet ??
> >Date: Thu, 1 Mar 2001 20:39:15 +0100
> >
> >That wouldn't give you much safety would it?
> >The least thing you should do is check in the ServletA page whether the
> >user
> >was logged in properly.
> >
> >IMO the best way to do this is to check the access rights in
> every page. If
> >the user hasn't logged in, save the requested URL in a session var and
> >redirect to the loginservlet. After successful login, the servlet can
> >redirect you back to the original location.
> >Check out the tag libraries that are publicly available (at tomcat,
> >JSPTags,
> >JSPinsider ...). There are several examples who do that for you
> with just a
> >few lines of code.
> >Also check out the security options your web server or servlet
> engine gives
> >you. Resin e.g. has a nice system for authentication.
> >
> >Geert Van Damme
> >
> >
> > > -Original Message-
> > > From: A mailing list about Java Server Pages specification
> and reference
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Karau, Joe
> > > Sent: donderdag 1 maart 2001 20:11
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: login servlet ??
> > >
> > >
> > > Sufi, you could encode the url of the servlet, and pass the url of the
> > > servletA as a parameter.
> > > Example href=/servlets/YourLoginServlet?ToServlet=SerlvetA
> > >
> > > Then, in your login servlet simply do a
> > > String forwardTo = request.getParameter("ToServlet");
> > >
> > > and the "forwardTo" String will be the url of the servlet that
> >you
> > > originally linked to.
> > >
> > > To be on the safe side though, you may wish to encode the URL of
> >servletA
> > > using:
> > >
> > > href=/servlets/YourLoginServlet?ToServlet=<%=java.net.URLEncoder.e
> > > ncode(stri
> > > ng_of_servletA_url)%>
> > >
> > >
> > >
> > > Joseph Karau
> > > Kingland Systems
> > > [EMAIL PROTECTED]
> > > 507-536-3629
> > > AIM: jkara3629
> > >
> > >
> > > -Original Message-
> > > From: sufi malak [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, March 01, 2001 12:45 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: login servlet ??
> > >
> > >
> > > Hi, please don't be mad, I know for you guru it's an easy question,
> >please
> > > bear with me, I am still learning servlets
> > > I am trying to have a login servlet, and other servlets, when
> I click to
> >a
> > > link of a servletA, I want to loginservlet get invoqued, my
> > > question is how
> > > to save the url of the servletA so if the loginservlet success we will
> > > return to servletA
> > > thanks
> > > God helps all
> > > _
> > > Get your FREE download of MSN Explorer at http://explorer.msn.com
> > >
> > > ==
> > > =
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > > JSP-INTEREST".
> > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > > DIGEST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> > >
> > > ==
> > > =
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > > JSP-INTEREST".
> > > For digest: mailto [EMAIL PROTECTED] with body: 

OT Re: login servlet ??

2001-03-01 Thread Joseph Ottinger

Oh, come off it, Geert, you KNOW resin sucks!

>From: Geert Van Damme <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: login servlet ??
>Date: Thu, 1 Mar 2001 20:39:15 +0100
>
>That wouldn't give you much safety would it?
>The least thing you should do is check in the ServletA page whether the
>user
>was logged in properly.
>
>IMO the best way to do this is to check the access rights in every page. If
>the user hasn't logged in, save the requested URL in a session var and
>redirect to the loginservlet. After successful login, the servlet can
>redirect you back to the original location.
>Check out the tag libraries that are publicly available (at tomcat,
>JSPTags,
>JSPinsider ...). There are several examples who do that for you with just a
>few lines of code.
>Also check out the security options your web server or servlet engine gives
>you. Resin e.g. has a nice system for authentication.
>
>Geert Van Damme
>
>
> > -Original Message-
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Karau, Joe
> > Sent: donderdag 1 maart 2001 20:11
> > To: [EMAIL PROTECTED]
> > Subject: Re: login servlet ??
> >
> >
> > Sufi, you could encode the url of the servlet, and pass the url of the
> > servletA as a parameter.
> > Example href=/servlets/YourLoginServlet?ToServlet=SerlvetA
> >
> > Then, in your login servlet simply do a
> > String forwardTo = request.getParameter("ToServlet");
> >
> > and the "forwardTo" String will be the url of the servlet that
>you
> > originally linked to.
> >
> > To be on the safe side though, you may wish to encode the URL of
>servletA
> > using:
> >
> > href=/servlets/YourLoginServlet?ToServlet=<%=java.net.URLEncoder.e
> > ncode(stri
> > ng_of_servletA_url)%>
> >
> >
> >
> > Joseph Karau
> > Kingland Systems
> > [EMAIL PROTECTED]
> > 507-536-3629
> > AIM: jkara3629
> >
> >
> > -----Original Message-
> > From: sufi malak [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 01, 2001 12:45 PM
> > To: [EMAIL PROTECTED]
> > Subject: login servlet ??
> >
> >
> > Hi, please don't be mad, I know for you guru it's an easy question,
>please
> > bear with me, I am still learning servlets
> > I am trying to have a login servlet, and other servlets, when I click to
>a
> > link of a servletA, I want to loginservlet get invoqued, my
> > question is how
> > to save the url of the servletA so if the loginservlet success we will
> > return to servletA
> > thanks
> > God helps all
> > _
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> > ==
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> > ==
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set
> > JSP-INTEREST DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

_
Get your FREE download of MSN Explorer at http://explorer.msn.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: login servlet ??

2001-03-01 Thread Geert Van Damme

That wouldn't give you much safety would it?
The least thing you should do is check in the ServletA page whether the user
was logged in properly.

IMO the best way to do this is to check the access rights in every page. If
the user hasn't logged in, save the requested URL in a session var and
redirect to the loginservlet. After successful login, the servlet can
redirect you back to the original location.
Check out the tag libraries that are publicly available (at tomcat, JSPTags,
JSPinsider ...). There are several examples who do that for you with just a
few lines of code.
Also check out the security options your web server or servlet engine gives
you. Resin e.g. has a nice system for authentication.

Geert Van Damme


> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Karau, Joe
> Sent: donderdag 1 maart 2001 20:11
> To: [EMAIL PROTECTED]
> Subject: Re: login servlet ??
>
>
> Sufi, you could encode the url of the servlet, and pass the url of the
> servletA as a parameter.
> Example href=/servlets/YourLoginServlet?ToServlet=SerlvetA
>
> Then, in your login servlet simply do a
> String forwardTo = request.getParameter("ToServlet");
>
> and the "forwardTo" String will be the url of the servlet that you
> originally linked to.
>
> To be on the safe side though, you may wish to encode the URL of servletA
> using:
>
> href=/servlets/YourLoginServlet?ToServlet=<%=java.net.URLEncoder.e
> ncode(stri
> ng_of_servletA_url)%>
>
>
>
> Joseph Karau
> Kingland Systems
> [EMAIL PROTECTED]
> 507-536-3629
> AIM: jkara3629
>
>
> -Original Message-
> From: sufi malak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 01, 2001 12:45 PM
> To: [EMAIL PROTECTED]
> Subject: login servlet ??
>
>
> Hi, please don't be mad, I know for you guru it's an easy question, please
> bear with me, I am still learning servlets
> I am trying to have a login servlet, and other servlets, when I click to a
> link of a servletA, I want to loginservlet get invoqued, my
> question is how
> to save the url of the servletA so if the loginservlet success we will
> return to servletA
> thanks
> God helps all
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: login servlet ??

2001-03-01 Thread Karau, Joe

Sufi, you could encode the url of the servlet, and pass the url of the
servletA as a parameter.
Example href=/servlets/YourLoginServlet?ToServlet=SerlvetA

Then, in your login servlet simply do a
String forwardTo = request.getParameter("ToServlet");

and the "forwardTo" String will be the url of the servlet that you
originally linked to.

To be on the safe side though, you may wish to encode the URL of servletA
using:

href=/servlets/YourLoginServlet?ToServlet=<%=java.net.URLEncoder.encode(stri
ng_of_servletA_url)%>



Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629


-Original Message-
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 12:45 PM
To: [EMAIL PROTECTED]
Subject: login servlet ??


Hi, please don't be mad, I know for you guru it's an easy question, please
bear with me, I am still learning servlets
I am trying to have a login servlet, and other servlets, when I click to a
link of a servletA, I want to loginservlet get invoqued, my question is how
to save the url of the servletA so if the loginservlet success we will
return to servletA
thanks
God helps all
_
Get your FREE download of MSN Explorer at http://explorer.msn.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



login servlet ??

2001-03-01 Thread sufi malak

Hi, please don't be mad, I know for you guru it's an easy question, please
bear with me, I am still learning servlets
I am trying to have a login servlet, and other servlets, when I click to a
link of a servletA, I want to loginservlet get invoqued, my question is how
to save the url of the servletA so if the loginservlet success we will
return to servletA
thanks
God helps all
_
Get your FREE download of MSN Explorer at http://explorer.msn.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Piping JSP/Servlet requests to a common login servlet?

1999-11-16 Thread Ian

Hi all:

Doe anyone know if any of the servlet/JSP engines support the
piping/redirecting of specified JSP/servlet URL requests to a common login
servlet?

I want to ensure that a user is logged in if they access any JSP/servlet
under a given subdirectory.

I.e., I don't really want to include a  tag in all my JSPs, nor
pipe requests within each servlet. I was hoping to be able to do this
administratively. Am I daydreaming?

Thanks,

Ian

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html