Howdy, >SI> Here is the solution that I implemented. > >SI> s_contextPath = >SI> config.getServletContext() >SI> .getResource("/").getPath(); >SI> if ( s_contextPath.equals("/") ) s_contextPath = "";
I don't think the above even works as quoted. For example, for a context name "/blah" on tomcat 4.1.24 the above Would return "/localhost/blah" which is not the context path strictly speaking. It might work for SI's needs, but certainly not for HTML purposes. I also don't know if the above code would work for context path's containing a slash (e.g. /blah/blah), which is legal. >I've also been interested in this: anyway, >context path should be a property of servlet context, >then we should be able to get it. "should" is a strong word: why do you say that? Context path is a property of the request. Whenever you find something you think should belong in the specification, but isn't there, it's good to ask why. Could it be that the reason context path isn't available in the init method is the same reason that server port isn't available there? ;) Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]