Re: dynamic xsl

"Simon Kelly" <[email protected]>
Newsgroups gmane.comp.java.strutscx.user
Message-ID <[email protected]>
What you would need to do is have a business logic class to handle a file re-write (I haven't attempted this so your on your own there ;o)).
Then save the file back.

You would then need to re-write or alter the context listener for the definitions file and force it to reload the definitions file when it's been altered.

How you'd do this I don't know, or even if it is possible. One of the designers may know this.

Cheers

Simon
  ----- Original Message ----- 
  From: Nitin Gaur 
  To: Simon Kelly 
  Sent: Thursday, August 14, 2003 12:26 PM
  Subject: Re: [Strutscx-user] dynamic xsl


  Thanks for quick reply,
  Here are few things.
  You mean to say that I can create new XSL inside a specified directory inside WAR.
  Fine, but will it allow to create new file within unexpanded WAR (as in Weblogic) too?
  And if that is possible then how can add its entry into strutscx-definition.xml

  regards
  -Nitin

    ----- Original Message ----- 
    From: Simon Kelly 
    To: Nitin Gaur 
    Sent: Thursday, August 14, 2003 3:33 PM
    Subject: Re: [Strutscx-user] dynamic xsl


    You can't really (or rather shouldn't) access the local machine outside of the war directory, especially if it's a portable web application. You would do better to define an area within your war file, dedicated to these new files.

    And when you write the files use getResourceAsStream() and handle file creation using the URL rather than File class, as this 'should' allow you to read and write new files even if the webapp is running directly from the war file.

    Cheers

    Simon
      ----- Original Message ----- 
      From: Nitin Gaur 
      To: [email protected] 
      Sent: Thursday, August 14, 2003 11:16 AM
      Subject: [Strutscx-user] dynamic xsl


      hi,
      I want to know if there is any way I can add more xsl dynamically i.e. after the WAR build.
      I checked, xsl definitions take relative path from the project.
      Can I give a absolute path so that I can put xsl elsewhere on the disk and access it? I need this because I want a functionality to add new xsl templates by user.

      or any suggestions.

      thanks
      -nitin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.