cancel
Showing results for 
Search instead for 
Did you mean: 

SmartEdit - JspIncludeComponent - .jsp not rendered because of inexisting model

Former Member
1,383
WARN[hybrisHTTP16] [DefaultCMSComponentRendererRegistry] Error processing component tag. currentComponent [JspIncludeComponentModel (8796125004860@1)] exception: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'calculatorForm' available as request attribute

When trying to access the page in SmartEdit, it fails to render the .jsp associated to the JspIncludeComponentModel.

And this is because when trying to render a tag, if that particular tag has a refference to an attribute of / the model itself, it fails because the form is not on the model / request.

Problem is that SmartEdit doesn't use the custom controller for this and the model for the form is missing.

Do you guys have any suggestion of how this can be fixed, in order for the .jsp to be displayed successfully?

View Entire Topic

Hi,

To solve this, you need to instruct smartedit to use your custom request mapping.

This can be done by adding an entry to defaultPreviewUrlResolverPageMappings util map in spring-mvc-config.xml of your storefront.

Eg:
<entry key="your-page-label" value="/your-controller-request-mapping"/>

Thanks, Siddarth

phoude
Participant
0 Kudos

This did the trick for me. Thanks!! By the way where is the documentation for defaultPreviewUrlResolverPageMappings? I could not find any.

0 Kudos

Hi Pascal
Not everything is documented 🙂