ActionForward

ActionForwardで、遷移先ページを直接指定もできる。

ActionForward (Apache Struts API Documentation)

まず、いったん、

これを入れるように。
これを入れるように。

これを入れるように。

ディレクトリ構成は最初はこんな感じで。
ディレクトリ構成は最初はこんな感じで。

ディレクトリ構成は最初はこんな感じで。

libの下にstrutsのjarをぶちまける。
libの下にstrutsのjarをぶちまける。

libの下にstrutsのjarをぶちまける。

settings.jsonはこうする。
settings.jsonはこうする。

settings.jsonはこうする。

build.xml
build.xml

build.xml

こう。

index.jsp
index.jsp

index.jsp

こう。

MainAction.java
MainAction.java

MainAction.java

こう。

struts-config.xml
struts-config.xml

struts-config.xml

こう。

web.xml
web.xml

web.xml

こう。

パレットコマンドでAdd Local Server出ないので、なんでだろうとおもったら、Enable(workspace)を押さないと認識しない。
パレットコマンドでAdd Local Server出ないので、なんでだろうとおもったら、Enable(workspace)を押さないと認識しない。

パレットコマンドでAdd Local Server出ないので、なんでだろうとおもったら、Enable(workspace)を押さないと認識しない。

出た
出た

出た

tomcat8のディレクトリを選択
tomcat8のディレクトリを選択

tomcat8のディレクトリを選択

そのままFinish
そのままFinish

そのままFinish

tomcat8追加された
tomcat8追加された

tomcat8追加された
error.jspは、

こう。

bg1@vbox:~/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward$ ant war
Buildfile: /home/bg1/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward/build.xml

clean:

compile:
    [mkdir] Created dir: /home/bg1/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward/build/WEB-INF/classes
    [javac] /home/bg1/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward/build.xml:21: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 1 source file to /home/bg1/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward/build/WEB-INF/classes

copy-web:
     [copy] Copying 24 files to /home/bg1/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward/build

war:
    [mkdir] Created dir: /home/bg1/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward/dist
      [war] Building war: /home/bg1/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward/dist/ActionForward.war

BUILD SUCCESSFUL
Total time: 2 seconds
bg1@vbox:~/project/cloud/github.com/Sample/struts/ActionForward/ActionForward/src/ActionForward$

ant warして、

Run on Server
Run on Server

Run on Server

直接index.jspが表示された
直接index.jspが表示された

直接index.jspが表示された

Sample/struts/ActionForward/ActionForward/src/ActionForward at master · bg1bgst333/Sample · GitHub