Anonymous | Login | Signup for a new account | 12-17-2024 10:36 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ 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 | ||||
Reporter | ferg | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 4.0.22 | Product Version | 3.1.6 | ||||
Product Build | |||||||||
Summary | 0004720: match web-app for /*/appname | ||||||||
Description |
(rep by Sachidanand Shukla) Problem Description 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"> <session-config cookie-domain=".foo.com"> <enable-url-rewriting>false</enable-url-rewriting> </session-config> </web-app> <web-app id="/app" document-directory="_ear_deployer/webapps/cp"> // this directory is nothing but a symbolic link to /hi mentioned above. <session-config cookie-domain=".foo.com"> <enable-url-rewriting>false</enable-url-rewriting> </session-config> </web-app> 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. Downside: 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"> <session-config cookie-domain=".foo.com"> <enable-url-rewriting>false</enable-url-rewriting> </session-config> </web-app> <rewrite-dispatch> <forward regexp="^/foo" target="/"/> </rewrite-dispatch> 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. |
||||||||
Steps To Reproduce | |||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed. 25 unique queries executed. |