Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

[10:42:09 CST(-0600)] <Bananobot> I'm trying to get a portlet to read the client's GET request parameters to select the output. But it seems as though the output is being cached too heavily, so when I feed it a different value in the URL, the output isn't updated. Is there a way for the portlet to work around this without forcing all navigation to use POST?
[11:10:36 CST(-0600)] <holdorph> Bananobot, there are two things you need to look at. One, make sure the portlet.xml doesn't have caching turn on.
[11:11:16 CST(-0600)] <holdorph> Two, you must use the portlet container to create any URLs that the user can click on. Hand crafting URLs is not supported by the portlet spec
[11:11:46 CST(-0600)] <holdorph> that means, for example if you are using a .jsp file, using the portlet tag library and creating renderUrls
[11:11:49 CST(-0600)] <Bananobot> Caching is turned on in portlet.xml, but I would think that if a GET parameter is specified, targeting that specified portlet, the portal should know that it can't use the same cache as a request with a different GET parameter..
[11:12:30 CST(-0600)] <holdorph> you're right, assuming your following the second consideration i mention
[11:12:39 CST(-0600)] <Bananobot> Okay, I'll look into that
[11:13:45 CST(-0600)] <EricDalquist> If a portlet is targeted by a URL generated by the portlet API for that portlet the cache will be invalidated
[11:13:46 CST(-0600)] <Bananobot> Actually, hm... I'm using Spring's form tags, and I'm setting the "path" attributes for the form controls. The generated "name" attributes in the HTML are just being set to the literal value, rather than something translated for the portal..
[11:14:00 CST(-0600)] <EricDalquist> also all forms for portlets must use POST
[11:14:07 CST(-0600)] <EricDalquist> and the path must be set to a portlet API generated URL
[11:14:43 CST(-0600)] <Bananobot> EricDalquist: Why do they all have to be POST? The form isn't to post content, it's to request a resource.
[11:14:52 CST(-0600)] <EricDalquist> the portlet specification says so
[11:14:55 CST(-0600)] <Bananobot> :/
[11:15:09 CST(-0600)] <EricDalquist> if you want I can give you a 2 page technical explination as to why
[11:15:10 CST(-0600)] <holdorph> not true
[11:15:13 CST(-0600)] <Bananobot> Did the portlet specification authors read the HTTP specification before they wrote it?
[11:15:15 CST(-0600)] <holdorph> you can use render urls
[11:15:19 CST(-0600)] <EricDalquist> you can use render URLs
[11:15:21 CST(-0600)] <holdorph> and change the render parameters
[11:15:24 CST(-0600)] <EricDalquist> but they have to be POSTs
[11:15:38 CST(-0600)] <EricDalquist> there is a sound technical reason for this requirement
[11:15:51 CST(-0600)] <holdorph> hmm.... I didn't remember that part.
[11:16:09 CST(-0600)] <holdorph> i know if it's a form, it has to be a post, but I didn't know that render urls had to be posts too.
[11:16:20 CST(-0600)] <EricDalquist> if it is a form it has to be a post
[11:16:38 CST(-0600)] <EricDalquist> the reason is the portal can't appropriately namespace parameters defined as form <input> tags
[11:16:44 CST(-0600)] <holdorph> right, but if it's not a form and it's not a action url, i think it can be a get
[11:16:48 CST(-0600)] <EricDalquist> no
[11:16:50 CST(-0600)] <EricDalquist> it can;'t
[11:16:51 CST(-0600)] <EricDalquist> trust me
[11:16:57 CST(-0600)] <EricDalquist> let me find the spec reference
[11:17:02 CST(-0600)] <Bananobot> Okay.. from the jsp, how do I set a field's name attribute to be prefixed with the portal's stuff?
[11:17:14 CST(-0600)] <Bananobot> I have the action attribute all set up by the portal, but not the name attributes
[11:17:29 CST(-0600)] <holdorph> huh?
[11:17:33 CST(-0600)] <EricDalquist> PLT.7.1 PortletURL
[11:17:39 CST(-0600)] <holdorph> are you using a portlet url Bananobot ?
[11:17:42 CST(-0600)] <EricDalquist> Because some portal/portlet-containers implementations may encode internal state as part
[11:17:42 CST(-0600)] <EricDalquist> of the URL query string, portlet developers should not code forms using the HTTP GET
[11:17:42 CST(-0600)] <EricDalquist> method.
[11:17:56 CST(-0600)] <holdorph> that says 'forms'
[11:18:07 CST(-0600)] <EricDalquist> right

  • No labels