[opencms-dev] Urgent : Reading the contents of a html file inopencms 6.0b

Alexander Kandzior alex at opencms.org
Tue Aug 24 13:42:36 CEST 2004


Oliver,
 
check out the org.opencms.jsp.CmsJspActionElement.
 
Use one of the following methods:

    /**
     * Returns the processed output of an OpenCms resource in a String.<p>
     * 
     * @param target the target to process
     * @return the processed output of an OpenCms resource in a String
     */
    public String getContent(String target) ...

    /**
     * Returns the processed output of an element within an OpenCms
resource.<p>
     * 
     * @param target the target to process
     * @param element name of the element
     * @param locale locale of the element
     * @return the processed output
     */
    public String getContent(String target, String element, Locale locale)
...
 

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com <http://www.alkacon.com/> 



 


________________________________

	From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Oliver Pereira
	Sent: Tuesday, August 24, 2004 12:05 PM
	To: opencms-dev at opencms.org
	Subject: [opencms-dev] Urgent : Reading the contents of a html file
inopencms 6.0b
	Importance: High
	
	

	Hi, 

	I want to display (include) some html files dynamically on my
website, these are basically promotions. 

	How do I go about? 

	I tried using the CmsFile.getContents() methods but it returns some
junk. 

	I also tried the native java.io.FileInputStream method but it
returns a file does not exist in Opencms 

	Regards, 

	Oliver 





More information about the opencms-dev mailing list