You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Thang H. Lai" <th...@rogers.com> on 2005/06/02 21:03:15 UTC

Problem running SpringPortlet+Jetspeed2+Velocity

Please help!

I create a simple application to deploy to Jetspeed2 M3. For the Velocity view 
it is just:
Code:

#set($nodeLink = $renderResponse.createActionURL())
$nodeLink

If all is OK, then the portlet should be displayed with:

Code:
http://localhost:8080/jetspeed/portal/_ns:YnRwLTAyfGY_/

But about everyother refresh, there is an Exception:
Code:

Exception: java.lang.IllegalStateException
Message: Cannot call getRequestContext(HttpServletRequest request) before it 
has been created and set for this thread.

Stack Trace:
   
org.apache.jetspeed.request.JetspeedRequestContextComponent.getRequestContext(JetspeedRequestContextComponent.java:111)
   org.apache.jetspeed.services.information.DynamicInformationProviderImpl.
(DynamicInformationProviderImpl.java:79)
   
org.apache.jetspeed.services.information.InformationProviderServiceImpl.getDynamicProvider(InformationProviderServiceImpl.java:73)
   
org.apache.pluto.services.information.InformationProviderAccess.getDynamicProvider(InformationProviderAccess.java:34)
   org.apache.pluto.core.impl.PortletURLImpl.toString(PortletURLImpl.java:145)

I checked and see that all the attributes from renderRequest are gone.
I then try the same code but with JSP view then the problem goes away. I tried 
to compare the codes between the two classes VelocityView and JstlView but 
could not determine the different.
Have anyone tried to use Velocity with the SpringPortlet and found a solution 
for the above problem? I reckon I could just JSP for the view but prefer to 
use Velocity if I have a choice.

Thanks for any help you can give.
-- 
Windows 95 (win'doz nin'ti fiv): n.
    32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit 
operating system originally coded for a 4 bit microprocessor, written by a 2 
bit company that can't stand 1 bit of competition.

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