Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Tomcat - Apache connector problem

 
Greenhorn
Posts: 26
Oracle Java Linux
  • Mark post as helpful
  • send pies
  • 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.
 
Bartender
Posts: 20915
127
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • 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: 26
Oracle Java Linux
  • Mark post as helpful
  • send pies
  • 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.

 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!