Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 59688 invoked from network); 10 Jun 2005 14:46:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jun 2005 14:46:41 -0000 Received: (qmail 91111 invoked by uid 500); 10 Jun 2005 14:46:16 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 91093 invoked by uid 500); 10 Jun 2005 14:46:15 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 91079 invoked by uid 99); 10 Jun 2005 14:46:15 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp4.na.baesystems.com (HELO smtp4.na.baesystems.com) (63.164.202.13) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 10 Jun 2005 07:46:05 -0700 Received: from BLUMS0022.bluelnk.net (blums0022.na.baesystems.com [10.40.96.145]) by smtp4.na.baesystems.com (8.12.10/8.12.10) with ESMTP id j5AEgEK6021296 for ; Fri, 10 Jun 2005 10:42:14 -0400 (EDT) Received: from blums0001.bluelnk.net (blums0001.na.baesystems.com [10.40.96.101]) by smtp1.na.baesystems.com (8.12.10/8.12.10) with ESMTP id j5AEg4HV014158 for ; Fri, 10 Jun 2005 10:42:13 -0400 (EDT) Received: from blums0009.bluelnk.net ([129.86.15.182]) by blums0001.bluelnk.net with Microsoft SMTPSVC(5.0.2195.5329); Fri, 10 Jun 2005 10:43:10 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Problem with security? Date: Fri, 10 Jun 2005 10:43:10 -0400 Message-ID: <885C7EC41C6782488AD7D3A7C325910601F3D408@blums0009> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem with security? Thread-Index: AcVtxmdnkN9eRS1/Q/yvIUTNljjVMwABBRJA From: "Gagnon, Joseph M \(US SSA\)" To: "Tomcat Users List" X-OriginalArrivalTime: 10 Jun 2005 14:43:10.0611 (UTC) FILETIME=[B9180E30:01C56DCA] X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I believe I've covered that all in my original message. Read further. -----Original Message----- From: egan0019 [mailto:egan0019@umn.edu]=20 Sent: Friday, June 10, 2005 10:10 AM To: Tomcat Users List Subject: Re: Problem with security? Look into the ServletRequest interface. That interface, which is extended in HttpServletRequest. You can call the getRemoteAddr(), getRemoteHost(), etc. methods. You receive null in your getRemoteUser because the user hasn't been 'authenticated' yet. On 10 Jun 2005, Gagnon, Joseph M (US SSA) wrote: > Hello, >=20 > I'm new to JSP development (and to dynamic web development as a whole) > so please bear with me. I'm investigating using JSP/Java for a project > at my workplace. My system (test server, if you will) is a PC running > Windows XP Pro and I am using Tomcat 5.5.9. >=20 > I have a situation where I want to be able to provide user access to an > application by determining the identity of the requesting user, without > them having to go through a login procedure. Specifically, what I've > been trying to do is call the request.getRemoteUser() method to ID the > requesting user. When I do so, I keep getting null. After reading in > the JSP and Java servlet specifications, I see that this call would > return null if the user is not authenticated. Reading further, I get > the impression that by default, no authentication is needed to access > resources. If a security mechanism is specified in the deployment > descriptor (which I take to be my webapps\ROOT\WEB-INF\web.xml file), > then authentication would be required. >=20 > Now, I'm not sure that I understand all the nuances of the terminology > (not to mention the technology), but it seems that what I've been trying > to do should have worked. The web.xml file indicated above contains > only the following (and this is the way it came - I added nothing): >=20 > > >=20 > xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=3D3D"http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version=3D3D"2.4"> >=20 > Welcome to Tomcat > > Welcome to Tomcat > >=20 > >=20 > > org.apache.jsp.index_jsp > org.apache.jsp.index_jsp > >=20 > > org.apache.jsp.index_jsp > /index.jsp > >=20 > >=20 > >=20 > Does anyone have any suggestions as to why this doesn't work -or- any > suggestions for an alternate method? Also, in a more general sense, any > information regarding good sources of information for learning how to do > JSP/Servlet programming (web, books, etc.) would be appreciated. Please > keep in mind that I am new at this, so examples of some obscure > objective or expert level programming will probably be over my head. >=20 > Thanks, > Joe Gagnon >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org