Identify java version on remote server and more… March 29, 2007
Posted by maxmil in : Java, jsp , add a commentSystem properties are a useful way of determining information on a remote server.
Paste the following into a jsp deployed on the server…
java.versio = <%= System.getProperty("java.version") %><br>
java.home = <%= System.getProperty("java.home") %><br>
java.vendor = <%= System.getProperty("java.vendor") %><br>
java.vendor.url = <%= System.getProperty("java.vendor.url") %><br>
line.separator = <%= System.getProperty("line.separator") %><br>
os.arch = <%= System.getProperty("os.arch") %><br>
os.name = <%= System.getProperty("os.name") %><br>
os.version = <%= System.getProperty("os.version") %><br>
path.separator = <%= System.getProperty("path.separator") %><br>
user.dir = <%= System.getProperty("user.dir") %><br>
user.home = <%= System.getProperty("user.home") %><br>
user.name = <%= System.getProperty("user.name") %><br>
Define function in jsp May 11, 2006
Posted by maxmil in : Java, jsp , add a commentBeen working with some very long messy jsp's. In this environment using servlets or external classes was not an option but the least i could do was to try to extract methods from the mess… Heres how to define a method in a jsp. Include it at the bottom.
<%!
public void btn_AddUpdate(HttpServletRequest request, JspWriter out) throws java.io.IOException {
//do your stuff here, normally involves out.print(…)
}
%>