I would recommend to use mod_rewrite in conjunction with mod_proxy, which provide more flexibility for integration of content in the namespace of the virtual host. In order to reduce maintenance effort should think about using include files like in the example below.
Do you really need to use proxy-html?
http.conf:
...
| ServerTokens Prod
| ...
| LoadModule rewrite_module modules/mod_rewrite.so
| LoadModule proxy_module modules/mod_proxy.so
| ...
| RewriteEngine on
| RewriteCond %{REQUEST_METHOD} ^(TRACE|LOCK|UNLOCK)
| RewriteRule .* - [F]
| ...
|
| <virtualhost 127.0.0.1>
| ServerName s1.org
| ...
| Include conf/s1.txt
| </virtualhost>
|
| <virtualhost 127.0.0.1>
| ServerName s2.org
| ...
| Include conf/s2.txt
| </virtualhost>
|
s1.txt:
| RewriteRule .* - [E=DEFAULT_PORTAL:s1]
| RewriteRule .* - [E=DEFAULT_PAGE:p1]
|
| Include conf/common_rules.txt
|
s2.txt:
| RewriteRule .* - [E=DEFAULT_PORTAL:s2]
| RewriteRule .* - [E=DEFAULT_PAGE:p2]
|
| Include conf/common_rules.txt
|
common_rules.txt:
| RewriteCond %{REQUEST_URI} ^/$
| RewriteRule .* http://localhost:8080/portal/portal/%{ENV:DEFAULT_PORTAL}/%{ENV:DEFAULT_P... [P]
| RewriteCond %{REQUEST_URI} ^$
| RewriteRule .* http://localhost:8080/portal/portal/%{ENV:DEFAULT_PORTAL}/%{ENV:DEFAULT_P... [P]
|
| RewriteCond %{REQUEST_URI} ^/portal
| RewriteRule ^/(.*)$ http://localhost:8080/$1 [P]
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100511#4100511
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100511
Well, got around it. The issue went like this:
I wanted to return a Map<Query, Result> from the WS. Interfaces weren't allowed so I returned a HashMap<Query, Result> which worked perfectly if you disregard the fact that the map was always empty. So I returned a MapWrapper object, which complained that the Query class couldn't be found when it was constructing the result.
The strange thing is that returning a List was fine, so I got around it by adding a place for the return value inside the Query class...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100505#4100505
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100505
Problem solved after trace into JBoss code.
The reason is that I created the InitialContext at the time when the MDB is created and try to reuse it when the onMessage() is invoked. What happens behind the scene is that JBoss saves the username / password into a ThreadLocal variable in server environment when the InitialContext is created. This ThreadLocal variable is not there anymore when the onMessage() is invoked because it is a different thread. Hence, the security information is lost and causes the authentication exception.
I now create a new InitialContext object when processing the onMessage() method. Seems working fine.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100504#4100504
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100504
Problem solved after trace into JBoss code.
The reason is that I created the InitialContext at the time when the MDB is created and try to reuse it when the onMessage() is invoked. What happens behind the scene is that JBoss saves the username / password into a ThreadLocal variable in server environment when the InitialContext is created. This ThreadLocal variable is not there anymore when the onMessage() is invoked because it is a different thread. Hence, the security information is lost and causes the authentication exception.
I now create a new InitialContext object when processing the onMessage() method. Seems working fine.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100503#4100503
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100503