首页 技术 正文
技术 2022年11月15日
0 收藏 621 点赞 3,246 浏览 2397 个字

<!–
body{
margin:1em;
}

div{
display:block;
margin:0 auto;
list-style-type:none;
}

ul li{
text-align:justify;
color:#336;
text-decoration:none;
}

ul li:hover{
color:lightdark;
}
–>

测试前准备工作目录

JavaProject的工程结构

Mac下Intellij IDea发布Java Web项目详解五 开始测试

开始测试下绝对路径

<%@ 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" rel="external nofollow" rel="external nofollow" >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" rel="external nofollow" rel="external nofollow" >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" rel="external nofollow" rel="external nofollow" >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" rel="external nofollow" rel="external nofollow" >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" rel="external nofollow" rel="external nofollow" >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/web/index.jsp

project1/test1/project1_test1_index2.jsp

project1/test2/project1_test2_index1.jsp

project2/index.jsp

project2/test3/project2_test3_index1.jsp

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,028
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,518
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,365
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,146
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,780
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,857