Announcement Announcement Module
Collapse
No announcement yet.
JSP Views residing outside the servlet container Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSP Views residing outside the servlet container

    I'm working on an applications which requires me to have some jsp files situated outside the webapps folder on the servlet container (because we don't want them to disappear if we have to redeploy the webapp)

    Is there some combination of view resolver(s) and handler mapping bean(s) that can do this for me? I also have quite a few jsp's in /WEB-INF/jsp, and I'm using InternalResourceViewResolver and SimpleUrlHandlerMapping for this, so I guess I have to use several view resolvers and/or handler mappings. To make it even more complicated, the names of the jsp's outside the webapps directory are dynamic, so I can't hard code them either.

    Does anyone have any suggestions? I was thinking that I could point the view to some generic jsp page and have the page include the page residing outside the container, but this sounds like a hack. Is there any "proper" way of doing this in Spring?

  • #2
    Using the JstlView, or InternalResourceView is conceptually the right thing to do.

    What happens if you specify the fully qualified url to the view?

    BTW; not clear on why you want this

    Comment


    • #3
      Originally posted by yatesco
      Using the JstlView, or InternalResourceView is conceptually the right thing to do.
      I don't understand how I'm supposed to do that. According to my view resolver now (listed below), all view exists in the /WEB-INF/jsp folder. How can I change it so that only some views are there, and some views are somewhere else?

      View resolver xml from x-servlet.xml:
      Code:
      <bean id="viewResolver" 
      	      class="org.springframework.web.servlet.view.InternalResourceViewResolver">
      		<property name="prefix">
      			<value>/WEB-INF/jsp/</value>
      		</property>
      		<property name="suffix">
      			<value>.jsp</value>
      		</property>
      	</bean>
      Originally posted by yatesco
      BTW; not clear on why you want this
      It's a web presentation application. A power user can make his or her own web presentation based on a few XML files and some jsp pages, which the power user supply. The jsp's belong to the presentation itself, so they have different content and can even have different names, all depending on the person making the presentation. It's some sort of research thing on the university, which will possibly represent a new paradigm in web presentations blah blah blah - you know the drill

      Anyway, hope I was clear on why I want it. Now to how I make it happen

      Comment

      Working...
      X