Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

our IT is trying to configure a new apache/jboss/apj setup. When I browse to

and echo out the request.getRequestURL() I get (without jboss) My deployed app encounteres a lot of 404's because of this.

This is what our IT department has the ProxyPassReverse set to.

<Location /jboss>
    ProxyPass balancer://cluster stickysession=JSESSIONID 

Shouldn't the directive be set to:

<Location /jboss>
    ProxyPass balancer://cluster stickysession=JSESSIONID 
    ProxyPassReverse /jboss

Edit The issue arrises when I use response.sendRedirect

On our old server I used
response.sendRedirect("login.jsp?message=You have successfully logged off.");

to get things to work with the new proxy I have to recode as
response.sendRedirect("/jboss/AppName/login.jsp?message=You have successfully logged off.");

My applications are no longer portable or reuseable with the latter syntax. That line is in an my framework servlet for logging out and is shared by all of my apps.

The error (in Apache, not jboss) for
response.sendRedirect("login.jsp?message=You have successfully logged off."); File does not exist: /folder1/folder2/AppNamelogin.jsp`
Note there is no "/" between my appname and login.jsp

The error (in Apache, not jboss) for
response.sendRedirect("/login.jsp?message=You have successfully logged off."); File does not exist: /folder1/folder2/login.jsp Note the AppName is missing

share|improve this question
Is the JBoss-server setup with the /jboss context? – pkhamre Jul 25 '12 at 13:30
I beleive so but I don't have access to directly view the apache configuration. I'd have to ask IT but they always seem annoyed when developers ask them questions :) I'd like to just tell them here is what ProxyPassReverse should be set to. – jeff Jul 25 '12 at 14:06

Nope; the first argument is implied when used in a <Location> block. That usage is correct.

ProxyPassReverse serves only to translate the Location header on a 30x redirection response; it's probably not the issue, given what you've described.

You should clarify exactly what the path should be set to. If I understand you right, the request should be sent to instead of the current, right? If that's the case, then just change..

ProxyPass balancer://cluster stickysession=JSESSIONID

ProxyPass balancer://cluster/jboss stickysession=JSESSIONID


Leaving the above in place, but the new information presented makes it clear that the problem is indeed with the ProxyPassReverse - the balancer configuration probably has the /jboss path in the BalancerMember configs.




The slash is being stripped when the Location translation is occurring, sending the client a redirect to /jbossappname instead of /jboss/appname, due to the imbalanced trailing slashes between the <Location /jboss> and the ProxyPassReverse.

share|improve this answer
Shane. Correct. I expect the request.getRequestURL() to have jboss in the url. Or in other words what ever URL is typed in the Address bar, request.getRequestURL() should return an exact match. IT has our AS7 apps pointing to – jeff Jul 26 '12 at 13:00
@jeff Right, but does it actually need to be on the non-/jboss path for the actual request to the JBoss server to map to the correct context path for your web application? If it needs to have the path throughout, then make the change recommended in my answer and all should be well, but I'm confused at how the application code is even handling the request at all if an important part of the URL path is completely missing. – Shane Madden Jul 26 '12 at 15:55
Not sure how to answer that. I have edited my question to facilitate. – jeff Jul 26 '12 at 17:12
@jeff Ahh, then it is indeed an issue with the ProxyPassReverse. See the edit to my answer. – Shane Madden Jul 26 '12 at 17:49
Shane thanks I really appreciate you helping. But the error in apache never mentions /jboss as in /jbossappname. I was trying to anonymize my path, maybe a bit too much. file not found is more like this /WEB/wwws/appnamelogin.jsp – jeff Jul 26 '12 at 18:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.