Case in-sensitive Jboss 7 web application context root

纵饮孤独 提交于 2019-12-12 12:14:18

问题


Is there a way to make web application context case in-sensitive?

Basically i'm doing the following in jboss-web.xml

<jboss-web>
    <context-root>cap</context-root>
</jboss-web>

I'm able to access the app via localhost:8080/cap, but trying to make it accessible via localhost:8080/Cap or localhost:8080/CAP. Any ideas please?


回答1:


Put apache+mod_proxy in front of jboss and use url-rewriting or redirection (easier option). Example of rewrite:

RewriteEngine on
RewriteRule ^/Cap$ /cap/ [R]
RewriteRule ^/CAP$ /cap/ [R]

You would put the above to httpd.conf or a similar location.



来源:https://stackoverflow.com/questions/7470850/case-in-sensitive-jboss-7-web-application-context-root

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!