tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Dekker <willem.dek...@2en40.nl>
Subject T5 on websphere 6.1 problems
Date Mon, 20 Aug 2007 15:28:10 GMT

I am evaluating Tapestry 5.05 on websphere 6.1 with RAD7.0 as IDE.

I have imported the tutorial1 application and it deployed al right.
But when I tried to start the application with
http://localhost:9081/tutorial1 in a browser I had the following message:
Error 404: SRVE0190E: File not found: {0} 
Or when I try the direct home url http://localhost:9081/tutorial1/start I
had the same kind of message:
Error 404: SRVE0190E: File not found: /start 

So I did a bit of searching and found out that it had something to to with
IBM's issues PK31377 and PK33090 which are fixed in fixpak 9 for Websphere
6.1.
After enabling the com.ibm.ws.webcontainer.invokeFiltersCompatibility
property I tried the application again but I got the same kind of Error in
my browser.

I've attached the tapestry source to my environment and set breakpoints to
find out where things are going wrong.
What I have found is that the problem lies in the implementation of the
getPath() method of the Request interface. It calls the HttpServletRequest's
getServletPath() method which returns an empty string("") in Websphere but
when calling the getPathInfo() method on the request it returns the correct
String. On other web-containers it probably works fine(I've tested on tomcat
5.5). It seems like a difference in interpretation of the spec, which says
the following of the above methods:

• Servlet Path: The path section that directly corresponds to the mapping
which activated this request. This path starts with a’/’ character except in
the
case where the request is matched with the ‘/*’ pattern, in which case it is
an
empty string.
• PathInfo: The part of the request path that is not part of the Context
Path or
the Servlet Path. It is either null if there is no extra path, or is a
string with a
leading ‘/’.
(source: Java(TM) Servlet Specification 2.4 Final Release)

To temporary solve this problem I have created a contribute method for the
RequestHandler which instantiate an extended implementation of the
RequestImp with an overridden implementation of the getPath() method like
this:
		@Override
		public String getPath() {
			//Websphere returns the path in the getPathInfo()
			String path = request.getPathInfo();
			//path == null so no Websphere
			if (path == null) {
				return super.getPath();
			}
			//TODO find out if this is necessary
			if (path.length() == 0) {
				path = "/";
			}
			return path;
		}

Now I can finally enjoy tapestry 5 development on Websphere 6.1. However I
don't think this should be a basic thing WAS developers should do when the
want to create a T5 application.
Hopefully this issue could be fixed somehow in a future release.

Cheers,

Willem



-- 
View this message in context: http://www.nabble.com/T5-on-websphere-6.1-problems-tf4299547.html#a12238072
Sent from the Tapestry - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message