cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabor Bartha <gabor.bar...@mailbox.hu>
Subject initialize a java variable with an xml file tag's value
Date Wed, 09 Oct 2002 09:27:47 GMT
Hi,

I wanna use a (maybe little bit extreme) solution but I don't know how. 
I want to make a single config file for users then use that file in the 
application.

The config.xml file e.g

<?xml version="1.0" encoding="ISO-8859-1"?>
<mysite>
  <driver>oracle.jdbc.OracleDriver</driver>
  <url>jdbc:oracle:thin:@192.168.0.115:1521:OEMMY</url>
  <username>scott</username>
  <password>tiger</password>
  <tableName>mytable</tableName>
</mysite>

Then in my application I want to use the username, driver, ... 
parameters as java variables from this xml (without using of session). 
So something like that:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page
   language="java"
   xmlns:xsp="http://apache.org/xsp"
 >
...
<xsp:logic>
// java code
String url = ????  //Here I want to use the value of <driver> from 
config.xml file.
</xsp:logic>
...
</xsp:page>

Is there any solution without using of session?

thanks,
Gabor


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message