• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to handle this seneraio is Spring framework?

 
Ranch Hand
Posts: 674
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there

I have problem in working on viewHandle in SpringFramework.
suppose I have my all views file inside JSP folder then I can do like




and in xml file something like this


<!-- Declare a view resolver -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/jsp/" p:suffix=".jsp" />




but suppose I have organized my JSP files in many category as
category1(This contain some JSP files)
category2(This contain some JSP file)
.
.
.

So how can I make viewResolver in this case?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same question. a bit difference, I am using java to configure my MVC project, the configuration is like


and I am thinking , what if some of my .jsp is not in /views/, but one hierarchy upper than that.
don't know how to do this yet.
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have something like, /WEB-INF/jsp/category1, /WEB-INF/jsp/category2, then you can configure your ViewResolver suffix with /WEB-INF/jsp/ and return qualified names like "category1/file.jsp" or "category2/file.jsp" wherever needed.
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic