Hi,

- Thanks for all the responses so far regarding my other issues I have raised.  I 
truly appreciate the advice and help!  I promise that once I get this stuff working, I 
will contribute to the next build by adding some new demo portlets (or expand on some 
of the existing ones) if folks agree they are worth while

- I am trying to get a (WML media type) JSPPortlet-based portlet to work

- I am still using the default (out of the box) Velocity-based templates and have 
successfully created and tested my own (HTML) JSPPortlet-based portlets.

- Given the following entry in local-portlets.xreg:

    <portlet-entry name="wmlJSP" hidden="false" type="ref" parent="JSP" 
application="false">
        <meta-info>
            <title>wmlJSP</title>
            <description>WML JSP Portlet Example</description>
        </meta-info>      
<classname>org.apache.jetspeed.portal.portlets.JspPortlet</classname>
        <parameter name="template" value="wmlfun.jsp" hidden="true"
            cachedOnName="true" cachedOnValue="true"/>
        <media-type ref="wml"/>
        <url cachedOnURL="true"/>
        <category group="Jetspeed">demo</category>
        <category group="Jetspeed">jsp.demo</category>
    </portlet-entry>

    I also tried value="wml/wmlfun.jsp" just for fun, it fails in exactly the same 
manner.  Note, there is no action, however the HelloJSP portlet in demo-portlets.xreg 
also has no action either and it works fine...

- I can add this portlet under the customize WML no problem, so it has been added to 
the registry.

-  I have a file called wmlfun.jsp under ../WEB-INF/templates/jsp/portlets/wml (I 
needed to create the WML directory, a HTML already existed to which I have previously 
successfully added some HTML JSP's).  Text of wmlfun.jsp:

<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>

<card title="Hello">
<p align="center">Ready 4 fun</p>
</card>

 

- Quote from the tutorial: "Similarly, WML portlets would be found under 
/WEB-INF/templates/jsp/portlets/wml"

which is where I added wmlfun.jsp

 

- After successfully adding this portlet (in HTML mode) using "customize WML", I 
successfully login using my OpenWave emulator.  It then spits back valid WML other 
than the following error message embedded:

        org.apache.turbine.util.TurbineException: Error rendering Velocity template: 
null

Line from jetspeed.log:

[17 Jan 2003 16:54:28 ERROR] - Error rendering Velocity template: null: null

 

- It appears to me that JetSpeed is looking for a Velocity template, when I have 
clearly specified a JSPPortlet, thus it's not looking for the JSP template I placed in 
the correct directory (according to the tutorial).

- I added another entry in local-portlets.xreg which points to the same template jsp 
file, but it's name/title/etc. are different and the media type is html.  I then 
simply copied my wmlfun.jsp from ../WEB-INF/templates/jsp/portlets/wml to 
../WEB-INF/templates/jsp/portlets/html. And guess what, it works great...  This other 
portlet entry text is:

        <portlet-entry name="wmlHJSP" hidden="false" type="ref" parent="JSP" 
application="false">
        <meta-info>
            <title>AAwmlHJSP</title>
            <description>wmlH JSP Portlet Example</description>
        </meta-info>
        <classname>org.apache.jetspeed.portal.portlets.JspPortlet</classname>
        <parameter name="template" value="wmlfun.jsp" hidden="true"
            cachedOnName="true" cachedOnValue="true"/>
        <media-type ref="html"/>
        <url cachedOnURL="true"/>
        <category group="Jetspeed">demo</category>
        <category group="Jetspeed">jsp.demo</category>
    </portlet-entry>

 

- To restate the obvious, it SURE looks like jetspeed is not looking for the WML 
template in the "correct" place.  BTW, The "Stocks" demo example (not "Stock 
Portfolio"), which is Velocity-based I believe, ALSO fails and spits out a:

org.apache.turbine.util.TurbineException: Error rendering Velocity template: null

Thus the only working WML portlets that I can see are the demo examples, Stock 
Portfolio and MyWeather.  Both are WMLFilePortlets which serve static WML files  :-(

- Side note: the Logout function for WML (last link) pukes nicely right out of the box 
with :

Horrible Exception: org.apache.turbine.services.InstantiationException: ServiceBroker: 
unknown service SecurityService requested

Thanks again,

Mike



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Reply via email to