Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java EE 综合讨论区 » J2EE SDK  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 文件改动.求救路径问题,急等!谢谢
heartache





发贴: 59
积分: 0
于 2006-06-20 17:40 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
在eclipse里,WebRoot下建里一批jsp文件,但随着项目的增多,JSP文件也越来越多,于是在WebRoot下建立一文件夹,准备把不同人员写的JSP文件放到不同的文件夹中,请问我建的文件夹名是tyt ,那么我应该改动那些配置呢 ?
有tiles,实体bean,业务bean,连接数据库的文件,做的是个用struts+sqlserver2000的网上书店,在线急等!



作者 Re:文件改动.求救路径问题,急等!谢谢 [Re:heartache]
ancin





发贴: 5
积分: 0
于 2006-06-21 09:26 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
在webRoot 下随便建立目录放置所需文件;
例如你的JSP文件中加入如下即可找到JSP文件:
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName()
+ ":" + request.getServerPort() + path + "/";
%>
<head>
<base href="<%=basePath%>">
</head>



作者 Re:文件改动.求救路径问题,急等!谢谢 [Re:heartache]
heartache





发贴: 59
积分: 0
于 2006-06-21 19:39 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
先试试吧!
谢谢楼上的大哥




作者 Re:文件改动.求救路径问题,急等!谢谢 [Re:heartache]
hayash





发贴: 8
积分: 0
于 2006-06-23 23:02 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
把所有的form 提交action,及所有的URL超连接都使用绝对路径,那么就不会出现找不到页面的问题了。
例如:
<form name="form1" action ="${pageContext.request.contextPath}/tyt/xxx.jsp" method="post">

<a href="${pageContext.request.contextPath}/tyt/xxx.jsp">XXXX</a>



作者 Re:文件改动.求救路径问题,急等!谢谢 [Re:heartache]
tiger_hlq





发贴: 9
积分: 0
于 2008-09-12 10:58 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
在你所有配置文件中,指定你JSP文件目录的前面加上tyt/***.jsp就可以.
还有最简单的办法就是在配置文件中改动一下就行了
但我不知道你的配置文件是怎么样的




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923