JSP application(return String)用法详例

1.JSP代码:
复制代码 代码如下:

<%--
Document : Application
Created on : 2009-10-4, 13:18:53
Author : lucifer
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
"http://www.w3.org/TR/html4/loose.dtd">



JSP Page


get Server Info:
<%=application.getServerInfo()%>


get Context Path:
<%=application.getContextPath()%>


get Real Path:
<%=application.getRealPath("/Application.jsp")%>





2.输出:
复制代码 代码如下:

get Server Info: Apache Tomcat/6.0.18
get Context Path: /TestMethod
get Real Path: D:\Program Files\NetBeans 6.7.1\www\TestMethod\build\web\Application.jsp

你可能感兴趣的:(JSP application(return String)用法详例)