getRealPath « J2EE « JSP-Servlet Q&A





1. Why does getRealPath() return null when deployed with a .war file?    stackoverflow.com

getRealPath() is returning the actual path in the local system, but returns null when deployed with a .war file.

<%@ page import="java.io.*" %>
<%@ page contentType="text/html;charset=ISO-8859-1" %> 
<%
int iLf = 10;
char cLf = ...