You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by "Patabandula, Gangadhar" <Ga...@ltcg.com> on 2018/03/05 22:51:13 UTC

Rulerewrite is not working in TomEE

All,

I am configuring a maintenance page for my application to block users accessing the application during maintenance window.

I have configured below valve in context.xml as attached.

<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />

I have created rewrite.config file as attached with below rule.

RewriteRule ^/home/.*$ /maintenance.html [L]

Now I restarted TomEE.

When I accessed http://localhost/  I am getting block page where I am expecting server admin page
When I accessed http://localhost/home/  I am getting block page where I am expecting maintenance.html page.

Could anyone help me solve the issue.

Regards,
Gangadhar.

Notice - The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged. If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or storage system. Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability. No LTCG companies shall be liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt.

Re: Rulerewrite is not working in TomEE

Posted by Jonathan Gallimore <jo...@gmail.com>.
What version of TomEE are you using?

Jon

On Mon, Mar 5, 2018 at 10:51 PM, Patabandula, Gangadhar <
Gangadhar.Patabandula@ltcg.com> wrote:

> All,
>
>
>
> I am configuring a maintenance page for my application to block users
> accessing the application during maintenance window.
>
>
>
> I have configured below valve in context.xml as attached.
>
>
>
> <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
>
>
>
> I have created rewrite.config file as attached with below rule.
>
>
>
> RewriteRule ^/home/.*$ /maintenance.html [L]
>
>
>
> Now I restarted TomEE.
>
>
>
> When I accessed http://localhost/  I am getting block page where I am
> expecting server admin page
>
> When I accessed http://localhost/home/  I am getting block page where I
> am expecting maintenance.html page.
>
>
>
> Could anyone help me solve the issue.
>
>
>
> Regards,
>
> Gangadhar.
>
>
> Notice - The information and attachment(s) contained in this communication
> are intended for the addressee only, and may be confidential and/or legally
> privileged. If you have received this communication in error, please
> contact the sender immediately, and delete this communication from any
> computer or storage system. Any interception, review, printing, copying,
> re-transmission, dissemination, or other use of, or taking of any action
> upon this information by persons or entities other than the intended
> recipient is strictly prohibited by law and may subject them to criminal or
> civil liability. No LTCG companies shall be liable for the improper and/or
> incomplete transmission of the information contained in this communication
> or for any delay in its receipt.
>

Re: Rulerewrite is not working in TomEE

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

this works on tomee 7.0.4 (note your comet valve is not provided in tomee
so you have to remove it to deploy your application I think)

ensure you put rewrite.config in WEB-INF and context.xml in META-INF of the
war maybe.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>

2018-03-05 23:51 GMT+01:00 Patabandula, Gangadhar <
Gangadhar.Patabandula@ltcg.com>:

> All,
>
>
>
> I am configuring a maintenance page for my application to block users
> accessing the application during maintenance window.
>
>
>
> I have configured below valve in context.xml as attached.
>
>
>
> <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
>
>
>
> I have created rewrite.config file as attached with below rule.
>
>
>
> RewriteRule ^/home/.*$ /maintenance.html [L]
>
>
>
> Now I restarted TomEE.
>
>
>
> When I accessed http://localhost/  I am getting block page where I am
> expecting server admin page
>
> When I accessed http://localhost/home/  I am getting block page where I
> am expecting maintenance.html page.
>
>
>
> Could anyone help me solve the issue.
>
>
>
> Regards,
>
> Gangadhar.
>
>
> Notice - The information and attachment(s) contained in this communication
> are intended for the addressee only, and may be confidential and/or legally
> privileged. If you have received this communication in error, please
> contact the sender immediately, and delete this communication from any
> computer or storage system. Any interception, review, printing, copying,
> re-transmission, dissemination, or other use of, or taking of any action
> upon this information by persons or entities other than the intended
> recipient is strictly prohibited by law and may subject them to criminal or
> civil liability. No LTCG companies shall be liable for the improper and/or
> incomplete transmission of the information contained in this communication
> or for any delay in its receipt.
>