You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by sh...@apache.org on 2001/03/28 09:34:46 UTC

cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/enginecontext ServletEngineContextService.java

shesmer     01/03/27 23:34:46

  Modified:    src/java/org/apache/jetspeed/services/enginecontext
                        ServletEngineContextService.java
  Log:
  WebSphere fix
  
  Revision  Changes    Path
  1.6       +9 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/services/enginecontext/ServletEngineContextService.java
  
  Index: ServletEngineContextService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/enginecontext/ServletEngineContextService.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServletEngineContextService.java	2001/03/07 06:48:30	1.5
  +++ ServletEngineContextService.java	2001/03/28 07:34:45	1.6
  @@ -72,7 +72,7 @@
    * @author <a href="mailto:raphael@apache.org">Rapha�l Luta</a>
    * @author <a href="mailto:ekkerbj@netscape.net">Jeff Brekke</a>
    * @author <a href="mailto:sgala@hisitech.com">Santiago Gala</a>
  - * @version $Id: ServletEngineContextService.java,v 1.5 2001/03/07 06:48:30 taylor Exp $
  + * @version $Id: ServletEngineContextService.java,v 1.6 2001/03/28 07:34:45 shesmer Exp $
    */
   public class ServletEngineContextService extends TurbineBaseService implements EngineContextService
   {
  @@ -131,7 +131,14 @@
           URL url = null;
           try {
               url = context.getResource( uri );
  -            // work-around for Websphere 3.52
  +        } catch ( MalformedURLException e) {
  +            //if the URL is wrong, return null
  +        }
  +        try {
  +            // work-around for Websphere
  +            if (url==null) {
  +                url = new URL("file:" + context.getRealPath(uri));
  +            }
               if (url.toString().startsWith("classloader:")) {
                   url = new URL("file:" + url.toString().substring(12));
               }
  
  
  

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