> Sourabh Kulkarni wrote:
>
> I am trying to send an object to servlet.
> URL url = new URL("http://localhost:8080/context/servletname?param=value";);
> 2] If i use request.getParameter("param") and then go ahead with reading
> the object, I get the following excetpion on server.
>
>    at javax.servlet.http.HttpUtils.parseQueryString(HttpUtils.java:151)
>    at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:254)
>    at org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
>    at org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
>    at org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
>    at org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
>

 The servlet container is trying to read your POST'ed object
as a form. That should only happen if your content-type is
"application/x-www-form-urlencoded", which is (always?) the
default if you don't set it to anything else.

 Are you setting the Content-Type?


--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to