Tomcat 6.0 설정
Tomcat 6.0 설정
수정할 파일들..
1.Server.xml -포트 번호에 따라 호스팅
2.Web.xml -Servlet 실행 설정
3.Context.xml -JNDI 설정
4.Tomcat 6.0\lib에 ojdbc14.jar 파일 넣기
1.Server.xml 에 Service 추가
<Service name="Catalina2"> <Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8444" URIEncoding="UTF-8" useBodyEncodingForURI="true"/> <Connector port="8010" protocol="AJP/1.3" redirectPort="8444" URIEncoding="UTF-8"/> <Engine name="Catalina2" defaultHost="localhost"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <Host name="localhost" appBase="C:\web-tomcat" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> </Host> </Engine> </Service> -service name 과 engine name 동일하게 써줌 - Connector port 접속할 포트 번호 -appBase 물리적 경로 |
톰캣 6에서 .class 파일을 servlet에서 실행하는 방법. 톰캣 5.5 와 차이점이 있습니다. 2.1 web.xml 수정(모든 servlet 사용할 수 있도록 함) <!-- The mapping for the invoker servlet --> |
<Resource name="jdbc/testDb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@devcom:1521:ora10g" username="u_bol" password="ubol10ga" maxActive="20" maxIdle="10" maxWait="-1"/>
3.Context.xml 추가 - jndi설정
4.Tomcat 6.0\lib에 ojdbc14.jar 파일 복사