----- Original Message -----
From: "Phee, Martin J (Jump Tech)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 6:38 AM
Subject: RE: Portlet example help...
> I got it to work. Thanks for the help. I was looking at action classes
> while I should have been looking at the portlet classes. Also, sorry
about
> the servlet/portlet confusion.
>
> I thinking I'm getting a handle on this. I didn't look at the classes
close
> enough yesterday.
>
> When creating a portlet that needs to access a database should I be using
> the Turbine classes? A lot of the portlets I want to create will be
> accessing an oracle database to present information.
You can use JDBC or whatever you like of course.
IMO, Torque is worth taking a look at
http://jakarta.apache.org/turbine/turbine-2/howto/torque-howto.html
>
> -----Original Message-----
> From: David Sean Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 24, 2001 8:55 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Portlet example help...
>
>
>
> ----- Original Message -----
> From: "Marty" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 24, 2001 3:46 PM
> Subject: Re: Portlet example help...
>
>
> > I've been having the same problem today. I was able to get a portlet
> working
> > with our oracle database using 1.3a1, but now I'm using the nightly
builds
> > (1.3a2 ? ) so I can use Velocity.
> >
> > I also created a local-portlet.xreg, and put it into the conf directory
> with
> > the portlet.xreg file ( Is that right?, I was going off of a previous
> email
>
> yes, xreg files go in the conf dir
>
> > of Bob's). I then created a servlet and put it into the class directory
>
> a servlet???
>
> > classes/com/bp/pipelines_na/noms/actions/NewWebNoms.class (the package
> name
> > comforms to the dir structure), and I put a velocity template in the
> > templates directory with the other portlets vm's.
> >
>
> The above path looks like an action.
>
> VelocityPortlet actions are found via the turbine modules path, since
> they are really turbine actions. When you specify the location of your
> velocity portlet action, specify it relative to any one of the modules
root
> directories for that specific module type(action,navigation,screen,layout)
> So if your modules path is setup in the TRP as:
>
> module.packages=org.apache.jetspeed.modules
> module.packages=org.apache.turbine.modules
> module.packages=com.bp.pipelines_na.noms.actions
>
> then turbine will add all 3 of the paths to the module.packages path
> (please do not remove the org.apache.jetspeed.modules path, or your
velocity
> portlet will not work, since your velocity action derives from a jetspeed
> velocity
> action)
>
> In your case: NewWebNoms should go directly in the
> com.bp.pipelines_na.noms.actions directory, since that is how you
specified
> the classpath above
>
> and then specify in your velocity portlet entry in the xreg:
>
> ...
> <parameter name="template" value="web-noms" />
> <parameter name="action" value="WebNomAction" />
> ...
>
> DO NOT SPECIFY
> <parameter name="action" value="portlets.WebNomAction" />
>
> since from what you said above, its not under the actions.portlets
package,
> but under the actions package
>
> As for the template location, it works almost like any other template,
> except that, since it is a portlet-specific template (i guess), it is
> placed in the 'portlets' subdirectory under the /templates/vm directory
(or
> under templates/jsp)
> Like all Jetspeed templates and psml, you can further delineate a
directory
> by mediatype + language + country.
>
>
> > In the local-portlet.xreg how should I specify the servlet to be called?
> Servlet?
>
> If you meant the portlet, then portlets are found via the container's
> classpath. The servlet container should also search the WEB-INF/classes
and
> WEB-INF/lib directories for your webapp.
>
> wrt Turbine(2) modules, they are:
> actions, screens, navigations, layouts, and pages (nevermind the pages...)
> see org.apache.jetspeed.modules for examples of turbine modules, and the
> turbine website: http://jakarta.apache.org/turbine/turbine-2/fsd.html for
> docs
>
> > Just the class name, or the how package name? Will Jetspeed transverse
> the
> > class directory untill it finds the file? I added my package to the
> > TurbineResource.properties file:
> > module.packages=com.bp.pipelines_na.noms.actions
>
> the turbine module path is only used to search for turbine(2) modules, not
> portlets (or servlets :)
>
> >
> > When I look at the jetspeed log I can see the the portlet is getting
> > registered ( I assume that it's just reading the xreg file ), but when I
> > select the portlet to be used it is never called. Nothing in the logs
> about
> > exceptions, or anything.
> >
> > Is there any updated documentation I should be looking at? I took the
> > HelloVelocity example from the portlets.xreg as a template.
> >
>
> The two "HowTo" documents are a little out-of-date, (they do correctly
> document 1.3a1)....ugh documentation, Im really
> sorry about the state of those documents, one of these days real soon they
> will be updated...
>
> Recently I spoke with one of the great extreme programmign gurus, who told
> me
> that the code is the only artifact necessary for a software system. There,
> how's that for an excuse for crap docs!
>
> I, being an extreme kinda guy, recommend looking at examples of other
> portlets under org.apache.jetspeed.portal.portlets
> and also check out the portlet catalog:
> http://jakarta.apache.org/jetspeed/site/catalog.html
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]