You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Hill <an...@gridnode.com> on 2003/04/11 05:58:50 UTC
Struts Resources [WAS: RE: java.lang.ClassCastException: org.apache.struts.upload.MultipartRequestWrapper]
The main documentation is available from the struts website. You can also
search the mailing list archives and the bugzilla bug tracking system for
further information.
If you have a question , chances are someone else has already had a similar
problem and it has been answered on the list - so a search of the archive is
always a good idea - though the archive search can be a pain to use at times
(likewise for bugzilla!)...
Struts:
http://jakarta.apache.org/struts/
List Archive:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
Bugzilla:
http://issues.apache.org/bugzilla/
I also have some of the struts books that are available and these are a good
resource.
Chuck's O'Reilly book has good information on configuring stuff, and Ted's
book has a lot of info on designing applications that run on struts. The
Struts Kickstart book is also a wealth of information - and has a cd thats
got lots examples as well as good open source stuff on it.
-----Original Message-----
From: jmutonho@za.safmarine.com [mailto:jmutonho@za.safmarine.com]
Sent: Thursday, 10 April 2003 22:33
To: andrew.david.hill@gridnode.com
Subject: RE: java.lang.ClassCastException:
org.apache.struts.upload.MultipartRequestWrapper
Hi there
Do you have any pointers to struts docs?Where do you get all the info
man.Like , knowing that the I can specify my own RequestProcessor in
the the config file...
Jeff Mutonho
Developer
Safmarine Computer Services(Pty Ltd)
ph : + 27 21 408 6230
mob : + 27 83 229 1154
web : www.scs.co.za
|---------+------------------------------>
| | andrew.david.hill@g|
| | ridnode.com |
| | |
| | 2003/04/10 01:18 PM|
| | Please respond to |
| | andrew.david.hill |
| | |
|---------+------------------------------>
>---------------------------------------------------------------------------
-----------------------------|
|
|
| To: <jm...@za.safmarine.com>
|
| cc: struts-user@jakarta.apache.org
|
| Subject: RE: java.lang.ClassCastException:
org.apache.struts.upload.MultipartRequestWrapper |
>---------------------------------------------------------------------------
-----------------------------|
(also posting reply to the list in case its helpful to anyone else)
Struts allows you to plug your own RequestProcessor in in place of
the one
it provides - so you wont need to rebuild any of the struts files -
you just
specify which class to use for the request processor so struts will
use
yours instead the default one.
Your RequestProcessor needs to extend
org.apache.struts.action.RequestProcessor. You only need to override
those
methods whose behaviour you wish to change. (In our case this is the
doForward() method - just paste in that code I posted before. Dont
forget to
import whatever classes it needs from the appropriate packages)
To tell struts to use your RequestProcessor you change the
'processorClass'
attribute of the 'controller' element in your struts-config.xml
Heres what mine looks like:
<controller
processorClass
="com.gridnode.gtas.client.web.strutsbase.GTRequestProcessor"
locale="true"
contentTy...(etc...)
And set it to the full name of your request processor class.
One thing to look out for is that some struts extensions (I think
Tiles is
one) already override the RequestProcessor. If this is the case you
will
need to extend your implementation from their processor class rather
than
the standard RequestProcessor.
-----Original Message-----
From: jmutonho@za.safmarine.com [mailto:jmutonho@za.safmarine.com]
Sent: Thursday, 10 April 2003 19:05
To: andrew.david.hill@gridnode.com
Subject: RE: java.lang.ClassCastException:
org.apache.struts.upload.MultipartRequestWrapper
I think you're right about this....the request has to be unwrapped
and then get forwarded...So when I override it , I have to rebuild
all the classes right or just that one?How do you normally do it?
I'm sorry I'm mailing you directly.
Jeff Mutonho
Developer
Safmarine Computer Services(Pty Ltd)
ph : + 27 21 408 6230
mob : + 27 83 229 1154
web : www.scs.co.za
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org