• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Tomcat - Apache connector problem

 
Greenhorn
Posts: 27
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
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)
AppPrefix/WebContent/admin/login.jsp
AppPrefix/WebContent/admin/login-error.jsp
AppPrefix/WebContent/internal/internal.jsp
AppPrefix/WebContent/articles/index.html



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 workers.properties file:



May be, I have a configuration mistake.

Thank you, in advance.
 
Saloon Keeper
Posts: 25646
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm too lazy to read the details, but did you remember to route https (port 443) to the connector as well?
 
Adrian Cordoba
Greenhorn
Posts: 27
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?



Tim:
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.

 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic