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 js...@odshp.com on 2002/05/02 21:37:59 UTC

Simple Servlet Deployment Problem

I've just installed Jetspeed 1.3a2-release and I'm having trouble
deploying a "Hello World" portlet.

Per instructions, 1) I built this:

package mypackage;

import org.apache.jetspeed.portal.portlets.AbstractPortlet;
import org.apache.turbine.util.RunData;
import org.apache.ecs.ConcreteElement;
import org.apache.ecs.StringElement;
   
public class HelloPortlet extends org.apache.jetspeed.portal.portlets.AbstractPortlet {

  public HelloPortlet() {
	super();
  }
 
  public ConcreteElement getContent(RunData runData) {
	return (new StringElement ("Hello World!"));
  }
}

2) Created WEB_INF/classes/mypackage and placed the class file there.

3) Create an xreg file in WEB-INF/conf:

<?xml version="1.0" encoding="UTF-8"?>
<registry>
    <portlet-entry name="HelloPortlet" hidden="false" type="ref"
        <meta-info>
            <title>HelloPortlet</title>
            <description>My Portlet Example</description>
        </meta-info>
        <classname>mypackage.HelloPortlet<classname>
        <media-type ref="html"/>
    </portlet-entry>
</registry>


4) Added a line to TurbineResources.properties:

module.packages=mypackage

right after the jetspeed and turbine module lines.

5) Added [tomcat webapps dir]/jetspeed/WEB-INF/classes to the
CLASSPATH (not needed?)

6) Restart, login as "turbine", try to add portlets, but my
HelloPortlet is not listed.

Also (and this is wierd)...  There are never any files write in
webapps/jetspeed/logs.

In addition I edited the anon files to try to add my portlet to the
default page, but it does not show up.

I think I'm following the instruction, plus a few other tips from the
email list, but still no portlet.  Help?!

Thank you 



---
Jeff Sexton
ODS Health Plans
jsexton@odshp.com



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


Re: Simple Servlet Deployment Problem

Posted by Paul Spencer <pa...@apache.org>.

jsexton@odshp.com wrote:

> I've just installed Jetspeed 1.3a2-release and I'm having trouble
> deploying a "Hello World" portlet.
<snip>

>

> 6) Restart, login as "turbine", try to add portlets, but my
> HelloPortlet is not listed.
> 


Is the registry entry still in the xreg file?  I be it is not.  As a 
general rule, always wait 5 minutes after updating a xreg file before 
shutting down tomcat.  This is a well know problem with registry files.

> Also (and this is wierd)...  There are never any files write in
> webapps/jetspeed/logs.


Try <jetspeed-home>/WEB-INF/log

> 
> In addition I edited the anon files to try to add my portlet to the
> default page, but it does not show up.
> 



If the corrisponding registry entry does not exist, then this behavior 
is to be expected.

> I think I'm following the instruction, plus a few other tips from the
> email list, but still no portlet.  Help?!
> 
> Thank you 
> 
> 
> 
> ---
> Jeff Sexton
> ODS Health Plans
> jsexton@odshp.com
> 
 
Paul Spencer



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


RE: Simple Servlet Deployment Problem

Posted by David Sean Taylor <da...@bluesunrise.com>.
> <?xml version="1.0" encoding="UTF-8"?>
> <registry>
>     <portlet-entry name="HelloPortlet" hidden="false" type="ref"
>         <meta-info>
>             <title>HelloPortlet</title>
>             <description>My Portlet Example</description>
>         </meta-info>
>         <classname>mypackage.HelloPortlet<classname>
>         <media-type ref="html"/>
>     </portlet-entry>
> </registry>

Sure youre not getting errors in the log?

Perhaps this is one of those email formatting errors, but 2 things look
suspect:

     <portlet-entry name="HelloPortlet" hidden="false" type="ref"

1. No ending ">" on your portlet-entry
2. It's a "ref", but where is its "parent"?

> 5) Added [tomcat webapps dir]/jetspeed/WEB-INF/classes to the 
> CLASSPATH (not needed?)

Not necessary



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