[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: using Saxon from Tomcat

Subject: Re: using Saxon from Tomcat
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Tue, 14 May 2002 07:03:19 -0700
saxon tomcat
You can keep your XML/XSL under WEB-INF so they are secure. For example:

- basic_app
  |- css
  |- images
  |- WEB-INF
       |- classes
           |- SaxonServlet.class
       |- content
           |-replace_data.xml
       |- styling
           |- test.xsl
       |- lib
           |- saxon.jar

You can set an intitial param for the docroot relative path to your content in your /WEB-INF/web.xml. For example:
<context-param>
<param-name>client.content.dir</param-name>
<param-value>/WEB-INF/content/</param-value>
</context-param>


Then you will need to either getRealPath or getResourceAsStream based on an argument starting from the WEB-INF. For example:

StringBuffer path = new StringBuffer(ServletContextObject.getRealPath(ServletContextObject.getInitParameter("client.content.dir")));
path.append(filename_var);


best,
-Rob


Joeri Belis wrote:


ENV: Linux Redhat 6.1, Saxon 6.5.2, Tomcat 3.3.1

I want to use Tomcat to do an xslt transformation via a servlet.

I have Tomcat up and running and Saxon installed.

Where should i put my xlst, xml files under Tomcat? And what is more needed
to
have the following working.
http://webserver:8080/examples/servlets/SaxonServlet?source=replace_data.xml
&style=test.xsl

I am using the SaxonServlet that came with the saxon samples. Do i need to
change any code in it
or is this a generic version that works for every kind of transformation.

Thanks for any feedback;
Joeri


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list







XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.