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 Aaron Evans <aa...@yahoo.ca> on 2006/02/07 21:16:59 UTC

[J2] web.xml configuration requirements

It has been sooooo long since I set up my web application with my portlet app,
that I have forgotten exactly what is required in its configuration.

So here are some questions:

1. I have the the JetspeedContainer and the URI pattern /container/* mapped
to it in my web.xml.  However, I cannot find any documentation anymore that 
indicates I need to do this (for example, it is not needed for "the simplest 
portlet").

Is this something old that I can now get rid of?

2. I have the role 'admin' declared in my web.xml even though I am not using 
it directly (since authentication is done via the jetspeed portal 
application).

However, it seems if I remove this configuration, the next time I make any
changes to my portlet.xml, then jetspeed fails to deploy my application. Log
details are given below.

So can someone please remind me why this configuration is necessary?

The only funky thing with my setup is that I am using tomcat SSO and have
moved the JAAS realm up to the container level.

Otherwise, my environment: Jetspeed 2.0, Tomcat 5.5.12, JDK 1.5, MySQL 4.1.

Here are the lines from deployment.log: 

2006-02-07 15:06:08,722 [Autodeployment File Scanner Thread] INFO  deployment 
- File: C:\Program Files\Apache Software Foundation\Tomcat 
5.5\webapps\jetspeed\WEB-INF\deploy\portlet-app.war deployed
2006-02-07 15:06:14,430 [Timer-27] INFO  deployment - Remove all registry 
entries defined for portlet application portlet-app
2006-02-07 15:06:22,802 [Timer-27] INFO  deployment - Loading 
portlet.xml....portlet-app
2006-02-07 15:06:22,882 [Timer-27] INFO  deployment - No extended metadata 
found.
2006-02-07 15:06:22,882 [Timer-27] INFO  deployment - Loading 
web.xml....portlet-app
2006-02-07 15:06:22,902 [Timer-27] ERROR deployment - Failed to load portlet 
application for portlet-app



Here is the output from tomcat's log:

- JetspeedContainerServlet: attemping to start Portlet Application at: 
portlet-ap
 INFO: Remove all registry entries defined for portlet application portlet-app
 INFO: Loading portlet.xml....portlet-app
 INFO: No extended metadata found.
 INFO: Loading web.xml....portlet-app
ERROR: Failed to load portlet application for portlet-app
- JetspeedContainerServlet: initialization failed for Portlet Application at: 
portlet-app
org.apache.jetspeed.components.portletregistry.RegistryException: Failed to 
load portlet application for portlet-app
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
registerPortletApplication(PortletApplicationManager.java:273)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
startPA(PortletApplicationManager.java:372)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
startPortletApplication(PortletApplicationManager.java:120)
	at org.apache.jetspeed.container.JetspeedContainerServlet.
attemptStart(JetspeedContainerServlet.java:168)
	at org.apache.jetspeed.container.JetspeedContainerServlet.
access$200(JetspeedContainerServlet.java:52)
	at org.apache.jetspeed.container.JetspeedContainerServlet$1.
run(JetspeedContainerServlet.java:139)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)

thx,
aaron



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: [J2] web.xml configuration requirements

Posted by Raj Saini <ra...@gmail.com>.
Aaron Evans wrote:

>Raj Saini <rajsaini <at> gmail.com> writes:
>
>  
>
>>You need JetspeedContainerServlet and its mapping in your web.xml if you
>>dont drop your .war in jetspeed deploy folder. Jetspeed deploy folder will
>>add servlet and its mapping into web.xml when it deploys the wars.
>>
>>If you deploy your portlets as directory (expanded wars) you will need to
>>add JetspeedContainerServlets and its mapping in your web.xml file.
>>
>>Regards,
>>
>>Raj
>>
>>    
>>
>
>Thanks, I must have copied my web.xml from a portlet web application that was
>already deployed when I was building my latest one.
>
>I am still puzzled about having to include the following block in my web.xml.
>
>  <security-role>
>    <description>The admin role</description>
>    <role-name>admin</role-name>
>  </security-role>
>
>If I do not include this block, the deployment of the war file via jetspeed
>will fail.
>
>  
>
I am not sure, why do you need this in your portlet application's 
web.xml. However, this is required in portal application's web.xml and I 
never explored why it is needed. My portal uses Jetspeed's default 
security configration.

Thanks,

Raj



>Why must I include this role declaration?
>
>The logs are not helpful in determining the problem.  deployment.log just says:
>
>Failed to load portlet application for portlet-app
>
>And the tomcat logs have this stack trace, but again, not very useful:
>
> INFO: Remove all registry entries defined for portlet application portlet-app
> INFO: Loading portlet.xml....portlet-app
> INFO: No extended metadata found.
> INFO: Loading web.xml....portlet-app
>ERROR: Failed to load portlet application for portlet-app
>- JetspeedContainerServlet: initialization failed for Portlet Application at: 
>portlet-app
>org.apache.jetspeed.components.portletregistry.RegistryException: 
>Failed to load portlet application for portlet-app
>	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
>registerPortletApplication(PortletApplicationManager.java:273)
>	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
>startPA(PortletApplicationManager.java:372)
>	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
>startPortletApplication(PortletApplicationManager.java:120)
>	at org.apache.jetspeed.container.JetspeedContainerServlet.
>attemptStart(JetspeedContainerServlet.java:168)
>	at org.apache.jetspeed.container.JetspeedContainerServlet.
>access$200(JetspeedContainerServlet.java:52)
>	at org.apache.jetspeed.container.JetspeedContainerServlet$1.
>run(JetspeedContainerServlet.java:139)
>	at java.util.TimerThread.mainLoop(Timer.java:512)
>	at java.util.TimerThread.run(Timer.java:462)
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: [J2] web.xml configuration requirements

Posted by Aaron Evans <aa...@yahoo.ca>.
Raj Saini <rajsaini <at> gmail.com> writes:

> 
> You need JetspeedContainerServlet and its mapping in your web.xml if you
> dont drop your .war in jetspeed deploy folder. Jetspeed deploy folder will
> add servlet and its mapping into web.xml when it deploys the wars.
> 
> If you deploy your portlets as directory (expanded wars) you will need to
> add JetspeedContainerServlets and its mapping in your web.xml file.
> 
> Regards,
> 
> Raj
> 

Thanks, I must have copied my web.xml from a portlet web application that was
already deployed when I was building my latest one.

I am still puzzled about having to include the following block in my web.xml.

  <security-role>
    <description>The admin role</description>
    <role-name>admin</role-name>
  </security-role>

If I do not include this block, the deployment of the war file via jetspeed
will fail.

Why must I include this role declaration?

The logs are not helpful in determining the problem.  deployment.log just says:

Failed to load portlet application for portlet-app

And the tomcat logs have this stack trace, but again, not very useful:

 INFO: Remove all registry entries defined for portlet application portlet-app
 INFO: Loading portlet.xml....portlet-app
 INFO: No extended metadata found.
 INFO: Loading web.xml....portlet-app
ERROR: Failed to load portlet application for portlet-app
- JetspeedContainerServlet: initialization failed for Portlet Application at: 
portlet-app
org.apache.jetspeed.components.portletregistry.RegistryException: 
Failed to load portlet application for portlet-app
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
registerPortletApplication(PortletApplicationManager.java:273)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
startPA(PortletApplicationManager.java:372)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.
startPortletApplication(PortletApplicationManager.java:120)
	at org.apache.jetspeed.container.JetspeedContainerServlet.
attemptStart(JetspeedContainerServlet.java:168)
	at org.apache.jetspeed.container.JetspeedContainerServlet.
access$200(JetspeedContainerServlet.java:52)
	at org.apache.jetspeed.container.JetspeedContainerServlet$1.
run(JetspeedContainerServlet.java:139)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: [J2] web.xml configuration requirements

Posted by Raj Saini <ra...@gmail.com>.
On 2/8/06, Ate Douma <at...@douma.nu> wrote:
>
> Raj Saini wrote:
> > On 2/8/06, Aaron Evans <aa...@yahoo.ca> wrote:
> >
> >>It has been sooooo long since I set up my web application with my
> portlet
> >>app,
> >>that I have forgotten exactly what is required in its configuration.
> >>
> >>So here are some questions:
> >>
> >>1. I have the the JetspeedContainer and the URI pattern /container/*
> >>mapped
> >>to it in my web.xml.  However, I cannot find any documentation anymore
> >>that
> >>indicates I need to do this (for example, it is not needed for "the
> >>simplest
> >>portlet").
> >>
> >>Is this something old that I can now get rid of?
> >
> >
> >
> >
> > You need JetspeedContainerServlet and its mapping in your web.xml if you
> > dont drop your .war in jetspeed deploy folder. Jetspeed deploy folder
> will
> > add servlet and its mapping into web.xml when it deploys the wars.
> And provides the portlet.tld if it isn't present yet.


I think portlet.tld is always available in the  Portlet  specs R I i.e.
pluto library. I don't configure my tlds in web.xml (for tomcat 5.5 which
implements Servlet API 2.4).

You can also do this (infusion as we call it) off line using the deploy
> tools:
>
> http://portals.apache.org/jetspeed-2/multiproject/jetspeed-deploy-tools/deploy-tools.html
>
> >
> > If you deploy your portlets as directory (expanded wars) you will need
> to
> > add JetspeedContainerServlets and its mapping in your web.xml file.
>
> >
> > Regards,
> >
> > Raj
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: [J2] web.xml configuration requirements

Posted by Ate Douma <at...@douma.nu>.
Raj Saini wrote:
> On 2/8/06, Aaron Evans <aa...@yahoo.ca> wrote:
> 
>>It has been sooooo long since I set up my web application with my portlet
>>app,
>>that I have forgotten exactly what is required in its configuration.
>>
>>So here are some questions:
>>
>>1. I have the the JetspeedContainer and the URI pattern /container/*
>>mapped
>>to it in my web.xml.  However, I cannot find any documentation anymore
>>that
>>indicates I need to do this (for example, it is not needed for "the
>>simplest
>>portlet").
>>
>>Is this something old that I can now get rid of?
> 
> 
> 
> 
> You need JetspeedContainerServlet and its mapping in your web.xml if you
> dont drop your .war in jetspeed deploy folder. Jetspeed deploy folder will
> add servlet and its mapping into web.xml when it deploys the wars.
And provides the portlet.tld if it isn't present yet.

You can also do this (infusion as we call it) off line using the deploy tools:
   http://portals.apache.org/jetspeed-2/multiproject/jetspeed-deploy-tools/deploy-tools.html

> 
> If you deploy your portlets as directory (expanded wars) you will need to
> add JetspeedContainerServlets and its mapping in your web.xml file.

> 
> Regards,
> 
> Raj
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: [J2] web.xml configuration requirements

Posted by Raj Saini <ra...@gmail.com>.
On 2/8/06, Aaron Evans <aa...@yahoo.ca> wrote:
>
> It has been sooooo long since I set up my web application with my portlet
> app,
> that I have forgotten exactly what is required in its configuration.
>
> So here are some questions:
>
> 1. I have the the JetspeedContainer and the URI pattern /container/*
> mapped
> to it in my web.xml.  However, I cannot find any documentation anymore
> that
> indicates I need to do this (for example, it is not needed for "the
> simplest
> portlet").
>
> Is this something old that I can now get rid of?



You need JetspeedContainerServlet and its mapping in your web.xml if you
dont drop your .war in jetspeed deploy folder. Jetspeed deploy folder will
add servlet and its mapping into web.xml when it deploys the wars.

If you deploy your portlets as directory (expanded wars) you will need to
add JetspeedContainerServlets and its mapping in your web.xml file.

Regards,

Raj