简体   繁体   中英

rich:fileupload problem with filter

hi i have a problem with rich fileupload , i have a website with some discussion group with restricted access.

for allow that i use a filter that scan the request and redirect you if you have no access. the problem is using rich:fileupload with this:

www.XXXXXX.com/faces/file.jsp?id=2 for example at this time i can access to the fileupload form

<rich:fileUpload fileUploadListener="#{fileUploadManager.listener}"
id="upload" immediateUpload="true"> </rich:fileUpload>

i have tried also to insert something like this into the fileUpload tags

<a4j:actionparam name="id" value="#{group.id}" 
assignTo="#{fileUploadManager.idgruppo}"></a4j:actionparam>

at this time i have not problem with filter but the listener doesn't work, anyone can help me , i have to use richfaces not something else because this is an assignment for university pourpose.

i have allowed flash but the problem persist this is the server log

INFO: PWC1412: WebModule[/PW_socialnetworkRich] ServletContext.log():FileFilter:Initializing filter
INFO: PWC1412: WebModule[/PW_socialnetworkRich] ServletContext.log():FileFilter:doFilter()
INFO: PWC1412: WebModule[/PW_socialnetworkRich] ServletContext.log():FileFilter:DoBeforeProcessing
INFO: idgroup:23

INFO: PWC1412: WebModule[/PW_socialnetworkRich] ServletContext.log():FileFilter:DoAfterProcessing
INFO: PWC1412: WebModule[/PW_socialnetworkRich] ServletContext.log():FileFilter:doFilter()
INFO: PWC1412: WebModule[/PW_socialnetworkRich] ServletContext.log():FileFilter:DoBeforeProcessing
INFO: idgroup:null
INFO: Listener:
INFO: Name of the uploaded file
GRAVE: The log message is null.
java.sql.SQLException: Incorrect integer value: 'null' for column 'fk_group' at row 1

Another aproach is using the attribute allowFlash set to "true". Activating the embedded Flash module you can upload files to the sever without using Ajax request avoiding your filter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM