David Sean Taylor escribió:

> I gave Dirk some bad advice, so I hope I've got this resolved right for him
> this time.
> Its working for me now with the following jcfg entries ( this is simply a
> transform on the distributed jetspeed content as a test ):
>
>         <portlet-entry type="abstract" name="XSLPortlet" >
>
> <classname>org.apache.jetspeed.portal.portlets.XSLPortlet</classname>
>         </portlet-entry>
> ....
>              <portlet-entry type="ref" parent="XSLPortlet" name="XSLTest">
>                 <url>/jcm/jetspeed-content.xml</url>
>           <parameter name="stylesheet" value="/WEB-INF/xsl/jpc-full.xsl" />
>            <meta-info>
>             <title>XSLTest</title>
>            </meta-info>
>         </portlet-entry>
>
> Next, I had to modify the XSLPortlet to build the webapp relative path.
>
> + import org.apache.jetspeed.cache.disk.*;
>
> +         String url;
> +
> +         try {
> +               stylesheet = JetspeedDiskCache.getInstance().getEntry(
> stylesheet ).getURL();
> +                       url = getPortletConfig().getURL();
> +               url = JetspeedDiskCache.getInstance().getEntry( url ).getURL();
> +         } catch ( IOException e ) {
> +             Log.error( e );
> +             content = new ClearElement(e.getMessage());
> +             return content;
> +         }
>
> -                         SimpleTransform.transform(
> getPortletConfig().getURL(),
> +                         SimpleTransform.transform( url,
>
> Note to Santiago: I updated your latest changes this afternoon.
> Did you change something to cause this, or did the XSLPortlet ever work?
> I have other XSL-based-portlets that are now also broken...and they are
> working on my other machine...
>

It could be that the change in the way that entities are resolved breaks
something. In the messages I cannot see the detailed exception given. Can you tell
me which is the error?

I don't have any example of this portlet to test.


>
> I can check this in, but Im waiting to hear from you first,

The changes were small, and related only to the parameter passing to transforms
and to the way that dtds are searched. It does not look like it could break the
URL. I think it was broken already, or else that some differences in tomcat
versions are showing. I am seeing strange things since I updated tomcat to 3.2.1
HEAD on cvs.

BTW: According to tomcat docs, if you run tomcat with a security manager, WEB-INF
is no longer writable. I think the only writable space is the work directory for
the webapp.

Given that commercial services are likely to run tomcat with a security manager,
we should be thinking about using the WORK directory for log, cache, ... so that
jetspeed can be installed without having to change the security policies for the
server as a whole.

I wonder if psml storage should also be moved there? Maybe the system could look
into work directory. If the psml tree is there, use it. If not, copy a read-only
version from WEB-INF and start using it.

This is not something for doing quickly, but the issue is there, and we should be
thinking about the security issues as we come closer to a commercial, production
quality release.

>
>
> Thanks,
>
> David
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Dirk Hamstra
> > Sent: Sunday, January 07, 2001 8:44 PM
> > To: JetSpeed
> > Subject: XSLPortlet , JetspeedContent
> >
> >
> > Hi!
> >
> > I want to display some XML files with associated XSL. So I thought of two
> > options see below. In general what is the correct method?
> >
> >
> > 1. using the XSLPortlet with the following entries in the jcfg-file both
> > failed. Is the the right type of portlet to use and if so how do I pass
> > parameters to it?
> >
> >        <!--
> > =======================================================================
> >       <portlet-entry type="ref" parent="XSLPortlet" name="XSLTest">
> >              <meta-info>
> >                  <title>XSLTest</title>
> >              </meta-info>
> >               <parameter name="url" value="/jcm/test.xml" />
> >               <parameter name="stylesheet" value="/WEB-INF/xsl/test.xsl"/>
> >
> > ==================================================================
> > ====== -->
> >
> >       <portlet-entry type="ref" parent="XSLPortlet" name="XSLTest">
> >         <url>/jcm/test.xml </url>
> >         <stylesheet>/WEB-INF/xsl/test.xsl </stylesheet
> >             <meta-info>
> >                  <title>XSLTest</title>
> >              </meta-info>
> >
> > 2. use JetspeedContent portlet by adding an entry to the
> > JetspeedResources.properties like:
> > content.provider.test.url=/jcm/test.xml
> > content.provider.test.stylesheet.url=/WEB-INF/xsl/test.xsl
> > content.provider.test.title=Test
> > content.provider.test.description=Test Document
> >
> > and an entry in my psml file like:
> >
> > <entry type="ref" parent="Test"/>
> >
> > This seems to pick up the file correctly but than generates an error from
> > SAX
> >
> > file:E:/Nile/tomcat/webapps/nile/jcm/test.xml; Line 14; Column 74
> > XSL Error: Could not parse file:E:\Nile\tomcat\webapps\nile\jcm\test.xml
> > document!
> > XSL Error: SAX Exception
> >
> > Not sure what's going on here since that file is correctly formatted and
> > displayed in a browser and XMLSpy.
> >
> > --Dirk
> >
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/[email protected]/>
> > List Help?:          [EMAIL PROTECTED]
> >
> >
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/[email protected]/>
> List Help?:          [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?:          [EMAIL PROTECTED]

Reply via email to