반응형
어플리케이션 배포 위치에 아래 소스 코드를 jarcheck.jsp 파일로 만들어서 저장한다.
class 파일이 어떤 jar 파일에서 사용되는지 확인이 가능하다.
<%@ page import="java.util.*"%>
<%
String reqName = null;
java.net.URL classUrl = null;
reqName = request.getParameter("reqName");
if (reqName == null || reqName.trim().length() == 0) {
reqName = "";
}
%>
<html>
<body onLoad="document.form1.reqButton.focus();">
<br><hr align=center><br>
[Example]<br>
Document Builder Factory - org.apache.xerces.jaxp.DocumentBuilderFactoryImpl<br>
SAX Parser Factory - org.apache.xerces.jaxp.SAXParserFactoryImpl<br>
Transformer Factory - org.apache.xalan.processor.TransformerFactoryImpl<br>
<br>
(ex) org.apache.xerces.jaxp.DocumentBuilderFactoryImpl<br>
<form action="findClass.jsp" name=form1>
<input type=text name="reqName" value="<%= reqName %>">
<input type=submit name=reqButton value="FIND">
</form>
<%
if (reqName.trim().length() != 0) {
%>
[Search Result]
<br>
<%
reqName = reqName.replace('.', '/').trim();
reqName = "/" + reqName + ".class";
classUrl = this.getClass().getResource(reqName);
if (classUrl == null) {
out.println(reqName + " not found");
} else {
out.println("<b>" + reqName + "</b>: [" +
classUrl.getFile() + "]\n"
);
}
out.println("<br>");
}
%>
반응형
'JAVA' 카테고리의 다른 글
[JAVA] HTTP 통신간 지원하는 기본 TLS 버전 (0) | 2024.02.05 |
---|---|
[JAVA] java.io.IOException: User limit of inotify instances reached or too many open files (0) | 2023.12.28 |
[JAVA] JAR, WAR, EAR 정리 (0) | 2023.08.14 |
[JAVA] JAR(JAVA Archive) 정리 (0) | 2023.06.26 |
[JAVA] JVM(Java Virtual Machine) 정리 (0) | 2023.06.26 |