Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Portlet action URL

 
John Lincoln
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a login.jsp, which uses Form based authentication from the container (i.e j_security_check).

I want to have to two anchor links in jsp, which should trigger a portlet

Is it possible to do ? Following is the sample code. The problem is login is not a portlet . Please throw some light

 
Ryan Wilson
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John what portal/version are you running?

The actionURL tag will create a link to the action phase of the current portlet. If this form is not being called inside the portlet itself then you will need to use the vender specific APIs to generate the URLs to the portlet.

In Websphere this can be done using the advance URL generation APIs.
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0603_behl/0603_behl.html
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it comes down to what you mean by "trigger a portlet."

You can't actually trigger a portlet. The best you can do is trigger a page, that has a portlet on it. But even then, a user can always remove a portlet from a page unless you've cut off their hands and locked the portlet on the page.

The portal requires a bit of a mindshift when using it. You don't invoke portlets, but instead, pages, that can have any diverse number and types of portlets on it.

To achieve what you want in WebSphere, you can have named pages, and call on one of those named pages. Of course, this requires some coordination between admins and developers, as admins name the page, and developers will reference it.

Again, try to think portal. I'm worried that you've invested in a portal environment, but are still thinking like one of those dinosaur Servlet/JSP programmers. Get out of the Jurrasic era!

And Ryan, that link about advance WebSphere page generation scared the pants off me! The EngineURL extending the DisposableURL? That's some crazy stuff!


-Cameron mcKenzie


[ April 23, 2007: Message edited by: Cameron W. McKenzie ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic