473,387 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

J2EE Security with Tomcat and Apache Proxy Module

I am running a J2EE Web App under Tomcat 4.1 with Apache 2.0 proxying
requests. Everything is configured and working appropriately however
I ran into a problem after configuring J2EE Form Authentication. I
have a security constraint restricting access to the application so
that when I attempt to access the app I am redirected to the login
page. This works as expected both when accessing the application via
the Apache proxy or hitting the application directly. However, when
submitting the login form through the Apache proxy Tomcat chokes after
the submittal to j_security_check and barfs up the following error:

Invalid direct reference to form login page

The login process works fine when doing the same thing hitting the
Tomcat server directly.

I know this error occurs when trying to submit a login request after
accessing the login page directly and I am not doing this, nor is my
proxy doing this. I'm not entirely sure where Tomcat caches the
original requested URL during the login redirect process but I know
some solutions redirect using cookies and I think the Apache proxy may
be eating those cookies if that is the case. Either that or the
Apache proxy is submitting the request in a strange way.

If anyone has ever run into this problem and found a work around or a
more appropriate way to configure the proxy I would appreciate any
pointers. I have searched everywhere for something referencing this
type of problem and haven't been able to find a thing.

Thanks in advance for any pointers anyone can give. I have attached
the appropriate configuration parameters for the proxy below. I
haven't included any of the J2EE configuration because like I
mentioned the application works as expected when accessing Tomcat
directly so there is no problem there.

# Tomcat Proxy Configuration
ProxyRequests on
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /app/proxyPoint http://foo.bar.com:8080/ContextRoot
ProxyPassReverse /app/proxyPoint http://foo.bar.com:8080/ContextRoot
Jul 17 '05 #1
0 3267

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: kaptain kernel | last post by:
I've got some security through obscurity questions - not directly related to PHP programming per se, but indirectly related, as most php programmers are also server admins of their servers. I want...
7
by: Alexandr Molochnikov | last post by:
Hello, I've spent a few days trying to get Apache and Tomcat work together via JK module. First I followed the following HOWTO link: http://www.johnturner.com/howto/winxp-howto.html and...
2
by: John | last post by:
I am experienced at using J2SE for application development (including over The Internet), but have only recently started developing web pages. At the moment I use PHP for database connectivity, but...
5
by: Thiago Campos Pereira | last post by:
I need a support of the staff of the Microsoft. Since the beginning of the year I am working in the CFLCL (Company of the sector of energy with more than 15000 employees). I am trying to...
3
by: Ryan Riehle | last post by:
Hi All! Trying to upgrade to Apache 2.0.49 and getting compile errors related to mod_auth_pgsql, any clue?: make: Entering directory `/usr/src/httpd-2.0.49'...
4
by: Henrik Skak Pedersen | last post by:
Hi, I have a set up where a windows client connects to a web service to retrieve a license file. The client is a consumer product which is beeing distributed to multiple locations. 1) I would...
5
by: KinnarSen | last post by:
Hi I am new to APACHE , TOMCAT arena . For my application i need to install Apache with mod_jk support so that it can connect with a standalone Tomcat server. I am following the instruction of...
4
by: JNeko | last post by:
Hello all! I am starting to do a little reviewing of my JSP, but first I would like to get my servlet container working! Now, it's been a while sinced I configured and used Tomcat, so I used this...
0
by: amie2008 | last post by:
Hi Folks, I need urgent help with tomcat-apache configuration for load balancing using the mod_proxy module. I have been trying to achieve this configuration: 2 tomcat instances load balanced...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.