This is my html form POSTing a file and some form data to the server:
<form
action="http://localhost:8383/compareviews3/sites/sitename5/products/product2/"
enctype="multipart/form-data" method="post" name="newImage"><input id="command"
name="command" type="hidden" value="newImageValue"/><input id="imgFile"
name="imgFile" type="file"/><br/><br/><button
type="submit">Submit</button></form>
When I try to create a form object of the entity received
Form form = new Form(entity)
This is the error I get:
java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%)
pattern
at java.net.URLDecoder.decode(Unknown Source)
at org.restlet.data.Reference.decode(Reference.java:165)
at com.noelios.restlet.util.FormUtils.create(FormUtils.java:75)
at
com.noelios.restlet.util.FormReader.readNextParameter(FormReader.java:245)
at
com.noelios.restlet.util.FormReader.addParameters(FormReader.java:129)
at com.noelios.restlet.util.FormUtils.parse(FormUtils.java:240)
at com.noelios.restlet.Engine.parse(Engine.java:979)
at org.restlet.data.Form.<init>(Form.java:84)
at org.restlet.data.Form.<init>(Form.java:133)
at
restlet.resources.NodeResource.acceptRepresentation(NodeResource.java:1076)
...
But I am able to receive the input file at the server end. I am having problem
reading only the form input sent along with the file.
Any clues/hints/solutions??
Thanks in advance
Pracheer Gupta
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2634012