ant elder wrote:
On 8/30/07, ant elder <[EMAIL PROTECTED]> wrote:
This thread has gone quiet but there's been more discussion on this in
TUSCANY-1654 (in case people aren't reading all the jira comments).

How about we just have a  ServletHost getContextPath() modeled after the
Servlet APIs getContextPath method?


That seems the easiest way to fix things so i'd like to do this unless
someone has a better approach?

   ...ant


There's a better approach IMO: the getBaseURI method you proposed initially.

Here's my last comment on getContextPath(), which got snipped out of the thread, so I'm just going to say it again :)

"After reading this: http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html#getContextPath(), getContextPath() seems to return the "path " portion of the URI starting with /, this is different from the complete request URI. So if a complete URL from a mapping is not convenient to pass to Axis2 then I don't think that there's an equivalent in the Servlet APIs and it's probably best to go back to your initial idea of a getBaseURI() method."

This is also consistent with the comments in TUSCANY-1654, which report that getContextPath are returning... a path, not the complete URI.

Also the code that you pointed me to does this:
String filePart = req.getRequestURL().toString(); <-- to get the complete URL/URI, different from the request path
 ...
 o.a.t.s.binding.ws.axis2.TuscanyListingAgent.setContextRoot(filePart)

So I'm still not sure about how this new ServletHost.getXyz() method will be used, but anyway a getContextPath() doing something different than the Servlet API getContextPath() will be confusing and I prefer your initial getBaseURI() proposal.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to