Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 905975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:18:35+00:00 2026-05-15T16:18:35+00:00

I want to make spring MVC 3.0.3 portlet using DispatcherPortlet class With JSON support.

  • 0

I want to make spring MVC 3.0.3 portlet using DispatcherPortlet class With JSON support. So, i added following configuration in the spring context file.

<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">

text/html

Without this, if i use the ‘InternalResourceViewResolver’ only then it runs fine and i am able to use the portlet. But with this bean defined, i got the following error on tomcat startup.

I googled around and find a link stating that this bean with JSON only works with servlets in the latest spring vesion. please check the link as well.

http://jira.springframework.org/browse/SPR-7344 (JSON issue for portlets…)

http://jira.springframework.org/browse/SPR-6932?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs

Also please check the error pasted below. Help me…
thanks.

:ERROR:

java.lang.IllegalArgumentException: Object of class [org.springframework.web.portlet.context.PortletRequestAttributes] must be an instance of class org.springframework.web.context.request.ServletRequestAttributes

please check the log

 Caused by: java.lang.IllegalArgumentException: Object of class [org.springframework.web.portlet.context.PortletRequestAttributes] must be an instance of class org.springframework.web.context.request.ServletRequestAttributes
 at org.springframework.util.Assert.isInstanceOf(Assert.java:337)
 at org.springframework.util.Assert.isInstanceOf(Assert.java:319)
 at org.springframework.web.servlet.view.ContentNegotiatingViewResolver.resolveViewName(ContentNegotiatingViewResolver.java:363)
 at org.springframework.web.portlet.DispatcherPortlet.resolveViewName(DispatcherPortlet.java:1110)
 at org.springframework.web.portlet.DispatcherPortlet.render(DispatcherPortlet.java:1052)
 at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:761)
 at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:522)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:18:36+00:00Added an answer on May 15, 2026 at 4:18 pm

    ContentNegotiatingViewResolver doesn’t work with portlets, only servlets.

    As a general rule, many servlet API classes in Spring have a portlet equivalent, e.g.

    • org.springframework.web.servlet.HandlerAdapter
    • org.springframework.web.portlet.HandlerAdapter

    You have to make sure that you use the right one – the servlet and portlet APIs are completely incompatible.

    However, since Spring 2.5, the portlet framework has been neglected (probably because it’s very rarely used), and newer parts of the servlet MVC API have not been included in the portlet MVC API.

    It would seem that if you want to do what you’re trying to do, you’re going to have to do a lot of it yourself. You might be able to copy some of the code from ContentNegotiatingViewResolver and related classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Spring MVC 3 and I want to make an AJAX call
I'm trying to make this 2-player web game application using Spring MVC. I have
We are currently using Spring MVC to implement REST web services. We now want
I want to program against the Spring Portlet MVC framework in liferay running under
i'm trying to make a log in. I'm using the Spring MVC framework. I
I am using Spring MVC and Hibernate. I want to use the OpenSessionInViewFilter to
I want to build an MVC app using Spring (first timer here). As such
It's my first time developing using MVC and I want to make it secure.
I have this json string: $row['medium'] = {\medium\:13|17|1|14, \medium_sub\:21}; now I want to make
I want make datetimepicker in my project. Using jquery how it is possible? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.