File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

prob in getParameter

 
Sophia Choi
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is I can't receive the value of path or other parameters.
Some parameters are in JSP and passed to Servlet. I use request.getParameter("path"). But, it doesn't work.
Any idea? thanks.
String path="c:\\test\\";
form name="form1" enctype="multipart/form-data" method="post"
onSubmit="return validateForm(this)" action="/cfhc/servlet/UploadTest"
input type=hidden name=path value="<%=path%>"
input type=submit name=upload value="upload" size=25
--------------
public void doPost(HttpServletRequest req,HttpServletResponse res) throws
ServletException,IOException{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
String path = req.getParameter("path"); //set default upload directory
 
Prasanth Allam
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case the request is a multi-part request the request cannot be accessed directly. There is a package in Struts which has been taken from Oreily through which you can access the multi-part request data
[ March 03, 2004: Message edited by: Prasanth Allam ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic