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

質問編集履歴

1

ソース追加、別エラー発生

2016/02/28 13:17

投稿

junpi-ya
junpi-ya

スコア17

title CHANGED
File without changes
body CHANGED
@@ -60,7 +60,32 @@
60
60
  dispatcher.forward(request, response);
61
61
  }
62
62
  }
63
+ MMPC003form.java----------------------------------------------------------
64
+ package model;
63
65
 
66
+ public class MMPC003form {
67
+
68
+ private String email;
69
+ private String error;
70
+
71
+ public String getEmail() {
72
+ return email;
73
+ }
74
+
75
+ public void setEmail(String email) {
76
+ this.email = email;
77
+ }
78
+
79
+ public String getError() {
80
+ return error;
81
+ }
82
+
83
+ public void setError(String error) {
84
+ this.error = error;
85
+ }
86
+ }
87
+
88
+
64
89
  S007.java------------------------------------------------
65
90
  package validate;
66
91
 
@@ -101,4 +126,27 @@
101
126
  </body>
102
127
  </html>
103
128
  --------------------------------------------------------------
104
- よろしくお願いいたします。
129
+ よろしくお願いいたします。
130
+
131
+ 【追記】
132
+ 一番最後のMMPC004.jspのみ実行してみると、
133
+ HTTPステータス 500 - JSPのクラスをコンパイルできません: というエラーが出てきました!(泣)
134
+
135
+ type 例外レポート
136
+ メッセージ JSPのクラスをコンパイルできません:
137
+ 説明 The server encountered an internal error that prevented it from fulfilling this request.
138
+ 例外
139
+ org.apache.jasper.JasperException: JSPのクラスをコンパイルできません:
140
+
141
+ An error occurred at line: [14] in the generated java file: [C:\pleiades\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\MyManeger\org\apache\jsp\MMPC004_jsp.java]
142
+ Only a type can be imported. model.MMPC003form resolves to a package
143
+
144
+ JSPファイル: /MMPC004.jsp の中の4行目でエラーが発生しました
145
+ MMPC003form cannot be resolved to a type
146
+ 1: <%@ page language="java" contentType="text/html; charset=UTF-8"
147
+ 2: pageEncoding="UTF-8"%>
148
+ 3: <%@ page import="model.MMPC003form"%>
149
+ 4: <%MMPC003form mmpc003 = (MMPC003form) request.getAttribute("error");%>
150
+ 5: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
151
+ 6: <html>
152
+ 7: <head>