jsp路径使用
来源:互联网 发布:mysql的可视化界面 编辑:程序博客网 时间:2024/05/22 16:03
<%
String path = request.getContextPath();
// 获得项目完全路径(假设你的项目叫MyApp,那么获得到的地址就是 http://localhost:8080/MyApp/):
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.getSession().setAttribute("basePath",basePath);
String path = request.getContextPath();
// 获得项目完全路径(假设你的项目叫MyApp,那么获得到的地址就是 http://localhost:8080/MyApp/):
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.getSession().setAttribute("basePath",basePath);
%>
<script type="text/javascript">
var base = '<%=request.getSession().getAttribute("basePath")%>';
</script>
0 0
- jsp路径使用
- jsp中路径使用
- JSP中使用路径问题
- jsp页面相对路径的使用
- 使用JSP、EL表达式获取相对路径
- JSP路径
- jsp路径
- jsp路径
- JSP页面中如何使用相对路径访问文件
- 在jsp中使用applet时的路径问题
- jsp页面使用网络路径访问图片的乱码问题解决
- 关于在jsp中使用图片相对路径的问题
- jsp中路径获取的几个方法的使用区别
- JSP中如何使用JQuery及相对路径问题
- jsp路径,及struct2路径
- JSP中的路径问题
- jsp 中的相对路径
- jsp虚拟路径设置
- 如何在 Ubuntu 12.04 中安装 GIMP 2.8
- 【例7-6】源程序Bwriter.java,从键盘键入一系列字符串,写入到某磁盘文件中。
- file_get_contents读取 https 请求
- myeclipse 使用记录
- WebView注入Java对象注意事项
- jsp路径使用
- 【黑马程序员】C语言学习笔记之第一个C程序及编译运行(一)
- python基础
- Qt4.8.4运行程序显示中文
- Android 命令 - fastboot
- Python学习笔记(二)
- 扩展WPF工具包™Community Edition(待研究)
- servlet跳转
- long转成datetime类型