SpringMVC出现 Request method 'POST' not supported 错误

图片说明
图片说明
图片说明
图片说明
图片说明

2

5个回答

    <!-- 配置可以把POST 请求转换为 PUT、DELETE 请求的 filter -->
    <filter>
        <filter-name>HiddenHttpMethodFilter</filter-name>
        <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>HiddenHttpMethodFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-4

你在controller的方法里面没有说明使用的是什么请求方式,因此采用了默认的get方式,当然就和form表单的post方式冲突了,只要在方法上说明一下使用post方式就可以了

0

不科学呀,按道理应该可以将post转换成delete呀

0
-1

你的方法上注解的提交方式是DELETE,你用POST当然提交不上去了。

-6
qq_26584263
天雨流芳-128 会不会呀
大约 2 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
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 表单 一提交 就报题目那个错误
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",method=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",method=RequestMethod.POST)rn public String insertList(Employee employee)rn employeeDao.save(employee);rn return "redirect:emps";rn rn rn @RequestMapping(value="/insert",method=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 method 'GET' not supportedrn
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应该没什么问题的)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]
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 安全问题: 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]
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 method POST is not supported by this URL ??
孙鑫的书, servlet/jsp深入详解,网上参见http://www.qijan.com/bbs/viewthread.php?action=printable&tid=10063 rnrn书上67页请求转发的例子, 例2-16 PortalServlet.java和例2-17 LoginServlet2.javarn网上请通过ctrl+F去查找rnrn点登陆后出现错误: HTTP method POST is not supported by this URLrnrn把例2-17 LoginServlet2.java第21行代码form method=post改成form method=get后运行正常.rn请问是为什么?rnrnrnrn附两个程序:rn例2-16 PortalServlet.javarn1. package org.sunxin.ch02.servlet;rnrn2. rn3. import java.io.IOException;rn4. import java.io.PrintWriter;rn5. rn6. import javax.servlet.RequestDispatcher;rn7. import javax.servlet.ServletContext;rn8. import javax.servlet.ServletException;rn9. import javax.servlet.http.HttpServlet;rn10. import javax.servlet.http.HttpServletRequest;rn11. import javax.servlet.http.HttpServletResponse;rn12. rn13. public class PortalServlet extends HttpServletrn14. rn15. public void doGet(HttpServletRequest req, HttpServletResponse resp)rn16. throws ServletException,IOExceptionrn17. rn18. resp.setContentType("text/html;charset=gb2312");rn19. rn20. PrintWriter out=resp.getWriter();rn21. rn22. out.println(" ");rn23. out.println("登录页面");rn24. out.println("");rn25. rn26. String name=req.getParameter("username");rn27. String pwd=req.getParameter("password");rn28. rn29. if("zhangsan".equals(name) && "1234".equals(pwd))rn30. rn31. ServletContext context=getServletContext();rn32. RequestDispatcher rd=context.getRequestDispatcher("/welcome");rn33. rd.forward(req,resp);rn34. rn35. elsern36. rn37. RequestDispatcher rd=req.getRequestDispatcher("login2");rn38. rd.include(req,resp);rn39. rn40. out.println("");rn41. out.close();rn42. rn43. public void doPost(HttpServletRequest req,HttpServletResponse resp)rn44. throws ServletException,IOExceptionrn45. rn46. doGet(req,resp);rn47. rn48. rnrnrnrnrn例2-17 LoginServlet2.javarn1. package org.sunxin.ch02.servlet;rnrn2. rn3. import java.io.IOException;rn4. import java.io.PrintWriter;rn5. rn6. import javax.servlet.ServletException;rn7. import javax.servlet.http.HttpServlet;rn8. import javax.servlet.http.HttpServletRequest;rn9. import javax.servlet.http.HttpServletResponse;rn10. rn11. public class LoginServlet2 extends HttpServletrn12. rn13. public void doGet(HttpServletRequest req, HttpServletResponse resp)rn14. throws ServletException,IOExceptionrn15. rn16. rn17. resp.setContentType("text/html;charset=gb2312");rn18. rn19. PrintWriter out=resp.getWriter();rn20. rn21. out.println(" ");rn22. rn23. out.println(" ");rn24. rn25. out.println(" ");rn26. out.println(" 请输入用户名");rn27. out.println(" ");rn28. out.println("");rn29. rn30. out.println(" ");rn31. out.println(" 请输入密码");rn32. out.println(" ");rn33. out.println("");rn34. rn35. out.println(" ");rn36. out.println(" ");rn37. out.println(" ");rn38. out.println("");rn39. rn40. out.println("");rn41. out.println("");rn42. rn43. rn44. public void doPost(HttpServletRequest req,HttpServletResponse resp)rn45. throws ServletException,IOExceptionrn46. rn47. doGet(req,resp);rn48. rn49. rn
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)
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这是怎么回事啊,求大神指点!!!!!
错误405 POST not supported
数据库连接成功以后做了个简单的登陆页面,但老出现405 POST not supported的问题rn1,登陆代码:rn<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>rnrnrnrn rn 登陆rnrnrnrn 登陆rn rn rn 用户名rn rnrnrn rnrn 密码rn rnrnrn rn rn提交rn取消rnrnrnrnrnrn2,检验代码:rn<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" import="java.util.*"errorPage="" %>rnrnrnrn rn checkloginrnrnrnrnrn<% boolean success=true;rnString userID=new;rnString(request.getParameter("userID").getBytes(ISO8859_1),"GBK");rnString password=new;rnString(request.getParameter("password").getBytes(ISO8859_1),"GBK");rn%>rnrn<% Class.forName("org.gjt.mm.mysql.Driver").newInstance();rnConnection con=DriverManager.getConnection("jdbc:mysql://localhost/testmysql?user=root&password=normanwu82&useUnicode=true&characterEncoding=8859_1");rnStatement stmt=con.createStatement(); %>rnrn<%rn sql="select * from users where userID='"+userID+"' and password='"+password+"'";rnResultSet rs=stmt.executeQuery(sql);rn %>rn rn <% if(success)rn session.setAttribute("userID",userID);rn success=true;rn 登陆成功!rn rn elsern %>用户名或密码错误,请重新登陆!<% rn rn rn rs.close();rn con.close();rn %>rn 返回rn rnrnrn3,书中的检验代码中与数据库相连用的是连接池,我不太用会,就想直接连接数据库可不可以,所以我就自己写了代码,我想应该没那么难,但是却老是出现405 POST not supported的问题,请高手指点。rn4,如果用连接池的话,id,scope,class等该如何设置啊?
The method 'SelectMany' is not supported 错误求教
[b]Error :[/b]rnThe method 'SelectMany' is not supportedrnrn[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
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", method = RequestMethod.PUT)rn public String update(SalesOpportunity salesOpportunity) rn salesOpportunityService.update(salesOpportunity);rn return "redirect:/marketingManage/salesOpportunityHandler/salesOpportunityList";rn rn------------------------------------------------------------------------------------------------------------------------------rn提交修改页面时,出现这种错误,找了半天都没找到哪里有问题? 给位能指点一下吗?rnrnHTTP Status 405 - Request method 'PUT' not supportedrnrn
HTTP method POST is not supported by this URL的问题,很急
运行程序,报错:HTTP method POST is not supported by this URLrn我的jsp页面是这样的:rnrnrnrnrn 手机收费页面rn rn电话号码: rnrnrnrnrnrnservlet的源码是:rnimport java.io.*;rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnimport java.io.IOException;rnimport java.io.PrintWriter;rnimport javax.servlet.ServletException; rnpublic class Login extends HttpServletrnrn public void doGet(HttpServletRequest request,HttpServletResponse response)rn throws IOException,ServletExceptionrn rn PrintWriter out=response.getWriter();rn String num=request.getParameter("phonenum");rn rn if (num.trim().equals("")) rn rn out.println("号码不能为空,请重新输入!");rn response.sendRedirect("login.jsp");rn rn else rn rn if((!num.trim().equals("11")) && (!num.substring(0,1).equals("13")))rn rn out.println("非手机号码,请重新输入!");rn response.sendRedirect("login.jsp");rn rn else rn rn response.sendRedirect("fail.jsp");rn rn rn rn public void doPost(HttpServletRequest request,HttpServletResponse response)rn throws IOException,ServletExceptionrn rn doGet(request,response);rn rnrnrnrnweb。xml配置:rnrnrnrnrnrn Welcome to Tomcatrn rn Welcome to Tomcatrn rnrnrnrnrn rn rn org.apache.jsp.index_jsprn org.apache.jsp.index_jsprn rn rn rn myloginrn myloginrn rn rn rn Loginrn Loginrn rn rn rn FeeLoginrn FeeLoginrn rn rn rn org.apache.jsp.index_jsprn /index.jsprn rnrn rn myloginrn /myloginrn rn rn rn Loginrn /Loginrn rn rn rn FeeLoginrn /FeeLoginrn rnrnrnrnrn可是运行时总是报这个错,我都疯了,我是新手,实在不知道怎么办了
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运行为什么出HTTP method POST is not supported by this URL!错误?如果改成Post改成Get就好使~Post有什么需要特殊注意的吗?
form表单,输入框里按回车键后405错误:Request method 'POST' not supported
在一个页面搜索时出现的问题:输入完按回车就报错:405错误:Request method 'POST' not supported。开始我以为没有传递到controller里,但debug一下,实际上是进去了,而且出错的断点处的代码实在让我无法理解rn(因为那代码根本不会错),而且我还有个页面也是同样的代码,搜索按回车可以搜索成功。纠结了四个小时,无意中搜到了“自动提交”这问题。看了一个帖子http://blog.csdn.net/lu7kang/article/details/5258054。抱着试一试的想法,竟然成功了。我又蛋疼了。为什么同样的页面、同样的功能代码不一样。。。。rnrnrn部分代码如下:rn页面:rn[code=html]rn rn rn 手机号rn rn rn rn rn rn rn rn[/code]rnjs代码:rn[code=javascript]rnfunction vipCancel() rn $("#frmVipSearch").resetForm();rn rn function vipSearch()rn var data = $("#frmVipSearch").serializeObject();rn $('#tg').datagrid('load',rn mobile:data.mobilern );rn rn $(document).keydown(function(e)rn if(e.keyCode == 13) rn vipSearch();rn rn );rn[/code]
SpringMVC上传文件出现400 Bad Request错误
1.起因 写了上传文件代码,用postman测试一下报400 Dad Request。 2.原因 看了下资料了解到使用SpringMVC上传文件需要在form表单中添加enctype=&quot;multipart/form-data&quot;,并且需要在springmvc的配置文件加入上传文件的bean代码,否则会报以上错误。 3.解决方法 form表单中添加enctype=&quot;multipart/for...
Spring,JSP用AJAX的post方法提交contrllor后弹出Request method 'POST' not supported
delete.jsprn[code=text]<%@ page language="java" contentType="text/html; charset=ISO-8859-1"rn pageEncoding="ISO-8859-1"%>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", method = RequestMethod.POST)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 method 'POST' not supportedrnrntype Status reportrnrnmessage Request method 'POST' not supportedrnrndescription The specified HTTP method 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 method 'POST' not supportedrnrnrnrn请问这是什么原因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]
客户端错误!method 'getconrec' not supported by automation object!
我在应用程序端写了一个getconrec,然后在客户端调用。出现上述错误,客户端使用SocketConnection连接服务器,请问这是什么问题?
XtraReport.ShowPerview()报"The method or operation is not supported"的错误
我的DXperience工具是11.1.8的,已经破解了,我是用Winform的Report Designer设计的repx文件,我用的开发工具是VS2010,然后在Asp.Net的页面后台加载这个文件,用XtraReport控件显示报表,但是每当程序运行到XtraReport的ShowPerview方法时都会报"The method or operation is not supported"的错误,刚开始遇到这个错误时,我以为是我少添加了引用,我就根据Devexpress的帮助文档[url=http://documentation.devexpress.com/#XtraReports/CustomDocument9367][/url]添加了这些引用,但是任然报这个错;于是我就在其他本版的DXperience(10.1.5)环境下做测试,也是报这个错。下面是我用VS2010写的一个demo:rnrn[code=HTML]rn<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default1.aspx.cs" Inherits="Web.Default1" %>rnrn<%@ Register Assembly="DevExpress.XtraReports.v11.1.Web, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"rn Namespace="DevExpress.XtraReports.Web" TagPrefix="dx" %>rnrnrnrnrnrn 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此问题本人纠结了很久,找过很多文档资料,始终没有解决,但求高人指点,谢谢。
表单提交后提示错误:The request method of POST is not allow by URL/index.htm
配置:red hat6.2+apache3.12+php3.0+mysql
method '' not supported by automation object
method 'AAA' not supported by automation object rnrn总是提示这个错误,该从哪方面去找原因啊rnrn
数据库出现错误:Capability not supported
数据库出现错误:rnCapability not supportedrn是哪儿的问题呢 rn谢谢了
http 转 https 后,警告:Request method get not supported
http 转 https ,配置了http 自动转 https,代码没有变动,使用 SpringMVC,访问时没有显式指定端口,即使用默认端口,前端发送 post 请求后后台会报警告 get method not supported。回归到 http 配置就可以正常访问。求各位大佬帮忙,在线等。。
错误提示(HTTP method POST is not supported by this URL),什么原因呢?
The specified HTTP method is not allowed for the requested resource (HTTP method POST is not supported by this URL).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 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点击按钮后提示:rnHTTP method GET is not supported by this URLrn这是怎么回事?怎么解决?rn
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 supported by automation object,难道Delphi操作Excel自动保存还有什么玄机?rn另外读取数据库时如果我不使用fidlds[0]这样的序号来读,使用字段名应该使用哪个方法呢?请举例说明,谢谢!
SmartUpload使用问题405 HTTP method POST is not supported by this URL
我用如下方法提交rn rnrnrn为什么会报错rn405 HTTP method POST is not supported by this URL
405 POST not supported ???
使用post为什么会出现这样的错误,而使用get则没问题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!!!!!!!!!!!!!!!!
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>rn rn<%String softname=request.getParameter("softname");rn String content=request.getParameter("content");rn String pic=request.getParameter("pic");rn String softtime=request.getParameter("softtime");rn Class.forName("org.gjt.mm.mysql.Driver").newInstance();rn Connection con; rn con=DriverManager.getConnection("jdbc:mysql://localhost/flying?user=flying&password=flying&useUnicode=true&characterEncoding=gb2312");rn Statement stmt=con.createStatement();rn String sql=INSERT INTO software(softname,content,softtime,pic) VALUES ('"+softname+"','"+content+"','"+softtime+"','"+pic+"');rn stmt.executeUpdate(sql);rn stmt.close;rn con.close;rn %>rnrnform提交到这个页面,提示:405 POST not supportedrn哪里错了!
Property or Method not supported by layers of this type.
我在MapX中添加一个UserLayer,功能是添加个比例尺显示在地图左上角,那段代码是从别人的源码考过来的,地图单位和我的不一样,我的是Km,运行后可以显示比例尺,但弹出个对话框说Property or Method not supported 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 methodrn 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; i<=1; i++) rn long x2 =(long)(barWidth+x1);rn long y2 =(long)(barHeight+y1);rn rn /*** First Section ***/rn if (i==0) rn dc.SelectObject(&brushRed); //Redrn rn else rn dc.SelectObject(&brushWhite); //Whitern rnrn // with mapMode HIENGLISH, positive is x to the right, positive y is uprn dc.Rectangle(x1, -y1, x2, -y2);rnrn /*** Second Section ***/rn x1=x2;rn x2=(long)(barWidth+x1);rn if (i==0) rn dc.SelectObject(&brushWhite); //Whitern rn else rn dc.SelectObject(&brushRed); //Redrn rn dc.Rectangle(x1, -y1, x2, -y2);rnrn /*** Third Section ***/rn x1=x2;rn x2=(long)(barWidth*2+x1);rn if (i==0) rn dc.SelectObject(&brushRed); //Redrn rn else rn dc.SelectObject(&brushWhite); //Whitern rn dc.Rectangle(x1, -y1, x2, -y2);rn rn /*** Reset Values for bottom bar pass***/rn x1=(long)(startX*1000);rn y1=y2;rn // End Forrnrn // Calculate Pixels Per Inchrn CPoint pt(1000, 1000); // In HIENGLISH 1000 units = 1 inchrn dc.LPtoDP(&pt); // Convert inch to pixelrn long lPixPerInch = pt.x;rnrn CRect rc;rn CView::GetClientRect(&rc);rnrn float screenX, screenY;rn double mapX1, mapY1;rn // subtract lPixPerInch from center to get 1 inch to left of Centerrn screenX = (float)(rc.right/2-lPixPerInch);rn screenY = (float)(rc.bottom/2);rn try rn m_ctrlMapX.ConvertCoord(&screenX, &screenY, &mapX1, &mapY1, 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 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
怪问题?The network request is not supported
装好tomcat输入127.0.0.1:8080rn出现The network request is not supported.rnxp系统.rn方正的机器.rn不知那位仁兄遇到过这种情况.rn谢了.
org.springframework.web.HttpRequestMethodNotSupportedException: Request method
jap代码:rn 全部会员 全部研发会员 全部企业会员rnrnrncontroller代码:rn @RequestMapping(value = "/manager/message/type", method = RequestMethod.POST)rn public String selectUserName(Model m, @PathVariable("type") String type) rn m.addAttribute("name", messageService.getUserName(type));rn return "manager/message/add";rn rnrnrnrnservice代码:rn public String getUserName(String type);rnrn实现service代码rn @Transactional(readOnly = true)rn public String getUserName(String type) rn Query query ;rn if("2".equals(type))rn query = userDao.createQuery("from UsersEntity c where c.userType = 0");rn elsern query = userDao.createQuery("from UsersEntity c where c.userType = 0 and c.type = ?",type);rn rn List ls = query.list();rn List userNames = Lists.newArrayList();rn for (int i = 0; i < ls.size(); i++) rn UsersEntity entity = ls.get(i);rn UserVO vo = new UserVO();rn DozerBeanMapperSingletonWrapper.getInstance().map(entity, vo);rn userNames.add(vo.getUserName());rn rn String userName = userNames.toString();rn String name = userName.substring(1, userName.length()-1);rn return name;rn rnrnrnrn抛出的异常:rn org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supportedrn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodResolver.resolveHandlerMethod(AnnotationMethodHandlerAdapter.java:623) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:421) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) [servlet-api.jar:na]rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) [servlet-api.jar:na]rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) [catalina.jar:7.0.12]rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.12]rn at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:157) [javamelody-1.27.0.jar:na]rn at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:131) [javamelody-1.27.0.jar:na]rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.12]rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.12]rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.12]rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.12]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.captcha.JcaptchaAuthenticationFilter.doFilter(JcaptchaAuthenticationFilter.java:98) [spring-security-captcha-3.0.2.jar:na]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.12]rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.12]rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) [catalina.jar:7.0.12]rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) [catalina.jar:7.0.12]rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) [catalina.jar:7.0.12]rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) [catalina.jar:7.0.12]rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [catalina.jar:7.0.12]rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) [catalina.jar:7.0.12]rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.12]rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395) [catalina.jar:7.0.12]rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250) [tomcat-coyote.jar:7.0.12]rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188) [tomcat-coyote.jar:7.0.12]rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302) [tomcat-coyote.jar:7.0.12]rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_13]rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_13]rn at java.lang.Thread.run(Thread.java:619) [na:1.6.0_13]rnrn
struts:的method=“request" ???
中method=“request",rn请问这里若request是什么意思,与“post”有什么区别?rn我的程序用request没有问题,但用post就会出现ie提示出错。
SpringMVC中出现" 400 Bad Request "错误的解决方法
在使用SpringMVC自动封装前台传递数据的时候,如果前台使用的content-type为application/json,那么后台就需要使用@ResponseBody(处理ajax传过来的json数据转成bean)但是有时候加了@ResponseBody还是出现错误码400 这可能是因为类型转换的问题,SpringMVC转换jsno为Bean的时候只会将String类型转换成功,所以当Bean
SpringMVC表单提交过程中出现400错误 Bad Request
提交的数据与项目中数据库表的映射类的成员变量类型不一致 多半是因为Date类型 解决方法: 首先检查表单是否正确 action method modelAttribute 把date类型 改为java.sql.Date 在实体类中的Date类型前加入注解 @DateTimeFormat(pattern=“yyyy-MM-dd”) ...
求助:servlet运行时出现的问题 HTTP method GET is not supported by this URL
各位兄弟姐妹,小弟在调试JSP的时候遇到一个问题:rnservlet运行时出现的问题 HTTP method GET is not supported by this URL 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
连接DB2数据库出现"encoding not supported!!"错误
大家好,采用如下代码连接DB2数据库出现错误rn数据库版本:DB2 V8rn数据库驱动包:db2jcc.jarrn代码:rnpublic class Testrnrn String s = "com.ibm.db2.jcc.DB2Driver";rn String URL = "jdbc:db2://localhost:50000/oa";rn rn public Object showResult()rn rn Connection conn = null;rn tryrn Class.forName(s);rn conn = DriverManager.getConnection(URL , "admin" , "gtc");rn rn catch(Exception e)rn rn System.out.println(e);rn rn rn return conn;rn rn rn public static void main(String[] args)rn rn Test t = new Test();rn System.out.println(t.showResult());rn rnrn错误:rncom.ibm.db2.jcc.a.DisconnectException: encoding not supported!! DB2ConnectionCornrrelator: NF000001.N107.060317101512rnrn我在论坛上过同样错误,不知道哪位高人遇到过,请给指点一下,谢谢:)
这是什么错误啊HTTP method GET is not supported by this URL
地址栏运行到http://localhost:8080/flight/searchflightServlet?action=list时就出现了这个405错误,请大家帮忙啊?
奇怪的错误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
相关热词 c# 线程顺序 c#昨天当前时间 c# 多进程 锁 c#mysql图片存取 c# ocx 委托事件 c# 读取类的属性和值 c# out 使用限制 c#获取url的id c#怎么进行分页查询 c# update 集合