Hi Ken, I'd like to understand the question a little better. We intentionally didn't include constants for the 3xx errors in the Query.Status class because they generally shouldn't happen when accessing a REST service.
That said, you should still be able to handle 302 errors on the client - there just isn't a constant defined for it. What is causing the 302 in this case? Is it an expected error? If so, what does it mean in the context of your application? Greg On Aug 23, 2010, at 11:02 PM, [email protected] wrote: > > Hi All, > When I use Pivot postQuery1,but face the return stauts code 302 from server > side and hint the error? > Is there any simple code for me ref. for server side jsp.Many thanks. > > How to handle HTTP STAUTS 302 > |--------------------------------------------------------------------------| > |Pivot Code. | > | PostQuery postQuery1 = new PostQuery("localhost", 8080, | > | "/WebQuotation/JSP/testURL.jsp", false); | > | | > | postQuery1.execute(); | > |--------------------------------------------------------------------------| > > |--------------------------------------------------------------------------| > |JSP Code.servise | > |<% | > |try | > |{ | > | | > |response.sendRedirect("getGWU002T4.jsp"); | > |} | > |catch(Exception e) | > |{ | > |e.printStackTrace(); | > |} | > | | > | | > | | > |%> | > |--------------------------------------------------------------------------| > > > > |--------------------------------------------------------------------------| > |Povit return Code. | > |<% | > |org.apache.pivot.web.QueryException: 302 Moved Temporarily | > |%> | > |--------------------------------------------------------------------------| > > > > > Best regards, > Ken Jiang > > ******************************************* > Murata Electronics Trading (Shenzhen) Co.,Ltd > Tel:86-755-82847251 > E-mail:[email protected] > ******************************************* >
