質問するログイン新規登録

質問編集履歴

1

struts-config.xml の修正。サーバー起動時のエラーメッセージの追加。

2018/02/22 12:43

投稿

add-1914
add-1914

スコア16

title CHANGED
File without changes
body CHANGED
@@ -64,4 +64,123 @@
64
64
  環境
65
65
  struts1.3.10
66
66
  Tomcat6.0
67
- java 6
67
+ java 6
68
+
69
+
70
+ 遅くなりまして申し訳ございません
71
+ 以下設定ファイルになります。
72
+ ```struts-config.xml
73
+ コード
74
+ <?xml version="1.0" encoding="Shift_JIS" ?>
75
+ <!DOCTYPE struts-config PUBLIC
76
+ "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
77
+ "http://struts.apache.org/dtds/struts-config_1_3.dtd">
78
+ <struts-config>
79
+ <!-- ========================= Form Bean Definitions -->
80
+ <form-beans>
81
+ <form-bean name="HelloForm" type="hello.form.HelloForm" />
82
+ </form-beans>
83
+ <!-- ========================= Global Exception Definitions -->
84
+ <global-exceptions>
85
+
86
+ </global-exceptions>
87
+ <!-- ========================= Global Forward Definitions -->
88
+ <global-forwards>
89
+ </global-forwards>
90
+ <!-- ========================= Action Mapping Definitions -->
91
+ <action-mappings>
92
+ <!-- 入力画面 -->
93
+ <action
94
+ attribute ="HelloForm"
95
+ input ="/jsp/who.jsp"
96
+ name ="HelloForm"
97
+ path ="/InputConfirmAction"
98
+ type ="hello.InputConfirmAction"
99
+ scope ="session"
100
+ validate ="true">
101
+ <forward name="success" path="/jsp/user.jsp"/>
102
+ <forward name="errors" path="/jsp/who.jsp"/>
103
+ </action>
104
+ <!-- 確認画面 -->
105
+ <action
106
+ input ="/jsp/user.jsp"
107
+ name ="HelloForm"
108
+ path ="/helloAction"
109
+ type ="hello.HelloAction"
110
+ scope ="session"
111
+ validate ="false">
112
+ <forward name="success" path="/jsp/Thanks.jsp"/>
113
+ </action>
114
+ </action-mappings>
115
+ <!-- ========================== Message Resources Definitions -->
116
+ <message-resources parameter="/WEB=INF/ApplicationResouce_ja"></message-resources>
117
+ <!-- ========================== Plug Ins Configuration -->
118
+ <!-- ========================== Tiles plugin -->
119
+ <!-- ========================== Validator plugin -->
120
+ <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
121
+ <set-property
122
+ property="pathnames"
123
+ value="/org/apache/struts/validator/validator-rules.xml,
124
+ /WEB-INF/validation.xml"/>
125
+ </plug-in>
126
+ </struts-config>
127
+
128
+ ```
129
+ ```以下サーバ起動時のエラーメッセージです。
130
+ type 例外レポート
131
+
132
+ メッセージ An exception occurred processing JSP page /jsp/who.jsp at line 8
133
+
134
+ 説明 The server encountered an internal error that prevented it from fulfilling this request.
135
+
136
+ 例外
137
+
138
+ org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/who.jsp at line 8
139
+
140
+ 5: prefix="bean" %>
141
+ 6: <html:html>
142
+ 7: <head>
143
+ 8: <title><bean:message key="survey"/></title>
144
+ 9: </head>
145
+ 10: <body>
146
+ 11: <h1><bean:message key="PleaseSurvey"/></h1>
147
+
148
+
149
+ Stacktrace:
150
+ org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:525)
151
+ org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
152
+ org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
153
+ org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
154
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
155
+ filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
156
+ 原因
157
+
158
+ javax.servlet.ServletException: javax.servlet.jsp.JspException: キー "survey" に対応するメッセージが見つかりません
159
+ org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:868)
160
+ org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:797)
161
+ org.apache.jsp.jsp.who_jsp._jspService(who_jsp.java:99)
162
+ org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
163
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
164
+ org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
165
+ org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
166
+ org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
167
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
168
+ filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
169
+ 原因
170
+
171
+ javax.servlet.jsp.JspException: キー "survey" に対応するメッセージが見つかりません
172
+ org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:233)
173
+ org.apache.jsp.jsp.who_jsp._jspx_meth_bean_005fmessage_005f0(who_jsp.java:170)
174
+ org.apache.jsp.jsp.who_jsp._jspx_meth_html_005fhtml_005f0(who_jsp.java:123)
175
+ org.apache.jsp.jsp.who_jsp._jspService(who_jsp.java:90)
176
+ org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
177
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
178
+ org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
179
+ org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
180
+ org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
181
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
182
+ filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
183
+ ```
184
+ やはり起動時にメッセージリソースファイルを読み込めず、file.setCharaterEncordingFilterでおちてしまいます。
185
+
186
+ よろしくお願いいたします。