You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Aliyar, Nishar" <ni...@schema.de> on 2002/09/02 17:38:10 UTC

JSP inside the Portlet

Hai All,

How I can disply a JSP page inside the portlet. If there is an example let me know please.

Greetings,
Nishar.



-----Original Message-----
From: Paul Spencer [mailto:paulspencer@mindspring.com]
Sent: Monday, September 02, 2002 4:58 PM
To: Jetspeed Users List
Subject: Re: Portlets Configuration : Urgent


Nishar,
Use security.  The simplest is to set the security-ref="admin-only" in the psml.  This will only allow user in with the role admin from viewing the portlet.  Another approach it to use PortalAccessController.checkPermission() in you portlet to verify the user is allowed.  See org.apache.jetspeed.services.security.PortalAccessController.java and the security proposal, http://cvs.apache.org/viewcvs.cgi/jakarta-jetspeed/proposals/Security.txt?rev=HEAD&content-type=text/vnd.viewcvs-markup

Paul Spencer



Aliyar, Nishar wrote:

>Hai All,
> I wrote a portlet and I wanted to display this portlet only when the admin loged in how I can do this. How is the configuration for the portlet and which files.
>
>Greetings,
>Nishar.
>
>///////////////////////////////////////////////////////////////////
>
>public class LdapAdminPortlet extends AbstractPortlet{
>
>  public LdapAdminPortlet() {
>  }
>
>  public ConcreteElement getContent(RunData data){
>
>      try{
>
>            return new StringElement ("test ") ;
>
>      }
>      catch(Exception ee){
>
>            Log.info(" exception from LdapAdminPortlet : "+ee);
>            ee.printStackTrace();
>      }
>
>            return new StringElement ("test ") ;
>  }
>}
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSP inside the Portlet

Posted by Hugh Brien <hp...@comcast.net>.
Here is another way to put a JSP in a portlet. If none of the other options
work for you.

import org.apache.jetspeed.portal.portlets.AbstractPortlet;
import org.apache.turbine.util.*;
import org.apache.jetspeed.util.servlet.*;
import org.apache.ecs.ConcreteElement;
import org.apache.ecs.StringElement;

public class ContentPortlet extends AbstractPortlet
{
    public ConcreteElement getContent (RunData runData)
    {
 return (new EcsServletElement(runData,"/dynamic/kd/home.jsp"));
    }
}







----- Original Message -----
From: "Paul Spencer" <pa...@mindspring.com>
To: "Jetspeed Users List" <je...@jakarta.apache.org>
Sent: Monday, September 02, 2002 10:58 AM
Subject: Re: JSP inside the Portlet


> Nishar,
> A JSP can generate the portlet's content, see
http://jakarta.apache.org/jetspeed/site/portlet_config_JSP.html
>
> You can also use the WebPagePortlet that is a link to a web page the is
generated via a JSP.
>
> I an not sure what you mean by 'disply a JSP page inside the portlet'.
>
> Paul Spencer
>
>
> Aliyar, Nishar wrote:
>
> >Hai All,
> >
> >How I can disply a JSP page inside the portlet. If there is an example
let me know please.
> >
> >Greetings,
> >Nishar.
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
> >
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSP inside the Portlet

Posted by Paul Spencer <pa...@mindspring.com>.
Nishar,
A JSP can generate the portlet's content, see http://jakarta.apache.org/jetspeed/site/portlet_config_JSP.html

You can also use the WebPagePortlet that is a link to a web page the is generated via a JSP.  

I an not sure what you mean by 'disply a JSP page inside the portlet'.

Paul Spencer


Aliyar, Nishar wrote:

>Hai All,
>
>How I can disply a JSP page inside the portlet. If there is an example let me know please.
>
>Greetings,
>Nishar.
>  
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>