Results 1 to 2 of 2

Thread: Is it possible to resolve a view from an external source or inputstream?

  1. #1
    Join Date
    Jun 2010
    Posts
    2

    Default Is it possible to resolve a view from an external source or inputstream?

    The scenario is that a remote application creates an almost complete JSP page, that our applicatino will consume over Http using something like HttpClient, the application will then add some more decoration, possibly via the backing model and then deliver the view as normal.

  2. #2
    Join Date
    Jun 2010
    Posts
    2

    Default

    Just for information I found a solution using velocity templates instead, utilising URLResourceLoader to supply vm templates over Http.



    Code:
    <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
            <property name="velocityProperties">
              <props>
              	<prop key="resource.loader">file, MYO</prop>
    	      
              	<prop key="MYO.resource.loader.class">org.apache.velocity.runtime.resource.loader.URLResourceLoader</prop>
                <prop key="MYO.resource.loader.root">http://static.content.com/static/</prop>
                <prop key="MYO.resource.loader.cache">false</prop>
                <prop key="MYO.resource.loader.modificationCheckInterval">0</prop>
                </props>
             </property>
        </bean>

Posting Permissions

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