Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
259 views
in Technique[技术] by (71.8m points)

apache - Spring externalContext.redirect when ProxyPass, ProxyPassReverse

I have one httpd with ssl and a virtual host on it and a tomcat with my app, when someone connect to my domain, www.mydomian.com, he can see my app www.mydomain.com:8080/myapp, this is working fine.

But in the app the user fill a form and after this form redirect him to a greetings page, thanks.xhtml, but instead of this the user is redirected to ssl site mydomain.com/myapp/index.xhtml, i tested in the tomcat manager using the link and the app works fine, what i am doing wrong?

I am using this virtual host directives

ProxyRequests off
ProxyPreserveHost On
ProxyPass / http://localhost:8080/myapp
ProxyPassReverse / http://localhost:8080/myapp

This is my redirection in the app

ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
externalContext.redirect("../thanks.xhtml");
question from:https://stackoverflow.com/questions/65832960/spring-externalcontext-redirect-when-proxypass-proxypassreverse

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...