Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Sep 02, 2011 6:26 am 
Offline
Newbie

Joined: Wed Aug 31, 2011 8:18 am
Posts: 3
Well first of all let me say that my application has been developed using struts2, java, jsp, tomcat6. For preventing double form submission I have made use of tokenSession interceptor. Additionally I have 2 wars namely PIconstructionWeb and PIdistributionWeb. And goal is to make switching between these wars when needed, WITHOUT removing anything from tomcat and restarting tomcat.

I have tried both mod-proxy and mod_jk. To be honest mod-proxy is more simple.

In mod-proxy everything has worked. And necessity for NOT restarting tomcat to make chages has been reached. BUT as I said above I am using tokenSession interceptor, and with mod-proxy EVERY form submission is recieving "invalid.token" result. May be you know how to solve this issue. The configuration has been made with mod-proxy is as following:

<VirtualHost *:80>
ServerName virbank.ru

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /PIconstructionWeb http://localhost:8080/PIconstructionWeb/
ProxyPassReverse /PIconstructionWeb http://localhost:8080/PIconstructionWeb/

ProxyPass /PIdistributionWeb http://localhost:8080/PIdistributionWeb/
ProxyPassReverse /PIdistributionWeb http://localhost:8080/PIdistributionWeb/

ProxyPass / http://localhost:8080/PIdistributionWeb/
ProxyPassReverse / http://localhost:8080/PIdistributionWeb/

</VirtualHost>

On the other hand with mod_jk everything is working (including tokenSession issue). But necessity for NOT restarting tomcat has not been reached. Because one of my wars should reside in ROOT directory of tomcat, and whenever I want to switch I have to restart tomcat. The worker I have defined, is as following:

# Define 1 real worker using ajp13
worker.list=piworker

# Set properties for piworker (ajp13)
worker.piworker.type=ajp13
worker.piworker.host=localhost
worker.piworker.port=8009

I wonder is there any thechnique here to define meaning of the following?

worker.piworker1.host=localhost:8009/PIconstructionWeb
worker.piworker2.host=localhost:8009/PIdistributionWeb


If somebody has solved similar problem please help.

PS with mod_jk: defining workers with differenent ports, and in tomcat server.xml setting different listening ports to 2 wars is tedious and not preferred.

My tomcat should not be restarted because system should always respond to 3rd party external payment systems. And they are working 24 hours a day.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group