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

Oliver Pereira Oliver.Pereira at dna.co.uk
Tue Aug 24 13:49:51 CEST 2004


Alex,

Thanks for the response... I managed to get around it using the
cms.include(<file>, "body") and it works as I expected.

Also I have another problem / query regarding user authentication in
opencms via Apache 1.3.28 

http://mail.opencms.org/pipermail/opencms-dev/2004q3/012528.html

Any ideas?

Regards,

Oliver


-----Original Message-----
From: Alexander Kandzior [mailto:alex at opencms.org] 
Sent: 24 August 2004 12:43
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] Urgent : Reading the contents of a html
fileinopencms 6.0b

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 




_______________________________________________
This mail is send to you from the opencms-dev mailing list To change
your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed
Scanning Services - powered by MessageLabs. For further information
visit http://www.mci.com



More information about the opencms-dev mailing list