Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

oreilly.com.servlet.MultipartRequest  RSS feed

 
Dominic Mack
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, thanks to Paul Wetzel for his previous post on how to upload a file using servlets.
OK, so here is the info to lead into my question. This is how I understand MultipartRequests to work:
(1) You are only able to create a single instance of a MultipartRequest (via constructor) for each HttpServletRequest.
(2) The MultipartRequest constructor takes, as an argument, the directory to which the file will be saved.
(3) The only way to get the HTML form paramters is to create a MultipartRequest and retrieve them through that -- the ServletRequest does not contain these.
So, my question is:
How can I pass a parameter into the servlet that determines where the file should be saved, since in order to read the parameter I must create a MultipartRequest which takes the directory name?

Thanks in advance,
klein
 
Yogen Vadnere
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now u have source code of multipartrequest, u can change as per ur need.
 
Dominic Mack
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course, which is exactly what I did today.
However, if someone knows a workaround - or if there is a release coming that will handle it - then I won't spend the time to make a _real_ fix.
So, if anyone out there has some helpful input on this I would much appreciate it.
[This message has been edited by Dominic Mack (edited September 26, 2001).]
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear
i dont think any release is coming, u'll hv to specify in the source code n complete yr work.
so do it n enjoy..
Originally posted by Dominic Mack:
Of course, which is exactly what I did today.
However, if someone knows a workaround - or if there is a release coming that will handle it - then I won't spend the time to make a _real_ fix.
So, if anyone out there has some helpful input on this I would much appreciate it.
[This message has been edited by Dominic Mack (edited September 26, 2001).]

 
kvk kishore
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you keep the Parameters from a file and Access them .. for Example ResourceBundle for weblogic.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!