Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-25 Thread rupali singh
hi chris,

Apologies for typo mistakes.

business user are using url :   https://xyz.ae/apex/f?p=1001
<https://xyz.com/apex/f?p=1001>   to login into apex application and login
is working fine.

xyz.ae is published in our F5 which is pointing to tomcat server on port
8080  hence im not worried about xyz.ae

for making is simple for user we want to rename f?p=1001
<https://xyz.com/apex/f?p=1001>   to myapp
so business user will use https://xyz.ae/apex/myapp
<https://xyz.com/aorx/myapp>

So our requirement is  :   in url we want to replace f?p=1001
<https://xyz.com/apex/f?p=1001> to myapp


tried below but not working

RewriteCond %{QUERY_STRING} p=1001
RewriteRule ^/f$ /apex/myapp

rewrite.config location :
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config


Thanks Peter for suggestion but configure friendly URLs is not our
requirement.


We have achieved  our requirement  where apex is deployed on oracle
weblogic with Oracle HTTP server.
Now same want to achieve with apex-tomcat


curl output:
curl -D- 'localhost:8080/apex/f?p=10001'
HTTP/1.1 302
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin
Location: https://localhost/apex/workspace/r/abcrelease10001123100/home
Transfer-Encoding: chunked
Date: Fri, 25 Mar 2022 15:18:16 GMT

On Fri, 25 Mar 2022 at 16:52, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Rupali,
>
> This has gone around in circles for a while with no progress. Can you
> please:
>
> 1. Show examples of what you would like. Specific examples, like:
>
> "I expect that when requesting http://xyz.ae/apex/?f=1001; I get a 302
> redirect to http://xyz.ae/apex/myapp;
>
> That's what you are asking for, but I suspect that what you really want
> is the reverse: users who request /myapp actually get "?f=1001".
>
> This is further complicated by the fact that all your URLs show as
> ayx.ae in text, but then have  added to the end for some
> reason. Which is it?
>
> Do you want an HTTP redirect? If so, what kind? Or do you want your
> server to proxy from one URL to the other, so the client doesn't know
> it's happening?
>
> 2. Which component should be responsible for all of this? You have
> several networking components to choose from:
>
> a. F5 load balancer
> b. Oracle Apex
> c. Apache Tomcat
>
> Why have you decided to re-write your application's URLs at the Tomcat
> level and not somewhere further up the chain?
>
> 3. Show exactly what you currently have in your rewrite config file, and
> exactly where that rewrite configuration file is on the disk.
>
> Going back to your original post, lots of things are confusing:
>
> i. The URLs are inconsistent (.ae va .com, apex vs aorx)
>
> ii. You appear to be asking to redirect from non-friendly URLs to
> friendly URLs which doesn't make any sense. Perhaps this is a
> terminology issue. You want clients to use the friendly URLs
> (/apex/myapp) and then get what they would have received had they called
> /f?p=1001 right?
>
> iii. You are redirecting /myapp to /myapp in your example, which
> accomplishes nothing. You also have the same rule twice.
>
> This should be as simple as:
>
> RewriteRule "^/f?p=1001" "/myapp"
>
> ... but it's not, because RewriteRule only looks at the path and not the
> query string, so you need a separate condition. I'll repeat what Felix
> (almost) posted a few days ago, which should be correct:
>
> RewriteCond %{QUERY_STRING} p=1001
> RewriteRule ^/f$ /apex/myapp
>
> I don't think you even want the [R] flag because if you do that, the
> client will see the URL change to the unfriendly URL, and the point is
> to hide that from them, right?
>
> The last thing to do is to make sure the file is *in the right place*.
> No amount of configuration in C:\Windows\rewrite.config is going to have
> any effect unless you have a very strange configuration.
>
> -chris
>
> On 3/24/22 14:23, rupali singh wrote:
> > hi,
> >
> > yes context name is apex.
> >
> >   https://xyz.ae/apex/f?p=1001 <https://xyz.com/apex/f?p=1001>   to
> > https://xyz.ae/apex/myapp <https://xyz.com/aorx/myapp>
> >
> > we dont want to change xyz.ae that will name remain as it is , we want
> to
> > change f?p=1001 <https://xyz.com/apex/f?p=1001> to myapp
> >
> >
> >
> > On Wed, 23 Mar 2022 at 19:23, Felix Schumacher <
> > felix.schumac...@internetallee.de> wrote:
> >
> >>
> >>
> >> Am 23. März 2022 12:14:25 MEZ schrieb rupali singh <
> >> rupali.r.si...@gmail.com>:
> >>> Hi Chris,
> >>>
> >>> I al

Re: Apex SSO

2022-03-25 Thread rupali singh
hi team,

the reason im asking is we have document for apex and idcs integration
https://www.ateam-oracle.com/post/integrating-sso-between-apex-cloud-and-identity-cloud-service-the-easy-way

i did all the setup as per document but now the issue is apex is not
redirecting to idcs url and giving below error.when we are trying to access
the application URL.
In tomcat logs there is no trace of IDCS discover URL and oracle denying
from support coz we are using tomcat which is not supported by oracle.

Hence trying to understand if there is anything we need on tomcat  and why
apex is not redirecting to idcs url
we are not using any proxy for tomcat

apex error :

[image: image.png]

On Fri, 25 Mar 2022 at 18:42, Peter Chiu  wrote:

> Hi Chris,
>
> To implement APEX SSO, that requires NO change to tomcat. That is why I
> tried not to post here.
>
> Here is the blog for starters. https://fuzziebrain.com/content/id/1908/
>
> If tomcat is behind a proxy (apache or nginx), we might need to change a
> setting in server.xml to return the real hostname.
>
> Hope this helps.
>
> On Fri, Mar 25, 2022 at 8:54 AM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > Peter,
> >
> > On 3/24/22 14:54, Peter Chiu wrote:
> > > I will email you directly. For the group knowledge, there is nothing
> > > special you need to do on Tomcat if it is not behind a proxy.
> >
> > Please post to the mailing list. It's not at all clear to me how you'd
> > get Oracle APEX to deliver authentication information to Tomcat.
> >
> > Presumably, that's what Rupali is trying to accomplish and it would be
> > helpful for the whole community to post back.
> >
> > -chris
> >
> > > On Thu, Mar 24, 2022 at 1:51 PM rupali singh  >
> > > wrote:
> > >
> > >> Hi Peter,
> > >>
> > >> Are u using apache web server with tomcat or its only tomcat  .
> > >> if possible can you please share steps for azure AD with me on
> > >> rupali.r.si...@gmail.com
> > >>
> > >>
> > >>
> > >> On Thu, 24 Mar 2022 at 21:21, Peter Chiu  wrote:
> > >>
> > >>> I have a working APEX SSO against Azure AD or On-Permise AD.
> > >>>
> > >>> On Thu, Mar 24, 2022 at 1:13 PM rupali singh <
> rupali.r.si...@gmail.com
> > >
> > >>> wrote:
> > >>>
> > >>>> HI Team,
> > >>>>
> > >>>> We are using apex 21.1 with tomcat 9.54.
> > >>>> we want to implement SSO for application deployed in Apex  with IDCS
> > >>>> reference URL :
> > >>>>
> > >>>>
> > >>>
> > >>
> >
> https://www.ateam-oracle.com/post/integrating-apex-with-oracle-identity-cloud-service
> > >>>>
> > >>>> but apex is not at all redirecting to IDCS URL and as per Oracle
> issue
> > >> is
> > >>>> with tomcat .
> > >>>>
> > >>>> anyone successfully implemented APEX SSO( webserver : apache tomcat)
> > >>> with
> > >>>> Oracle IDCS
> > >>>> or  APEX SSO( webserver : apache tomcat)  with Microsoft Azure AD.
> > >>>> can you please assist us with steps.
> > >>>>
> > >>>> --
> > >>>> Thanks and Regards,
> > >>>> Rupali
> > >>>>
> > >>>
> > >>
> > >>
> > >> --
> > >> Thanks and Regards,
> > >> Rupali
> > >>
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


-- 
Thanks and Regards,
Rupali


Re: Apex SSO

2022-03-25 Thread rupali singh
Hello Everyone,

In apex under authentication scheme we are using social sign in and
provided discover url, now when we are trying to login into apex its not
redirecting to discover url (oracle idcs url)
Is their is any setup we need to do on tomcat?
In tomcat access logs i dont see oracle idcs url at all.

On Thu, Mar 24, 2022, 10:42 PM rupali singh 
wrote:

> HI Team,
>
> We are using apex 21.1 with tomcat 9.54.
> we want to implement SSO for application deployed in Apex  with IDCS
> reference URL :
> https://www.ateam-oracle.com/post/integrating-apex-with-oracle-identity-cloud-service
>
> but apex is not at all redirecting to IDCS URL and as per Oracle issue is
> with tomcat .
>
> anyone successfully implemented APEX SSO( webserver : apache tomcat)  with
> Oracle IDCS
> or  APEX SSO( webserver : apache tomcat)  with Microsoft Azure AD.
> can you please assist us with steps.
>
> --
> Thanks and Regards,
> Rupali
>


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-24 Thread rupali singh
Hi,

How we can enable friendly url in apex?



On Fri, Mar 25, 2022, 12:48 AM Peter Chiu  wrote:

> Have you consider doing the following
> 1. custom URL/domain, and
> 2. enable Friendly URLs in APEX
>
> On Thu, Mar 24, 2022 at 3:09 PM Felix Schumacher <
> felix.schumac...@internetallee.de> wrote:
>
> >
> > Am 24.03.22 um 19:23 schrieb rupali singh:
> >
> > hi,
> >
> > yes context name is apex.
> >
> > Good to know.
> >
> >  https://xyz.ae/apex/f?p=1001 <https://xyz.com/apex/f?p=1001> <
> https://xyz.com/apex/f?p=1001>   tohttps://xyz.ae/apex/myapp <
> https://xyz.com/aorx/myapp> <https://xyz.com/aorx/myapp>
> >
> > we dont want to change xyz.ae that will name remain as it is , we want
> to
> > change f?p=1001 <https://xyz.com/apex/f?p=1001> <
> https://xyz.com/apex/f?p=1001> to myapp
> >
> > Sorry, I don't understand, what you meant by the above.
> >
> > I suspect, that you wanted to show, what the user enters into the browser
> > and where the application listens. But it doesn't really makes sense to
> me.
> >
> > Reading your first mail again, I think, that you have a loadbalancer that
> > listens on xyz.ae and that proxies to xyz.com (you mentioned port 8080,
> > which is left out in all your examples). Is that right?
> >
> > Apart from that, I wanted to know, what you tried on a technical level.
> > Have you tried the curl command that I gave as an example?
> >
> > Felix
> >
> > On Wed, 23 Mar 2022 at 19:23, Felix Schumacher <
> felix.schumac...@internetallee.de> wrote:
> >
> >
> > Am 23. März 2022 12:14:25 MEZ schrieb rupali singh <
> rupali.r.si...@gmail.com>:
> >
> > Hi Chris,
> >
> > I already tried with fully qualified name but its not working
> >
> > Can you be more specific, what you tried?
> >
> > Is Chris right and your context name is apex?
> >
> > Felix
> >
> > On Tue, Mar 22, 2022, 7:15 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
> >
> >
> > All,
> >
> > On 3/21/22 10:19, Felix Schumacher wrote:
> >
> > Am 21.03.22 um 06:39 schrieb rupali singh:
> >
> > Hi Felix,
> >
> > location of context.xml file is
> >
> >   cat context.xml| grep RewriteValve
> >   >
> > className="org.apache.catalina.valves.rewrite.RewriteValve"
> >
> > />
> >
> >   pwd
> > /opt/tomcat/apache-tomcat-9.0.54/instance/conf
> >
> > That context.xml is thought to be a default template for all installed
> > webapps. It will work, but remember, that every installed webapp will
> > get its own copy of a rewrite valve.
> >
> > +1
> >
> > This is probably the problem.
> >
> >
> > more
> >
> >
> >
> /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
> >
> > RewriteCond %{QUERY_STRING} p=10001
> > RewriteRule ^/apex/f$ /apex/myapp [R,L]
> >
> > I think you want:
> >
> > RewriteCond %{QUERY_STRING} p=10001
> > RewriteRule ^/f$ /myapp [R,L]
> >
> > The prefix /apex is already a part of the context-path and should be
> > removed from the URL patterns being matched. If you want to redirect to
> > another web application, you need a fully-qualified redirect like this:
> >
> > RewriteCond %{QUERY_STRING} p=10001
> > RewriteRule ^/f$ https://www.google.com/ [R,L]
> >
> > -chris
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >  -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-24 Thread rupali singh
hi,

yes context name is apex.

 https://xyz.ae/apex/f?p=1001 <https://xyz.com/apex/f?p=1001>   to
https://xyz.ae/apex/myapp <https://xyz.com/aorx/myapp>

we dont want to change xyz.ae that will name remain as it is , we want to
change f?p=1001 <https://xyz.com/apex/f?p=1001> to myapp



On Wed, 23 Mar 2022 at 19:23, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
>
> Am 23. März 2022 12:14:25 MEZ schrieb rupali singh <
> rupali.r.si...@gmail.com>:
> >Hi Chris,
> >
> >I already tried with fully qualified name but its not working
>
> Can you be more specific, what you tried?
>
> Is Chris right and your context name is apex?
>
> Felix
> >
> >On Tue, Mar 22, 2022, 7:15 PM Christopher Schultz <
> >ch...@christopherschultz.net> wrote:
> >
> >> All,
> >>
> >> On 3/21/22 10:19, Felix Schumacher wrote:
> >> >
> >> > Am 21.03.22 um 06:39 schrieb rupali singh:
> >> >> Hi Felix,
> >> >>
> >> >> location of context.xml file is
> >> >>
> >> >>   cat context.xml| grep RewriteValve
> >> >>   className="org.apache.catalina.valves.rewrite.RewriteValve"
> >> />
> >> >>   pwd
> >> >> /opt/tomcat/apache-tomcat-9.0.54/instance/conf
> >> > That context.xml is thought to be a default template for all installed
> >> > webapps. It will work, but remember, that every installed webapp will
> >> > get its own copy of a rewrite valve.
> >>
> >> +1
> >>
> >> This is probably the problem.
> >>
> >> >> more
> >> >>
> >>
> /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
> >> >> RewriteCond %{QUERY_STRING} p=10001
> >> >> RewriteRule ^/apex/f$ /apex/myapp [R,L]
> >>
> >>
> >> I think you want:
> >>
> >> RewriteCond %{QUERY_STRING} p=10001
> >> RewriteRule ^/f$ /myapp [R,L]
> >>
> >> The prefix /apex is already a part of the context-path and should be
> >> removed from the URL patterns being matched. If you want to redirect to
> >> another web application, you need a fully-qualified redirect like this:
> >>
> >> RewriteCond %{QUERY_STRING} p=10001
> >> RewriteRule ^/f$ https://www.google.com/ [R,L]
> >>
> >> -chris
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
Thanks and Regards,
Rupali


Re: Apex SSO

2022-03-24 Thread rupali singh
Hi Peter,

Are u using apache web server with tomcat or its only tomcat  .
if possible can you please share steps for azure AD with me on
rupali.r.si...@gmail.com



On Thu, 24 Mar 2022 at 21:21, Peter Chiu  wrote:

> I have a working APEX SSO against Azure AD or On-Permise AD.
>
> On Thu, Mar 24, 2022 at 1:13 PM rupali singh 
> wrote:
>
> > HI Team,
> >
> > We are using apex 21.1 with tomcat 9.54.
> > we want to implement SSO for application deployed in Apex  with IDCS
> > reference URL :
> >
> >
> https://www.ateam-oracle.com/post/integrating-apex-with-oracle-identity-cloud-service
> >
> > but apex is not at all redirecting to IDCS URL and as per Oracle issue is
> > with tomcat .
> >
> > anyone successfully implemented APEX SSO( webserver : apache tomcat)
> with
> > Oracle IDCS
> > or  APEX SSO( webserver : apache tomcat)  with Microsoft Azure AD.
> > can you please assist us with steps.
> >
> > --
> > Thanks and Regards,
> > Rupali
> >
>


-- 
Thanks and Regards,
Rupali


Apex SSO

2022-03-24 Thread rupali singh
HI Team,

We are using apex 21.1 with tomcat 9.54.
we want to implement SSO for application deployed in Apex  with IDCS
reference URL :
https://www.ateam-oracle.com/post/integrating-apex-with-oracle-identity-cloud-service

but apex is not at all redirecting to IDCS URL and as per Oracle issue is
with tomcat .

anyone successfully implemented APEX SSO( webserver : apache tomcat)  with
Oracle IDCS
or  APEX SSO( webserver : apache tomcat)  with Microsoft Azure AD.
can you please assist us with steps.

-- 
Thanks and Regards,
Rupali


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-23 Thread rupali singh
Hi Chris,

I already tried with fully qualified name but its not working

On Tue, Mar 22, 2022, 7:15 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> All,
>
> On 3/21/22 10:19, Felix Schumacher wrote:
> >
> > Am 21.03.22 um 06:39 schrieb rupali singh:
> >> Hi Felix,
> >>
> >> location of context.xml file is
> >>
> >>   cat context.xml| grep RewriteValve
> >>   />
> >>   pwd
> >> /opt/tomcat/apache-tomcat-9.0.54/instance/conf
> > That context.xml is thought to be a default template for all installed
> > webapps. It will work, but remember, that every installed webapp will
> > get its own copy of a rewrite valve.
>
> +1
>
> This is probably the problem.
>
> >> more
> >>
> /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
> >> RewriteCond %{QUERY_STRING} p=10001
> >> RewriteRule ^/apex/f$ /apex/myapp [R,L]
>
>
> I think you want:
>
> RewriteCond %{QUERY_STRING} p=10001
> RewriteRule ^/f$ /myapp [R,L]
>
> The prefix /apex is already a part of the context-path and should be
> removed from the URL patterns being matched. If you want to redirect to
> another web application, you need a fully-qualified redirect like this:
>
> RewriteCond %{QUERY_STRING} p=10001
> RewriteRule ^/f$ https://www.google.com/ [R,L]
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi Felix,

location of context.xml file is

 cat context.xml| grep RewriteValve

 pwd
/opt/tomcat/apache-tomcat-9.0.54/instance/conf



more
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
RewriteCond %{QUERY_STRING} p=10001
RewriteRule ^/apex/f$ /apex/myapp [R,L]

its still not working


On Mon, 21 Mar 2022 at 00:57, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
> Am 20.03.22 um 19:45 schrieb Thomas Hoffmann (Speed4Trade GmbH):
>
> Hello,
>
> url rewrite doesn't match against url parameters as far as I know.
> RewriteRule ^/apex/f$  /apex/myapp [R,L]
>
> You can match the query string by adding a RewriteCond, for example
>
> RewriteCond %{QUERY_STRING} p=1001
> RewriteRule ^/apex/f$ /apex/myapp [R,L]
>
> (The lines have to be in that order and no other line in between)
>
> Felix
>
> Just a guess, maybe you can  give it a try.
>
> Another option would be to use the source code of tomcat and set a breakpoint 
> within the filter class
> (just with a little dummy app deployed).
>
> Greetings, Thomas
>
>
> -Ursprüngliche Nachricht-
> Von: rupali singh  
> Gesendet: Sonntag, 20. März 2022 19:23
> An: Tomcat Users List  
> Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
>
> Hi,
>
> i have referred Around 
> here:https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> but still can't figure out how to write rules for my requirements..
> can you please help
>
> On Sat, 19 Mar 2022 at 21:57, Thomas Hoffmann (Speed4Trade 
> GmbH) 
>  wrote:
>
>
> Hallo,
>
> just scroll down the documentation.
> Around here:https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> If something is not clear there, just drop a line
>
>
>
> -Ursprüngliche Nachricht-
> Von: rupali singh  
> Gesendet: Samstag, 19. März 2022 18:28
> An: Tomcat Users List  
> Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
>
> Hi,
>
> Thanks a lot for your quick response.then what options we have in
> tomcat apache for rewrite rules.
>
> Apologies im new to apache tomcat.
>
>
> On Sat, Mar 19, 2022, 9:42 PM Terence M. Bandoian 
> 
> wrote:
>
>
> On 3/19/2022 1:03 AM, rupali singh wrote:
>
> Hi Team,
>
> We are using tomcat 9.54 version.
> Need help in rewriting rule.
>
> background   : We have an Oracle apex server ( version 21.1)  and
>
> tomcat
>
> is
>
> installed on the same server. We have F5 url which redirects to
> apex installed on tomcat  eg 
> https://xyz.ae/apex/f?p=1001<https://xyz.com/apex/f?p=1001> 
> <https://xyz.com/apex/f?p=1001>   so xyz.ae is published on our F5
>
> which
>
> redirects internally to tomcat server on port 8080.
>
> we want to redirect  
> https://xyz.ae/apex/f?p=1001<https://xyz.com/apex/f?p=1001> 
> <https://xyz.com/apex/f?p=1001>   to
>   https://xyz.ae/apex/myapp <https://xyz.com/aorx/myapp> 
> <https://xyz.com/aorx/myapp>   as it's
>
> difficult
>
> for business users to remember f?p=1001<https://xyz.com/apex/f?p=1001> 
> <https://xyz.com/apex/f?p=1001>
>
> i have prepared context.xml and rewrite.config rule but
> redirection not working and there is no error in catalina.log
>
> in access log we are getting 404.
>
> i have tried steps mentioned in
>
>
> https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with
> -
>
> ord
>
> s-and-oracle-apex
>
> rewrite.config content
>
> RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule 
> ^/myapp$https://xyz.ae/apex/myapp [R,L]
>
>
> please advise how to resolve the issue
>
> Those look like Apache HTTPD rewrite rules. How are they supported
> in Apache Tomcat?
>
> -Terence Bandoian
>
>
> --
> --- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>  --
> Thanks and Regards,
> Rupali
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
Thanks and Regards,
Rupali


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi,

Yes im restarting the tomcat after changing the rewrite. Config file.


i have increased log level to FINE


*cat /opt/tomcat/apache-tomcat-9.0.54/instance/conf/logging.properties |
grep FINE*
1catalina.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.level = FINE
3manager.org.apache.juli.AsyncFileHandler.level = FINE
4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
java.util.logging.ConsoleHandler.level = FINE
*org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE*
#org.apache.catalina.util.LifecycleBase.level = FINE
#org.apache.jasper.compiler.TldLocationsCache.level = FINE
#org.apache.coyote.http2.level = FINE
#org.apache.tomcat.websocket.level = FINE


in which log file it will write detailed errors/issues/ trace details

i have checked below files but cant see anything related to rewrite rules.
its all normal logs only

catalina.out
catalina.2022-03-20.log
localhost_access_log.2022-03-20.txt


 cat localhost_access_log.2022-03-20.txt | grep myapp
x.x.x.x - - [20/Mar/2022:20:08:47 +] "GET /apex/myapp HTTP/1.1" 404
16681





On Mon, Mar 21, 2022, 1:25 AM Thomas Hoffmann (Speed4Trade GmbH)
 wrote:

> Hello,
>
> the location under /WEB-INF/ is the correct one.
> Did you restart tomcat afterwards? The config is loaded during startup.
>
> Maybe you can activate logging via logging.properties
>
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE
>
> Should spit out plenty of information in one of the logfiles.
>
>
> > -----Ursprüngliche Nachricht-
> > Von: rupali singh 
> > Gesendet: Sonntag, 20. März 2022 20:17
> > An: Tomcat Users List 
> > Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
> >
> > Hi Thomas,
> > thanks for the quick reply.
> > I have tried below but it's still not working.
> >
> > RewriteRule ^/apex/f$  /apex/myapp [R,L]
> >
> > I have placed rewrite.config on below locations and fileis same in both
> > locations , after changing rewrite.config i'm restarting tomcat as well.
> > /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-
> > INF/rewrite.config
> > and
> > /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/apex/WEB-
> > INF/rewrite.config
> >
> >
> > i'm new to apache tomcat and now aware of how to achieve below.
> >
> >
> > Another option would be to use the source code of tomcat and set a
> > breakpoint within the filter class (just with a little dummy app
> deployed).
> >
> > On Sun, 20 Mar 2022 at 22:46, Thomas Hoffmann (Speed4Trade GmbH)
> >  wrote:
> >
> > > Hello,
> > >
> > > url rewrite doesn't match against url parameters as far as I know.
> > > RewriteRule ^/apex/f$  /apex/myapp [R,L]
> > >
> > > Just a guess, maybe you can  give it a try.
> > >
> > > Another option would be to use the source code of tomcat and set a
> > > breakpoint within the filter class (just with a little dummy app
> > > deployed).
> > >
> > > Greetings, Thomas
> > >
> > > > -Ursprüngliche Nachricht-
> > > > Von: rupali singh 
> > > > Gesendet: Sonntag, 20. März 2022 19:23
> > > > An: Tomcat Users List 
> > > > Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
> > > >
> > > > Hi,
> > > >
> > > > i have referred Around here:
> > > > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > > > but still can't figure out how to write rules for my requirements..
> > > > can you please help
> > > >
> > > > On Sat, 19 Mar 2022 at 21:57, Thomas Hoffmann (Speed4Trade GmbH)
> > > >  wrote:
> > > >
> > > > > Hallo,
> > > > >
> > > > > just scroll down the documentation.
> > > > > Around here:
> > > > > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > > > > If something is not clear there, just drop a line
> > > > >
> > > > >
> > > > > > -Ursprüngliche Nachricht-
> > > > > > Von: rupali singh 
> > > > > > Gesendet: Samstag, 19. März 2022 18:28
> > > > > > An: Tomcat Users List 
> > > > > > Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Thanks a lot for your quick response.then what options we have
> > > > > > in tomcat apache for rewrite rules.
> &

Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi Thomas,
thanks for the quick reply.
I have tried below but it's still not working.

RewriteRule ^/apex/f$  /apex/myapp [R,L]

I have placed rewrite.config on below locations and fileis same in both
locations , after changing rewrite.config i'm restarting tomcat as well.
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
and
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/apex/WEB-INF/rewrite.config


i'm new to apache tomcat and now aware of how to achieve below.


Another option would be to use the source code of tomcat and set a
breakpoint within the filter class
(just with a little dummy app deployed).

On Sun, 20 Mar 2022 at 22:46, Thomas Hoffmann (Speed4Trade GmbH)
 wrote:

> Hello,
>
> url rewrite doesn't match against url parameters as far as I know.
> RewriteRule ^/apex/f$  /apex/myapp [R,L]
>
> Just a guess, maybe you can  give it a try.
>
> Another option would be to use the source code of tomcat and set a
> breakpoint within the filter class
> (just with a little dummy app deployed).
>
> Greetings, Thomas
>
> > -Ursprüngliche Nachricht-
> > Von: rupali singh 
> > Gesendet: Sonntag, 20. März 2022 19:23
> > An: Tomcat Users List 
> > Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
> >
> > Hi,
> >
> > i have referred Around here:
> > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > but still can't figure out how to write rules for my requirements..
> > can you please help
> >
> > On Sat, 19 Mar 2022 at 21:57, Thomas Hoffmann (Speed4Trade GmbH)
> >  wrote:
> >
> > > Hallo,
> > >
> > > just scroll down the documentation.
> > > Around here:
> > > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > > If something is not clear there, just drop a line
> > >
> > >
> > > > -Ursprüngliche Nachricht-
> > > > Von: rupali singh 
> > > > Gesendet: Samstag, 19. März 2022 18:28
> > > > An: Tomcat Users List 
> > > > Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
> > > >
> > > > Hi,
> > > >
> > > > Thanks a lot for your quick response.then what options we have in
> > > > tomcat apache for rewrite rules.
> > > >
> > > > Apologies im new to apache tomcat.
> > > >
> > > >
> > > > On Sat, Mar 19, 2022, 9:42 PM Terence M. Bandoian
> > > > 
> > > > wrote:
> > > >
> > > > > On 3/19/2022 1:03 AM, rupali singh wrote:
> > > > > > Hi Team,
> > > > > >
> > > > > > We are using tomcat 9.54 version.
> > > > > > Need help in rewriting rule.
> > > > > >
> > > > > > background   : We have an Oracle apex server ( version 21.1)  and
> > > tomcat
> > > > > is
> > > > > > installed on the same server. We have F5 url which redirects to
> > > > > > apex installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > > > > > <https://xyz.com/apex/f?p=1001>   so xyz.ae is published on our
> F5
> > > > which
> > > > > > redirects internally to tomcat server on port 8080.
> > > > > >
> > > > > > we want to redirect  https://xyz.ae/apex/f?p=1001
> > > > > > <https://xyz.com/apex/f?p=1001>   to
> > > > > >   https://xyz.ae/apex/myapp <https://xyz.com/aorx/myapp>   as
> it's
> > > > > difficult
> > > > > > for business users to remember f?p=1001
> > > > > > <https://xyz.com/apex/f?p=1001>
> > > > > >
> > > > > > i have prepared context.xml and rewrite.config rule but
> > > > > > redirection not working and there is no error in catalina.log
> > > > > >
> > > > > > in access log we are getting 404.
> > > > > >
> > > > > > i have tried steps mentioned in
> > > > > >
> > > > > https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with
> > > > > -
> > > > ord
> > > > > s-and-oracle-apex
> > > > > >
> > > > > > rewrite.config content
> > > > > >
> > > > > > RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule ^/myapp$
> > > > > > https://xyz.ae/apex/myapp [R,L]
> > > > > >
> > > > > >
> > > > > > please advise how to resolve the issue
> > > > >
> > > > > Those look like Apache HTTPD rewrite rules. How are they supported
> > > > > in Apache Tomcat?
> > > > >
> > > > > -Terence Bandoian
> > > > >
> > > > >
> > > > > --
> > > > > --- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > > > >
> > > > >
> > >
> >
> >
> > --
> > Thanks and Regards,
> > Rupali
>


-- 
Thanks and Regards,
Rupali


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi,

i have referred Around here:
https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
but still can't figure out how to write rules for my requirements..
can you please help

On Sat, 19 Mar 2022 at 21:57, Thomas Hoffmann (Speed4Trade GmbH)
 wrote:

> Hallo,
>
> just scroll down the documentation.
> Around here:
> https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> If something is not clear there, just drop a line
>
>
> > -Ursprüngliche Nachricht-
> > Von: rupali singh 
> > Gesendet: Samstag, 19. März 2022 18:28
> > An: Tomcat Users List 
> > Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
> >
> > Hi,
> >
> > Thanks a lot for your quick response.then what options we have in tomcat
> > apache for rewrite rules.
> >
> > Apologies im new to apache tomcat.
> >
> >
> > On Sat, Mar 19, 2022, 9:42 PM Terence M. Bandoian 
> > wrote:
> >
> > > On 3/19/2022 1:03 AM, rupali singh wrote:
> > > > Hi Team,
> > > >
> > > > We are using tomcat 9.54 version.
> > > > Need help in rewriting rule.
> > > >
> > > > background   : We have an Oracle apex server ( version 21.1)  and
> tomcat
> > > is
> > > > installed on the same server. We have F5 url which redirects to apex
> > > > installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > > > <https://xyz.com/apex/f?p=1001>   so xyz.ae is published on our F5
> > which
> > > > redirects internally to tomcat server on port 8080.
> > > >
> > > > we want to redirect  https://xyz.ae/apex/f?p=1001
> > > > <https://xyz.com/apex/f?p=1001>   to
> > > >   https://xyz.ae/apex/myapp <https://xyz.com/aorx/myapp>   as it's
> > > difficult
> > > > for business users to remember f?p=1001
> > > > <https://xyz.com/apex/f?p=1001>
> > > >
> > > > i have prepared context.xml and rewrite.config rule but redirection
> > > > not working and there is no error in catalina.log
> > > >
> > > > in access log we are getting 404.
> > > >
> > > > i have tried steps mentioned in
> > > >
> > > https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with-
> > ord
> > > s-and-oracle-apex
> > > >
> > > > rewrite.config content
> > > >
> > > > RewriteCond %{REQUEST_URI} ^/myapp$
> > > > RewriteRule ^/myapp$ https://xyz.ae/apex/myapp [R,L]
> > > >
> > > >
> > > > please advise how to resolve the issue
> > >
> > > Those look like Apache HTTPD rewrite rules. How are they supported in
> > > Apache Tomcat?
> > >
> > > -Terence Bandoian
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > >
> > >
>


-- 
Thanks and Regards,
Rupali


Re: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi,

i have tried below but its not working

RewriteRule ^/apex/f?p=1001  /apex/myapp [R,L]

On Sat, 19 Mar 2022 at 10:19, Jason Wee  wrote:

> have you try?
>
> RewriteRule ^/apex/f?p=1001  /apex/myapp [R,L]
>
> On Sat, Mar 19, 2022 at 2:05 PM rupali singh 
> wrote:
> >
> > Hi Team,
> >
> > We are using tomcat 9.54 version.
> > Need help in rewriting rule.
> >
> > background   : We have an Oracle apex server ( version 21.1)  and tomcat
> is
> > installed on the same server. We have F5 url which redirects to apex
> > installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > <https://xyz.com/apex/f?p=1001>   so xyz.ae is published on our F5 which
> > redirects internally to tomcat server on port 8080.
> >
> > we want to redirect  https://xyz.ae/apex/f?p=1001
> > <https://xyz.com/apex/f?p=1001>   to
> >  https://xyz.ae/apex/myapp <https://xyz.com/aorx/myapp>   as it's
> difficult
> > for business users to remember f?p=1001 <https://xyz.com/apex/f?p=1001>
> >
> > i have prepared context.xml and rewrite.config rule but redirection not
> > working and there is no error in catalina.log
> >
> > in access log we are getting 404.
> >
> > i have tried steps mentioned in
> >
> https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with-ords-and-oracle-apex
> >
> > rewrite.config content
> >
> > RewriteCond %{REQUEST_URI} ^/myapp$
> > RewriteRule ^/myapp$ https://xyz.ae/apex/myapp [R,L]
> >
> >
> > please advise how to resolve the issue
> > --
> > Thanks and Regards,
> > Rupali
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
Thanks and Regards,
Rupali


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-19 Thread rupali singh
Hi,

Thanks a lot for your quick response.then what options we have in tomcat
apache for rewrite rules.

Apologies im new to apache tomcat.


On Sat, Mar 19, 2022, 9:42 PM Terence M. Bandoian  wrote:

> On 3/19/2022 1:03 AM, rupali singh wrote:
> > Hi Team,
> >
> > We are using tomcat 9.54 version.
> > Need help in rewriting rule.
> >
> > background   : We have an Oracle apex server ( version 21.1)  and tomcat
> is
> > installed on the same server. We have F5 url which redirects to apex
> > installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > <https://xyz.com/apex/f?p=1001>   so xyz.ae is published on our F5 which
> > redirects internally to tomcat server on port 8080.
> >
> > we want to redirect  https://xyz.ae/apex/f?p=1001
> > <https://xyz.com/apex/f?p=1001>   to
> >   https://xyz.ae/apex/myapp <https://xyz.com/aorx/myapp>   as it's
> difficult
> > for business users to remember f?p=1001 <https://xyz.com/apex/f?p=1001>
> >
> > i have prepared context.xml and rewrite.config rule but redirection not
> > working and there is no error in catalina.log
> >
> > in access log we are getting 404.
> >
> > i have tried steps mentioned in
> >
> https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with-ords-and-oracle-apex
> >
> > rewrite.config content
> >
> > RewriteCond %{REQUEST_URI} ^/myapp$
> > RewriteRule ^/myapp$ https://xyz.ae/apex/myapp [R,L]
> >
> >
> > please advise how to resolve the issue
>
> Those look like Apache HTTPD rewrite rules. How are they supported in
> Apache Tomcat?
>
> -Terence Bandoian
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Fwd: tomcat 9.50 - rewrite rule question

2022-03-19 Thread rupali singh
Hi Team,

We are using tomcat 9.54 version.
Need help in rewriting rule.

background   : We have an Oracle apex server ( version 21.1)  and tomcat is
installed on the same server. We have F5 url which redirects to apex
installed on tomcat  eg https://xyz.ae/apex/f?p=1001
   so xyz.ae is published on our F5 which
redirects internally to tomcat server on port 8080.

we want to redirect  https://xyz.ae/apex/f?p=1001
   to
 https://xyz.ae/apex/myapp    as it's difficult
for business users to remember f?p=1001 

i have prepared context.xml and rewrite.config rule but redirection not
working and there is no error in catalina.log

in access log we are getting 404.

i have tried steps mentioned in
https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with-ords-and-oracle-apex

rewrite.config content

RewriteCond %{REQUEST_URI} ^/myapp$
RewriteRule ^/myapp$ https://xyz.ae/apex/myapp [R,L]


please advise how to resolve the issue
-- 
Thanks and Regards,
Rupali