1. 개요
가우스 라이브러리 위치를 찾는 간단한 코드이다.
2. 코드
<%@page import="com.gauce.GauceDataSet"%> <%@page import="java.net.URL"%> <%@ page language="java" contentType="text/html; charset="UTF-8" pageEncoding="UTF-8"%> <% URL location = null; String cl = GauceDataSet.class.getName().replace('.', '/') + ".class"; ClassLoader loader = GauceDataSet.class.getClassLoader(); if (loader == null) { location = ClassLoader.getSystemResource(cl); } else { location = loader.getResource(cl); } %> <html> <head> <title>Gauce Library Location</title> </head> <body> <h1>Gauce Library Finder Version 1.0</h1> <hr> <b><%=location%></b> </body> </html>
3. URL 호출
http://100.100.100.100:7001/gauce40/select/select.jsp?X-UIClient=G40