Forwarding or redirecting from a BaseAction

2006-05-16 Thread Jose Moreira
Hello, every action in my webapp extends a BaseAction and call
super.execute(...). I'm taking advantage of this pattern to implement a
security scheme where the Action classes class signature
(com.example.XYZAction) are mapped to security levels. Example:

user X as access to com.example.XYZAction but now com.example.ABCAction.

In the BaseAction i get the permission by looking up the class in the
database:

String currectAction = mapping.getType();


almost everything works fine except if the user has no access i cant
redirect to anywhere from the baseaction getting:

StandardWrapperValve[action]: Servlet.service() for servlet action threw
exception
java.lang.IllegalStateException: Cannot forward after response has been
committed
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:324)

event when there's no 'request.getSession' in its code 


i considered using a servlet filter mapped to the action servlet, but
there i cant get access to the mapping (?)

Any ideas besides changing the security implementation? (OMG nooo)




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



commons-uploading and heap space

2006-04-11 Thread Jose Moreira
hello,

i'm using struts 1.1 and commons-uploading 1.0 ; i use JUpload(.biz) to
submit multiple image files
to an action form. On average aproximate 400 around 50k of files are
sent, causing heap space problems (currently set to 512mb).

i also configured the controller as:

controller
set-property property=nocache value=true/
set-property property=debug value=9/
!--
The size of the input buffer used when processing file
uploads. The default value is 4096
 --
set-property property=bufferSize value=24M/

!--
The maximum size (in bytes) of a file to be accepted as a file
upload. This value can be expressed as a number followed by
a K, M , or G , which is interpreted to mean kilobytes,
megabytes, or gigabytes, respectively. The default value is 250M
 --
set-property property=maxFileSize value=250M/

!--
The maximum size (in bytes) of a file whose contents will be
retained in memory after uploading. Files larger than this
threshold will be written to some alternative storage
medium, typically a hard disk. This value can be expressed as
a number followed by a K , M , or G , which is interpreted to
mean kilobytes, megabytes, or gigabytes, respectively. The
default value is 256K
 --
set-property property=memFileSize value=0K/


Can it be that are not the files size causing the OutOfMemoryError but
the number of objects in the request?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]