RE: Returning to called page after loggin on...

2001-07-11 Thread dhay



In reference to this...how do you refer to the url of the page in a custom tag?

Dave




-- Forwarded by David Hay/Lex/Lexmark on 07/11/2001 03:57 PM
---


David Hay
07/11/2001 01:18 PM

To:   [EMAIL PROTECTED],
  [EMAIL PROTECTED]
cc:

Subject:  Returning to called page after loggin on...  (Document link: David
  Hay)

Hi everyone.

I am placing a tag on each page to check the user is logged on, which, as
expected, takes them to a login page if they are not.

However, I want to then return them to the page they tried to access before
being asked to log on.  Do I need to save the name of the page somewhere, or is
there an easier way?

Cheers,

Dave








RE: Returning to called page after loggin on...

2001-07-11 Thread Abraham Kang

Dave,

That is exactly what you would need to do in the tag.  You will need to
store the location under some session key and retrieve this after loggin in.

However.

The web app security mechanism handles protecting your resources, sending
unauthenticated users to the login page, authentication, and redirecting to
the desired page after successful login.  All you have to do is configure
the web.xml.

The only major issue is setting up your app server to use your
authentication mechanism as its security realm.

--Abraham

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 10:19 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Returning to called page after loggin on...
>
>
>
>
> Hi everyone.
>
> I am placing a tag on each page to check the user is logged on, which, as
> expected, takes them to a login page if they are not.
>
> However, I want to then return them to the page they tried to
> access before
> being asked to log on.  Do I need to save the name of the page
> somewhere, or is
> there an easier way?
>
> Cheers,
>
> Dave
>
>
>
>




RE: Returning to called page after loggin on...

2001-07-11 Thread Abraham Kang

Hi Dave,

   Attached is SnoopSerlvet.jsp.  If you drop it in your jsp container and
reference the source code you will be able to get the info you are looking
for.

--Abraham

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 1:16 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Returning to called page after loggin on...
>
>
>
>
> In reference to this...how do you refer to the url of the page in
> a custom tag?
>
> Dave
>
>
>
>
> -- Forwarded by David Hay/Lex/Lexmark on
> 07/11/2001 03:57 PM
> ---
>
>
> David Hay
> 07/11/2001 01:18 PM
>
> To:   [EMAIL PROTECTED],
>   [EMAIL PROTECTED]
> cc:
>
> Subject:  Returning to called page after loggin on...  (Document
> link: David
>   Hay)
>
> Hi everyone.
>
> I am placing a tag on each page to check the user is logged on, which, as
> expected, takes them to a login page if they are not.
>
> However, I want to then return them to the page they tried to
> access before
> being asked to log on.  Do I need to save the name of the page
> somewhere, or is
> there an easier way?
>
> Cheers,
>
> Dave
>
>
>
>
>
>

Title: Snoop Servlet










Snoop Servlet




This servlet returns information about the HTTP request
itself. You can modify this servlet to take this information
and store it elsewhere for your HTTP server records. This
servlet is also useful for debugging.


Servlet Spec Version Implemented



<%= getServletConfig().getServletContext().getMajorVersion() + "." + getServletConfig().getServletContext().getMinorVersion() %>



Requested URL



<%= HttpUtils.getRequestURL(request) %>



Request parameters



<%
Enumeration enum = request.getParameterNames();
while(enum.hasMoreElements()){
  String key = (String)enum.nextElement();
  String[] paramValues = request.getParameterValues(key);
  for(int i=0;i < paramValues.length;i++){
  out.println(key + " : "  + paramValues[i]); 
  }
}
%>



Request information



Request Method: <%= request.getMethod() %>
Request URI: <%= request.getRequestURI() %>
Request Protocol: <%= request.getProtocol() %>
Servlet Path: <%= request.getServletPath() %>
Path Info: <%= request.getPathInfo() %>
Path Translated: <%= request.getPathTranslated() %>
Query String: <%= request.getQueryString() %>
Content Length: <%= request.getContentLength() %>
Content Type: <%= request.getContentType() %>
Server Name: <%= request.getServerName() %>
Server Port: <%= request.getServerPort() %>
Remote User: <%= request.getRemoteUser() %>
Remote Address: <%= request.getRemoteAddr() %>
Remote Host: <%= request.getRemoteHost() %>
Authorization Scheme: <%= request.getAuthType() %>


Certificate Information

<%
  try {
weblogic.security.X509 certs [] = (weblogic.security.X509 [])
	request.getAttribute("javax.net.ssl.peer_certificates");

if (certs != null) {
  weblogic.security.JDK11Certificate jdk11cert = new weblogic.security.JDK11Certificate(certs[0]);
%>
Subject Name : <%= jdk11cert.getPrincipal().getName() %> 
Issuer Name :<%= jdk11cert.getGuarantor().getName() %> 
Certificate Chain Length : <%= certs.length %> 
<%
  // List the Certificate chain
  for (int i=0; i  Certificate[<%= i %>] : <%= certs[i].toString() %> 
<%
  } // end of for loop
%>
<%
} 
else // certs==null 
{
%>
Not using SSL or client certificate not required.
<%
}
  } catch (ClassCastException cce) {
System.out.println(cce.getMessage());
cce.printStackTrace();
  }
%>




Request headers



<%
enum = request.getHeaderNames();
while (enum.hasMoreElements()) {
  String name = (String)enum.nextElement();
  out.println(name + ": " + request.getHeader(name));
}
%>



Copyright © 1999-2000 by BEA Systems, Inc. All Rights Reserved.







Re: Returning to called page after loggin on...

2001-07-30 Thread Craig R. McClanahan



On Wed, 11 Jul 2001 [EMAIL PROTECTED] wrote:

> 
> 
> Hi everyone.
> 
> I am placing a tag on each page to check the user is logged on, which, as
> expected, takes them to a login page if they are not.
> 
> However, I want to then return them to the page they tried to access before
> being asked to log on.  Do I need to save the name of the page somewhere, or is
> there an easier way?
> 

It sounds like you are duplicating what container-managed security in a
servlet container will do for you.  Refer to the Servlet Spec for
definitions .

I also did a BOF at JavaOne that covered container-managed security at a
pretty high level, but is useful to read after you've read the servlet
spec chapter on security.  You can write to me privately if you want a
copy.


> Cheers,
> 
> Dave
> 
> 
> 
> 

Craig McClanahan





Re: Returning to called page after loggin on...

2001-07-31 Thread Ted Husted

Craig's slides for BOF #1291, "Approaches to User Authentication and
Access Control in Web Applications" is  available for download at 

< http://husted.com/about/struts/resources.htm#new >

True to the school, it's in Open Office format <
http://www.openoffice.org/ >.


"Craig R. McClanahan" wrote:
> I also did a BOF at JavaOne that covered container-managed security at a
> pretty high level, but is useful to read after you've read the servlet
> spec chapter on security.  You can write to me privately if you want a
> copy.



Re: Returning to called page after loggin on...

2001-07-31 Thread Scott Ryan

This looks like a very useful paper but how do you open and read the
paper if you only come equipped with the text tools from the microsoft
monster?



Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:(303 263-3044

>>> [EMAIL PROTECTED] 07/31/01 05:19AM >>>
Craig's slides for BOF #1291, "Approaches to User Authentication and
Access Control in Web Applications" is  available for download at 

< http://husted.com/about/struts/resources.htm#new >

True to the school, it's in Open Office format <
http://www.openoffice.org/ >.


"Craig R. McClanahan" wrote:
> I also did a BOF at JavaOne that covered container-managed security
at a
> pretty high level, but is useful to read after you've read the
servlet
> spec chapter on security.  You can write to me privately if you want
a
> copy.



Re: Returning to called page after loggin on...

2001-07-31 Thread Ted Husted

Open Office is a free download, and available even to the monsters
amongst us ;-)

Scott Ryan wrote:
> 
> This looks like a very useful paper but how do you open and read the
> paper if you only come equipped with the text tools from the microsoft
> monster?
> 
> Scott Ryan
> Developer
> First Bank Data Corporation
> Work: (303) 235-1485
> Cell:(303 263-3044
> 
> >>> [EMAIL PROTECTED] 07/31/01 05:19AM >>>
> Craig's slides for BOF #1291, "Approaches to User Authentication and
> Access Control in Web Applications" is  available for download at
> 
> < http://husted.com/about/struts/resources.htm#new >
> 
> True to the school, it's in Open Office format <
> http://www.openoffice.org/ >.
> 
> "Craig R. McClanahan" wrote:
> > I also did a BOF at JavaOne that covered container-managed security
> at a
> > pretty high level, but is useful to read after you've read the
> servlet
> > spec chapter on security.  You can write to me privately if you want
> a
> > copy.