Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getContentType returns null inside doFilter method

843842Dec 5 2009 — edited Dec 10 2009
Hi,

I was just wondering if it was normal for getContentType to return Null inside the doFilter method:
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
   _contentType = servletRequest.getContentType(); // Keeps returning null
...
I am guessing that by the time the HTML arrives to the doFilter method it arrives as text data that has lost the type information which was supplied by the JSP?

Is anyone able to confirm this?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2010
Added on Dec 5 2009
6 comments
1,729 views