簡體   English   中英

是否可以通過同一工作區中的另一個項目調用另一個項目中可用的jsp

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

我的工作區中有兩個項目:projectA,projectB。 projectA的網絡流具有以下內容:

  <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>

一切正常。 事情是:如果我將以下內容添加到projectA'flow.xml中,那么它將無法正常工作

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

在這里,someJSP.jsp在projectB中(路徑是:/projectB/WebContent/WEB-INF/common/files/someJSP.jsp),而firstJSP.jsp在projectA中(路徑是:/ projectA / WebContent / WEB-INF / common /gifts/firstJSP.jsp)

那么可以在projectA的web.xml中調用projectB的jsp嗎?

不,這是不允許的。 最后,所有內容(類,jps,htmls ..)都打包到一個戰爭文件中,該文件與其他戰爭分開。

這應該是可能的。

在這里查看一些示例:

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

在您的情況下,您可能想要使用以下內容:

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

雖然據我所知,您可能希望在這一點上結束流程,但以下方法可能會更好:

<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"/>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM