Eclipseの動的プロジェクトを使用して
javaの道②基本操作
こちらのサイトのプログラムをコピペして実行しましたがエラー画面となります。
ID,パスワードにそれぞれ「java」「road」を入力して「送信」ボタンを押すと
HTTPステータス 404 - /struts_study001/welcome.jsp typeステータスレポート メッセージ/struts_study001/welcome.jsp 説明The requested resource is not available. Apache Tomcat/9.0.0.M9
という画面が出ます。ちなみにこの時のURLは
http://localhost:8080/struts_study001/authentication.do
となっています。
正常に表示するにはどうすればいいでしょうか?
もしかしたらweb.xmlが原因かもしれないので、そのコードも記載しておきます。
lang
1<?xml version="1.0" encoding="ISO-8859-1"?> 2<!-- 3 Licensed to the Apache Software Foundation (ASF) under one or more 4 contributor license agreements. See the NOTICE file distributed with 5 this work for additional information regarding copyright ownership. 6 The ASF licenses this file to You under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with 8 the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 See the License for the specific language governing permissions and 16 limitations under the License. 17--> 18 19 <!DOCTYPE web-app PUBLIC 20 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 21 "http://java.sun.com/dtd/web-app_2_3.dtd"> 22 23<web-app> 24 <display-name>Struts Blank Application</display-name> 25 26 <!-- Standard Action Servlet Configuration --> 27 <servlet> 28 <servlet-name>action</servlet-name> 29 <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> 30 <init-param> 31 <param-name>config</param-name> 32 <param-value>/WEB-INF/struts-config.xml</param-value> 33 </init-param> 34 <load-on-startup>2</load-on-startup> 35 </servlet> 36 37 38 <!-- Standard Action Servlet Mapping --> 39 <servlet-mapping> 40 <servlet-name>action</servlet-name> 41 <url-pattern>*.do</url-pattern> 42 </servlet-mapping> 43 44 45 <!-- The Usual Welcome File List --> 46 <welcome-file-list> 47 <welcome-file>login.jsp</welcome-file> 48 </welcome-file-list> 49 50</web-app> 51
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/10/11 21:45