Don't know if this will help you...

I'm using the com.oreilly.something.blabla to upload files.

To get the parameters on the next page I use: (well, its a servlet... )

MultipartRequest multi = new MultipartRequest(request, ".");

  String target = multi.getParameter("target");
  if (target.equals("trader")) {
   adBean.setCategoryid(multi.getParameter("categoryid"));
  }


  adBean.setModelName(multi.getParameter("modelName"));
  adBean.setYear(multi.getParameter("year"));
  if (!adBean.getCategoryid().equals(Constants.ACCESSORIES)) {
   adBean.setFuelid(multi.getParameter("fuelid"));
  }
  adBean.setPrice(multi.getParameter("price"));
  adBean.setPostcode(multi.getParameter("postcode"));
  adBean.setDescription(multi.getParameter("description"));
  if (!adBean.getCategoryid().equals(Constants.ACCESSORIES)) {
   adBean.setBrandid(multi.getParameter("brandid"));
   adBean.setMaterialid(multi.getParameter("materialid"));
  }
  adBean.setConditionid(multi.getParameter("conditionid"));

The key is the MultipartRequest object...

import com.oreilly.servlet.multipart.*;

So I guess, you would have to find something similar.

----- Original Message -----
From: "Huibert Aalbers Indaberea" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Sunday, January 07, 2001 5:44 PM
Subject: Are these Orion bugs?


> Hi everyone,
>
> Please let me first thank all of you who answered my previous question
about
> redirection. I have been able to solve my problem.
>
> I have been working with ENCTYPE="multipart/form-data" forms recently and
> have faced a number of problems. I do not know if I am doing something
> wrong, if this is the expected behaviour or if I am stumbling into orion
> specific bugs.
>
> The first problem is that I cannot use request.getParameter() to check the
> value of "normal" field (as opposed to a "file" parameters). I assumed
that
> this was normal and that I had to examine the request header to do the
> trick. Is this correct?
>
> The second problem surged when trying to parse the request header. I tried
> to do it from a JSP custom tag. In my code, I used
> pageContext.getRequest().getInputStream() but got an unexpected result. I
> can read part of the header but I do not get the full header, the
beginning
> is missing. Using reset() on the InputStream generates an IOException, as
I
> expected, but hey, I had to try!
>
> I know that orion provides support classes to handle file uploads that I
> could use to get my program to work but I would like to use my own to make
> sure that I remain app server independent.
>
> So, do you think I am facing some kind of bug that I should report? By the
> way, I forgot to mention that I am using orion 1.4.0
>
> Thnks in advance for your help!
>
> Regards,
>
> Huibert Aalbers
>


Reply via email to