[ 
https://issues.apache.org/jira/browse/PLUTO-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12872760#action_12872760
 ] 

Eric Dalquist commented on PLUTO-590:
-------------------------------------

So I was able to reproduce this in Pluto using the following portlet: 
https://mywebspace.wisc.edu/dalquist/web/JA-SIG/PLUTO-590/BookmarksPortlet.war 
It's already setup for Pluto 2 so you should be able to drop it in and have it 
run. 

It renders two links:
    <link rel="stylesheet" href="/pluto/css/bookmarks.css" type="text/css"/>
    <script src="/pluto/script/bookmarks.min.js" 
type="text/javascript"></script>

which are pointing to pluto and not to the portlet.

What I'm wondering about is the portlet is using the Spring MVC framwork so 
there are actually three levels of request dispatching being done. The first 
from the portal to the PortletServlet the second from the Portlet impl to a 
servlet in the same context and a third from the servlet to a JSP.


Here is the stack trace from the pluto code on.


HttpServletPortletRequestWrapper.getContextPath() line: 980     
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available 
[native method]  
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39      
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25  
Method.invoke(Object, Object...) line: 597      
BeanELResolver.getValue(ELContext, Object, Object) line: 62     
CompositeELResolver.getValue(ELContext, Object, Object) line: 54        
AstValue.getValue(EvaluationContext) line: 123  
ValueExpressionImpl.getValue(ELContext) line: 186       
PageContextImpl.proprietaryEvaluate(String, Class, PageContext, 
ProtectedFunctionMapper, boolean) line: 935     
viewBookmarks.jsp line: 7       
viewBookmarks_jsp(HttpJspBase).service(HttpServletRequest, HttpServletResponse) 
line: 70        
viewBookmarks_jsp(HttpServlet).service(ServletRequest, ServletResponse) line: 
717       
JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean) 
line: 377   
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String, 
Throwable, boolean) line: 313        
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 260   
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 717      
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 
290      
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206      
ApplicationDispatcher.invoke(ServletRequest, ServletResponse, 
ApplicationDispatcher$State) line: 646    
ApplicationDispatcher.doInclude(ServletRequest, ServletResponse) line: 551      
ApplicationDispatcher.include(ServletRequest, ServletResponse) line: 488        
PortletRequestDispatcherImpl.include(ServletRequest, ServletResponse) line: 268 
JstlView(InternalResourceView).renderMergedOutputModel(Map, HttpServletRequest, 
HttpServletResponse) line: 134  
JstlView(AbstractView).render(Map, HttpServletRequest, HttpServletResponse) 
line: 243   
ViewRendererServlet.renderView(HttpServletRequest, HttpServletResponse) line: 
111       
ViewRendererServlet.processRequest(HttpServletRequest, HttpServletResponse) 
line: 84    
ViewRendererServlet.doGet(HttpServletRequest, HttpServletResponse) line: 65     
ViewRendererServlet(HttpServlet).service(HttpServletRequest, 
HttpServletResponse) line: 617     
ViewRendererServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 
717     
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 
290      
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206      
ApplicationDispatcher.invoke(ServletRequest, ServletResponse, 
ApplicationDispatcher$State) line: 646    
ApplicationDispatcher.doInclude(ServletRequest, ServletResponse) line: 551      
ApplicationDispatcher.include(ServletRequest, ServletResponse) line: 488        
PortletRequestDispatcherImpl.doDispatch(PortletRequest, PortletResponse, 
boolean) line: 174     
PortletRequestDispatcherImpl.include(RenderRequest, RenderResponse) line: 227   
DispatcherPortlet.render(ModelAndView, RenderRequest, RenderResponse) line: 
1077        
DispatcherPortlet.doRenderService(RenderRequest, RenderResponse) line: 809      
DispatcherPortlet(FrameworkPortlet).processRequest(PortletRequest, 
PortletResponse) line: 461   
DispatcherPortlet(FrameworkPortlet).doDispatch(RenderRequest, RenderResponse) 
line: 431 
DispatcherPortlet(GenericPortlet).render(RenderRequest, RenderResponse) line: 
259       
FilterChainImpl.doFilter(RenderRequest, RenderResponse) line: 200       
FilterManagerImpl.processFilter(RenderRequest, RenderResponse, Portlet, 
PortletContext) line: 95        
PortletServlet.dispatch(HttpServletRequest, HttpServletResponse) line: 340      
PortletServlet.doGet(HttpServletRequest, HttpServletResponse) line: 261 
PortletServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse) 
line: 617  
PortletServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 717  
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 
290      
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206      
ApplicationDispatcher.invoke(ServletRequest, ServletResponse, 
ApplicationDispatcher$State) line: 646    
ApplicationDispatcher.doInclude(ServletRequest, ServletResponse) line: 551      
ApplicationDispatcher.include(ServletRequest, ServletResponse) line: 488        
DefaultPortletInvokerService.invoke(PortletRequestContext, PortletRequest, 
PortletResponse, FilterManager, Integer) line: 233   
DefaultPortletInvokerService.render(PortletRequestContext, RenderRequest, 
RenderResponse, FilterManager) line: 117      
PortletContainerImpl.doRender(PortletWindow, HttpServletRequest, 
HttpServletResponse) line: 157 


>  In a porltet JSP file, calling request.getContextPath() gives the portal app 
> "/pluto" and not the portlet app's context path.
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-590
>                 URL: https://issues.apache.org/jira/browse/PLUTO-590
>             Project: Pluto
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Luis
>            Assignee: Ate Douma
>             Fix For: 2.0.2, 2.1.0
>
>
> JSPs called by a portlet have this problem.  request.getContextPath() changed 
> between pluto 1.x and 2.0
> You need to use the portlet taglib to get the context path from the 
> portletrequest.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to