Quantcast
Channel: OKWAVE 閲覧数の多い質問(Java/253)【本日】
Viewing all articles
Browse latest Browse all 68675

教えてください:strutsのhtml:formタグがjspに展開された状態の、actionの値について

$
0
0
java初心者です。 どなたか教えていただけませんでしょうか? JAVAのstrutsを使用してソフトを作成しています。 JSPに記載した「<html:form action="/authentication" focus="id"> 」 との記述が、WEB(IE)に展開されたソースを見ると、「<form name="AuthenticationForm" method="post" action="/strutsTest/authentication">」 に変換されています。 action="/authentication"と記述しているにもかかわらず、 action="/strutsTest/authentication"と展開されているのですが /strutsTestが自動的に付与されているのは、なぜなのでしょうか? なにか設定するところがあるのでしょうか? ※struts-config.xmlに指定したpathと一致しない為、404NotFoundになるので自動設定しないように変更したいのです。 ちなみに環境は struts-1.3.10 Apache Tomcat 6.0.14 Server EclipsVersion: 3.4.2 pakage名:struts プロジェクト名:strutsTest struts-config.xmlの設定   <form-beans> <form-bean name="AuthenticationForm" type="struts.AuthenticationForm"/> </form-beans> <global-exceptions> </global-exceptions> <global-forwards> <forward name="fail" path="/login.jsp"/> </global-forwards> <action-mappings> <action path="/authentication" name="AuthenticationForm" type="struts.AuthenticationAction" scope="session"> <forward name="success" path="/welcome.jsp"/> <forward name="fail" path="/login.jsp"/> </action> </action-mappings> login.jsp <%@ page contentType="text/html; charset=Windows-31J" %> <%@ taglib uri="/tags/struts-bean" prefix="bean" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> <html:html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Windows-31J"/> <title>ログイン画面</title> </head> <body> <html:errors/> ID・パスワードを入力してください。 <html:form action="/authentication" focus="id"> <html:text property="id" size="16"/> <br> <html:password property="pas" size="16" redisplay="false" /> <br> <html:submit property="submit" value="送信"/> <html:reset value="リセット"/> </html:form> </body> </html:html> 動作順は、login.jsp => AuthenticationAction.class => welcome.jsp です。 よろしくお願いします。

Viewing all articles
Browse latest Browse all 68675

Trending Articles