IntelliJ Java IDE
The moose likes Portals and Portlets and the fly likes Portlet action URL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Reply Bookmark "Portlet action URL" Watch "Portlet action URL" New topic
Author

Portlet action URL

John Lincoln
Ranch Hand

Joined: Feb 11, 2003
Posts: 192
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

Joined: Apr 16, 2003
Posts: 62
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

Joined: Aug 26, 2006
Posts: 4962

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 ]

Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
 
IntelliJ Java IDE
 
subject: Portlet action URL
 
Threads others viewed
Pass username and password via browser in Formbased Authentication
forms authentication (j_security_check) with JSF
request. get User Principal(). getName() do not retreive user name
How to send a information to a form?
jsp login
developer file tools