• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Struts redirect behind reverse proxy  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an issue dealing with a struts application behind an apache proxy.

The url used through proxy is https://www.example.com/myapp/.
The proxy redirects to http://localmachine:8080/myapp/Logon.do.
So when the struts application redirects to new pages, the new pages fail to load.

Proxy config contains:
RewriteRule /myapp/(*.)  http://localmachine:8080/myapp/$1 [P,L]

The myapp/WEB-INF/web.xml contains:
<welcome-file-list>
   <welcom-file>index.jsp</welcome-file>
</welcom-file-list>

The myapp/WEB-INF/struts-config.xml contains:
<global-forwards>
   <forward name="Welcome" path="/Logon.do" >
</global-forwards>

The myapp/index.jsp contains:
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<logic:redirect forward="Welcome"/>

Could anyone tell me how to make this struts application work properly behind the reverse proxy?
 
Bartender
Posts: 9559
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is your local web server?  If it is Tomcat, do you have your Connector(s) configured with a proxyName/proxyPort like this:



see here for more info
 
Let's get him boys! We'll make him read this tiny ad!
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!