Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

View Resolver doubt?

 
shai ban
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
New to Spring. Got stuck with Tiles.
How dispatchServlet will know that a particular view should be resolved with a particular resolver? eg. I am using two resolvers InternalResourceViewResolver or TilesViewResolver?
Now, I returned some view name that was supposed to resolved with TilesViewResolver but it got resolved with InternalResourceViewResolver and it tried to find that jsp. Whereas, actual jsp name should come after consulting TilesViewResolver! What's wrong here?
I am using plain JSPs also that doesn't have anything to do with Tiles. Should I use only plain JSPs or Tiles only?

Please explain. Let me know if you have any query.

Thanks.

NOTE:
Getting the below exception. Here Dispatcher servlet is calling InterviewViewResolver instead of TilesViewResolver? May be because of this attribute' title' is not visible there.



org.apache.tiles.template.NoSuchAttributeException: Attribute 'title' not found.
org.apache.tiles.template.DefaultAttributeResolver.computeAttribute(DefaultAttributeResolver.java:50)
org.apache.tiles.template.GetAsStringModel.resolveAttribute(GetAsStringModel.java:152)
org.apache.tiles.template.GetAsStringModel.execute(GetAsStringModel.java:110)
org.apache.tiles.jsp.taglib.GetAsStringTag.doTag(GetAsStringTag.java:261)
org.apache.jsp.WEB_002dINF.jsp.showTilePage_jsp._jspx_meth_tiles_005fgetAsString_005f0(showTilePage_jsp.java:117)
org.apache.jsp.WEB_002dINF.jsp.showTilePage_jsp._jspService(showTilePage_jsp.java:62)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 
Jhakda Velu
Ranch Hand
Posts: 167
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you set order property for the resolvers you added? Something like this


Lower value has higher priority


Jhakda
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic