594032.xml

来自「论坛精华帖子」· XML 代码 · 共 68 行

XML
68
字号
<?xml version='1.0' encoding='GB2312'?>
<?xml-stylesheet type='text/xsl' href='../csdn.xsl'?>
<Topic>
<Issue>
<PostUserNickName>hongs</PostUserNickName>
<rank>二级(初级)</rank>
<ranknum>user2</ranknum>
<credit>110</credit>
<TopicId>594032</TopicId>
<TopicName>如何在JSP中获得当前的物理路径?</TopicName>
<PostUserId>78756</PostUserId>
<PostUserName>bill_hongs</PostUserName>
<RoomName>JSP</RoomName>
<ReplyNum>3</ReplyNum>
<PostDateTime>2002-3-22 19:00:24</PostDateTime>
<Point>20</Point>
<ReadNum>0</ReadNum>
<RoomId>28</RoomId>
<EndState>2</EndState>
<Content>谢了。</Content>
</Issue>
<Replys>
<Reply>
<PostUserNickName>和我一起看上帝</PostUserNickName>
<rank>一级(初级)</rank>
<ranknum>user1</ranknum>
<credit>100</credit>
<ReplyID>3939257</ReplyID>
<TopicID>594032</TopicID>
<PostUserId>165144</PostUserId>
<PostUserName>gotogod</PostUserName>
<Point>17</Point>
<Content>
String&#32;virtPath&#32;=&#32;request.getServletPath();//虚拟路径
String&#32;realPath&#32;=&#32;request.getRealPath(virtPath);//物理路径

试一下就知道了,呵呵</Content>
<PostDateTime>2002-3-22 19:33:06</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>开心的鱼</PostUserNickName>
<rank>二级(初级)</rank>
<ranknum>user2</ranknum>
<credit>100</credit>
<ReplyID>3939701</ReplyID>
<TopicID>594032</TopicID>
<PostUserId>133245</PostUserId>
<PostUserName>liyujie2000</PostUserName>
<Point>3</Point>
<Content>out.println(request.getRealPath(""));</Content>
<PostDateTime>2002-3-22 20:10:25</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>hongs</PostUserNickName>
<rank>二级(初级)</rank>
<ranknum>user2</ranknum>
<credit>110</credit>
<ReplyID>3961643</ReplyID>
<TopicID>594032</TopicID>
<PostUserId>78756</PostUserId>
<PostUserName>bill_hongs</PostUserName>
<Point>0</Point>
<Content>Thanks&#32;a&#32;lot.</Content>
<PostDateTime>2002-3-25 11:58:50</PostDateTime>
</Reply>
</Replys>
</Topic>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?