commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tatu Vanhanen" <tatu.vanha...@graftor.fi>
Subject RE: [FileUpload] Problems with chaining uploading
Date Tue, 01 Jun 2004 10:55:36 GMT

> From: Schalk [mailto:schalk@volume4.co.za]
...
> You can go to http://www.volume4.co.za/phpBB2/viewtopic.php?t=2

This one also potentially tries to redirect a post request, which is not
allowed (some browsers may still do it) as Martin Cooper said previously.
I'd prefer forwarding the request processing to the "product_added.jsp", or
whatever jsp with
request.getRequestDispatcher("/product_added.jsp").forward(request,
response);

in the upload servlet. This forwards the processing in the container to the
next component (product_added.jsp) that will present the view (i.e. show you
the results of uploading). You can store some status info as request
attributes in the upload servlet and use (show) them in the jsp view.

> :: I am sorry to use jsp pages but perhaps (surely) it's a silly question,
> the
> :: jsp pages aren't compiled into servlet? Perhaps I didn't correctly
> :: understand the principles of jsp and servlets...
> ::

It is considered a better practice (compared to just jsp pages) to do
_processing_ in servlets and _presenting_ in jsp pages and alike (Velocity
templates?). Look at some other people's jsp pages containing mixed java and
html code in them and try to resolve what the page does; then you know why
;)


But back to the Exception you have, a stack trace will probably tell
something about the reason.

- Tatu V.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message