This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat - Apache connector problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat - Apache connector problem" Watch "Tomcat - Apache connector problem" New topic

Tomcat - Apache connector problem

Adrian Cordoba

Joined: Jul 09, 2011
Posts: 13

I have Tomcat (7.0.12) running behind Apache (2.2.17) server with Tomcat Connector JK 1.2.32.
I'm newbie with Apache-Tomcat connector: So, I made a very simple web application and deployed it in Tomcat webapps, with the following structure:

AppPrefix/WebContent/index.jsp (entry page)

The "WebContent/index.jsp" page has two links: a link to "WebContent/internal/internal.jsp", and the other one to "WebContent/articles/index.html".

The "WebContent/internal/" directory is protected by the following security constraint in the web.xml file:

Also, I declared in the web.xml file:

And in the tomcat-users.xml file, I set:

I can get the entry page with the "http://localhost/AppPrefix/index.jsp" URL through Apache server.
When I make click in the internal.jsp link, I get the login.jsp page. That's wright.
But when I submit the credentials (username: xx / password. yy), I get a blank page (with http://localhost/Andromeda/internal/j_security_check in the URL bar), instead of the internal.jsp page.

If I access to entry page with "http://localhost:8080/AppPrefix/index.jsp" URL, (skipping Apache server,) I can get the internal.jsp page when I submit the credentials.
Also, if I delete the security constraint, the web application works fine.

The relevant Apache configuration is:

httpd.conf file:

and file:

May be, I have a configuration mistake.

Thank you, in advance.

[Adrián E. Córdoba]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950

I'm too lazy to read the details, but did you remember to route https (port 443) to the connector as well?

Customer surveys are for companies who didn't pay proper attention to begin with.
Adrian Cordoba

Joined: Jul 09, 2011
Posts: 13

Tim Holloway wrote:I'm too lazy to read the details, but did you remember to route https (port 443) to the connector as well?

Thank you for replay. (Sorry for too much details. I don't know how to explain this problem in other way.)

I'm not using SSL protocol: There is not declaration in "user-data-constraint" subelement of "security-constraint".

Thank you, again.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Tomcat - Apache connector problem
Similar Threads
Keep having to login with container based authentaction.
JSF Suggestions Needed
HTTP Status 403 Access to the requested resource has been denied
Return to HTTP from HTTPS
Redirection after realm authentication