JSP 페이지에서 JSTL 관련 에러 (HTTP 500)

Back-End/Problems 2019. 5. 24. 11:55
728x90
반응형

에러내용


JSP 에서 JSTL을 사용할 때 아래와 같은 에러메시지가 출력될때는


JSP, Servlet, JSTL 버전이 맞지 않기 때문에 파싱과정에서 에러가 나는 것이다.


  HTTP Status 500 – Internal Server Error



  Type Exception Report


  Message /MemberList.jsp (line: [22], column: [1]) According to TLD or attribute directive in tag file, attribute [items] does not accept 

  any expressions


  Description The server encountered an unexpected condition that prevented it from fulfilling the request.



JSP 페이지 상단에 설정한 JSTL 주소를 변경


jstl / core를 jsp / jstl / core로 변경


1
2
3
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%> //이렇게 변경한다.
cs



  JSTL JavaServer Pages Standard Tag Library )

  JSTL은 태그를 통해 JSP 코드를 관리하는 라이브러리로서, JSP의 가독성이 좋아집니다.


  라이브러리이기 때문에 JSTL을 사용하려면, 라이브러리를 다운로드 해서 추가해야 합니다. 

  그리고 JSP 페이지에서 아래의 세 줄을 맨 위에 작성해야 해야 JSTL 문법을 사용할 수 있습니다.


<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>



728x90
반응형
: