I am trying to get JAVA_OPTS value defined in catalina.bat in a jsp file. Can someone tell me how to do that.
For Example: My JAVA_OPTS definition in catalina.bat is like
JAVA_OPS= -DMyProjectHome=D:\Projects
I want to have the value of MyProjectHome at run time in jsp file so I am trying to do is ${MyProjectHome} but it is doing nothing.
Or is there a way I can define JAVA_OPTS value in
Please help me out achieving my functionality.
thanks.
解决方案
what you pass to a JVM with -Dfoo=bar is called a system property. You can get their value using System.getProperty(). There is no standard tag or JSP EL syntax to get them, though, so you'll have to use scriptlet or implement a custom tag.