aspose file tools*
The moose likes Struts and the fly likes Multipart request with HttpServletResponseWrapper (java.lang.NullPointerException) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multipart request with HttpServletResponseWrapper (java.lang.NullPointerException)" Watch "Multipart request with HttpServletResponseWrapper (java.lang.NullPointerException)" New topic
Author

Multipart request with HttpServletResponseWrapper (java.lang.NullPointerException)

Csaba Palhidy
Greenhorn

Joined: Jun 03, 2014
Posts: 2
Hy All,

Sorry, I don't speak very good English.
My problem:
-I do in Filter:

If the request type is multipart then I get an error message:

Only multipart request throw exception and if i skip the wrapper is good too.
Action is executed, get and set method is executed. Jsp creating throw the exception. (Struts 2)

Any idea?

Thanks,
Palidy
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8873
    
    8

Welcome to the JavaRanch.

These lines in your error:

have me thinking this is a text resource problem. The File Upload Interceptor uses several text properties to display errors. Do you have those properties declared? (if that is the problem I would be surprised that it does not fail more gracefully).


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Csaba Palhidy
Greenhorn

Joined: Jun 03, 2014
Posts: 2
Hy hy!

Thanks
Joe Ess wrote:have me thinking this is a text resource problem. The File Upload Interceptor uses several text properties to display errors. Do you have those properties declared? (if that is the problem I would be surprised that it does not fail more gracefully).

Unfortunately, It's not help. Problem remains the same.
Any other idea?

If this running in debug mode, this drop exception in console too:
This step is thrown: WebAppServletContext.execute(ServletRequestImpl, ServletResponseImpl) line: 2183
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8873
    
    8

Unfortunately, It's not help. Problem remains the same.


I don't think so. The previous error was:


This error is:


So you fixed the text resource problem.
You have two problems:
1. Your request is failing for some reason.
2. You cannot communicate this error, which causes other errors.
Perhaps catching the exception thrown in doFilter and checking that exception's cause (invoke getCause, print its stack trace, then call getCause on it because exceptions can be chained together) would shed some light on the issue. I'd like to see your filter source too.
 
 
subject: Multipart request with HttpServletResponseWrapper (java.lang.NullPointerException)