Geoff,

   As Tim stated.  The <XSL:import... tag is an HTTP request.  Even though
it is coming in through the JSP page it is still and HTTP request and not a
"relative" file path issue in regards to the context.

I think we at least have you on the right path.



On 4/25/06, BLAND, Geoff, GBM <[EMAIL PROTECTED]> wrote:
>
> Marc,
>
> The <xsl:import href="..." /> statement to include routesummarycontent.xsl
> is in another XSLT script (routesummaryheader.xsl) which is loaded
> correctly
> from a JSP (routesummary.jsp) using the command <xsl:apply
> nameXml="routesummary" xsl="/xsl/routesummaryheader.xsl" />.
>
> To recap; routesummary.jsp calls routesummaryheader.xsl which imports
> routesummarycontent.xsl.
>
> >This has to do with how HTTP requests are processed on your server.
> We _think_ that the XSLT processor used by Tomcat can't use relative paths
> as it doesn't "know" what context it resides in (even if Tomcat does).
>
> Thanks
> Geoff
>
>
> -----Original Message-----
> From: Marc Farrow [mailto:[EMAIL PROTECTED]
> Sent: 25 April 2006 13:03
> To: Tomcat Users List
> Subject: Re: Problem with the xsl:import
>
>
> This has to do with how HTTP requests are processed on your server.  You
> control (by url pattern matching or some other technique) which "service"
> (Tomcat or Apache) gets to handle the request.
>
> Help me out a bit here.  What "language" the tag <XSL> belong to?  Is it a
> JSP tag or an HTML tag or what?
>
>
>
> On 4/25/06, BLAND, Geoff, GBM <[EMAIL PROTECTED]> wrote:
> >
> > Marc,
> >
> > Again thanks for the reply, we've kind of done what you say should
> > work - it appears not to work.
> >
> > We have put in
> >
> > <xsl:import href="/aaem/xsl/routesummarycontent.xsl" />
> >
> > And also (I think this is more correct as we're already at the "aaem"
> > level)
> >
> > <xsl:import href="/xsl/routesummarycontent.xsl" />
> >
> > Neither work.
> >
> > I'm pretty sure that alias is set correctly as if I put
> > http://myserver:thisport/aaem/xsl/routesummarycontent.xsl into a web
> > browser the XSLT script is found.
> >
> > I'm not sure quite what you mean by "make sure XSL content is
> > Processed by Tomcat". I assume this is happening as if we put in the
> > full address the XSLT is processed with no problem.
> >
> > Thanks
> > Geoff Bland
> >
> >
> > -----Original Message-----
> > From: Marc Farrow [mailto:[EMAIL PROTECTED]
> > Sent: 25 April 2006 12:29
> > To: Tomcat Users List
> > Subject: Re: Problem with the xsl:import
> >
> >
> > It is not impossible.  Try
> >
> > <xsl:import href="/aaem/xsl/routesummarycontent.xsl" />
> >
> > You just have to make sure that the XSL content is either
> >
> > 1)  Processed by Tomcat (by your connector properties)
> >    a)  in the MOD_JK* worlds, this is making sure the URL pattern
> > matching is set to forward
> >         the appropriate requests to Tomcat.  In other connectors, you
> > will have to do basically
> >         the same thing by whatever means is needed with that
> > connector.
> > 2)  Apache can see the "aaem" webapp via an alias.
> >
> > We use the second method.  You let Apache handle all requests that do
> > not require a servlet container and forward everything else (JSPs and
> > servlets)
> > to Tomcat.  This works even if we have "static" content within our
> > Tomcat webapp.
> >
> > hth
> >
> >
> > On 4/25/06, BLAND, Geoff, GBM <[EMAIL PROTECTED]> wrote:
> > >
> > > Marc,
> > >
> > > Thanks for the reply.
> > >
> > > We can put in an import of the form
> > >
> > > <xsl:import href="http://localhost/aaem/xsl/routesummarycontent.xsl";
> > > />
> > >
> > > and that works fine (for a single web server).
> > >
> > > But we have multiple web servers on the box (using different ports
> > > and different install paths) and they may be different versions
> > > (development, UAT, production) having different versions of
> > > routesummarycontent.xsl. If we use the import above all servers end
> > > up selecting the XSL for just one of the versions.
> > >
> > > We don't want to have a different import for each version either as
> > > that will need modifying as we migrate updated versions between
> > > servers.
> > >
> > > What we need is a "relative" import, for example,
> > >
> > > <xsl:import href="/xsl/routesummarycontent.xsl" />  <!-- doesn't
> > > work
> > > -->
> > >
> > > But I'm thinking this is impossible.
> > >
> > > Thanks
> > > Geoff
> > >
> > >
> > > -----Original Message-----
> > > From: Marc Farrow [mailto:[EMAIL PROTECTED]
> > > Sent: 21 April 2006 14:41
> > > To: Tomcat Users List
> > > Subject: Re: Problem with the xsl:import
> > >
> > >
> > > You need to put the XML import file (in your case
> > > routesummarycontent.xsl) somewhere that whomever is providing the
> > > resource (Apache or Tomcat) can see it.  Let me try to elaborate.
> > >
> > > We use an AJP connector with Tomcat and receives requests from
> > > Apache on port 8009.  We forward all "Servlet" stuff to the Tomcat,
> > > but we let Apache handle everything else.  Even images, js files,
> > > etc that are contained within a web application (context).  In order
> > > to accomplish this, we have an alias set up for each web application
> > > in Apache.  Thus, when we go to
> > > http://localhost/mywebapp/js/myjsfile.js we know that Apache is
> > > pulling
> > up
> > > that page.  However, if we have a js file in a JSP page that is
> > referenced
> > > such as
> > >
> > > <script src="/mywebapp/js/myjsfile.js"
> > > language="Javascript"></script>
> > >
> > > we know that Tomcat is processing the JSP page, but Apache is
> > > processing the handling of sending the JS file to the client.  As
> > > this is another "http" request inside the page that was request.
> > >
> > > So, the short of it is that you need to place your XSL somewhere
> > > that can be accessed via HTTP.  So you need to either move the XSL
> > > file to a place where an alias is defined for Apache (even root) or
> > > create an alias for your Tomcat context and then point your html tag
> > > to:
> > >
> > > <xsl:import href="http://localhost/aaem/xsl/routesummarycontent.xsl";
> > > />
> > >
> > > HTH
> > >
> > >
> > >
> > > On 4/21/06, BLAND, Geoff, GBM <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Using Apache Tomcat 5.0.28 I'm having a problem with the
> > > > xsl:import command.
> > > >
> > > > I have several Tomcat running on the same server (they could be
> > > > different releases of code so can't share resources).
> > > >
> > > > An XSLT script is called via a JSP to convert XML to HTML
> > > > (<xsl:apply nameXml="routesummary"
> > > > xsl="/xsl/routesummaryheader.xsl" />).
> > > >
> > > > This routesummaryheader.xsl script then needs to call another XSLT
> > > > script routesummarycontent.xsl and it does this via an import, for
> > > > example,
> > > >
> > > > <xsl:import
> > > > href="http://localhost:8080/aaem/xsl/routesummarycontent.xsl";
> > > > />
> > > >
> > > > Now this works fine.
> > > >
> > > > But I run many Tomcat servers on this box and so a specific URI is
> > > > no good. So I want to replace that import with a relative URI
> > > >
> > > > <xsl:import href="routesummarycontent.xsl" />
> > > >
> > > > This does not work, I get "Had IO Exception with stylesheet file:
> > > > routesummarycontent.xsl".
> > > >
> > > > Note routesummaryheader.xsl and routesummarycontent.xsl are in the
> > > > same directory.
> > > >
> > > > I've tried all kinds of relative paths in the import nothing seems
> > > > to work.
> > > >
> > > > The JSP file is under webapps\app-dir\jsp. The XSLT files are
> > > > under webapps\app-dir\xsl.
> > > >
> > > >
> > > > How do I fix this?
> > > >
>
>
> ***********************************************************************************
> The Royal Bank of Scotland plc. Registered in Scotland No 90312.
> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
> Authorized and regulated by the Financial Services Authority
>
> This e-mail message is confidential and for use by the
> addressee only. If the message is received by anyone other
> than the addressee, please return the message to the sender
> by replying to it and then delete the message from your
> computer. Internet e-mails are not necessarily secure. The
> Royal Bank of Scotland plc does not accept responsibility for
> changes made to this message after it was sent.
>
> Whilst all reasonable care has been taken to avoid the
> transmission of viruses, it is the responsibility of the recipient to
> ensure that the onward transmission, opening or use of this
> message and any attachments will not adversely affect its
> systems or data. No responsibility is accepted by The Royal
> Bank of Scotland plc in this regard and the recipient should carry
> out such virus and other checks as it considers appropriate.
> Visit our websites at:
> http://www.rbos.com
> http://www.rbsmarkets.com
>
> ***********************************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Marc Farrow

Reply via email to