tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikhil <mnik...@gmail.com>
Subject Re: tomcat, apache with mod_jk and mod_auth_kerb
Date Mon, 14 Jul 2008 14:50:19 GMT
On Mon, Jul 14, 2008 at 7:46 PM, Rainer Jung <rainer.jung@kippdata.de>
wrote:

> Use request.getRemoteUser()
>
> HTH
>
>
> Rainer
>


Thanks Rainer.

I am now using Tomcat6(latest stable release) and configured the server.xml
with ajp connector to use tomcatAuthentication=false and  I am still getting
the 'null' value :-( . Any other suggestions that I need to edit anywhere
else like web.xml / security constraints.

with the following sample jsp :

---------------------------------------------
<%@ page language="java" %>
<%@ page import="java.util.Enumeration" %>

<h2>HTTP Request Headers</h2>
 <table border="0" cellspacing="1" cellpadding="2">  <tr>    <th>Name</th>
<th>Value</th>  </tr>
<% // Get all HTTP request headers names/values
  Enumeration e1 = request.getHeaderNames();
  String valueuser = request.getRemoteUser();
  while (e1.hasMoreElements())  {
        boolean doLoop = true;
        String name = ((String)e1.nextElement()).toUpperCase();
                Enumeration e2 = request.getHeaders(name);
                while (e2.hasMoreElements())    {
                String value = (String)e2.nextElement();
                %>
 <tr>
  <td class=gray><%= name %></td>
  <td class=gray><%= value %></td>
  <td class=gray><%= valueuser %></td>
 </tr>

<%
    }
   }
%>
------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message