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?
The context root for an application is determined by how it is deployed. When a web application is deployed inside an EAR file, the context root is specified in the application. xml file of the EAR, using a context-root element inside of a web module.
By default, the context root is the server root itself, denoted as a single forward slash. Application root. Specifies the root of the application itself. The URL prefix is http://localhost:8080 and the context root is the application server root.
1.1 Right click on the project, select Properties , Web Project Settings , update the context root here. 1.2 Remove your web app from the server and add it back. The context root should be updated. 1.3 If step 2 is failing, delete the server, create a new server and add back the web app.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With