File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes prob in getParameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "prob in getParameter" Watch "prob in getParameter" New topic

prob in getParameter

Sophia Choi
Ranch Hand

Joined: Mar 22, 2002
Posts: 106
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
PrintWriter out=res.getWriter();
String path = req.getParameter("path"); //set default upload directory
Prasanth Allam

Joined: Oct 10, 2003
Posts: 2
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:
subject: prob in getParameter
It's not a secret anymore!