ITeye博客

默认的index.jsp里的参数解释

zhou_wu · 2010-08-26 15:55 · j2ee · 编程语言 · Markdown

建立一个web项目TestMyEclipse:

(1).String path = request.getContextPath(); //拿到的是TestMyEclipse 即是新建项目时url访问的路径 一般跟项目名一样

(2).String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; //http://127.0.0.1:8080/TestMyEclipse

(3). //连接的实际地址为 http://127.0.0.1:8080/TestMyEclipse/aaa.html

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。