HTTP method POST is not supported by this URL的问题,很急 [问题点数:20分,结帖人CSDN]

Bbs1
本版专家分:0
结帖率 100%
Bbs1
本版专家分:0
HTTP method POST is not supported by this URL
一个很简单的网页,提交一个选项,让后返回建议,但是一点提交就出错,下面是html xml 和servlet的代码rn![图片说明](https://img-ask.csdn.net/upload/201806/25/1529927309_326821.png)rn![图片说明](https://img-ask.csdn.net/upload/201806/25/1529927323_40723.png)rn![图片说明](https://img-ask.csdn.net/upload/201806/25/1529927334_893242.png)rn网页能够正常打开,但是一点提交就405rn![图片说明](https://img-ask.csdn.net/upload/201806/25/1529927377_549407.png)
HTTP method GET is not supported by this URL
我想在select的onchange事件中提交servlet可是出现如题所示的错误!rn我的servlet中的方法是dopostrnjs中的提交代码是:rnfunction selectName() rnvar projectName=document.saleform.contractnum.value; rnwindow.location="chaxunServlet?projectName= "+document.saleform.contractnum.value; rnrn点击按钮后提示:rn<em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>rn这是怎么回事?怎么解决?rn
SmartUpload使用问题405 HTTP method POST is not supported by this URL
我用如下方法提交rn rnrnrn为什么会报错rn405 <em>HTTP</em> <em>method</em> <em>POST</em> is not <em>supported</em> by this <em>URL</em>
Request method 'POST' not supported
rn rn rn rn :rnrn rn rn rnrn rn :rnrn rn rn rnrn rn rnrn rn rn rn rn rn rn为什么提交不了form 表单 一提交 就报题目那个错误
Servlet验证出现405错误,HTTP method POST is not supported by this URL
rn我找了很久确实没有找出错误!!看看错在哪儿行吗?rn谢谢!!rn我用Form表单提交:rnrn[code=HTML]"html" [color=#FF0000] [/color]rn 用户名: rn 密码: rn 确认密码: rn 邮箱: rn 安全<em>问题</em>: rn 答案: rn rn rn[/code]rnrn以下是我的Servlet代码:rn[code=HTML]"java"public class UserDAOServlet extends HttpServlet rn public class UserLoginServlet extends HttpServlet rn [color=#FF0000]public void doGet(HttpServletRequest request, HttpServletResponse response)[/color]rn throws ServletException, IOException rn [color=#FF0000]doPost(request, response);[/color]rnrn rnrn [color=#FF0000]public void doPost(HttpServletRequest request, HttpServletResponse response)[/color]rn throws ServletException, IOException rn request.setCharacterEncoding("utf-8"); //统一设置编码rn String page = "user_register.jsp";rn String code = request.getParameter("code");rn List errors = new ArrayList();rn // 验证码验证rn if (code == null || "".equals(code)) rn errors.add("验证码为空!");rn else rn String rand = (String) request.getSession().getAttribute("rand"); rn if (!code.equalsIgnoreCase(rand)) rn errors.add("验证码错误!!") ;rn rn rn //取出接受参数进行验证rn String userName = request.getParameter("userName");rn String userPassword = request.getParameter("userPassword");rn String confirmPassword = request.getParameter("confirmPassword");rn String userEmail = request.getParameter("userEmail");rn String userQuestion = request.getParameter("userQuestion"); rn String userAnswer = request.getParameter("userAnswer"); rn String userRealName = request.getParameter("userRealName");rn String tele = request.getParameter("tele");rn String address = request.getParameter("address");rn String sex = request.getParameter("sex");rn rn if(!(userPassword.equals(confirmPassword)))rn errors.add("两次输入密码不一样!");rn rn if (userName == null || "".equals(userName)) rn errors.add("用户名不能为空!");rn rn if (userPassword == null || "".equals(userPassword)) rn errors.add("密码不能为空!");rn rn if(errors.size()==0) // 现在没有任何的错误信息rn User vo=new User();rn vo.setUserName(userName);rn vo.setUserPassword(new MD5Code().getMD5ofStr(userPassword)) ;rn vo.setAddress(address);rn vo.setSex(sex);rn vo.setTele(tele);rn vo.setUserQuestion(userQuestion);rn vo.setUserAnswer(userAnswer);rn vo.setUserEmail(userEmail);rn vo.setUserRealName(userRealName);rn try rn if(DAOFactory.getIUserDAOInstance().doCreate(vo))rn request.getSession().setAttribute("user", vo) ; // 现在保存对象rn request.setAttribute("userName", userName);rn page = "register_success.jsp" ;rn else rn errors.add("用户名或密码错误!");rn rn catch (Exception e) rn e.printStackTrace();rn rn rn request.setAttribute("errors", errors) ;rn request.getRequestDispatcher(page).forward(request, response);rn rnrnrn[/code]rnrn以下是在WEB.XML里面的配置:rn[code=HTML]"xml"rnuserDAOrnorg.mm.servlet.UserDAOServletrnrnrnuserDAOrn/user_dao_servletrnrn[/code]
错误提示(HTTP method POST is not supported by this URL),什么原因呢?
The specified <em>HTTP</em> <em>method</em> is not allowed for the requested resource (<em>HTTP</em> <em>method</em> <em>POST</em> is not <em>supported</em> by this <em>URL</em>).rnrnrnhttp://10.10.10.4/lhnet/servlet/HelloWorld能正常运行(说明此HelloWorld是好的),要是通过表单提交就出现如上错误信息,不知道什么原因。rnrn表单提交语句为: rn…… ……rn rn…… ……rnrnrn请告知!!!
一个简单servlet+jsp+javabean报错 405 HTTP method POST is not supported by this URL
本人菜鸟,求高手帮帮忙。要做毕业设计了。。。。。rnrnCheckAdmin:rnpackage com.tyhg.action;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnpublic class CheckAdmin extends HttpServletrnrn protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletExceptionrn response.setContentType("text/html;charset=UTF-8");rn PrintWriter out = response.getWriter();rn String name = request.getParameter("username");rn String pass = request.getParameter("password");rn if(name.equalsIgnoreCase("admin") && pass.equals("12345"))rn response.sendRedirect("http://www.baidu.com");rn rn elsern response.sendRedirect("http://www.baidu.com");rn rn out.close();rn rn rn protected void doPost(HttpServletResponse response,HttpServletRequest request) throws IOException,ServletExceptionrn processRequest(request,response);rn rn protected void doGet(HttpServletResponse response,HttpServletRequest request) throws IOException,ServletExceptionrn doPost(request,response);rn rnrnrnweb.xml:rn rn CheckAdminrn com.tyhg.action.CheckAdminrn rn rn CheckAdminrn /CheckAdminrn rnjsp:rn
HTTP method POST is not supported by this URL!这是什么错误?servlet的!!!
ServletToJsp.java:rnimport java.io.*;rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnpublic class ServletToJsp extends HttpServletrn public void doPost(HttpServletRequest req,HttpServletResponse res)rn throws ServletException,IOExceptionrn res.setContentType("text/html");rn PrintWriter out=res.getWriter();rn out.println(" HelloWorld!");rn out.println("");rn out.println("Hello World");rn out.println("");rn out.close();rn rn rnrn1.jsp:rn rnrnrnrnweb.xml:rnrnrnrn rn ServletToJsprn ServletToJsprn rn rn ServletToJsprn /ServletToJsprn rnrn运行为什么出<em>HTTP</em> <em>method</em> <em>POST</em> is not <em>supported</em> by this <em>URL</em>!错误?如果改成Post改成Get就好使~Post有什么需要特殊注意的吗?
servlet 运行为什么出现HTTP method POST is not supported by this URL错误?
运行环境:Tomcat5.5rn目录结构:greeting-|WEB-INFrn | |__classesrn | | |___GreetingServlet.classrn | |__web.xmlrn |___index.htmlrnweb.xml内容:rnrnrnrnrn rn Welcome to Tomcatrn rn Welcome to Tomcatrn rn rn rn GreetingServletrn GreetingServletrn rn rn GreetingServletrn /servlet/GreetingServletrn rnrnindex.html内容:rnrn rn ProJava Registration rn rn rn Welcomern rn Your Namern Your Email rn rn rn rnrnGreetringServlet.java内容:rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport java.io.*;rnimport java.util.*;rnrnpublic class GreetingServlet extends HttpServletrnrn protected void dopost(HttpServletRequest request,HttpServletResponse response)rn throws ServletException,IOExceptionrn rn String name=request.getParameter("name");rn String email=request.getParameter("email");rn String message=null;rn GregorianCalendar calender=new GregorianCalendar();rn if(calender.get(Calendar.AM_PM)==Calendar.AM)rn rn message="Good Mornming";rn rn elsern rn message="Good afertnoon";rn rn response.setContentType("text/html");rn PrintWriter out =response.getWriter();rn out.println("");rn out.println("");rn out.println(" "+message+","+name+"");rn out.println(" Thanks for redistering you email("+email+")with us.");rn out.println(" -The Pro java Team.");rn out.println("");rn out.println("");rn out.close(); rn rn rnrn运行时出现如题的错误,本人初学servlet,还请大家不吝赐教,谢谢!
调用servlet出现这个错误HTTP method POST is not supported by this URL
是怎么回事呀?
报错:HTTP Status 405 - HTTP method GET is not supported by this URL
import java.io.*;rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnrnpublic class HelloServlet extends HttpServlet rnrn //从HttpServlet类的帮助文档中复制service方法的声明部分可避免书写错误rn //private static final long serialVersionUID = 1L;rn protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn // TODO Auto-generated <em>method</em> stub rn doPost(request,response); rn rn rn public void Service(HttpServletRequest request,rn HttpServletResponse response)rn throws IOException, ServletExceptionrn rn PrintWriter out = response.getWriter();rn out.println("");rn out.println("www.it315.org ");rn out.println(""+ new java.util.Date() +"");rn out.println("");rn rn rnrn请高手们帮帮忙看看,用浏览器运行时,出现错误:rn<em>HTTP</em> Status 405 - <em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>rnrn--------------------------------------------------------------------------------rnrntype Status reportrnrnmessage <em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>rnrndescription The specified <em>HTTP</em> <em>method</em> is not allowed for the requested resource (<em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>).rnrn是怎么回事呢?我是新手菜鸟,很想学好java,希望大家帮我看看哦~~
奇怪的错误HTTP Status 405 - HTTP method GET is not supported by this URL
package com.flight.servlet;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnimport java.lang.reflect.InvocationTargetException;rnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnimport java.util.ArrayList;rnimport org.apache.commons.beanutils.BeanUtils;rnrnimport com.flight.bean.City;rnimport com.flight.bean.flight;rnimport com.flight.dao.searchflightDao;rnrnpublic class ticketsearchServlet extends HttpServlet rn rn public void doGet(HttpServletRequest request, HttpServletResponse response, String String)rn throws ServletException, IOException rn rn doPost(request,response);rn rn rnpublic void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn request.setCharacterEncoding("utf-8");rn rn String action=request.getParameter("action");rn searchflightDao sfdao=new searchflightDao();rn rn if(action.equals("list"))rn rn rn rn String flight_id = request.getParameter("flight_id");rn String datetime = request.getParameter("datetime");rn rn request.setAttribute("fmList", sfdao.findBy(flight_id,datetime));rn rn request.getRequestDispatcher("ticketstatus.jsp").forward(request, response);rn rnrnrn rn public void init() throws ServletException rn // Put your code herern rnrnrn表单的提交方式检查过了是post方式提交的,请高手们帮忙看看是怎么回事?急用啊!!!rn
求助:servlet运行时出现的问题 HTTP method GET is not supported by this URL
各位兄弟姐妹,小弟在调试JSP的时候遇到一个<em>问题</em>:rnservlet运行时出现的<em>问题</em> <em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em> rn昨晚调了一晚都搞不定,代码如下:rnpackage ch07;rnrnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport java.io.*;rnpublic class SampleServlet1 extends HttpServlet rn public void doGet(HttpServlet request,HttpServletResponse response)rnthrows ServletException,IOExceptionrn response.setContentType("text/html;charset=GB2312");rn PrintWriter out = response.getWriter();rn out.println("");rn out.println(" Servlet");rn out.println("");rn out.println("大家好");rn out.println("");rn out.println("");rn out.close();rn rn
tomcat HTTP Status 405 - HTTP method POST is not supported by this URL报这个错
刚开始学servlet,就报了这个错。[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/31.gif][/img]rn网页代码如下:rnrnrnrn rn Insert title herernrnrn rn 用户名:rn 密码:rn rn rnrnrnservlet代码如下:rnpackage cn;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnpublic class HelloServlet extends HttpServletrn @Overridern protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException rn // TODO Auto-gern doPost(req, res);rn rn @Overridern protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException rn String user = req.getParameter("username");rn String pwd = req.getParameter("password");rn res.setContentType("text/html;charset=UTF-8");rn req.setCharacterEncoding("UTF-8");rn if(user.equals("admin")&&pwd.equals("admin")) rn res.sendRedirect("Hello.html");rn else rn PrintWriter out = res.getWriter();rn out.println(" ");rn out.close();rn rn rnrn配置文件如下:rnrnrn sj1rn rn index.htmlrn index.htmrn index.jsprn default.htmlrn default.htmrn default.jsprn rn rn HelloServletrn cn.HelloServletrn rn rn HelloServletrn /HelloServletrn rn
HTTP Status 405 - HTTP method POST is not supported by this URL错误,请高手指教!
本人在学习JSP时候rn遇到了以下错误,不知如何解决rn<em>HTTP</em> Status 405 - <em>HTTP</em> <em>method</em> <em>POST</em> is not <em>supported</em> by this <em>URL</em>rnrn--------------------------------------------------------------------------------rnrntype Status reportrnrnmessage <em>HTTP</em> <em>method</em> <em>POST</em> is not <em>supported</em> by this <em>URL</em>rnrndescription The specified <em>HTTP</em> <em>method</em> is not allowed for the requested resource (<em>HTTP</em> <em>method</em> <em>POST</em> is not <em>supported</em> by this <em>URL</em>).rnrnrn--------------------------------------------------------------------------------rnrnApache Tomcat/5.5.9rnrn请高手指教,<em>问题</em>出在哪儿???
这是什么错误啊HTTP method GET is not supported by this URL
地址栏运行到http://localhost:8080/flight/searchflightServlet?action=list时就出现了这个405错误,请大家帮忙啊?
新手求助 HTTP method GET is not supported by this URL是为什么
package cc;rnrnimport cc.Bookmark;rnrnimport java.io.IOException;rnimport java.util.ArrayList;rnimport java.util.List;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.annotation.WebServlet;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrn/**rn * Servlet implementation class AddBookmarkrn */rn@WebServlet("/AddBookmark")rnpublic class AddBookmark extends HttpServlet rn private static final long serialVersionUID = 1L;rn public String Success_view="success.view";rn public String Error_view="error.view";rn /**rn * @see HttpServlet#HttpServlet()rn */rn public AddBookmark() rn super();rn // TODO Auto-generated constructor stubrn rnrn /**rn * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)rn */rn protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn request.setCharacterEncoding("UTF-8");rn // TODO Auto-generated <em>method</em> stubrn String name=request.getParameter("name");rn String author=request.getParameter("author");rn String chuban=request.getParameter("chuban");rn rn Listerrors=new ArrayList();rn if(name==null||name.length()==0)rn errors.add("请填写书名");rn rn if(author==null||author.length()==0)rn errors.add("请填写作者");rn rn if(chuban==null||chuban.length()==0)rn errors.add("请填写出版社");rn rn if (errors.size()!=0)rn request.setAttribute("errors", errors);rn request.getRequestDispatcher(Error_view).forward(request, response);rn rn elsern Bookmark bookmark=new Bookmark(name.trim(),author.trim(), chuban.trim());rn request.setAttribute("bookmark", bookmark);rn request.getRequestDispatcher(Success_view).forward(request, response);rn rn rnrnrn[img=https://img-bbs.csdn.net/upload/201412/23/1419322712_389072.png][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/3.gif][/img]
碰到这句话 HTTP method GET is not supported by this URL 怎么办?
我在HTML里面用一个超连接 rnwelcome1 rn跳转页面到个servlet里面 然后得到page的值rn String page=request.getParameter("page");rn接着重定向rnresponse.sendRedirect(page);rn就出现了rntype Status reportrnrnmessage <em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>rnrndescription The specified <em>HTTP</em> <em>method</em> is not allowed for the requested resource (<em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>).rn 这句话rnrn他说不支持GET方法,但是我看How to program java 这本书里就是这样做的,真郁闷,谁能告诉我到底是什么原因呢?
HTTP method GET is not supported by this URL?该怎么解决哦?
如题。我是用servlet实现“给手机发网上短信息“的功能,是照抄书上的。rn使用的是<em>URL</em>类和<em>URL</em>Connection类。rn其中<em>URL</em>为<em>URL</em> url=new <em>URL</em>("http://sms.sohu.com/Sys_Sms/News_Sms.php");//创建<em>URL</em>对象;rn而且我使用的是doPost方法。rn不知道怎么提示是:<em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>。rn请各位高手指教。rnrnrn代码如下:rnpackage shortmessageservlet;rnrnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport java.io.*;rnimport java.util.*;rnimport java.net.*;//网络包rnrn/**rn * Title: rn * Description: rn * Copyright: Copyright (c) 2005rn * Company: rn * @author not attributablern * @version 1.0rn */rnrnpublic class ShortMessageServlet extends HttpServlet rn private static final String CONTENT_TYPE = "text/html; charset=GBK";rnrn //Initialize global variablesrn public void init() throws ServletException rn rn/* public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn doPost(request,response);rn rn */rn //Process the <em>HTTP</em> Post requestrn public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn response.setContentType(CONTENT_TYPE);//指定内容类型,并且可显示中文rn PrintWriter out = response.getWriter();rn //客户端表单域的各字段rn String UsrName;rn String ToNum;rn String Msg;rn String UsrPwd;rn String Msgid;rn String source;rn String StartPost="";rn String UsrNum;rn PrintWriter out<em>URL</em>;rn BufferedReader in<em>URL</em>;rn //String EndPost="&ok=+ %c8%b7+%B6%A8+\r\n";rn UsrName=request.getParameter("UsrName");rn ToNum=request.getParameter("ToNum");rn Msg=request.getParameter("Msg");rn UsrPwd=request.getParameter("UsrPwd");rn Msgid=request.getParameter("msgid");rn source=request.getParameter("source");rn UsrNum=request.getParameter("UsrNum");rn //对Post数据进行编码rn StartPost+="&UsrName=" +<em>URL</em>Encoder.encode(UsrName);rn StartPost+="&ToNum="+<em>URL</em>Encoder.encode(ToNum);rn StartPost+="&UsrPwd="+<em>URL</em>Encoder.encode(UsrPwd);rn StartPost+="&msgid="+<em>URL</em>Encoder.encode(Msgid);rn StartPost+="&source"+<em>URL</em>Encoder.encode(source);rn StartPost+="&UsrNum="+<em>URL</em>Encoder.encode(UsrNum);rn StartPost+="&ok=%c8%b7+%B6%A8+\r\n";rn //组成<em>POST</em> 实体来模拟表单提交rn //HttpStr+=StartPost+EndPost;rn String line;rn String returnHTML="";rnrn tryrn <em>URL</em> url=new <em>URL</em>("http://sms.sohu.com/Sys_Sms/News_Sms.php");//创建<em>URL</em>对象rn <em>URL</em>Connection connection=url.openConnection();//建立连接rn connection.setDoOutput(true);//可以输出数据rn out<em>URL</em>=new PrintWriter(connection.getOutputStream());//文本输出流rn out<em>URL</em>.println(StartPost);//写入<em>POST</em>数据rn out<em>URL</em>.flush();rn out<em>URL</em>.close();rn //读取响应rn in<em>URL</em>=new BufferedReader(new InputStreamReader(connection.getInputStream()));rn while((line=in<em>URL</em>.readLine())!=null)rn returnHTML+=line+"\n";rnrn rn catch(IOException ex)rn out.println("Error!"+ex);rnrn rn //取得要在响应中输出的文本流,即标准的HTMLrn out.println("");rn out.println(" 调用另一网站表单的Servle");rn out.println("");rn out.println(" 使用<em>URL</em>Connection调用另一网站表单的Servlet");rn if(returnHTML.indexOf("错误")==-1)rn out.println(" 短信息发送成功!");rnrn elsern out.println(" 信息提供错误,发送未成功。");rnrn rn out.println(" 发送的信息");rn out.println("");rn out.println(StartPost);rn out.println("");rn out.println(" 接收到的信息");rn out.println("");rn out.println(returnHTML);rn out.println("");rn out.println("");rn out.println("");rn/* out.println("");rn out.println(" ShortMessageServlet");rn out.println("");rn out.println(" The servlet has received a <em>POST</em>. This is the reply.");rn out.println("");rn */rn rnrn //Clean up resourcesrn public void destroy() rn rnrn
SpringMVC出现 Request method 'POST' not supported 错误
![图片说明](https://img-ask.csdn.net/upload/201610/14/1476451398_851931.png)n![图片说明](https://img-ask.csdn.net/upload/201610/14/1476451893_490488.png)n![图片说明](https://img-ask.csdn.net/upload/201610/14/1476451912_555477.png)n![图片说明](https://img-ask.csdn.net/upload/201610/14/1476451932_774744.png)n![图片说明](https://img-ask.csdn.net/upload/201610/14/1476451963_715213.png)n
我的tomcat3。23的servlet 总是报错:HTTP method POST is not supported by this URL
我用的是tomcat3.23.rn用jsp 调用一个servlet,出现<em>HTTP</em> 405:资源不允许。rntomcat 3.23 报错:<em>HTTP</em> <em>method</em> <em>POST</em> is not <em>supported</em> by this <em>URL</em> <em>HTTP</em> <em>method</em> <em>POST</em> is not <em>supported</em> by this <em>URL</em>rnrn问:是什么原因了?rn谢谢!!rn
关于tomcat加载servlet出错的问题,提示:HTTP Status 405 - HTTP method GET is not supported by this URL
如题,最近从书上看了一段利用servlet搭建网上购物车的程序,用tomcat加载时就提示<em>HTTP</em> Status 405 - <em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>,rn从网上发现很多人都朋友到过这个<em>问题</em>,按照很多中解决方案我的<em>问题</em>还是没有结果。rnrn最近要利用这个做一个大作业,时间比较紧,麻烦大家了,帮忙看一下<em>问题</em>处在哪?程序里明明没有使用doGet()方法,为什么还提示那个错误?rnrn源程序如下:rnpackage bits;rnrnimport java.util.*;rnimport java.io.*;rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnrnpublic class ShoppingServlet extends HttpServletrn private void doForward(String strurl,HttpServletRequest req,HttpServletResponse res)rn throws ServletException,IOExceptionrn rn String url=strurl;rn ServletContext sc=getServletContext();rn RequestDispatcher rd=sc.getRequestDispatcher(url);rn rd.forward(req,res);rn rn public void [color=#FF0000]doPost[/color](HttpServletRequest req,HttpServletResponse res)rn throws ServletException,IOExceptionrn rn req.setCharacterEncoding("GBK");rn HttpSession session =req.getSession(false);rn if(session==null)rn rn res.sendRedirect("/jsp/error.html");rn rn Vector buylist=(Vector)session.getAttribute("shopping.shoppingcart");rn String action=req.getParameter("command");rn if(action.equals("DELETE"))rn rn String del=req.getParameter("productvalue");rn int d=(new Integer(del)).intValue();rn int i=0;rn for(i=0;i
method '' not supported by automation object
<em>method</em> 'AAA' not <em>supported</em> by automation object rnrn总是提示这个错误,该从哪方面去找原因啊rnrn
tomcat HTTP Status 405 - HTTP method GET is not supported by this URL错误,高手来帮忙!
为什么我的http://localhost:8080能访问,而http://localhost:8080/shopping却不能访问,并出现<em>HTTP</em> Status 405 - <em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>错误。在网上找两个半天都说是servlet中没有重写doGet()方法,可我确实重写了啊!还有就是我刚才还能运行出来着,可我什么都没有操作前一秒钟行后一秒钟就报错了,现在怎么整就是提示错误,重新部署还是不行,tomcat莫名其妙的错误真是太多了啊。。。好心帮我分析一下是怎么回事啊:不弄明白睡不着啊! rn我的servlet中确实重写了两个方法: rnpublic void doGet(HttpServletRequest request, HttpServletResponse response) rnthrows ServletException, IOException rndoPost(request,response); rn rnrnrnpublic void doPost(HttpServletRequest request, HttpServletResponse response) rnthrows ServletException, IOException rn//根据用户的不同请求进行不同处理 rnrequest.setCharacterEncoding("GBK"); rnif(request.getParameter("requesttype").equals("register")) rntry rnregister(request, response); rn catch (Exception e) rne.printStackTrace(); rn rn else if(request.getParameter("requesttype").equals("login")) rnrn rnrn rnrn我的web.xml文件中的配置: rn rn UserServlet rn com.ls.magon.shopping.servlet.UserServlet rn rn rn UserServlet rn /user rn rnrnfrom表单: rn rnrn大侠帮忙看看啊。。。 rn
J2EE SDK/1.3.1 - HTTP Status 405 - HTTP method GET is not supported by this URL
各位好,我在部署servlet时提示是成功的。但在WEB页http://127.0.0.1:8000/loanContext/loanAlias打开时却报了以下错误:rnJ2EE SDK/1.3.1 - <em>HTTP</em> Status 405 - <em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>rnrn--------------------------------------------------------------------------------rnrntype Status reportrnrnmessage <em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>rnrndescription The specified <em>HTTP</em> <em>method</em> is not allowed for the requested resource (<em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>).rnrnrnrnrnrn请教各位高手指点迷津,该是哪儿错了?感激感激
HTTP method GET is not supported by this URL"">访问SERVLET报HTTP 405错,错误信息是:" HTTP method GET is not supported by this URL"
我在学习WEBSPHERE写了一个WEB程序,在调试的时候可以看到欢迎页面,在我的欢迎页面中有一超链指向SERVLET,但是访问该超链的时候出现错误:"<em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>,The specified <em>HTTP</em> <em>method</em> is not allowed for the requested resource (<em>HTTP</em> <em>method</em> GET is not <em>supported</em> by this <em>URL</em>)."错误代码为:"<em>HTTP</em> 405".不知是何原因,用WEBPHERE本身的调试器是这样,我又把它的WAR包导出到TOMCAT4的发布目录下同样如此.后来我把SERVLET的源码拷到JBUILDER里不做任何改动,编译了一下,然后把CLASS文件替换原来的SERVLET的CLASS文件就好了.请问这是什么原因.
SpringMVC ajax提交报Request method 'POST' not supported 错误
这是view.jsprn[img=https://img-bbs.csdn.net/upload/201706/13/1497319335_965052.png][/img]rn这是comment.jsprn[img=https://img-bbs.csdn.net/upload/201706/13/1497319353_606916.png][/img]rn这是JQuery代码,ajax提交(我项目名叫SpringMVCMg,所以url应该没什么<em>问题</em>的)rn[img=https://img-bbs.csdn.net/upload/201706/13/1497319552_499667.png][/img]rn这是Controller代码rn[img=https://img-bbs.csdn.net/upload/201706/13/1497319577_201366.png][/img]
Method 'SaveAs' not supported by automation object
varrn oXL, oWB, oSheet, oRng, VArray : Variant;rn SysPath:string;rnbeginrn SysPath:=ExtractFilePath(application.exename);rn Aq.Close;rn Aq.SQL.Add('psp_goodtype');rn Aq.Open;rn while not Aq.Eof dorn beginrn // Start Excel and get Application Objectrn oXL := CreateOleObject('Excel.Application');rn oXL.Visible := false;rn // Get a new workbookrn oWB := oXL.Workbooks.Add;rn oSheet := oWB.ActiveSheet;rnrn // Add table headers going cell by cellrn rn ……rn //get the classrn [color=#FF0000]oXL.SaveAs(SysPath[/color]+'\'+Aq.Fields[3].AsString+'_'+Aq.Fields[4].AsString+'_'+Aq.Fields[5].AsString+'.xls');rn oXL.Workbooks.Close;rn oXL.Close;rn Memo1.Lines.Insert(0,[color=#FF0000]Aq.Fields[3].[/color]AsString+'---'+Aq.Fields[4].AsString+'---'+Aq.Fields[5].AsString);rn Aq.Next;rn end;rnend;rn运行提示Method 'SaveAs' not <em>supported</em> by automation object,难道Delphi操作Excel自动保存还有什么玄机?rn另外读取数据库时如果我不使用fidlds[0]这样的序号来读,使用字段名应该使用哪个方法呢?请举例说明,谢谢!
springmvc Request method 'GET' not supported
@RequestMapping("/aa")rn@Controllerrnpublic class EmployeesHandler rn rn rn @Autowiredrn private EmployeeDao employeeDao;rn @Autowiredrn private DepartmentDao departmentDao;rn rn @RequestMapping(value="/insert/id",<em>method</em>=RequestMethod.DELETE)rn public String delete(@PathVariable("id")Integer id)rn employeeDao.delete(id);rn System.out.println(1);rn return "redirect:emps";rn rn rn @RequestMapping(value="/insert",<em>method</em>=RequestMethod.<em>POST</em>)rn public String insertList(Employee employee)rn employeeDao.save(employee);rn return "redirect:emps";rn rn rn @RequestMapping(value="/insert",<em>method</em>=RequestMethod.GET)rn public String inset(Map map)rn map.put("departments",departmentDao.getDepartments());rn map.put("employees", new Employee());rn return "insert";rn rn rn rn @RequestMapping(value="/emps")rn public String list(Map map)rn map.put("employees", employeeDao.getAll());rn return "list";rn rnrnrnrnemployeeDao.delete(id);System.out.println(1);;可以在控制台输出1,rn但是在redirect:emps后就提示Request <em>method</em> 'GET' not <em>supported</em>rn
The method 'SelectMany' is not supported 错误求教
[b]Error :[/b]rnThe <em>method</em> 'SelectMany' is not <em>supported</em>rnrn[color=#FF0000]Line 54: Response.Write(CommentsAfterJanuary1st.Count());[/color]rnLine 55: rnLine 56: //foreach (var k in CommentsAfterJanuary1st)rnrnrn[b]CODE:[/b]rnrnvar postsWithCommentsAfterJanuary1st = from p in collection.Linq()rn where p.Comments.Any(c => c.TimePosted >rn new DateTime(2009, 1, 1)) rn select newrn rn Title = p.Title,rn Body = p.Bodyrn ;rnrn foreach (var p in postsWithCommentsAfterJanuary1st)rn rn Response.Write(p.Title + " " + p.Body + " "); rn rn//以上执行成功rn var CommentsAfterJanuary1st = from p in collection.Linq()rn from c in p.Commentsrn where p.CharCount > 10 && c.TimePosted > new DateTime(2010, 1, 1)rn select newrn c.Email;rn Response.Write(CommentsAfterJanuary1st.Count());rn//错误发生rn
405 POST not supported ???
使用post为什么会出现这样的错误,而使用get则没<em>问题</em>rn代码如下,使用resin作服务器rn public class login extends rnrnlogin.javarnHttpServlet rn public void doPost(HttpServletRequest request,rn HttpServletResponse response)rn throws ServletException, IOException rn response.setContentType("text/html");rn PrintWriter out = response.getWriter();rn try rn......
405 POST not supported!!!!!!!!!!!!!!!!
rn rnrnrnform提交到这个页面,提示:405 <em>POST</em> not <em>supported</em>rn哪里错了!
错误405 POST not supported
数据库连接成功以后做了个简单的登陆页面,但老出现405 <em>POST</em> not <em>supported</em>的<em>问题</em>rn1,登陆代码:rnrnrnrnrn rn 登陆rnrnrnrn 登陆rn rn rn 用户名rn rnrnrn rnrn 密码rn rnrnrn rn rn提交rn取消rnrnrnrnrnrn2,检验代码:rnrnrnrnrn rn checkloginrnrnrnrnrnrnrnrnrnrn rn 用户名或密码错误,请重新登陆!rn 返回rn rnrnrn3,书中的检验代码中与数据库相连用的是连接池,我不太用会,就想直接连接数据库可不可以,所以我就自己写了代码,我想应该没那么难,但是却老是出现405 <em>POST</em> not <em>supported</em>的<em>问题</em>,请高手指点。rn4,如果用连接池的话,id,scope,class等该如何设置啊?
Property or Method not supported by layers of this type.
我在MapX中添加一个UserLayer,功能是添加个比例尺显示在地图左上角,那段代码是从别人的源码考过来的,地图单位和我的不一样,我的是Km,运行后可以显示比例尺,但弹出个对话框说Property or Method not <em>supported</em> by layers of this type.点击确定又弹出,就这样不断地弹出来,程序没法使用了,那位知道这是怎么回事,帮帮忙啊,谢谢了!!rn下面是代码rnvoid CWLDispView::OnDrawUserLayer(LPDISPATCH Layer, long hOutputDC, long hAttributeDC, rn LPDISPATCH RectFull, LPDISPATCH RectInvalid)rnrn float barWidth =(float)0.5, barHeight =(float)0.08;rn float startX =(float).3, startY =(float).3;rn long x1, y1;rn int i;rnrn // attach to dc that mapx passed us so we can use rn // mfc CDC object. (we will detach before exiting this <em>method</em>rn CDC dc;rn CPen pen;rn CBrush brushRed, brushWhite, *pOldBrush;rn CFont *pOldFont;rn rn pen.CreatePen(0,1,(COLORREF)0);rn brushRed.CreateSolidBrush(255);rn brushWhite.CreateSolidBrush(16777215);rnrn dc.Attach((HDC)hOutputDC);rn dc.SetAttribDC((HDC)hAttributeDC);rnrn //Set map mode to HI-Englishrn dc.SetMapMode(MM_HIENGLISH);rn //Set pen to blackrn CPen *pOldPen = dc.SelectObject(&pen);rn pOldBrush = dc.SelectObject(&brushRed);rnrn //convert to HiEnglish, Conversion needed because one HIENGLISH unit is .001 inchrn x1=(long)(startX*1000);rn y1=(long)(startY*1000);rn barWidth*=1000;rn barHeight*=1000;rnrn for (i=0; iReportError();rn e->Delete();rn rn catch (COleException *e) rn e->ReportError();rn e->Delete(); rn rn rn double mapX2, mapY2;rn // add lPixPerInch to center to get 1 inch to right of Centerrn screenX = (float)(rc.right/2+lPixPerInch);rn screenY = (float)(rc.bottom/2);rn try rn m_ctrlMapX.ConvertCoord(&screenX, &screenY, &mapX2, &mapY2, miScreenToMap);rn rn catch (COleDispatchException *e) rn e->ReportError();rn e->Delete();rn rn catch (COleException *e) rn e->ReportError();rn e->Delete(); rn rn CFont font;rn font.CreatePointFont(100, "Arial", &dc);rnrn pOldFont = dc.SelectObject(&font);rn dc.SetTextColor(0); //Blackrn dc.SetBkMode(TRANSPARENT);rnrn // Output ScaleBar start Label = 0rn x1=(long)(startX*1000);rn y1=(long)((startY-.2)*1000);rn dc.TextOut(x1,-y1,"0");rnrn // Output label for distance of 1 inchrn x1=(long)(barWidth*2+startX*1000);rnrn CString str;rn str.Format("%.0f",m_ctrlMapX.Distance(mapX1, mapY1, mapX2, mapY2)/2);rn // Need to center text over center line. will move it 60 units for each characterrn int iCenterAdjustment = 60*str.GetLength();rn dc.TextOut(x1-iCenterAdjustment,-y1,str);rnrn // Output label for distance of 2 inchesrn x1=(long)(barWidth*4+startX*1000);rnrn str.Format("%.0f",m_ctrlMapX.Distance(mapX1, mapY1, mapX2, mapY2));rn // Need to center text over end line. will move it 60 units for each characterrn iCenterAdjustment = 60*str.GetLength();rn dc.TextOut(x1-iCenterAdjustment,-y1,str);rnrn // Output label for Units "Miles"rn x1=(long)(barWidth*2+startX*1000);rn y1=(long)((startY+.2)*1000);rn // Need to center text over center line. will move it 60 units for each characterrn str.Format("Miles");rn iCenterAdjustment = 60*str.GetLength();rn dc.TextOut(x1-iCenterAdjustment,-y1,str);rnrn dc.SelectObject(pOldBrush);rn dc.SelectObject(pOldPen);rn dc.SelectObject(pOldFont);rnrn // detach dc so destructore won't call Release itrn dc.ReleaseAttribDC();rn dc.Detach();rn
http 转 https 后,警告:Request method get not supported
http 转 https ,配置了http 自动转 https,代码没有变动,使用 SpringMVC,访问时没有显式指定端口,即使用默认端口,前端发送 post 请求后后台会报警告 get <em>method</em> not <em>supported</em>。回归到 http 配置就可以正常访问。求各位大佬帮忙,在线等。。
SpringMVC提示HTTP Status 405 - Request method 'GET' not supported
在登录页面有一个注册的超链接,提供注册功能,登录页面的代码如下:rn rn rn rn Usernamern rn rn rn Passwordrn rn rn rn rn rn rn rn [color=#FF0000][b]请注册用户[/b][/color]rn rn rn $logInfo rn rnrn由于跳转到注册页面不需要做任何处理,因此在xml文件中配置直接跳转:rn rn rnrn但是点击超链接就会提示:rn[img=https://img-bbs.csdn.net/upload/201601/14/1452759371_77472.png][/img]rnrn这是怎么回事啊,求大神指点!!!!!
servlet页面报 405 - HTTP method GET is not supported
页面是从main.jsp跳到CategoryServlet的,CategoryServlet没有重写doGet和doPost方法。main.jsp页面中没有写明是用post方法,默认的get。rn可是jsp页面就是跳转不到CategoryServlet这里,为什么呢??rnrn====main.jsp==rnrn![图片说明](https://img-ask.csdn.net/upload/201611/30/1480485218_68371.png)rnrnrn====CategoryServlet======rnrnrn![图片说明](https://img-ask.csdn.net/upload/201611/30/1480485240_994710.png)
http secure socket is not supported???
想用NM<em>HTTP</em>控件<em>POST</em>数据到网页,网页采用https连接,<em>POST</em>后发生错误http secure socket is not <em>supported</em>,是NM<em>HTTP</em>不支持https吗?怎么解决?indy是否可以解决?
访问url 问题 很急
php 一个页面访问另一个页面的url ,但页面不能跳转 我写的代码如下rnrn$file = fopen('http://reg.yaofangwang.com/logout.aspx','r');rn$html = file_get_contents($url);rnfclose($file);rnrn这个完全好像行不通rnrn很少接触php 各位大虾帮个忙解决下,非常感谢
$.post()的url问题
如题,url能调action的方法嘛?我怎么看文档上写的是页面
MFC http post请求url带参数
如题,我需要向web端服务器post一些数据,对方给我的url的后面带个 ?sessionid= (sessionid内容,已提前获取)rn我原来是这样rn[code=c]CHttpFile* pFile = pConnection->OpenRequest( CHttpConnection::<em>HTTP</em>_VERB_<em>POST</em>,rn obj + sessionid);[/code]rn发现总是404rn而另外一个url后面没有带sessionid的,其他全部过程一致,完全没有<em>问题</em>。rn我猜想sessionid不能这么放,请问该怎么做?rn谢谢
C# 自定义Http客户端通信POST URL
//自定义Http客户端通信<em>POST</em>  <em>URL</em>         private static readonly string DefaultUserAgent = &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)&quot;;         private sta...
客户端错误!method 'getconrec' not supported by automation object!
我在应用程序端写了一个getconrec,然后在客户端调用。出现上述错误,客户端使用SocketConnection连接服务器,请问这是什么<em>问题</em>?
Spring,JSP用AJAX的post方法提交contrllor后弹出Request method 'POST' not supported
delete.jsprn[code=text]rnrnrnrn rn Insert title herernrnrndeletern rn rn rn rn account numberrn rn rn rn rn rn rn rn rn rn authcodern rn rn rn rn rn rn rn rn Submitrn Resetrn rn rnrn rn[/code]rnrncontrollerrn[code=java]rn@Controllerrn@Scope(value="prototype")rn@RequestMapping("/delete")rnpublic class DeleteController rn rn @Resourcern private CheckAccountNumberService checkAccountNumberService;rn @Resourcern private DepositService depositService;rn @Resourcern private GetAuthCodeService getAuthCodeService;rn @Resourcern private DeleteAccountService deleteAccountService;rnrn rn rn @RequestMapping(value = "/deleteAccount", <em>method</em> = RequestMethod.<em>POST</em>)rn public String deleteAccount(HttpServletRequest request, HttpServletResponse response) throws IOExceptionrn String accountNumber=request.getParameter("accountNumber");rn String code=request.getParameter("authcode");rn System.out.println("accountNumber");rn System.out.println("code");rn String authcode = getAuthCodeService.getAuthCode(code);rn if(authcode ==null)rn return "test/authcodefalse";rn rn rn elsern int a = deleteAccountService.DeleteAccount(accountNumber);rn if(a!=0)rn rn return "test/result";rn rn elsereturn "test/unknown";rn rn rnrnrn[/code]rnrn按下按钮后报错rnTTP Status 405 - Request <em>method</em> '<em>POST</em>' not <em>supported</em>rnrntype Status reportrnrnmessage Request <em>method</em> '<em>POST</em>' not <em>supported</em>rnrndescription The specified <em>HTTP</em> <em>method</em> is not allowed for the requested resource.rnrnIDE的consolern无法 System.out.println("accountNumber");rn System.out.println("code");rn只显示[org.springframework.web.servlet.PageNotFound] - Request <em>method</em> '<em>POST</em>' not <em>supported</em>rnrnrnrn请问这是什么原因rnrnSpringMVC.xmlrn[code=text]rnrnrn rn rn rn rn text/html;charset=UTF-8rn rn rn rnrn rn rn rn rn rn rn rn rnrn rn rnrn rn rnrn rn rn rnrn rnrn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn[/code]
html中_的method=post和method=get的区别
html中_的<em>method</em>=post和<em>method</em>=get的区别,详细的解释。
HTTP笔记(三)HTTPmethod
在<em>HTTP</em>协议中,可以通过<em>method</em>告知服务器客户端的意图。MethodGET方法用来请求访问已被URI识别的资源。指定的资源经服务器解析后返回响应内容。如果请求的资源是文本,就保持原样返回;如果是CGI程序,则经过处理返回输出结果。<em>POST</em>方法用来传输实体的主体。虽然GET方法也可以传输实体的主体,但一般不用GET方法进行传输,而是用<em>POST</em>。<em>POST</em>的主要目的并不是获取响应的主体内容。除了GE
method or operation is not supported"的错误">XtraReport.ShowPerview()报"The method or operation is not supported"的错误
我的DXperience工具是11.1.8的,已经破解了,我是用Winform的Report Designer设计的repx文件,我用的开发工具是VS2010,然后在Asp.Net的页面后台加载这个文件,用XtraReport控件显示报表,但是每当程序运行到XtraReport的ShowPerview方法时都会报"The <em>method</em> or operation is not <em>supported</em>"的错误,刚开始遇到这个错误时,我以为是我少添加了引用,我就根据Devexpress的帮助文档[url=http://documentation.devexpress.com/#XtraReports/CustomDocument9367][/url]添加了这些引用,但是任然报这个错;于是我就在其他本版的DXperience(10.1.5)环境下做测试,也是报这个错。下面是我用VS2010写的一个demo:rnrn[code=HTML]rnrnrnrnrnrnrnrnrn rnrnrn rn rn rn rn rnrnrn[/code]rnrn[code=C#]rnusing System;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Web;rnusing System.Web.UI;rnusing System.Web.UI.WebControls;rnusing DevExpress.XtraReports.UI;rnrnnamespace Webrnrn public partial class Default1 : System.Web.UI.Pagern rn protected void Page_Load(object sender, EventArgs e)rn rn rn rnrn protected void rvDemo_Load(object sender, EventArgs e)rn rn XtraReport xr = new XtraReport();rn xr.LoadLayout(@"C:\Users\Default\Desktop\DXexpress Demo\DXexpress\Web\File\Report1.repx");rn xr.ShowPreview();rn rn rnrn[/code]rnrn此<em>问题</em>本人纠结了很久,找过很多文档资料,始终没有解决,但求高人指点,谢谢。
method="get" 的区别.">表单 method="post" method="get" 的区别.
编写JSP程序时老要碰到的一个<em>问题</em>, 应该是ASP的基础知识吧, 但手中没相关的书籍没办法查, 求大家给个答案, 多谢了.rnrn
The HttpRuntime.ProcessRequest method is not supported by IIS integrated pipelin
[img=https://img-bbs.csdn.net/upload/201306/25/1372136991_600614.png][/img]
http页面POST问题
可能这个<em>问题</em>已有人<em>问题</em>过好多请了,但请大家也是回答我一下,谢谢。rn页面是这样的。rn 用户名 密码 rn rnrn代码:rn CppWebBrowser1->Navigate(WideString(url).c_bstr());rnrn IHTMLDocument2* pDoc;rn IHTMLElementCollection* pAll;rn IHTMLElement* pBit;rn IHTMLInputElement *pUser, *pPWD;rn IDispatch* pDisp;rnrn CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocument, (void**) & pDoc);rn pDoc->get_all(&pAll);rn pAll->item(TVariant("id"), TNoParam(), &pDisp);rn pDisp->QueryInterface(IID_IHTMLInputElement, (void**) & pUser);rn pDisp->Release();rn WideString myName(id);rn pUser->put_value(myName.c_bstr());rn pAll->item(TVariant("pw"), TNoParam(), &pDisp);rn pDisp->QueryInterface(IID_IHTMLInputElement, (void**) & pPWD);rn pDisp->Release();rn WideString myPWD(pw);rn pPWD->put_value(myPWD.c_bstr());rn但没有把ID与PW填入,请问怎么可以完成这个<em>POST</em>过程呢,谢谢。
HTTP post 问题
有个接口,是jsp的,我这边是PHP的程序rnrn我这边通过PHP <em>POST</em>一个XML 包过去,我怎么处理他的给我的响应呢?rn他给回应的东西应该是一个XML包,但是头上怎么还有rn<em>HTTP</em>/1.1 100 Continue Server: Microsoft-IIS/5.1 Date: Tue, 23 Nov 2004 05:44:45 GMT X-Powered-By: ASP.NET <em>HTTP</em>/1.1 200 OK Server: Microsoft-IIS/5.1 Date: Tue, 23 Nov 2004 05:44:45 GMT X-Powered-By: ASP.NET Connection: close Content-type: text/html X-Powered-By: PHP/5.0.1 rn这类的<em>HTTP</em>信息,晕倒,rn各位,谁做过该类程序
Http Post 问题
我需要向http服务器提交一个表单,用ieHttpHeaders获得该页提交的数据如下rnrn<em>POST</em> /pls/wwwcjlr/cjlr.GradeInput <em>HTTP</em>/1.1rnAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/x-silverlight, */*rnReferer: http://202.206.1.161:7777/pls/wwwcjlr/cjlr.GradeInput?p_kch=09020&p_kxh=3&userid=B2024&p_bybz=本科&p_time=1&ps_inputtype=录入分数成绩&sycj=2&pscj=1&qzcj=2&qmcj=1&userid=B2024rnAccept-Language: zh-cnrnContent-Type: application/x-www-form-urlencodedrnAccept-Encoding: gzip, deflaternUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)rnHost: 202.206.1.161:7777rnContent-Length: 2675rnConnection: Keep-AlivernCache-Control: no-cachernCookie: ACCOUNT=B20240217174054rnrnps_inputtype=%C2%BC%C8%EB%B7%D6%CA%FD%B3%C9%BC%A8&p_tjzt=%D4%DD%B4%E6&p_kch=09020&p_kxh=3&userid=B2024&pscj=1&sycj=2&qzcj=2&qmcj=1&ps_inputtype=%C2%BC%C8%EB%B7%D6%CA%FD%B3%C9%BC%A8&p_bybz=%B1%BE%BF%C6&p_cxcklb=%2C&p_xh=2005430092&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430009&p_kssj=20080115&p_pscj=&p_qmcj=31&p_kscj=&p_cxck=&p_xh=2005430010&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430018&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430024&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430025&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430027&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430033&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430034&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430035&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430037&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430038&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430040&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430044&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430050&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430057&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430066&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430069&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430070&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430072&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430074&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430077&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430081&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430085&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430086&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430093&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430099&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430100&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430101&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430104&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430106&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430107&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430109&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430111&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430126&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430128&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430153&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_xh=2005430154&p_kssj=20080115&p_pscj=&p_qmcj=&p_kscj=&p_cxck=&p_time=1&p_fun=%D4%DD%B4%E6rnrn==================rn我的代码:rn CInternetSession session;rn // tryrn // rn CHttpConnection* pConnection =session.GetHttpConnection(L"202.206.1.161",INTERNET_PORT(7777)); //网站服务器rn CHttpFile* pFile = pConnection->OpenRequest(CHttpConnection::<em>HTTP</em>_VERB_<em>POST</em>,L"/pls/wwwcjlr/cjlr.GradeInput"); //直接向分数处理页面提交数据rn //下面向提交数据中添加<em>HTTP</em>头,这些可以由网络监视器得到rn CString strTemp;rn pFile->AddRequestHeaders(L"<em>POST</em> /pls/wwwcjlr/cjlr.GradeInput <em>HTTP</em>/1.1");rn pFile->AddRequestHeaders(L"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/x-silverlight, */*");rn pFile->AddRequestHeaders(L"Referer: http://202.206.1.161:7777/pls/wwwcjlr/cjlr.GradeInput?p_kch=09020&p_kxh=3&userid=B2024&p_bybz=本科&p_time=1&ps_inputtype=录入分数成绩&sycj=2&pscj=1&qzcj=2&qmcj=1&userid=B2024");rn pFile->AddRequestHeaders(L"Accept-Language: zh-cn");rn pFile->AddRequestHeaders(L"Content-Type: application/x-www-form-urlencoded");rn pFile->AddRequestHeaders(L"Accept-Encoding: gzip, deflate");rn pFile->AddRequestHeaders(L"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)");rn pFile->AddRequestHeaders(L"Host: 202.206.1.161:7777");rn strTemp.Format (L"Content-Length: %d",strPostData.GetLength());rn pFile->AddRequestHeaders(strTemp);rn pFile->AddRequestHeaders(L"Connection: Keep-Alive");rn pFile->AddRequestHeaders(L"Cache-Control: no-cache");rn pFile->AddRequestHeaders(L"Cookie: "+cookie);rn pFile->AddRequestHeaders(L"\n");rnrn pFile->SendRequest(NULL,0,strPostData.GetBuffer(0),strPostData.GetLength()); //提交所有数据rn //pFile->Close();rn //delete pFile;rn //delete pConnection;rn //session.Close();rn //return true;rnrn rn char szBuffer[11001]; //用来存放返回的处理页面,要多大看实际情况。当然也可以动态分配,不嫌累的话rn int nLen=pFile->Read(szBuffer,11000);//读取返回的内容rn szBuffer[nLen]=0;rn strTemp=CString(szBuffer); //CString虽然滥了些,但用着就是方便,嘿嘿~rn pFile->Close(); //数据读出来后把该关闭的东西都关掉rn pConnection->Close();rn delete pFile;rn delete pConnection;rn session.Close();rn    return true;rn=================rn<em>问题</em>:返回400错误,哪位达人能指点一下,不胜感谢rn
http Post 问题
在向webserver发数据时。一些特殊的符号比如"&"如果不经过转换就可能正确的提交。但是,如果在发送前对所有的特殊符号都进行转换也太累了。有什么方法?rn
HTTP post请求问题
按如下动作,服务器应该返回John,为何返回的是No Accept??rnrn客户端Post提交动作: rn CString strHeaders =rn _T("Content-Type: application/x-www-form-urlencoded");rn // <em>URL</em>-encoded form variables -rn CString strFormData = _T("name=John");rnrn CInternetSession session;rn CHttpConnection* pConnection =rn session.GetHttpConnection(_T("localhost"));rnrn CHttpFile* pFile =rn pConnection->OpenRequest(CHttpConnection::<em>HTTP</em>_VERB_<em>POST</em>,rn _T("default.aspx"));rnrn pFile->AddRequestHeaders(strHeaders); rnrn BOOL result = pFile->SendRequest(NULL,0,rn (LPVOID)(LPCTSTR)strFormData, strFormData.GetLength());rn//rn char szBuffer[1024]; rn int nLen=pFile->Read(szBuffer,1024);rn szBuffer[nLen]=0;rnrn pFile->Close(); rn pConnection->Close();rn delete pFile;rn delete pConnection;rnrn服务器响应:rnpublic partial class _Default : System.Web.UI.Page rnrn protected void Page_Load(object sender, EventArgs e)rn rn string userName;rn rn userName = (string)Request.Form["name"];rnrn if (userName != null)rn Response.Write(userName);rn elsern Response.Write("No accept!");rn rnrn
多线程http post的问题
最近找到了一个控件,是基于wininet的,我在多线程(60个线程)进行频繁<em>POST</em>的时候,执行发送请求的函数需要的时间很久,这大概会是什么原因,能否解决?rnrn控件名是winet,国外的商业控件,我下的是破解版的
请教HTTP POST问题
CStringA headerBuffer = "<em>POST</em> http://" + MmscName + " /<em>HTTP</em> /1.1\r\n";rn headerBuffer += "Accept: image/png, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n";rn //网关地址, 目前移动联通都是 10.0.0.172:80rn headerBuffer += "Host: 10.0.0.172:80\r\n";rn headerBuffer += "X-Online-Host: " + MmscName + "\r\n";rn headerBuffer += "Pragma: no-cache\r\n";rn headerBuffer += "Cache-Control: no-cache\r\n";rn headerBuffer += "Connection: Keep-Alive\r\n";rn headerBuffer += "Accept-Encoding: deflate, gzip\r\n";rn headerBuffer += "User-Agent: SAMSUNG-SGH-E908/NetFront 3.2/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1\r\n";rn headerBuffer += "Accept: application/vnd.wap.mms-message, image/vnd.wap.wbmp, image/png, image/jpeg, image/gif, text/x-iMelody, text/x-imelody, application/x-midi, audio/midi, audio/mid, audio/x-mid, image/bmp, audio/mp3, audio/x-midi, audio/amr, application/vnd.smaf, application/vnd.wap.mms-message x-wap-profile:http://wap.samsungmobile.com/uaprof/e908_10.xml\r\n";rn //s_length 为彩信包的长度rn headerBuffer += "Content-Length:" + strLength + "\r\n";rn headerBuffer += "Content-Type:application/vnd.wap.mms-message\r\n\r\n";rnrn后面跟上的是PDU包.rnrnrn最后用HttpSendRequest 同步方式,把所有数据发送出去。rnrn但都返回:rn<em>HTTP</em>/1.1 200 OK, SuccessrnContent-length: 0 rnrn不知道<em>HTTP</em> 用这种方式指定<em>HTTP</em> 头字段和BODY有没有<em>问题</em>? BODY是上面\r\n\r\n中直接跟上的PDU包,不知道格式有没有错误? 谢谢。
求助:http post问题
我想用R<em>HTTP</em>Session 和 R<em>HTTP</em>Transaction <em>POST</em>一串数据,但服务器没有T<em>HTTP</em>Event::EGotResponseBodyData:返回,T<em>HTTP</em>Event::EGotResponseHeaders:返回为status: 200 0K,不知是什么原因rn我连的是http://wap1.m.139.com/rest.do?do=Users.loginrnrn我现在想先连接http://wap1.m.139.com,然后向/rest.do?do=Users.login <em>POST</em>数据,但不知调用哪个接口。rnSDK的例子是这样的rnrnvoid CClientEngine::Issue<em>HTTP</em>PostL(const TDesC8& aUri,rn const TDesC8& aContentType,rn const TDesC8& aBody)rn rn SetupConnectionL(); rn rn // Parse string to URIrn TUriParser8 uri;rn uri.Parse(aUri);rnrn该接口只传了一个uri进来,如果设置/rest.do?do=Users.login该怎么弄?麻烦大家给点提示!rnrnrnrn下面是<em>POST</em>的代码rnvoid CClientEngine::Issue<em>HTTP</em>PostL(const TDesC8& aUri,rn const TDesC8& aContentType,rn const TDesC8& aBody)rn rn SetupConnectionL(); rn rn // Parse string to URIrn TUriParser8 uri;rn uri.Parse(aUri);rnrn // Copy data to be posted into member variable; iPostData is used later inrn // <em>method</em>s inherited from M<em>HTTP</em>DataSupplier. T<em>HTTP</em>HdrVal rn delete iPostData;rn iPostData = aBody.AllocL();rn rn rn#ifndef __WINSCW__rn //代理rn TBuf8 aProxy8(_L8("10.0.0.172:80"));rn RStringF iPrxAddr = iSession.StringPool().OpenFStringL(aProxy8);rn CleanupClosePushL(iPrxAddr);rn T<em>HTTP</em>HdrVal iPrxUsage(iSession.StringPool().StringF(<em>HTTP</em>::EUseProxy,R<em>HTTP</em>Session::GetTable()));rn iSession.ConnectionInfo().SetPropertyL(iSession.StringPool().StringF(<em>HTTP</em>::EProxyUsage,R<em>HTTP</em>Session::GetTable()), iPrxUsage);rn iSession.ConnectionInfo().SetPropertyL(iSession.StringPool().StringF(<em>HTTP</em>::EProxyAddress,R<em>HTTP</em>Session::GetTable()), iPrxAddr);rnrn CleanupStack::PopAndDestroy();rn rn#endifrn rn rn rn // Get request <em>method</em> string for <em>HTTP</em> <em>POST</em>rn RStringF <em>method</em> = iSession.StringPool().StringF(<em>HTTP</em>::E<em>POST</em>,rn R<em>HTTP</em>Session::GetTable());rnrn // Open transaction with previous <em>method</em> and parsed uri. This class willrn // receive transaction events in MHFRunL and MHFRunError.rn iTransaction = iSession.OpenTransactionL(uri, *this, <em>method</em>);rnrn rn rn rn // Set headers for request; user agent, accepted content type and body'srn // content type.rn R<em>HTTP</em>Headers hdr = iTransaction.Request().GetHeaderCollection();rn rn rn rn SetHeaderL(hdr, <em>HTTP</em>::EUserAgent, KUserAgent);rn SetHeaderL(hdr, <em>HTTP</em>::EAccept, KAccept);rn SetHeaderL(hdr, <em>HTTP</em>::EContentType, aContentType);rnrn rnrn // Set this class as an data supplier. Inherited M<em>HTTP</em>DataSupplier <em>method</em>srn // are called when framework needs to send body data.rn M<em>HTTP</em>DataSupplier* dataSupplier = this;rn rn delete iFormEncoder;rn iFormEncoder = C<em>HTTP</em>FormEncoder::NewL();rn rnrn iTransaction.Request().SetBody(*dataSupplier);rn //iTransaction.Request().SetBody(*iFormEncoder);rn rn rnrn // Submit the transaction. After this the framework will give transactionrn // events via MHFRunL and MHFRunError.rn iTransaction.SubmitL();rnrn iRunning = ETrue;rn _LIT(KConnecting,"Connecting...");rn iObserver.ClientEvent(KConnecting);rn
http post 编码 问题
原本form里面的数据rnE=(Keyword_C=(机器学习)%2BTitle_C=(机器学习))&S=1&N=20&P=1&C=0&H=题名或关键词=机器学习*年=1989%2D2009&M=&CSID=F6693F29-F6A5-4CCB-B17D-6A760D925039&KM=rnrn<em>HTTP</em>抓取包的数据rnE=%28%28Keyword_C%3D%28%BB%FA%C6%F7%D1%A7%CF%B0%29%2BTitle_C%3D%28%BB%FA%C6%F7%D1%A7%CF%B0%29%29%29&S=1&N=20&P=1&C=0&H=%28%CC%E2%C3%FB%BB%F2%B9%D8%BC%FC%B4%CA%3D%BB%FA%C6%F7%D1%A7%CF%B0%29*1989-2009&M=&KM=&CSID=%7B0C9D18B9-D93C-41A7-BCCF-E438D20EF204%7Drnrn<em>问题</em>:rn1、这种转换是怎么实现的?rn2、有没有现成的转换工具?rn3、编程怎么实现?rn具体点哈,各位大侠。rnrn小弟分不多。
http post的问题
下载了那个典型的http 的例子,也看的差不多了,但是我想把它改为实现c/s的数据传输,把我的数据传给局域网的服务器上,请问思路是什么? 我有点迷糊了!rnvoid CClientEngine::Issue<em>HTTP</em>PostL(const TDesC8& aUri,rn const TDesC8& aContentType,rn const TDesC8& aBody)rn rn SetupConnectionL(); rn rn // Parse string to URIrn TUriParser8 uri;rn uri.Parse(aUri);rnrn // Copy data to be posted into member variable; iPostData is used later inrn // <em>method</em>s inherited from M<em>HTTP</em>DataSupplier.rn delete iPostData;rn iPostData = aBody.AllocL();rnrn // Get request <em>method</em> string for <em>HTTP</em> <em>POST</em>rn RStringF <em>method</em> = iSession.StringPool().StringF(<em>HTTP</em>::E<em>POST</em>,rn R<em>HTTP</em>Session::GetTable());rnrn // Open transaction with previous <em>method</em> and parsed uri. This class willrn // receive transaction events in MHFRunL and MHFRunError.rn iTransaction = iSession.OpenTransactionL(uri, *this, <em>method</em>);rnrn // Set headers for request; user agent, accepted content type and body'srn // content type.rn R<em>HTTP</em>Headers hdr = iTransaction.Request().GetHeaderCollection();rn SetHeaderL(hdr, <em>HTTP</em>::EUserAgent, KUserAgent);rn SetHeaderL(hdr, <em>HTTP</em>::EAccept, KAccept);rn SetHeaderL(hdr, <em>HTTP</em>::EContentType, aContentType);rnrn // Set this class as an data supplier. Inherited M<em>HTTP</em>DataSupplier <em>method</em>srn // are called when framework needs to send body data.rn M<em>HTTP</em>DataSupplier* dataSupplier = this;rn iTransaction.Request().SetBody(*dataSupplier);rnrn // Submit the transaction. After this the framework will give transactionrn // events via MHFRunL and MHFRunError.rn iTransaction.SubmitL();rnrn iRunning = ETrue;rn _LIT(KConnecting,"Connecting...");rn iObserver.ClientEvent(KConnecting);rn
HTTP POST问题
用以下代码:rn Function Http<em>POST</em>(ByVal Url As String, ByVal PostData As String, Optional ByVal Time As Integer = 0) As Streamrn Dim req As HttpWebRequestrn If Time <> 0 Thenrn End Ifrn req = WebRequest.Create(Url)rn req.Method = "<em>POST</em>"rn Dim bytesData() As Byte = System.Text.Encoding.ASCII.GetBytes(PostData)rn req.ContentLength = bytesData.Lengthrn Dim postStream As Stream = req.GetRequestStream()rn postStream.Write(bytesData, 0, bytesData.Length)rn Dim res As HttpWebResponse = req.GetResponse()rn Return res.GetResponseStreamrn End Functionrn将返回流转换为文本之后,发现怎么都是失败的,<em>POST</em>文本没有<em>问题</em>,因为在其他编程语言里面都能成功.rn应该怎么改? rn提供一组测试数据:rn地址:http://www.5d6d.com/logging.php?action=login&referer=bbscp.phprn<em>POST</em>数据:username=用户名&password=密码&submit=+&formhash=36a2650c&loginfield=username&loginsubmit=true
实现HTTPPOST问题
我们是否可以在VB中模拟实现一个有文件上传的页面呢?rn一般我们要上传一个文件的话是如此写:rn rn 文本框1: rn 选择文件: rn rn rn这里使用了 ENCTYPE 参数,那么 IE 就就我们选择的文件以二进制数据形式提交上去,请问我们在 VB 中怎样来实现这个过程了。?将我们要操作的文件提交到 DEMO1.ASP 上面又它来处理。
HTTP POST 参数问题
我在做模拟航空到易宝支付的流程,完全抓包去实现,但是现在遇到了一个<em>问题</em>[color=#FF0000]trx_order_amount=1198.8&frpId=1000001&x=53&y=14 [/color] rn这里面的X, Y 值什么呢,怎么获取这个值呢?还有时常会报出[b]未能创建SSL/TSL安全通道<em>问题</em>[/b]rn求大神,跪求了!!!
HTTP post 的问题
procedure TForm1.Button5Click(Sender: TObject);rnvarrn postlist:tstringlist;rnbeginrn postList := TStringList.Create;rn PostList.Add('act=1');rn postList.Add('tDate=''2010-03-25''');rn postList.Add('oBjData.Search(g_vType,$(''tDate'').value');rn //PostList.add('door=9726');rn tryrn with Id<em>HTTP</em>1 dorn beginrn Host := 'finance.qq.com/stock/sother/zldx.htm';rn HandleRedirects := True;rn Request.Connection := 'Keep-Alive';rn Request.Referer := 'finance.qq.com/stock/sother/zldx.htm';rn memo1.text := Post('finance.qq.com/stock/sother/zldx.htm', postList);rn end;rn finallyrn postList.Free;rn end;rnend;rnrnrn为什么这样不行,需要怎么样才能得到这个网页的正常返回信息?rn
有关HTTP POST问题
brew http是否支持Digest协议,如果支持的话其流程是怎么样的,如果不支持就得自个开发来支持。
http post问题
手机上实现<em>HTTP</em>的<em>POST</em>请求!rn "<em>POST</em> xxxxxxxx / <em>HTTP</em>/1.1\r\n"\rn "Accept: */*\r\n" \rn "X-Online-Host: %s:%d\r\n"\rn "Keep-Alive: keep-alive\r\n"rn "Content-Length: 6\r\n"\rn "\r\n"rn 123456rnrn%s:%d对应着主机与端口rnrn不解之处,已经发送了数据,socket就被close掉了,本来是还要接收数据的,为什么却没有接收到数据!难道<em>POST</em>不能接收数据吗?还是<em>POST</em>格式有<em>问题</em>??谢谢哪位牛人能指点下我!rn同样是xxxxxxxx ,用GET方法就能下载数据,"GET xxxxxxxx / <em>HTTP</em>/1.1\r\n"
Spring MVC 注解方式 Request method 'PUT' not supported
初学 Spring MVC rn我在修改页面中使用了 PUT方式提交rnrnrnrn------------------------------------------------------------------------------------------------------------------------------rnweb.xml 中也配置了 HiddenHttpMethodFilter rnrn rn contextConfigLocationrn classpath:spring.xmlrn rnrn rn rn org.springframework.web.context.ContextLoaderListenerrn rnrn rn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn UTF-8rn rn rn forceEncodingrn truern rn rn rn encodingFilterrn /*rn rnrn rn rn openSessionInViewrn org.springframework.orm.hibernate4.support.OpenSessionInViewFilterrn rnrn rn openSessionInViewrn /*rn rnrn rn rn springDispatcherServletrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn classpath:springmvc.xmlrn rn 1rn rnrn rn springDispatcherServletrn /rn rnrn rn rn HiddenHttpMethodFilterrn org.springframework.web.filter.HiddenHttpMethodFilterrn rn rn rn HiddenHttpMethodFilterrn /*rn rnrn rn rn defaultrn *.cssrn rnrn rn defaultrn *.gifrn rnrn rn defaultrn *.jpgrn rnrn rn defaultrn *.jsrn rn------------------------------------------------------------------------------------------------------------------------------rn在类中也配置了 PUT请求啊rn@RequestMapping(value = "/salesOpportunity", <em>method</em> = RequestMethod.PUT)rn public String update(SalesOpportunity salesOpportunity) rn salesOpportunityService.update(salesOpportunity);rn return "redirect:/marketingManage/salesOpportunityHandler/salesOpportunityList";rn rn------------------------------------------------------------------------------------------------------------------------------rn提交修改页面时,出现这种错误,找了半天都没找到哪里有<em>问题</em>? 给位能指点一下吗?rnrn<em>HTTP</em> Status 405 - Request <em>method</em> 'PUT' not <em>supported</em>rnrn
Wp8.1 Http Post问题
[size=18px]本想将8.0的Post改成runtime版的api,可是遇到一些<em>问题</em>rn1.HttpClient的实例的属性DefaultRequestHeaders是只读的,请问该怎么设置post的headers,rn2.用原先的HttpWebRequest和WebRequest,结果实例的属性webRequest中的ContentLength和UserAgent属性都失效了,只能通过webRequest.Headers["UserAgent"]和webRequest.Headers["ContentLength"]来设置http头吗?[/size]
http post file问题
请教,用c/c++语言,通过http协议的post方法,怎样上传文件到服务器呢?rn 用java实现的比较多,能用C/C++实现吗,该如何实现?
URL method对应数据
[code=&quot;java&quot;] String url = &quot;http://www.abc.com/p.htm?k=v&quot;; <em>URL</em> rurl = new <em>URL</em>(url); rurl.getHost(); // www.abc.com rurl.getFile(); // p.htm?k=v rurl.getPath(); // p.htm rurl.getQuery(); // k=v...
表单提交后提示错误:The request method of POST is not allow by URL/index.htm
配置:red hat6.2+apache3.12+php3.0+mysql
jsp中type=post和method=post什么区别?
jsp中type=post和<em>method</em>=post什么区别?
http访问url的问题
一般情况下,http访问www的是80端口;假如需要访问别的端口,因此需要在域名或远程ip后面加冒号紧跟私有端口号,如:http://192.168.1.1:8080 当后面还有参数时一般需要在“?”后面添加,如:http://192.168.1.1:8080/? 而有时候我们自己会忽略在端口号后面添加了“/”,如:http://192.168.1.1:8080? 这样会导致主机域缺失,有些
HTTP POST
系统采用<em>HTTP</em> <em>POST</em>方式调用其他系统的网页,将信息提供给该系统。我如何用IE打开收到的结果信息?rn函数举例:rnCString PostPage(CString m_svr, CString m_page, CString m_formdat)rnrn CString m_cont,m_err, s1; rn rn CInternetSession lc_isession;rn lc_isession.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT,32000);rn lc_isession.SetOption(INTERNET_OPTION_CONNECT_RETRIES,10);rn lc_isession.SetOption(INTERNET_OPTION_CONNECT_BACKOFF,1000);rn rn CHttpConnection *pcon = lc_isession.GetHttpConnection(m_svr,80,"admin","password");rn CString FormDataType = _T("Content-Type: application/x-www-form-urlencoded");rnrn tryrn rn CHttpFile *http=pcon->OpenRequest("<em>POST</em>",m_page);rn http->AddRequestHeaders("Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, */*");rn http->AddRequestHeaders("Accept-Language: zh-cn");rn http->AddRequestHeaders("Content-Type: application/x-www-form-urlencoded");rn http->AddRequestHeaders("Accept-Encoding: gzip, deflate");rn http->AddRequestHeaders("User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)");rn http->AddRequestHeaders("Connection: Keep-Alive");rn http->AddRequestHeaders("Cache-Control: no-cache");rn //http->AddRequestHeaders("Cookie: FirstLogon=D195593569A134;");rn http->SendRequest(FormDataType,(LPVOID)(LPCTSTR)m_formdat,m_formdat.GetLength());rn CString mstr;rn m_cont.Empty();rn while(http->ReadString(mstr))rn rn m_cont+=mstr+"\n";rn rn m_cont.Replace(" ","\r\n");rn http->Close();rn pcon->Close();rn return m_cont; rn rn catch (CInternetException* pEx)rn rn char mcharerr[100];rn pEx->GetErrorMessage(mcharerr,100);rn m_err=mcharerr;rn return m_cont;rn rnrn
http post
如下代码:rn[code=java]rn // 创建HttpPost对象。rn HttpPost post = new HttpPost(url);rn // 如果传递参数个数比较多的话可以对传递的参数进行封装rn List params = new ArrayList();rn for(String key : rawParams.keySet())//rawParams是Maprn rn //封装请求参数rn params.add(new BasicNameValuePair(key , rawParams.get(key)));rn rn // 设置请求参数rn post.setEntity(new UrlEncodedFormEntity(params, "gbk"));rn // 发送<em>POST</em>请求rn HttpResponse httpResponse = httpClient.execute(post);rn[/code]rn怎么用C#实现?
idhttp post提交网页时报'HTTP/1.1 405 Method Not Allowed'
抓包数据:rn<em>POST</em> /login.aspx <em>HTTP</em>/1.1rnAccept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*rnReferer: http://www.cnlinfo.net/login.aspxrnAccept-Language: zh-CNrnUser-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; EmbeddedWB 14.52 from: http://www.bsalsa.com/ EmbeddedWB 14.52; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; Tablet PC 2.0)rnContent-Type: application/x-www-form-urlencodedrnAccept-Encoding: gzip, deflaternHost: www.cnlinfo.netrnContent-Length: 229rnConnection: Keep-AlivernCache-Control: no-cachernCookie: Hm_lvt_8803f7fa56465a59d0c1a12ec666f533=1368799256,1368803521,1369021257,1369038720; Hm_lpvt_8803f7fa56465a59d0c1a12ec666f533=1369038720; bdshare_firstime=1367801140475; ASP.NET_SessionId=4nckfv55dmys20452gi2jvrmrn__VIEWSTATE=%2FwEPDwUJODI5MjcyNzM1D2QWAgIDD2QWAgIFDw8WAh4EVGV4dAUFOCsxMz1kZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUHSW1nX0J0bv77TZpONe7QCO7Gu0iZqLY%2BmnKw&tbx_Name=test&tbx_pwd=test&Txt_code=21&Img_Btn.x=86&Img_Btn.y=10rn代码:rn[code=delphi]procedure TForm1.SB_DLClick(Sender: TObject);rnvarrn url:string;rn Param:TStringList;rn RStream:TStringStream;rnbeginrn url:='http://www.cnlinfo.net/login.aspx';rn idpost.Request.Referer:='http://www.cnlinfo.net/login.aspx';rn idpost.Request.Host:='www.cnlinfo.net';rn IDpost.Request.SetHeaders;rn IDpost.Request.RawHeaders.Clear;rn IDpost.HandleRedirects := true;rn IDpost.<em>HTTP</em>Options := IDpost.<em>HTTP</em>Options + [hoKeepOrigProtocol];rn IDpost.ProtocolVersion := pv1_1;rn IDpost.Request.Accept := '*/*';rn IDpost.Request.AcceptLanguage := 'zh-cn';rn IDpost.Request.UserAgent := 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; EmbeddedWB 14.52 from: http://www.bsalsa.com/ EmbeddedWB 14.52; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; Tablet PC 2.0)';rn IDpost.Request.Connection := 'Keep-Alive';rn IDpost.Request.CacheControl := 'no-cache';rn IDpost.Request.ContentType := 'application/x-www-form-urlencoded';rn //idpost.Request.ContentType:='multipart/form-data';rn param:=TStringList.Create;rn Rstream:=TStringStream.Create('');rn param.Add('__VIEWSTATE='+chstrid+'');//验证字符串存于页面name="__VIEWSTATE",启动时GET网页提取并赋值给CHSTRIDrn param.Add('tbx_Name=go2013');rn param.Add('tbx_pwd=go2013');rn param.Add('Txt_code='+Edit3.Text+'');//验证码rn param.Add('Img_Btn.x=64');rn param.Add('Img_Btn.y=23');rn idpost.post(url,param,Rstream);rn memo1.Text:=utf8toansi(Rstream.DataString);rn Rstream.Free;rnend;rnrn[/code]rnrn错误信息:环境D7+WIN7
http发送post请求,却报Reqest Method:OPTIONS的错误
原来代码如下,报图一的错误: function cpuTest() { $.ajax({ url: &quot;http://127.0.0.1:1010/ICC_tsi_api_multi&quot;, type: 'post', dataType: &quot;json&quot;, co...
[url]http://www.abce.com[/url]
[url]http://www.abce.com[/url]rn怎样将上面的字段成以下格式?rnhttp://www.abce.comrnrn是不是这样。但是这样好像是错的。rnRegex.Replace(u,@"\[url=(?[^\]]*)\](?[^\]]*)\[/url\]",@"$2",RegexOptions.IgnoreCase);
asp:textbox 与 form method=post 问题
我刚刚学asp.net,对这些输入还不熟悉;rn'fill.aspxrn rn 标题: rnrnrn rn 时间: rnrnrn rn 内容: rnrn rn rn rn rn这样点了“Submit”后不跳转到receive.aspx,不懂为什么。rn而下面这样:rn'fill.aspxrn rn 标题: rnrnrn rn 时间: rnrnrn rn 内容: rn请输入你内容rn rn rn rn-----------------rnrn'submit.aspxrn rn这样能转到submit.aspx,但是又提示Request()不对:rnServer Error in '/' Application.rnCompiler Error Message: BC30188: Declaration expected.rnrnrn==============================rn请各位帮忙指点下,不胜感激!rn
This is class servlets.Search, using the POST method
代码已经写在post里面了,但是跳转出来的还是这个怎么办[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/50.gif][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/50.gif][/img]
method=post 为什么不能用?
用GET是可以的,但我是复制过来的程序,不可能把所有的代码都改一遍,请问是不是在IIS上改什么东东?
关于获取post的url的问题
我有一个静态面向一个asp.net通过post发送数据,asp.net已能正确分析接收数据,我想在asp.net中获得这个静态页的准确url地址,怎么做?
URLPOST数组问题
在php中如果要通过<em>URL</em>来<em>POST</em>数组数据的话!需要rn rn有什么方法能够rnrn也就是说把"sName[]"名字换成"sName"来传数组数据!rn然后在insert中如何得到关于SName和sAge的数组值?rn
ASP.NET 如何设置 method="post"?
我们知道在ASP中form有两中传送方式,一种get,一种post,但是在asp.net中却没有明确指出, 现在我要给别的asp网站一个页面传送一些数据, 对方要求必须用post方式. 那么该怎么办呢?rn
Go语言反射实现Http Url与Method映射
      最近使用Go语言,使用http server,做了一个简单Url到StructName/MethodName的简单映射。主要思路是将Url能够StructName/MethodName做个映射,只需在Struct中添加方法就可以添加了实现,比如localhost:9000\struct\a和localhost:9000\struct\b,若是struct需要添加可以定义新的Stru...
关于loadXML(method,url,callback) 的问题
loadXML(<em>method</em>,url,callback)rn <em>method</em>: http方法,例如:<em>POST</em>、GET、PUT及PROPFINDrn url: 请求的<em>URL</em>地址,可以为绝对地址也可以为相对地址rn callback:自定义的返回处理函数rn我看一个AJAX 的实例是 这个样子的rnrn function gotopage(page)rn rn loadXML("get","pl_list.asp?page="+page,getList);rn rn function loadDom() //定时更新评论列表,初始化10秒钟rn rn [color=#FF0000] loadXML("get","pl_list.asp",getList);[/color]rn setTimeout("loadDom()",10000)rn rnrnrnrn[color=#FF0000]function getList(xmlDom)[/color]rn rn var pllist=document.getElementById("pllist"); //获得页面pllist对象,此对象用来显示评论内容rn var node=xmlDom.responseXML.getElementsByTagName("pllist");//获得pllist节点集合rn var tot=xmlDom.responseXML.getElementsByTagName("pl")[0].getAttribute("tot");//获得pl节点tot属性值,这里指评论的总数量rn var curpage=xmlDom.responseXML.getElementsByTagName("pl")[0].getAttribute("curpage");//获得pl节点curpage属性,这里指评论列表当前所在的页数,应用于翻页rn if (tot!=0) //判断当前评论数是否为空rn rn var cont="";rn var len=node.length;//获得pllist节点集合中节点的总数量rn for(var i=0;i 时间:'+d+' 删除 内容:'+co+''; //将所获得的评论内容生成一个字符串rn rn var cont1=pagecount(tot,curpage);//调用分页函数rn cont+=cont1;rn pllist.innerHTML=cont;//将内容呈现rn rn elsern rn pllist.innerHTML="暂无评论!";rn rn rnrnrn在loadXML中自定义回调函数getList没有参数rn可是的在function getList(xmlDom)就有参数xmlDomrn这样对吗?rn为什么?rn在线等rn谢谢
ajax问题:open(Method,Url,IsAsync)
[code=JScript]function Ajax()rnrn var _req = !!0;rn try_req=new XMLHttpRequest;catch(e)try _req=new ActiveXObject("MSXML2.XML<em>HTTP</em>");catch(e2)try _req=new ActiveXObject("Microsoft.XML<em>HTTP</em>");catch(e3)_req=false;rn if (!_req) return;rn this.req = _req;rn this.send = function(_url,_content,_callback,_<em>method</em>,_isasync)rn rn var Url = _url||"";rn var Content = _content||"";rn var Callback = _callback;rn var Method = _<em>method</em>||"GET";rn var IsAsync = _isasync==null?true:_isasync;rn _req.open(Method,Url,IsAsync);rn if(Method=="<em>POST</em>")_req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");rn _req.onreadystatechange = function()rn rn if(_req.readyState==4&&Callback)rn rn Callback(_req.status==200?_req:null);rn rn ;rn _req.send(Method=="<em>POST</em>"?Content:"");rn rn this.get = function(_url,_callback)rn rn this.send(_url,"",_callback,"GET");rn rn this.post = function(_url,_content,_callback)rn rn this.send(_url,_content,_callback,"<em>POST</em>");rn rn[/code]**********************************************************************************************rn/**************为什么执行到这一行_req.open(Method,Url,IsAsync);就执行不了?rn看不懂可以hi我或者Q我。QQ:495724633
http Post方法问题,急!
rn目前需要用到这个东西,但是以前从来没接触过,开始看。rnrn下面是我从网上找到的资料,对这个东西有一点不明把。rn1.那个hdrs[]就应该是url吧,我不明白这个url什么用呢?因为我把我的数据发过去就行了,只关心数据即可,为什么要加一个url呢?url具体是用来干什么的呢?rn2.这个例子中发送的是字符串数据,如果我要发送别的数据呢?比如结构体rnstruct tagmystructrnrn string str;rn int a;rn double b;rn ......rn;rnrn这应该如何做呢?谢谢!rnrn/////////////////////////////////////////////////////////////////////rnrn Without MFC, the same code translates to straight SDK calls as follows:rnrn rn rnrnstatic rnTCHAR hdrs[] =rnrn _T("Content-Type: application/x-www-form-urlencoded");rnrn rnstatic rnTCHAR frmdata[] =rnrn _T("name=John Doe&userid=hithere&other=P&Q");rnrn statuc TCHAR accept[] =rnrn _T("Accept: */*");rnrn rnrn rn// for clarity, error-checking has been removedrnrnrn HINTERNET hSession = InternetOpen("MyAgent",rnrn INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);rnrn HINTERNET hConnect = InternetConnect(hSession, _T("ServerNameHere"),rnrn INTERNET_DEFAULT_<em>HTTP</em>_PORT, NULL, NULL, INTERNET_SERVICE_<em>HTTP</em>, 0, 1);rnrn HINTERNET hRequest = HttpOpenRequest(hConnect, "<em>POST</em>",rnrn _T("FormActionHere"), NULL, NULL, accept, 0, 1);rnrn HttpSendRequest(hRequest, hdrs, strlen(hdrs), frmdata, strlen(frmdata));rnrn // close any valid internet-handles
请教HTTP控件 POST问题
有一个页面,很简单,也不牵涉到cookie,就是接收一个号码,一个内容,我想用Id<em>HTTP</em>控件来实现<em>POST</em>数据,<em>POST</em>出去了就可以,不用管以后的事情,调了很久,也查了很多资料,还是有点<em>问题</em>,所以发上来问一下,熟悉的人可能是一句话就帮我解决了.rnrn rn rnrn rn rn 号码rn rn rn rn rn 内容rn rn rn rn rn rn rn rn rnrnrnrn------------------------------------------------------rnC代码:注意我的是81端口rn AnsiString <em>URL</em>="http://10.178.3.1:81/sendsms_s.asp";rn TStringList *temp=new TStringList();rn temp->Clear();rn temp->Add("sim=13911112222");rn temp->Add("sim_data=你好");rn TStringStream *rep=new TStringStream("");rn Id<em>HTTP</em>1->Request->ContentType = "text/css";rn Id<em>HTTP</em>1->Post(<em>URL</em>,temp,rep);rn delete temp,rep;rnrn程序运行后,没有任何反应,不知是哪一块还要修改一下?rn
一个http post 和get的问题
做一个登录网站 并且获取个人信息的一个小程序,做法是 向网站提交登录的信息,然后在get 如果找到个人信息则登录成功 没找到则登录失败。rn但是登录的时候 有时候会出现登录失败,发现是因为 登录完成之后有时候不直接返回的个人信息 返回的是正在加载请稍后的页面。请问这个要怎么解决。rnrn[code=C/C++]CString strHtml;rnCString url1="http://yeseons.com/sub/Check_login.asp"; //登录地址rnCString url2="http://yeseons.com/personal/index.asp"; //个人信息主页地址rnCString PostData=_T("Key_Username="+regName+"&Key_Password="+regPass); //提交的登录数据rnGetHtml(url1,CHttpConnection::<em>HTTP</em>_VERB_<em>POST</em>,PostData); //登录rnstrHtml=GetHtml(url2,CHttpConnection::<em>HTTP</em>_VERB_GET,PostData); //获取个人页面rnint k=strHtml.Find("个人中心");rnif (-1!=k)rnrn //成功rnrnelsernrn //失败rn rn rn//返回有的时候是个人的页面,有的时候是一个正在加载请稍候的页面。[/code]
网络通信编程基础客户端代码下载
网络通信编程基础客户端代码 网络通信编程基础客户端代码 相关下载链接:[url=//download.csdn.net/download/zhang9042/2209764?utm_source=bbsseo]//download.csdn.net/download/zhang9042/2209764?utm_source=bbsseo[/url]
利用felix和struts2实现osgi web下载
利用felix和struts2实现osgi web 相关下载链接:[url=//download.csdn.net/download/u010597767/5339226?utm_source=bbsseo]//download.csdn.net/download/u010597767/5339226?utm_source=bbsseo[/url]
泽林装饰公司网站模板下载
装饰公司网站模板整站下载,黑红色调,精美大方,完善的后台管理功能。 相关下载链接:[url=//download.csdn.net/download/fangpage/9031835?utm_source=bbsseo]//download.csdn.net/download/fangpage/9031835?utm_source=bbsseo[/url]
相关热词 c# login 居中 c# 考试软件 c# 自然语言分析 c# 分段读取文件 c# 泛型反射 c#打断点 c# 时间转多少秒 c# 线程函数加参数 c# modbus 读取 c#查询集合表
我们是很有底线的