[ http://jira.codehaus.org/browse/DISPL-344?page=comments#action_74755 ] Eric Dalquist commented on DISPL-344: -------------------------------------
Here is a high level overview of what I was thinking as far as an external servlet goes, with some background. If any of it needs clarification feel free to ask. The servlet spec states that a portlet and a servlet in the same web-application share a session object. Data put into the session in the application scope by a portlet should be readily readable by a servlet in the same web-app being accessed by the same user. Data put into the session in the portlet scope by the portlet will be accessible but will likely have a name-spaced name, this makes portlet scoped session attributes hard to use. The down side of a user accessing this external servlet is you don't have any information about the user accessing the servlet like you do inside of the portlet. This is why the session sharing is important, the portlet will need to put some useful bit of data in the session so the servlet has some context for what is expected to do. With those two notes the approach I would take follows (at a very high level). The export URL rendered by displaytag points to this servlet that is mapped in the portlet's web application. Every time displaytag renders it uses some standard portlet session attribute (probably with some configurable key in the name so multiple tables can be on one page) to put a bit of requisite info for the servlet into the session. The URL to the export servlet includes this configurable key so the servlet knows which session attribute to get its requisite export info from. When the user clicks on the link the servlet looks in the session with the specified key for the info it needs to export the data. This will slightly pollute the session since there is no way for the portlet to know when the data can be removed from the session and the data must always be in the session since the portlet won't know when the user clicks on the export link. When I was doing the work to get display tag JSR-168 compliant I didn't look at the export code at all since that wasn't one of my needs. This high level overview may need some refining to work with the way displaytag does exports. If you need more information please feel free to ask. > Export failure running as Liferay portlet > ----------------------------------------- > > Key: DISPL-344 > URL: http://jira.codehaus.org/browse/DISPL-344 > Project: DisplayTag > Issue Type: Bug > Components: Export > Affects Versions: 1.1 > Reporter: Bill Joy > Priority: Blocker > Attachments: Capture-05-18-00001.png > > > When click on any of the Export options, the content of the portlet is > replaced with the exported data. > If do not add the "displaytag extensions" for JSR 168 portlet support, the > export feature works correctly. > I consider this a blocker because without the portlet extensions the > "pagesize" table attribute has unacceptable behavior (so I have to choose > which feature I prefer to enable). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel