You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Jay, Michael" <em...@ufl.edu> on 2011/05/24 15:11:15 UTC

Static Resources - Runtime Problems

I'm finding that whether I use a redirect() or a forward() to a static resource, my server goes crazy. 

  at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572)
  at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
  at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572)
  at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)

Above is output to the console many times. Then the pattern below repeats until I stop the application with the Tomcat Manager.

 at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
 at edu.ufl.uflib.hr.web.HRSurveyLogin.doGet(HRSurveyLogin.java:180)

I must be overlooking something very basic. 

The catalina log simply says:

May 24, 2011 8:33:35 AM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 461 instance(s) to be deallocated
May 24, 2011 8:33:36 AM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 461 instance(s) to be deallocated
May 24, 2011 8:33:37 AM org.apache.catalina.core.StandardWrapper unload

Can anyone help?

mj

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


RE: Static Resources - Runtime Problems

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
 On Tue, 24 May 2011 10:47:32 -0400, Jay, Michael wrote:

 IMHO code that follows pattern

 try {
 ... something
 }  catch (Exception e) {
 System.out("oops");
 }

 ...

 try {
 ... something
 }  catch (Exception e) {
 System.out("oops");
 }

 deserves only /dev/null as a permanent storage destination.

-- 
 Mikolaj Rydzewski <mi...@ceti.pl>

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


Re: Static Resources - Runtime Problems

Posted by Mark Thomas <ma...@apache.org>.
On 24/05/2011 21:21, Jay, Michael wrote:
> That was gnawing at the back of my mind a little bit. So how would you have an entry point servlet run at a simple address without consuming everything in that path? If the context is /hrsurvey and all the other servlets are mapped with that assumed as a prefix, can there not be anything mapped to /hrsurvey?

You'd use an exact match (which takes precedence).

> If I'm looking foolish here it's worth it. Under a lot of pressure to make something work that I've never looked at before. I appreciate the insight.

Rather than me copy and pasting a few pages of the spec here, I highly
recommend that you read section 12 of the Servlet spec for info on how
requests are mapped to servlets.

Getting back to the original problem, it looks like something somewhere
has managed to create an HttpRequestWrapper that wraps itself. That is
going to be tricky to track down. How easy is this to reproduce? Can you
figure out what triggers it from the access logs?

Mark


> 
> mj
> 
> -----Original Message-----
> From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
> Sent: Tuesday, May 24, 2011 4:07 PM
> To: Tomcat Users List
> Subject: RE: Static Resources - Runtime Problems
> 
>> From: Jay, Michael [mailto:emjay@ufl.edu] 
>> Subject: RE: Static Resources - Runtime Problems
> 
>> I haven't mapped the .htm to anything.
> 
> Actually, you have:
> 
>>       <servlet-mapping>
>>           <servlet-name>HRSurveyLogin</servlet-name>
>>           <url-pattern>/</url-pattern>
>>       </servlet-mapping>	
> 
> That will send everything to HRSurveyLogin, including anything it redirects or forwards.  (Can you say, "infinite loop"?)
> 
>  - 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: Static Resources - Runtime Problems

Posted by "Jay, Michael" <em...@ufl.edu>.
Thanks! 

-----Original Message-----
From: Bill Miller [mailto:millebi.subscriptions@gmail.com] 
Sent: Tuesday, May 24, 2011 4:32 PM
To: 'Tomcat Users List'
Subject: RE: Static Resources - Runtime Problems

Using a filter would insert the entry point of the Servlet into an entire path with the option of allowing/not allowing it to continue down the call chain.

-->FilterA->FilterB->RealServlet
     |
     +->SomethingInteresting

FilterA will have the ability to examine the request and pass it to some other logic (SomethingInteresting) and also abort the passing to FilterB and the RealServlet if required. This means that a call to /a/b/wooHoo can be examined/processed at the /a level, and then the /a/b level before it finally arrives at /a/b/wooHoo.

Bill
-----Original Message-----
From: Jay, Michael [mailto:emjay@ufl.edu] 
Sent: May 24, 2011 4:21 PM
To: 'Tomcat Users List'
Subject: RE: Static Resources - Runtime Problems

That was gnawing at the back of my mind a little bit. So how would you have an entry point servlet run at a simple address without consuming everything in that path? If the context is /hrsurvey and all the other servlets are mapped with that assumed as a prefix, can there not be anything mapped to /hrsurvey?

If I'm looking foolish here it's worth it. Under a lot of pressure to make something work that I've never looked at before. I appreciate the insight.

mj

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Tuesday, May 24, 2011 4:07 PM
To: Tomcat Users List
Subject: RE: Static Resources - Runtime Problems

> From: Jay, Michael [mailto:emjay@ufl.edu] 
> Subject: RE: Static Resources - Runtime Problems

> I haven't mapped the .htm to anything.

Actually, you have:

>       <servlet-mapping>
>           <servlet-name>HRSurveyLogin</servlet-name>
>           <url-pattern>/</url-pattern>
>       </servlet-mapping>	

That will send everything to HRSurveyLogin, including anything it redirects or forwards.  (Can you say, "infinite loop"?)

 - 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: Static Resources - Runtime Problems

Posted by Bill Miller <mi...@gmail.com>.
Using a filter would insert the entry point of the Servlet into an entire path with the option of allowing/not allowing it to continue down the call chain.

-->FilterA->FilterB->RealServlet
     |
     +->SomethingInteresting

FilterA will have the ability to examine the request and pass it to some other logic (SomethingInteresting) and also abort the passing to FilterB and the RealServlet if required. This means that a call to /a/b/wooHoo can be examined/processed at the /a level, and then the /a/b level before it finally arrives at /a/b/wooHoo.

Bill
-----Original Message-----
From: Jay, Michael [mailto:emjay@ufl.edu] 
Sent: May 24, 2011 4:21 PM
To: 'Tomcat Users List'
Subject: RE: Static Resources - Runtime Problems

That was gnawing at the back of my mind a little bit. So how would you have an entry point servlet run at a simple address without consuming everything in that path? If the context is /hrsurvey and all the other servlets are mapped with that assumed as a prefix, can there not be anything mapped to /hrsurvey?

If I'm looking foolish here it's worth it. Under a lot of pressure to make something work that I've never looked at before. I appreciate the insight.

mj

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Tuesday, May 24, 2011 4:07 PM
To: Tomcat Users List
Subject: RE: Static Resources - Runtime Problems

> From: Jay, Michael [mailto:emjay@ufl.edu] 
> Subject: RE: Static Resources - Runtime Problems

> I haven't mapped the .htm to anything.

Actually, you have:

>       <servlet-mapping>
>           <servlet-name>HRSurveyLogin</servlet-name>
>           <url-pattern>/</url-pattern>
>       </servlet-mapping>	

That will send everything to HRSurveyLogin, including anything it redirects or forwards.  (Can you say, "infinite loop"?)

 - 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: Static Resources - Runtime Problems

Posted by "Jay, Michael" <em...@ufl.edu>.
That was gnawing at the back of my mind a little bit. So how would you have an entry point servlet run at a simple address without consuming everything in that path? If the context is /hrsurvey and all the other servlets are mapped with that assumed as a prefix, can there not be anything mapped to /hrsurvey?

If I'm looking foolish here it's worth it. Under a lot of pressure to make something work that I've never looked at before. I appreciate the insight.

mj

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Tuesday, May 24, 2011 4:07 PM
To: Tomcat Users List
Subject: RE: Static Resources - Runtime Problems

> From: Jay, Michael [mailto:emjay@ufl.edu] 
> Subject: RE: Static Resources - Runtime Problems

> I haven't mapped the .htm to anything.

Actually, you have:

>       <servlet-mapping>
>           <servlet-name>HRSurveyLogin</servlet-name>
>           <url-pattern>/</url-pattern>
>       </servlet-mapping>	

That will send everything to HRSurveyLogin, including anything it redirects or forwards.  (Can you say, "infinite loop"?)

 - 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.


RE: Static Resources - Runtime Problems

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jay, Michael [mailto:emjay@ufl.edu] 
> Subject: RE: Static Resources - Runtime Problems

> I haven't mapped the .htm to anything.

Actually, you have:

>       <servlet-mapping>
>           <servlet-name>HRSurveyLogin</servlet-name>
>           <url-pattern>/</url-pattern>
>       </servlet-mapping>	

That will send everything to HRSurveyLogin, including anything it redirects or forwards.  (Can you say, "infinite loop"?)

 - 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.


RE: Static Resources - Runtime Problems

Posted by "Jay, Michael" <em...@ufl.edu>.
I appreciate you trying to be helpful rather than otherwise. The current state of the code is simply an exploration, a debugging exercise, though one that is causing a lot of frustration and costing a lot of time.  I'm not sure how to get the full trace. It goes beyond what I can capture in the console window and it doesn't appear in catalina.log--many more lines appear in the console. Perhaps tweaking the shortcut that starts tomcat to pipe to a file? Any suggestions on how to get that data for you?

And  to answer Charles and Martin, no, I haven't mapped the .htm to anything. Since it is not a servlet I didn't know that was necessary. If I have a test.htm file in the context root of this web app, how would I configure the <servlet> and <servlet-mapping> elements? I don't want the user to be able to access the page directly, I want a servlet to forward to it under the right conditions.

I'll try again to isolate the error. 

mj

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Tuesday, May 24, 2011 2:23 PM
To: Tomcat Users List
Subject: Re: Static Resources - Runtime Problems

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael,

On 5/24/2011 10:47 AM, Jay, Michael wrote:
> I apologize for the insufficient data.  The goal is to foward the
> user to google.com to login and on successful authentication, reveal
> the original page desired. The original author used a .jsp that
> simply produces itself. But that's a separate issue--I think. I've
> not been able to capture an exception when attempting to forward().
> Tomcat seems to go into a loop of some kind.--mj

It looks more like the object graph has a /very/ long chain to get to
the real request object.

Can you post the /entire/ stack trace you get? What is the actual error?
Probably a StackOverflowException or something like that.

HttpServletRequestWrapper is a Servlet API class that can be used to
wrap a request object. AFAIK, Tomcat does not use this class for
anything unless you have explicitly configured Tomcat to attach a Filter
to incoming requests.

If you have many requests that forward to other resources that forward
to other resources that forward... and so on, the request can be
(inadvertently) wrapped multiple times.

I didn't see *any* filter definitions in your web.xml so your code must
be wrapping something at some point. A look at the full stack trace will
help a bit.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3b93gACgkQ9CaO5/Lv0PAMcQCfXhUBsPGd6zDcU1MiFhFc8ouj
xfAAnR+Zq+1gkkTQtVMS7xHZ/E7R1s+Q
=BwFT
-----END PGP SIGNATURE-----

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


Re: Static Resources - Runtime Problems

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael,

On 5/24/2011 10:47 AM, Jay, Michael wrote:
> I apologize for the insufficient data.  The goal is to foward the
> user to google.com to login and on successful authentication, reveal
> the original page desired. The original author used a .jsp that
> simply produces itself. But that's a separate issue--I think. I've
> not been able to capture an exception when attempting to forward().
> Tomcat seems to go into a loop of some kind.--mj

It looks more like the object graph has a /very/ long chain to get to
the real request object.

Can you post the /entire/ stack trace you get? What is the actual error?
Probably a StackOverflowException or something like that.

HttpServletRequestWrapper is a Servlet API class that can be used to
wrap a request object. AFAIK, Tomcat does not use this class for
anything unless you have explicitly configured Tomcat to attach a Filter
to incoming requests.

If you have many requests that forward to other resources that forward
to other resources that forward... and so on, the request can be
(inadvertently) wrapped multiple times.

I didn't see *any* filter definitions in your web.xml so your code must
be wrapping something at some point. A look at the full stack trace will
help a bit.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3b93gACgkQ9CaO5/Lv0PAMcQCfXhUBsPGd6zDcU1MiFhFc8ouj
xfAAnR+Zq+1gkkTQtVMS7xHZ/E7R1s+Q
=BwFT
-----END PGP SIGNATURE-----

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


RE: Static Resources - Runtime Problems

Posted by "Jay, Michael" <em...@ufl.edu>.
I apologize for the insufficient data.  The goal is to foward the user to google.com to login and on successful authentication, reveal the original page desired. The original author used a .jsp that simply produces itself. But that's a separate issue--I think. I've not been able to capture an exception when attempting to forward(). Tomcat seems to go into a loop of some kind.--mj

OS: Windows 7 Enterprise (6.1.7600)
Tomcat: 7.0.12
IE: 8.0.7600.16385

The initial servlet  . . . 

//	source file HRSurveyLogin.java

package edu.ufl.uflib.hr.web;

//	external libraries
import java.io.*;
import java.lang.*;
import java.util.*;

import javax.servlet.*;
import javax.servlet.http.*;

import org.openid4java.*;
import org.openid4java.association.*;
import org.openid4java.discovery.*;
import org.openid4java.consumer.*;
import org.openid4java.message.*;
import org.openid4java.message.ax.*;

public class HRSurveyLogin extends HttpServlet
{ 
	//   attributes
     String discoveryTargetURL;				//	userSuppliedString (discovery endpoint)
     String verifierServlet;					//	openid.return_to (our verification servlet)
     String assocHandle;						//	openid.assoc_handle
     
     AuthRequest authentication;				//	object with auth data
     ConsumerManager manager;					//	directing openid4java object
     DiscoveryInformation discoveryData;		//	after "association"
	List discoveryDoc;						//	xrds response doc (xml--why a list?)
     FetchRequest fetcher;					//	attribute getter
     
     PrintWriter outstream;					//	not used
     
     RequestDispatcher home;					//	control transfer mechanism
     RequestDispatcher debug;
     RequestDispatcher test;
     
     ServletContext context;					//	this app's memory area
     
    	/*****************************************************************
    	*													*
    	*	populate the openid4java tools here and prepare the     	*
    	*	authentication request here during intit()				*
    	*													*
    	*****************************************************************/

	public void init() throws ServletException
	{
		//	prepare openid4java objects
		//	TODO: use real ip address
		//	verifierServlet = "http://128.227.254.84:8080/hrsurvey/verify";	
		discoveryTargetURL = "https://www.google.com/accounts/o8/id";
		verifierServlet = "http://localhost:8080/hrsurvey/verify";			
		
     	manager = new ConsumerManager();     	
     	
     	context = this.getServletContext();
     	
	    	try
		{
			//	prepare control transfer mechanism
			debug = context.getRequestDispatcher("/error");
	     	home = context.getRequestDispatcher("/hrsurvey.htm");	     
		}
     		
		catch(Exception error)
		{
			System.out.println("problem initializing dispatchers: " + error.getMessage());
		}				
     	
     	try
     	{
     		//	perform discovery
     		discoveryDoc = manager.discover(discoveryTargetURL);     		
     	}
     	
     	catch(Exception error)
     	{
			System.out.println("problem during discovery");
     		System.out.println(error.getMessage());
     	}
         
		//	handshake and get "real" endpoint address
     	//	TODO: catch errors here--see documentation
     	discoveryData = manager.associate(discoveryDoc); 
     	     
     	try
		{
     		//	build authentication request and obtain shared secret
     		authentication = manager.authenticate(discoveryData, verifierServlet);
     		assocHandle = authentication.getHandle();     	
		}
     	
     	catch (Exception error)
		{
			System.out.println(" problem with authentication!!!" + error.getMessage());
		}	    	
     	
     	try
		{	//	add e-mail request to url
     		fetcher = FetchRequest.createFetchRequest();
			fetcher.addAttribute("email", "http://axschema.org/contact/email", true );
			authentication.addExtension(fetcher);
		} 
     	
     	catch (Exception error)
		{
     	
			System.out.println("problem with adding extensions to request");
			System.out.println(error.getMessage());
		}      	    
     	
	}	//	method init() ends

	
	/*****************************************************************
    	*													*
    	*	save association handle for later verification and send 	*
    	*	the user to openID provider here in doGet()				*
    	*													*
    	*****************************************************************/
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
	{			
	 	//	prevent response from being committed before forward() is called
     	response.setContentType("text/plain");
     	response.setBufferSize(4096);
     	
     	outstream = response.getWriter();     	
     
		if ( request.getSession().getAttribute("visited") == null )
		{
			//	disable authentication on accidental visits here during session
			//	TODO: find better way to do this like event listeners
			request.getSession().setAttribute("visited", "visited");

			try
     		{
     			//	store association handle for verification
				context.setAttribute("handle", assocHandle);
     		}
     	
     		catch(Exception error)
     		{
     			request.getSession().setAttribute("error_message", "problem saving association hanlde to session: " + error.getMessage());
				debug.forward(request, response);	
			} 
	
			//	send user to openID provider for sign-in				
			response.sendRedirect(authentication.getDestinationUrl(true));
     	}		

		else
		{
			if ( context.getAttribute("verified") == null )
			{
				request.getSession().setAttribute("error_message", "unverfied attempt to access homepage: ");
				debug.forward(request, response);			
			}
			
			else
			{
				request.getSession().setAttribute("error_message", "success--the user has been verified");
				debug.forward(request, response);				
			}			<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< reveal the protected resource here upon login success (hrsurvey.htm) using  --RequestDispatcher home;--
			
		}
		
			//	close writer		
			outstream.close();
		
	}	//	method doGet() ends
	
	
	public void destroy()
	{
		debug = null;
		home = null;
		fetcher = null;
		manager = null;
	}

}	//	class HRSurveyLogin ends

//	source file HRSurveyLogin.java ends



The deployment descriptor . . . . 

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"  >

	<!--	servlet declarations	-->

	<!--	use this one for single-servlet approach
	<servlet>
    		<servlet-name>HRSurveyAuth</servlet-name>
		<servlet-class>edu.ufl.uflib.hr.web.HRSurveyAuth</servlet-class>
	</servlet>
	-->

	<servlet>
    		<servlet-name>HRSurveyError</servlet-name>
    		<servlet-class>edu.ufl.uflib.hr.web.HRSurveyError</servlet-class>
    		<load-on-startup>3</load-on-startup>
    	</servlet>
   	
	<servlet>
    		<servlet-name>HRSurveyInclude</servlet-name>
    		<servlet-class>edu.ufl.uflib.hr.web.HRSurveyInclude</servlet-class>
    		<load-on-startup>4</load-on-startup>
    	</servlet>
	
	<servlet>
    		<servlet-name>HRSurveyLogin</servlet-name>
		<servlet-class>edu.ufl.uflib.hr.web.HRSurveyLogin</servlet-class>
    		<load-on-startup>1</load-on-startup>
	</servlet>	
	
	<servlet>
    		<servlet-name>HRSurveyVerify</servlet-name>
		<servlet-class>edu.ufl.uflib.hr.web.HRSurveyVerify</servlet-class>
    		<load-on-startup>2</load-on-startup>
	</servlet>

	<servlet>
    		<servlet-name>ReportServlet</servlet-name>
    		<servlet-class>edu.ufl.uflib.hr.web.ReportServlet</servlet-class>
	</servlet>

	<!--	servlet mapping	-->
	<!-- 
	<servlet-mapping>
    		<servlet-name>HRSurveyAuth</servlet-name>
    		<url-pattern>/</url-pattern>
	</servlet-mapping>	
	-->
	
	<servlet-mapping>
    		<servlet-name>HRSurveyError</servlet-name>
    		<url-pattern>/error</url-pattern>
	</servlet-mapping>
		
	<servlet-mapping>
    		<servlet-name>HRSurveyInclude</servlet-name>
    		<url-pattern>/include</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
    		<servlet-name>HRSurveyLogin</servlet-name>
    		<url-pattern>/</url-pattern>
	</servlet-mapping>	
	
	<servlet-mapping>
    		<servlet-name>HRSurveyVerify</servlet-name>
    		<url-pattern>/verify</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
    		<servlet-name>ReportServlet</servlet-name>
    		<url-pattern>/report</url-pattern>
	</servlet-mapping>
	
	<session-config>
		<session-timeout>5</session-timeout>
	</session-config>

	<!--  this nullifies the default context and let's use use index.htm if we wish but only when we wish -->
	<welcome-file-list>
     	<welcome-file>foo.xml</welcome-file>
	</welcome-file-list>

	<resource-ref>
		<res-ref-name>jdbc/pooledDB</res-ref-name>
		<res-type>javax.sql.DataSource</res-type>
		<res-auth>Container</res-auth>
	</resource-ref>

</web-app>

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


RE: Static Resources - Runtime Problems

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jay, Michael [mailto:emjay@ufl.edu] 
> Subject: Static Resources - Runtime Problems

> I must be overlooking something very basic.

A) Not telling us the version of Tomcat you're using, the JVM level, the platform it's all running on, and whether or not you're running Tomcat stand-alone or behind some other web server.

B) Not providing the actual exception that occurred, but instead just a portion of the stack trace associated with it.

C) Configuring a loop in your filter declarations.  Post your WEB-INF/web.xml so we can look at it.

 - 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: Static Resources - Runtime Problems

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Caldarale, Charles R 
> Subject: RE: Static Resources - Runtime Problems

> C) Configuring a loop in your filter declarations.  Post 
> your WEB-INF/web.xml so we can look at it.

Might not be in filter declarations; could easily be just the servlet mapping you've set up.

 - 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: Static Resources - Runtime Problems

Posted by Martin Gainty <mg...@hotmail.com>.
<!-- what you are forwarding/redirecting to must be mapped so in one of my web.xml i have --.
    <servlet-mapping>
        <servlet-name>freemarker</servlet-name>
        <url-pattern>*.ftl</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>layoutServlet</servlet-name>
        <url-pattern>/servlets/layoutServlet</url-pattern>
    </servlet-mapping>

if i land on URL that ends in ftl the container will invoke the freemarker servlet
if i land on URL that ends with /servlets/layoutServlet then container will invoke layoutServlet

are you forwarding or redirecting to mapped url-pattern 's?

to verify display /WEB-INF/web.xml and 
edu.ufl.uflib.hr.web.HRSurveyLogin.java doGet method
Martin
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> From: emjay@ufl.edu
> To: users@tomcat.apache.org
> Date: Tue, 24 May 2011 09:11:15 -0400
> Subject: Static Resources - Runtime Problems
> 
> I'm finding that whether I use a redirect() or a forward() to a static resource, my server goes crazy. 
> 
>   at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572)
>   at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
>   at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572)
>   at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
> 
> Above is output to the console many times. Then the pattern below repeats until I stop the application with the Tomcat Manager.
> 
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
>  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
>  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
>  at edu.ufl.uflib.hr.web.HRSurveyLogin.doGet(HRSurveyLogin.java:180)
> 
> I must be overlooking something very basic. 
> 
> The catalina log simply says:
> 
> May 24, 2011 8:33:35 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 461 instance(s) to be deallocated
> May 24, 2011 8:33:36 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 461 instance(s) to be deallocated
> May 24, 2011 8:33:37 AM org.apache.catalina.core.StandardWrapper unload
> 
> Can anyone help?
> 
> mj
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>