portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/profiler/impl ProfilerValveImpl.java
Date Wed, 18 Aug 2004 13:57:58 GMT
weaver      2004/08/18 06:57:58

  Modified:    portal/src/java/org/apache/jetspeed/profiler/impl
                        ProfilerValveImpl.java
  Log:
  Refactored profiler valve to "play well" with the folder navigation valve
  
  Revision  Changes    Path
  1.8       +12 -4     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
  
  Index: ProfilerValveImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProfilerValveImpl.java	2 Aug 2004 18:57:28 -0000	1.7
  +++ ProfilerValveImpl.java	18 Aug 2004 13:57:58 -0000	1.8
  @@ -17,6 +17,8 @@
   
   import java.io.IOException;
   
  +import javax.servlet.http.HttpServletRequest;
  +
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.page.PageNotFoundException;
  @@ -39,6 +41,7 @@
   {
       protected Log log = LogFactory.getLog(ProfilerValveImpl.class);
       private Profiler profiler;
  +    static final String LOCATOR_KEY = "org.apache.jetpeed.profileLocator";
   
       
       public ProfilerValveImpl(Profiler profiler)
  @@ -55,9 +58,14 @@
       public void invoke( RequestContext request, ValveContext context ) throws PipelineException
       {
           try
  -        {            
  -
  -            ProfileLocator locator = profiler.getProfile(request);
  +        {  
  +             
  +            HttpServletRequest httpRequest = request.getRequest();
  +            ProfileLocator locator = null;
  +            String pathInfo = httpRequest.getPathInfo();
  +            locator = profiler.getProfile(request);                 
  +            httpRequest.getSession().setAttribute(LOCATOR_KEY, locator);             
  +            
               request.setProfileLocator(locator);
               request.setPage(profiler.getPage(locator));
               context.invokeNext(request);
  
  
  

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


Mime
View raw message