1. JSP applicationreturn String)用法详例
  1. JSPapplicationreturn String)用法详例,需要用的朋友可以参考下代码。
  2. 1.JSP代码:
  1. <%--
  2. Document : Application
  3. Created on : 2009-10-4, 13:18:53
  4. Author : lucifer
  5. --%>
  6. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  8. "http://www.w3.org/TR/html4/loose.dtd">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  12. <title>JSP Page</title>
  13. </head>
  14. <body>
  15. get Server Info:
  16. <%=application.getServerInfo()%>
  17. <br>
  18. get Context Path:
  19. <%=application.getContextPath()%>
  20. <br>
  21. get Real Path:
  22. <%=application.getRealPath("/Application.jsp")%>
  23. <br>
  24. </body>
  25. </html>
  1. 2.输出:
  1. get Server Info: Apache Tomcat/6.0.18
  2. get Context Path: /TestMethod
  3. get Real Path: D:\Program Files\NetBeans 6.7.1\www\TestMethod\build\web\Application.jsp

更多相关文章

  1. android 常用代码
  2. android handle ui 更新
  3. android设置图片变化的四种效果代码
  4. android 把view转成bitmap~~~
  5. Android的jni下c与java数据互传测试代码
  6. Android(安卓)handler.obtainMessage()传字符串用法
  7. android
  8. android 定时发送短信
  9. Android(安卓)代码中实现返回键功能

随机推荐

  1. Android画图学习总结(一)——类的简介
  2. Android 中文 API (100) ―― ScrollView
  3. Android(安卓)App快速启动
  4. Android 6.0发布大会来了,来看看Android 6
  5. Google 的设计主管谈开发中的 Ice Cream
  6. Android(安卓)SurfaceFlinger学习文档
  7. Android 蓝牙开发(整理大全)
  8. Android自学之路,ToolBar的使用标题居中颜
  9. Android O / Android 8.0 新特性及开发指
  10. 阅读《Android(安卓)从入门到精通》(11)—