Also, try to find out/debug *why* this isn't working. As I don't use uPortal
I really can't help you out with that.
On Jetspeed or for example Gridsphere, Liferay (three different portal containers)
this hasn't been a problem.

Although you got it working by unwrapping all down to the ApplicationHttpRequest, it really shouldn't be nessecary like that. But then, maybe with the uPortal
container implementation there isn't another way...

Sorry I can't give a better answer right now.
If you do findout a better solution though, I'm sure plenty of other uPortal users
will be interested.


Hello Ate,

I have made progress and I have got the JPetstore portlet working fully and in the process also found some problems with the uPortal request wrappers.

The StrutsPortlet invokes the StrutsServet using a RequestDispatcher object obtained using this path=/shop/viewCategory.shtml?categoryId=CATS

The ServletContext, HttpServletRequest and HttpServletResponse objects are retrieved from ServletContextProvider implemented for uPortal. Then the RequestDispatcher.include() method is called with this HttpServletRequest and HttpServletResponse objects as arguments.

Now in uPortal there are three request wrappers that act on the tomcat ApplicationHttpRequest:

org.jasig.portal.container.servlet.PortletParameterRequestWrapper
org.jasig.portal.container.servlet.ServletRequestImpl
org.jasig.portal.RequestParamWrapper

uPortal wraps the tomcat ApplicationHttpRequest and the constructor for the wrappers in uPortal builds a copy of the parameter map at that point. Subsequently the setQueryParams in ApplicationHttpRequest is called by the ApplicationDispatcher in tomcat. This sets the The query string parameter 'categoryId=CATS' for this request.

So at this point the parameters are present in both the query string and the request parameter, they are now merged by tomcat. But the copy of the parameters in the wrapper doesn't reflect the state of the parameters in the tomcat request. So the JPetstore portlet doesn't work and the categoryId parameter is not found.

As a fix I changed the wrappers to always call the getParameterMap method and changed that method to retreive the parameters with a call to the wrapped object. Now the JPetstore portlet works fine. There are some details about the fix I have left out for clarity.

I have informed the uPortal developers about the problem and also the possible way to fix it. I hope they fix this problem in the next release.

Cheers!

--
Satish Sekharan . . .
Programmer Intern // ccwebworks // Computing & Communications
Memorial University of Newfoundland // St. John's, NL, Canada


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to