1. /WEB-INF/tags 폴더 : "태그 파일" 기반의 커스텀태그

2. /WEB-INF/tld 폴더 : "핸들러 클래스" 기반의 커스텀태그

 

/WEB-INF/tags/* → /app_config/tags/* 로 경로를 변경할 수 있을까? 

확인한 바로는 이동 불가하다.

 

참고 문서 : https://docs.oracle.com/javaee/1.4/tutorial/doc/JSPTags5.html

Tag File Location

Tag files can be placed in one of two locations: in the /WEB-INF/tags/ directory or subdirectory of a web application or in a JAR file (see Packaged Tag Files) in the /WEB-INF/lib/ directory of a web application. Packaged tag files require a tag library descriptor (see Tag Library Descriptors), an XML document that contains information about a library as a whole and about each tag contained in the library. Tag files that appear in any other location are not considered tag extensions and are ignored by the web container.

 

 

 

/WEB-INF/tld/* → /app_config/tld/* 로 경로를 변경할 수 있을까? 

가능하다.

 

web.xml 파일에서 아래와 같이 경로를 설정하면 된다.

<jsp-config>
	<taglib>
		<taglib-uri>
			http://abcdefg.co.kr
		</taglib-uri>
		<taglib-location>
			/app_config/tld/abcdefg.tld
		</taglib-location>    
	</taglib>
</jsp-config>

<welcome-file-list>
        <welcome-file>/</welcome-file>
</welcome-file-list>

 

WebContent - WEB-INF/tags

                 - app_config/tld

 

위와 같이 WebContent 하위에서 이동은 가능하지만 그 외 이동은 불가하다.

예를 들어 특정 외부 폴더 (C:/project/Appserver/tomcat/app_config/tld) 로 이동은 안된다.

'JSP' 카테고리의 다른 글

[JSP] cannot be resolved to a type 오류 해결  (0) 2020.10.26

+ Recent posts