私はWebアプリケーションの開発にstruts2を使用しています。
私はstruts2に必要なjarファイルをインクルードしていますが、strutsアクションクラスを呼び出すときには404エラーがスローされています。
コンソールにエラーはなく、ブラウザはstruts.xmlがアクションクラスを呼び出すときに表示される.action拡張機能を表示しません。
私はjdk 1.6
とstruts 2.0
を使用しています。
このすべての責任を負う瓶がありません。私は単にここ
<s:form action = "Mergexmlaction" method = "post"/>
Struts 2アクションクラスが動作しない
から関数を呼び出していますJSPで
私のstruts.xmlとweb.xml
struts.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.multipart.maxSize" value="6000000000" />
<package name="default" namespace="/jsp" extends="struts-default">
<action name="Mergexmlaction" class="com.hm.merge.mergeaction.Mergexmlaction">
<result name="success" >/jsp/Result.jsp</result>
<result name="error" >/jsp/Browse_multiplexmlfiles.jsp</result>
<interceptor-ref name="fileUpload">
<param name="maximumSize">600000000</param>
</interceptor-ref>
</action>
</package>
</struts>
ウェブです。 xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="xml_file_merging" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>xml_file_merging</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>jsp/Browse_multiplexmlfiles.jsp</welcome-file>
</welcome-file-list>
</web-app>
web.xmlについてはどうですか?あなたは支柱のディスパッチャーをそこに置いたのですか? – Thomas
多くの情報が必要ですか?あなたのweb.xmlについて、あなたがこの情報を取得したときに打つURL。 –
私のstrutsとweb.xmlファイルを追加しました。
jsp私は単純にsから関数を呼び出しています: –