Skip to main content

how get value of variable environment with el .

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
3 replies [Last post]
mauro2011
Offline
Joined: 2011-06-08

hi .
i would get the value into a configuration xml from variable environment .
suppose that i have set up MYVAR='somevalue'
now i would get the value with el 2.2. for set the value into a file xml.
or also i try to visualize into a jsp page.
if i write ${MYVAR} not work.
i can try with ${System.getEnv("MYVAR")} but not work

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
oversteer
Offline
Joined: 2011-03-28

The question isn't clear - is this an environment variable or something set in an xml file such as web.xml?

mauro2011
Offline
Joined: 2011-06-08

yes it is a variable environment.
I would use EL for get the value of it and set into a file xml like persistence.xml or another file xml . or properties file.

mauro2011
Offline
Joined: 2011-06-08

yes it is a variable environment.
I would use EL for get the value of it and set into a file xml like persistence.xml or another file xml . or properties file.