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

您没有登录

» Java开发网 » Servlet/JSP/JSF/JavaFX Script  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to postflat modethreaded modego to previous topicgo to next topicgo to back
作者 求助:Apache Tomcat/4.1.24 + jdk14
flyingdd





发贴: 42
于 2004-11-23 11:07 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我的一个小程序使用Tomcat/4.1.24和JDK 1.4,错误提示 HTTP method GET is not supported by this URL,不知道错在哪里了,哪位高手帮忙指点一二:
源代码如下:
。。。
public void doPost(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException, IOException {
int petWeight=0, petLegs=0;
try{
petWeight=Integer.parseInt(req.getParameter("weight"));
petLegs=Integer.parseInt(req.getParameter("legs"));
} catch (NumberFormatException nfe) {
petWeight=petLegs=-1;
}
resp.setContentType("test/html");

PrintWriter out=resp.getWriter();

out.println("<html><body><hl>Recommended Pet</hl><p>");
out.println("You want a " + petLegs + "-legged pet weighting "
+ petWeight + "lbs.");
String pet =recommendedPet(petWeight,petLegs);
out.println("<P> we recommend getting <b>" + pet);
。。。




搞笑QQ图片

话题树型展开
人气 标题 作者 字数 发贴时间
2188 求助:Apache Tomcat/4.1.24 + jdk14 flyingdd 862 2004-11-23 11:07
1594 Re:求助:Apache Tomcat/4.1.24 + jdk14 jimmywin 967 2004-11-23 19:34
1805 十分感谢 flyingdd 21 2004-11-24 10:36

reply to postflat 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