is it possible to call a jsp available in a different project by another project in the same workspace

860 Views Asked by At

I have two projects in my workspace: projectA, projectB. The web-flow of projectA has got the following:

  <view-state id="hello" view="projectA/firstJSP" >
  </view-state>

<action-state id="checkingvalues">
  <evaluate expression="somethingIsthere" />
     <transition on="success" to="hello" />
     <transition on="error" to="bye" />
</action-state>

Its all working fine. The thing is: if I add the following to the projectA'flow.xml then, it is not working

<view-state id="bye" view="projectB/someJSP" >
  </view-state>

Here, someJSP.jsp is in projectB(path is:/projectB/WebContent/WEB-INF/common/files/someJSP.jsp) and firstJSP.jsp is in projectA(path is:/projectA/WebContent/WEB-INF/common/gifts/firstJSP.jsp)

So is it possible to call projectB's jsp in projectA's web.xml?

2

There are 2 best solutions below

1
On BEST ANSWER

No it is not allowed. At the end everything (classes, jps, htmls ..) is packed into a war file that is separated from other wars.

3
On

This should be possible.

See some examples here:

http://www.jonathanhui.com/spring-web-flow-web-flow-definiation

In your case you probably want to use something like the following:

<view-state id="bye"
    view="externalRedirect:serverRelative:projectB/someJSP">

Although as I guess you would want to end the flow at this point then the following might be better:

<action-state id="checkingvalues">
  <evaluate expression="somethingIsthere" />
     <transition on="success" to="hello" />
     <transition on="error" to="bye" />
</action-state>

<end-state id="bye" view="externalRedirect:serverRelative:projectB/someJSP"/>