📄 765214.xml
字号:
<?xml version='1.0' encoding='GB2312'?>
<?xml-stylesheet type='text/xsl' href='../csdn.xsl'?>
<Topic>
<Issue>
<PostUserNickName></PostUserNickName>
<rank>一级(初级)</rank>
<ranknum>user1</ranknum>
<credit>100</credit>
<TopicId>765214</TopicId>
<TopicName>这个问题已经困扰我很长时间了,请诸位帮忙。</TopicName>
<PostUserId>264300</PostUserId>
<PostUserName>aleckru</PostUserName>
<RoomName>JSP</RoomName>
<ReplyNum>8</ReplyNum>
<PostDateTime>2002-5-30 15:15:02</PostDateTime>
<Point>100</Point>
<ReadNum>0</ReadNum>
<RoomId>28</RoomId>
<EndState>2</EndState>
<Content>大家好:
    我大约半年前开始用JSP写程序到现在,有一个问题一直令我非常头痛。就是每次写完程序后,在调试的过程中不怕别的,就怕它出现如编译错误等等的一些错误。每当看着从服务器返回的一些令人不知所云的错误代码时,我的头顿时就得大一圈:( 有时候真想不明白为什么JSP程序在调试时不能像其它编程语言那样给人一个明确的信息呢?比如第几行有错误,错误的原因是什么等等。现在我只能在看到错误时无奈地开始漫长地打注释,然后再经过N长时间的寻找后才发现原来只是少了个分号。但随着代码的增加…………
    不知在这里的诸位高手有什么好的解决方法?帮帮我吧,我都快绝望了。
盼望答复,谢谢。</Content>
</Issue>
<Replys>
<Reply>
<PostUserNickName>我是谁??</PostUserNickName>
<rank>四级(中级)</rank>
<ranknum>user4</ranknum>
<credit>100</credit>
<ReplyID>4985096</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>67537</PostUserId>
<PostUserName>epowerlab</PostUserName>
<Point>20</Point>
<Content>是的jsp调试环境不如其它的
现在用的tomcat4.0出错信息还可以指出是第m-n行
不过也不准
不能靠那
多积累点经验</Content>
<PostDateTime>2002-5-30 15:22:02</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>阿枫</PostUserNickName>
<rank>三级(初级)</rank>
<ranknum>user3</ranknum>
<credit>100</credit>
<ReplyID>4985245</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>153027</PostUserId>
<PostUserName>javagoo</PostUserName>
<Point>20</Point>
<Content>还好了,在Weblogic下,可以指出出错原因的,还有行数;我的经验是不要插过逗的java代码,使用Bean!</Content>
<PostDateTime>2002-5-30 15:28:27</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>weidegong</PostUserNickName>
<rank>两星(中级)</rank>
<ranknum>star2</ranknum>
<credit>118</credit>
<ReplyID>4985346</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>128268</PostUserId>
<PostUserName>weidegong</PostUserName>
<Point>20</Point>
<Content>看不出来是哪行出错的时候,我通常是设置“断点”
out.println("Run here right!");out.close();
采用类似折半查找法,首先放在程序的一半位置上,如果执行无误,那就是下一半程序有错误,再放在出错的程序一半的位置上.....</Content>
<PostDateTime>2002-5-30 15:32:45</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>晓彬</PostUserNickName>
<rank>两星(中级)</rank>
<ranknum>star2</ranknum>
<credit>135</credit>
<ReplyID>4985374</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>173450</PostUserId>
<PostUserName>Andrawu</PostUserName>
<Point>20</Point>
<Content>1、用jbuilder就好了。
你可以用try{
....
}catch(Exception se) {
  se.printStackTrace(System.err);
}
这样能得到错误信息和第几行,这很好,我一直都用它。
2、如是在tomcat下,它的错误信息写在tomcat\log\tomcat.log中也很
详细
3、如果其它的,你可以以写文件的方式将错误信息写进去。
4、再就是写代码要仔细、要规范、要认真,提高经验值。
</Content>
<PostDateTime>2002-5-30 15:33:46</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>晓彬</PostUserNickName>
<rank>两星(中级)</rank>
<ranknum>star2</ranknum>
<credit>135</credit>
<ReplyID>4985452</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>173450</PostUserId>
<PostUserName>Andrawu</PostUserName>
<Point>0</Point>
<Content>jsp的调式还是比较麻烦的。要有耐心。</Content>
<PostDateTime>2002-5-30 15:38:21</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>晓彬</PostUserNickName>
<rank>两星(中级)</rank>
<ranknum>star2</ranknum>
<credit>135</credit>
<ReplyID>4985491</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>173450</PostUserId>
<PostUserName>Andrawu</PostUserName>
<Point>0</Point>
<Content>jsp的调试还是比较麻烦的,要有耐心。</Content>
<PostDateTime>2002-5-30 15:40:17</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>穆斯林信徒</PostUserNickName>
<rank>三级(初级)</rank>
<ranknum>user3</ranknum>
<credit>92</credit>
<ReplyID>4985513</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>179289</PostUserId>
<PostUserName>pingju</PostUserName>
<Point>20</Point>
<Content>或者使用好的webserver,譬如iplanit.日志文件error文件把错误说的很明白</Content>
<PostDateTime>2002-5-30 15:41:25</PostDateTime>
</Reply>
<Reply>
<PostUserNickName></PostUserNickName>
<rank>一级(初级)</rank>
<ranknum>user1</ranknum>
<credit>100</credit>
<ReplyID>4986716</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>264300</PostUserId>
<PostUserName>aleckru</PostUserName>
<Point>0</Point>
<Content>看了大家的回答后,感觉在调试JSP方面的确没有什么太好的方法。不过在些先谢过大家了。分数平均分发大家没有意见吧?
</Content>
<PostDateTime>2002-5-30 16:35:54</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>加瓦</PostUserNickName>
<rank>二级(初级)</rank>
<ranknum>user2</ranknum>
<credit>101</credit>
<ReplyID>5158030</ReplyID>
<TopicID>765214</TopicID>
<PostUserId>258336</PostUserId>
<PostUserName>bxh777</PostUserName>
<Point>0</Point>
<Content>不知道大家用过 JRun 没有,我刚刚使用这个工具,他在调试的时候比较方便一些。但是,像 BCB 那样的参数跟踪工具我却不知道如何用?</Content>
<PostDateTime>2002-6-11 9:29:12</PostDateTime>
</Reply>
</Replys>
</Topic>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -