You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sunil A V <su...@infosys.com> on 2010/09/02 16:36:49 UTC

Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to work

Hi,

We have a web application deployed on Tomcat server and is working pretty fine, except in one mode. The web application is available through 2 modes of links - one is regular without load balacer and other is Single Sign On based through load balancer. The normal mode works fine with one start after new war deployment. However SSO link through load balancer does not work fine. When stooped and started again, it works just fine.

Here is the sample directory structure:
Tomcat
                webapps
                                MyApp
                                                WEB-INF
                                                                web.xml
                                                                jsp
                                                                                myapp.jsp
                                MyApp.war
                bin
                logs
                conf
                                web.xml

Deployment Procedure:
Stop the server
Copy the new war to webapps replacing the old one
remove the complete diretcory of MyApp recursively (rm -rf MyApp)
start the server

Issue:
We try both the links of application. The normal one works just fine first time itself. The SSO link shows up the directory listings page of webapps directory showing the MyApp.war and MyApp directory link.
Now all we need to workaround this is just stop the server again and then start it. Surprisingly both SSO mode link and normal works totally fine.
This is recurring problem. Is there a proper permanent fix to this?

Please note the web.xml in Tomcat/conf directory has below
<servlet>
<servlet-name>default</servlet-name>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

Please note the web.xml in Tomcat/webapps/MyApp/WEB-INF directory has below
<welcome-file-list>
<welcome-file>myapp.jsp</welcome-file>
</welcome-file-list>

The application has only myapp.jsp and none of index.* files

myapp.jsp is as below
<html><head><META URL=<%=request.getContextPath()%>/who.do"></head><body/></html>

Somehow first time when new war is deployed, old exploded directory is deleted and server is started, the Tomcat might not be finding xcard.jsp or the application specific web.xml and hence it is listings the directory based on settings in Tomcat/conf/web.xml.  No exceptions in log file.
Second time however it finds the web.xml and xcard.jsp and hence works.

We even tried changing deployment procedure not to delete the exploded directory and rest of steps same. But it does not help either. If we drop the new war while the server is running, it does not take the changes in new war.

~Sunil


Re: Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to work

Posted by Pid <pi...@pidster.com>.
On 03/09/2010 07:31, AVSUNIL wrote:
> 
> Tomcat ver 5.0.19

Which was released 2004-08-28, over 6 years ago.

The most recent v5.0.29 was released 2005-02-19 - because 5.0.x is no
longer supported.  Upgrading to the latest 5.5 shouldn't be too much of
a trauma - you're already on Java 5.


I'm not sure it'll cure your problem, but it's a Really Good Idea.


p


> JVM 1.5
> Linux platform
> No exceptions in logs
> Single SIgn On mode works through a load balancer
> Normal mode URL hits the individual server directly
> In below mail, the jsp name was put incorrectly. It is always invoking
> myapp.jsp 
> 
> From the web.xml I infer that if listings or 404 error will be displayed
> based on settings in defaultServlet settings, if the welcome files are
> missing. Now the question is welcome file (myapp.jsp) is present in
> webapps/WEB-INF/jsp diretcory of application. Why does it not find the same
> first time and why will it find it after one mroe restart
> 
> --------------------------------------------------------------
> 
> 
> n828cl wrote:
>>
>>> From: Sunil A V [mailto:sunil_av@infosys.com] 
>>> Subject: Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to
>>> work
>>
>> Tomcat version?  JVM level?  Platform?  Anything of interest in the Tomcat
>> logs?
>>
>>> The web application is available through 2 modes of links -
>>> one is regular without load balacer and other is Single Sign
>>> On based through load balancer.
>>
>> Please explain how that is configured.  Are they completely separate
>> Tomcat instances on different boxes?
>>
>>> Deployment Procedure:
>>> Stop the server
>>> Copy the new war to webapps replacing the old one
>>> remove the complete diretcory of MyApp recursively (rm -rf MyApp)
>>> start the server
>>
>> Should be ok, although it's a bit heavy-handed.
>>
>>> We try both the links of application.
>>
>> What is a "link"?
>>
>>> Please note the web.xml in Tomcat/webapps/MyApp/WEB-INF directory has
>>> below
>>> <welcome-file-list>
>>> <welcome-file>myapp.jsp</welcome-file>
>>> </welcome-file-list>
>>
>> Which leaves directory listings enabled for the webapp.
>>
>>> The application has only myapp.jsp and none of index.* files
>>
>>> Tomcat might not be finding xcard.jsp
>>
>> Why would it?  Based on your description of the file contents, there is no
>> xcard.jsp, just a myapp.jsp.
>>
>>  - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
> 


RE: Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to work

Posted by AVSUNIL <su...@infosys.com>.
Tomcat ver 5.0.19
JVM 1.5
Linux platform
No exceptions in logs
Single SIgn On mode works through a load balancer
Normal mode URL hits the individual server directly
In below mail, the jsp name was put incorrectly. It is always invoking
myapp.jsp 

>From the web.xml I infer that if listings or 404 error will be displayed
based on settings in defaultServlet settings, if the welcome files are
missing. Now the question is welcome file (myapp.jsp) is present in
webapps/WEB-INF/jsp diretcory of application. Why does it not find the same
first time and why will it find it after one mroe restart

--------------------------------------------------------------


n828cl wrote:
> 
>> From: Sunil A V [mailto:sunil_av@infosys.com] 
>> Subject: Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to
>> work
> 
> Tomcat version?  JVM level?  Platform?  Anything of interest in the Tomcat
> logs?
> 
>> The web application is available through 2 modes of links -
>> one is regular without load balacer and other is Single Sign
>> On based through load balancer.
> 
> Please explain how that is configured.  Are they completely separate
> Tomcat instances on different boxes?
> 
>> Deployment Procedure:
>> Stop the server
>> Copy the new war to webapps replacing the old one
>> remove the complete diretcory of MyApp recursively (rm -rf MyApp)
>> start the server
> 
> Should be ok, although it's a bit heavy-handed.
> 
>> We try both the links of application.
> 
> What is a "link"?
> 
>> Please note the web.xml in Tomcat/webapps/MyApp/WEB-INF directory has
>> below
>> <welcome-file-list>
>> <welcome-file>myapp.jsp</welcome-file>
>> </welcome-file-list>
> 
> Which leaves directory listings enabled for the webapp.
> 
>> The application has only myapp.jsp and none of index.* files
> 
>> Tomcat might not be finding xcard.jsp
> 
> Why would it?  Based on your description of the file contents, there is no
> xcard.jsp, just a myapp.jsp.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Tomcat-Web-App---Strange-Issue---Need-2-restarts-for-SSO-mode-to-work-tp29605152p29611508.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to work

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Sunil A V [mailto:sunil_av@infosys.com] 
> Subject: Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to work

Tomcat version?  JVM level?  Platform?  Anything of interest in the Tomcat logs?

> The web application is available through 2 modes of links -
> one is regular without load balacer and other is Single Sign
> On based through load balancer.

Please explain how that is configured.  Are they completely separate Tomcat instances on different boxes?

> Deployment Procedure:
> Stop the server
> Copy the new war to webapps replacing the old one
> remove the complete diretcory of MyApp recursively (rm -rf MyApp)
> start the server

Should be ok, although it's a bit heavy-handed.

> We try both the links of application.

What is a "link"?

> Please note the web.xml in Tomcat/webapps/MyApp/WEB-INF directory has below
> <welcome-file-list>
> <welcome-file>myapp.jsp</welcome-file>
> </welcome-file-list>

Which leaves directory listings enabled for the webapp.

> The application has only myapp.jsp and none of index.* files

> Tomcat might not be finding xcard.jsp

Why would it?  Based on your description of the file contents, there is no xcard.jsp, just a myapp.jsp.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org