Mac下Intellij IDea发布Java Web项目详解五 开始测试
测试前准备工作目录
- Mac下Intellij IDea发布Web项目详解一
- Mac下Intellij IDea发布Java Web项目(适合第一次配置Tomcat的家伙们)详解二
- Mac下Intellij IDea发布Java Web项目详解三 新建Module
- Mac下Intellij IDea发布Java Web项目详解四 为所有Module配置Tomcat Deployment
JavaProject的工程结构
开始测试下绝对路径
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>project1/test1/index1.jsp</title> </head> <body> <h1>测试绝对路径</h1> <h4>WebWorkSpace1的web页面绝对路径 == (http://+ ip + port) + WebWorkSpace1 Application context(/) + path + *.jsp</h4> <h4>project1的web页面绝对路径 == (http://+ ip + port) + WebWorkSpace1 Application context + project1 Application context + path + *.jsp</h4> <h4>project2的web页面绝对路径 == (http://+ ip + port) + WebWorkSpace1 Application context + project2 Application context + path + *.jsp</h4> <h6>path是*.jsp文件的上级目录,web的下级目录们,如:project1_test1_index2.jsp的path=test1,它在web目录下,包含project1_test1_index2.jsp文件</h6> <%--http://localhost:1025/project1/index.jsp--%> <a href="http://localhost:1025/project1/index.jsp">project1/web/index.jsp</a><br><br> <%--http://localhost:1025/project1/web/test1/project1_test1_index2.jsp--%> <a href="http://localhost:1025/project1/test1/project1_test1_index2.jsp">project1/test1/project1_test1_index2.jsp</a></a><br><br> <%--http://localhost:1025/project1/web/test2/project1_test2_index1.jsp--%> <a href="http://localhost:1025/project1/test2/project1_test2_index1.jsp">project1/test2/project1_test2_index1.jsp</a></a><br><br> <%--http://localhost:1025/project2/web/index.jsp--%> <a href="http://localhost:1025/project2/index.jsp">project2/index.jsp</a><br><br> <%--http://localhost:1025/project2/web/test3/project2_test3_index1.jsp--%> <a href="http://localhost:1025/project2/test3/project2_test3_index1.jsp">project2/test3/project2_test3_index1.jsp</a> </body> </html>
测试绝对路径效果
- WebWorkSpace1的web页面绝对路径 == (http://+ ip + port) + WebWorkSpace1 Application context(/) + path + *.jsp
- project1的web页面绝对路径 == (http://+ ip + port) + WebWorkSpace1 Application context + project1 Application context + path + *.jsp
- project2的web页面绝对路径 == (http://+ ip + port) + WebWorkSpace1 Application context + project2 Application context + path + *.jsp
- path是*.jsp文件的上级目录,web的下级目录们,如:project1_test1_index2.jsp的path=test1,它在web目录下,包含project1_test1_index2.jsp文件
project1/test1/project1_test1_index2.jsp
project1/test2/project1_test2_index1.jsp
project2/index.jsp
project2/test3/project2_test3_index1.jsp
人生的智慧,在于确认自己是自由的存在着,而非宿命的被命运所规定.