programming/jsp

서블릿 테스트

labj 2012. 3. 21. 13:39

servlettest4-nimba.war


ServletTest4.war 을 eclipse에서 import 해서 테스트 함

 

1. BarChart3DDemo.java servlet 파일 생성

- package chart

 

2. web.xml 설정

- tomcat 4.1.31 기준

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app id="WebApp_ID">

             <display-name>ServletTest4</display-name>

            

             <servlet>

                           <servlet-name>BarChart3DDemo</servlet-name>

                           <servlet-class>chart.BarChart3DDemo</servlet-class>

             </servlet>

            

             <servlet-mapping>

                           <servlet-name>BarChart3DDemo</servlet-name>

                           <url-pattern>/BarChart3DDemo.st</url-pattern>

             </servlet-mapping>

            

             <welcome-file-list>

                           <welcome-file>index.html</welcome-file>

                           <welcome-file>index.htm</welcome-file>

                           <welcome-file>index.jsp</welcome-file>

                           <welcome-file>default.html</welcome-file>

                           <welcome-file>default.htm</welcome-file>

                           <welcome-file>default.jsp</welcome-file>

             </welcome-file-list>        

</web-app>

 

웹브라우저 접속 url은 <servlet-mapping><url-pattern>의 값으로 설정함

 

3. 웹브라우저 접속

http://127.0.0.1/ServletTest4/BarChart3DDemo.st

 

'programming > jsp' 카테고리의 다른 글

XHTML  (0) 2012.03.23
톰캣 리눅스(유닉스) 콘솔 로그 보기  (0) 2012.03.21
prototype & scriptaculous 인 액션 3장 예제  (0) 2012.03.21
자바스크립트 class화 하기  (0) 2012.03.21
jsp로 xml문서 만들기  (0) 2012.03.21