Plands.com Logo  Business Internet Services 
Main Menu
Home
Planetary CRM
  Benefits
  Features
  Demo
E-Mail Services
  E-mail Hosting
  Newsletters
  Discussion Lists
Web Hosting
Server Co-location
and Administration
Web Applications
Technical Support
Contact Us
DXP Samples
 
DxpHome  ||   Samples  ||   Details  ||   Docs  ||   Trees  ||   xml-xsl  ||   Links
// ReadText.java

ReadText is used to read a text file either write it to the default OutputStream or make it available to other tags that call it as a parameter.

Here is a simple example with a hard coded filename.

<dxp:ReadText filename="pageheader.txt"/>

In this example the file is stored under a parameter name so the outpout can be used more than once without re-reading the file.

<dxp:ReadText filename="custservice.txt" store="content"/>
  ...

If you need help contact us here: <dxp:Rp name="content"/>

... <dxp:SendMail mailserver="mail.mydomain.com"> ... <dxp:Rp name="content"/> ... </dxp:SendMail>

In this example the filename attribute is empty and a parameter called filename is used get the runtime value of the filename.

<dxp:ReadText default="products/generic.txt">
   <dxp:Rp name="filename"/>
</dxp:ReadText>

In this example a token char is replaced by the request value of the prameter session and $ is replaced by the request value of the product. If the file product.txt is not found a defaultName file is inserted in it's place.

<dxp:ReadText tokens=",$" values="session,product" defaultName="defaultName.txt">product.txt</dxp:ReadText>


@author Mark Ashworth
@version 0.1, 4/04/2001

Return to Index

Note: We have tried to test all of the code examples but they may contain errors. Any questions, comments, suggestions, or problems should be sent to info@plands.com.