22.07.24 00:27 작성
·
2.3K
0
This application has no explicit mapping for /error, so you are seeing this as a fallback.
username=kim&age=123]
2022-07-24 00:28:25.917 ERROR 11516 --- [nio-8080-exec-2] o.a.c.c.C.[.[localhost].[/].[jsp] : Servlet.service() for servlet [jsp] in context with path [] threw exception [Unable to compile class for JSP:
An error occurred at line: [14] in the generated java file: [/private/var/folders/1v/v3txby4x02v_9pyk_dr__mxh0000gn/T/tomcat.8080.1956174225538917680/work/Tomcat/localhost/ROOT/org/apache/jsp/jsp/members/save_jsp.java]
Only a type can be imported. hello.servlet.domain.member.MemberRepository resolves to a package
An error occurred at line: [8] in the jsp file: [/jsp/members/save.jsp]
MemberRepository cannot be resolved to a type
5: <%
6: // request, response 사용 가능
7:
8: MemberRepository memberRepository = MemberRepository.getInstance();
9:
10: System.out.println("save.jsp");
11: String username = request.getParameter("username");
An error occurred at line: [8] in the jsp file: [/jsp/members/save.jsp]
MemberRepository cannot be resolved
5: <%
6: // request, response 사용 가능
7:
8: MemberRepository memberRepository = MemberRepository.getInstance();
9:
10: System.out.println("save.jsp");
11: String username = request.getParameter("username");
Stacktrace:] with root cause
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [14] in the generated java file: [/private/var/folders/1v/v3txby4x02v_9pyk_dr__mxh0000gn/T/tomcat.8080.1956174225538917680/work/Tomcat/localhost/ROOT/org/apache/jsp/jsp/members/save_jsp.java]
Only a type can be imported. hello.servlet.domain.member.MemberRepository resolves to a package
An error occurred at line: [8] in the jsp file: [/jsp/members/save.jsp]
MemberRepository cannot be resolved to a type
5: <%
6: // request, response 사용 가능
7:
8: MemberRepository memberRepository = MemberRepository.getInstance();
9:
10: System.out.println("save.jsp");
11: String username = request.getParameter("username");
An error occurred at line: [8] in the jsp file: [/jsp/members/save.jsp]
MemberRepository cannot be resolved
5: <%
6: // request, response 사용 가능
7:
8: MemberRepository memberRepository = MemberRepository.getInstance();
9:
10: System.out.println("save.jsp");
11: String username = request.getParameter("username");
답변 1
2022. 07. 25. 18:31
감사합니다! 문제가 해결되었습니다.