Results 1 to 2 of 2

Thread: Fallback from VelocityViewResolver to JstViewResolver

  1. #1
    Join Date
    Apr 2005
    Location
    Umeå, Sweden
    Posts
    2

    Default Fallback from VelocityViewResolver to JstViewResolver

    Hi,
    I have started to migrate my app from jsp 2.0 to velocity. I want to be able to first resolve a velocity template, and if that fails load the corresponding jsp page. (/WEB-INF/velocity/start.vm -> doesn't exist -> try /WEB-INF/jsp/start.jsp).

    I've tried to subclass UrlBasedViewResolver for the jstl view, implementing the ordered interface (to load it last), and VelocityViewResolver, implementing the Ordered intererface, and returning null when catching any exceptions in loadView(). However, the VelocityViewResolver still crashes when it doesn't find the view instead of delegating to the next resolver in the chain. (Seems like the exception never is caught.)

    I don't want to use ResourceBundleViewResolver, since I just have to many views.

    Any suggestions?

    Thanks, Pontus

  2. #2
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

    Default

    I have a similar desire. I would like to use both Velocity and JSP pages. Velocity for simple output and JSP for forms and stuff.

    Tried JstView resolver the velocity resolver but to no avail.

Similar Threads

  1. Replies: 2
    Last Post: Sep 26th, 2005, 04:42 AM
  2. Replies: 2
    Last Post: May 12th, 2005, 12:55 PM
  3. Database fallback strategy
    By snowghost in forum Architecture
    Replies: 3
    Last Post: Apr 28th, 2005, 12:43 AM
  4. Replies: 2
    Last Post: Sep 5th, 2004, 04:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •