|Anonymous | Login | Signup for a new account||02-26-2021 20:05 PST|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0004720||[Resin]||minor||always||08-18-11 13:02||08-25-11 15:47|
|Summary||0004720: match web-app for /*/appname|
(rep by Sachidanand Shukla)
Our application is configured to a web-app id="/app". All request with <domainName>/app/* are reaching the app and everything works great.
Now, we have a new brand which needed the URL to be <domainName>/<brandName>/app/*.
We tried various options ( details given below), but finally we had to configure two different webapps with different IDs, one with /app and one with /brandName but pointing to the same deployment directory ( via sym links).
With big down side of this solution was that the application now starts twice, once with /app context and then fro /brandName content, although it is the same app.
What we need?
Basically, all we need is to send all request with */app to the same app, and the URL should not change when it is received by the app, so that we can parse and take the brand name from the URL.
We have the configuration defined as;
<web-app id="/app" document-directory="_ear_deployer/webapps/hi">
<web-app id="/app" document-directory="_ear_deployer/webapps/cp"> // this directory is nothing but a symbolic link to /hi mentioned above.
We need to run some thing like:
<web-app id=" * /app" document-directory="_ear_deployer/webapps/hi">
What we have tried so far?
We have tried two options which seemed to solve the problem and have one application support both cases, but both did not resolve the issue.
Approach 1: Used <web-app url-regexp= **>
We tried to use this option with configuring the app and using the regexp to configure the web app based on */app to go to same deployment directory.
When specified by url-regexp, the application will be initialized at the first request. This is a big problem.
Approach 2: Used rewrite-dispatch
We used the rewrite-dispatch in resin.conf and it worked close to what we thought.
<web-app id="/app" document-directory="deploy/hi">
<forward regexp="^/foo" target="/"/>
Problem with this approach when the request reached the app the portion before /app is removed. The browser still shows the URL as /foo/app but the application does not receive the /foo portion which is much needed to render the specific brand.
We need your help to make some suggestion so that we can run the same app and support both /app and /foo/app with one single instance of the application rendered from same deployment directory.
|08-18-11 13:02||ferg||New Issue|
|08-25-11 15:47||ferg||Note Added: 0005467|
|08-25-11 15:47||ferg||Assigned To||=> ferg|
|08-25-11 15:47||ferg||Status||new => closed|
|08-25-11 15:47||ferg||Resolution||open => fixed|
|08-25-11 15:47||ferg||Fixed in Version||=> 4.0.22|
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.|
25 unique queries executed.