JSP application(return String)用法详例
2018-10-12 13:59
459 查看
1.JSP代码:
2.输出:
<%--
Document : Application
Created on : 2009-10-4, 13:18:53
Author : lucifer
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
get Server Info:
<%=application.getServerInfo()%>
<br>
get Context Path:
<%=application.getContextPath()%>
<br>
get Real Path:
<%=application.getRealPath("/Application.jsp")%>
<br>
</body>
</html>
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 request(return String)用法详例
- JSP application(return String)用法详例
- JSP中request(return String)用法详例
- JSP中application(return String)用法详例
- String。equals()用法
- ASP.NET中Get和Post的用法 Request.QueryString,Request.Form,Request.Params的区别
- String、StringBuilder、StringBuffer 用法比较
- string 的常见用法
- JavaScript中return的用法详解
- NSString、NSMutableString基本用法
- java去String用法之空格
- C++模版STL中 map 和 string, vector 的用法详解!
- String.split()用法的一点经验
- std::string用法总结
- java toString()用法
- c++中的string用法(二)
- JAVA中String.format的用法
- iOS开发宝典:String用法大全(转)
- java.lang.String.isEmpty()的用法