wood burning stoves 2.0*
The moose likes Spring and the fly likes View Resolver doubt? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "View Resolver doubt?" Watch "View Resolver doubt?" New topic
Author

View Resolver doubt?

shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
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

Joined: Feb 26, 2008
Posts: 166
Did you set order property for the resolvers you added? Something like this


Lower value has higher priority


Jhakda


If I become filthy rich, I'll sponsor research for painless dental treatment at Harvard Medical School. Thats why,I'm learning Java.I have 32 teeth, 22 are man made.
 
GeeCON Prague 2014
 
subject: View Resolver doubt?