Mantis - Resin
Viewing Issue Advanced Details
3977 major always 03-31-10 14:14 01-18-11 17:08
closed 3.1.10  
none 4.0.14  
0003977: Display of web.xml upon auto-restart
When I upload a new .jar file to the domain/WEB-INF/lib directory, the server automatically restarts. When this happens, I sometimes encounter the error where the web.xml file will be displayed as the error page for the website.

Also, we are starting hosts in separate JVM instances, not sure if this contributes to the issue.

1.) Upload new .jar file.
2.) Go the the website and click to refresh/reload the website quickly.
3.) Often this will show back the web.xml file which sometimes includes DB connection info w/ password.

I think that it is happening if a web page is called during the process of loading a new .jar file.


03-31-10 14:15   
This has happened in the previous few versions also, but since I just upgraded to .10 I thought I'd put the bug in.
03-31-10 14:37   
The entire web.xml as a text file? Or an error where Resin shows 3-5 lines of web.xml context?

I can see the second happening because of a timing issue during startup, but I'm not sure how showing the whole web.xml would be possible.
04-02-10 11:04   
I think that only part of the web.xml file is being displayed, as part of an error message.

500 Servlet Exception

WEB-INF/web.xml:1: com.caucho.server.webapp.Listener.setListenerClass():
com.caucho.config.ConfigRuntimeException: java.lang.ClassNotFoundException: in EnvironmentClassLoader[web-app:]

The bad part that mine always seems to display is displaying the DB connection information with user, password etc.

I think that you are right in that it is a timing issue, is their any way to display something other than the WEB.xml file or any parts of it? Maybe during startup a message can display that says..."Server starting up, please refer to server logs for more details."

Would custom error messages prevent this from happening? I see it mostly on our development site, that doesn't have custom pages for error handling.

04-02-10 11:22   
If you remove the <development-mode-error-page/> in the resin.xml, the error message will be a generic one that doesn't show the web.xml.

Do you know where that class is in the classpath? Is there a chance that the class is being loaded before the <class-loader> tag is evaluated?