我搜索了一下,只找到了解决方法,他们建议在a glassfish前放置一个apache httpd。当然,这是有效的。
但是如果我不希望/不能在glassfish面前摆放任何东西?
<% String redirectURL =stackoverflow/; response.sendRedirect(redirectURL); %>当我将它指向以下位置时,是否可以让浏览器重定向: http://my.glassfish.domain/ ?
提供一点点更多详细信息:
我尝试将以下属性添加到虚拟服务器: redirect_1 from = / url = stackoverflow/ 但是,这使得一切都被重定向到 stackoverflow / ,例如。 http://my.glassfish.domain/myapp 重定向到stackoverflow/ ,而我只想要 http:// my.glassfish.domain / 被重定向到 stackoverflow/
有什么帮助吗?
解决方案也许你可以使用 UrlRweriteFilter 根据定义的映射重定向用户。 这里是一些例子
I've googled around and only found solution where they suggest putting an apache httpd in front of glassfish. Sure, that works.
But what if I do not wish to/cannot put any thing in front of glassfish?
Without using the index.jsp in the docroot of the domain to have something like:
<% String redirectURL = "stackoverflow/"; response.sendRedirect(redirectURL); %>Can I make browser to be redirected when I point it to: my.glassfish.domain/ ?
To provide a little bit more details:
I tried adding a property to the vitual server as: redirect_1 from=/ url=stackoverflow/ But that make everything to be redirected to stackoverflow/, eg. my.glassfish.domain/myapp redirects to stackoverflow/ while all I want was my.glassfish.domain/ to be redirected to stackoverflow/
Any help please?
解决方案Maybe you can use UrlRweriteFilter to redirect users according to defined mappings. Here are some examples
更多推荐
在glassfish中从docroot重定向到外部网址
发布评论