태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.


Apache 서버 파일 리스트 숨기기


directory_listing

웹사이트 방문자들이 파일이나 이미지를 다운로드할때 보여지는 주소, 예를 들어 이미지 주소가
http://www.guitina.com/wp-content/uploads/blockberry.jpg 일때 http://www.guitina.com/wp-content/uploads/ 를 주소창에 입력하면
그 디렉토리 안에 있는 모든 파일들이 보여질때가 있다.

이런 노출을 방지하기 위해서

1. 각 디렉토리마다 index 파일을 넣기
2. 각 파일에 권한 설정을 해주기
3. Apache <Directory> 설정을 바꿔 숨기기

만약 Apache를 처음 실행하고 이 설정을 바꿔주지 않으면 모든 파일이 노출된다.

내 경우는 vhost를 자주 사용해서 사이트 모든 파일 목록을 보이지 않게 설정하는데 3번의 경우를 자주 이용한다.

1.< Directory />
2.Options Indexes FollowSymLinks
3.AllowOverride All
4.< / Diretory>

Apache Directory Options의 처음 값 중에 Indexes 지워주면

1.< Directory />
2.Options FollowSymLinks
3.AllowOverride All
4.< / Directory >

이 사이트내 Index 목록 볼 수 없게 된다.

이때 중요한 것은 혹시 사이트내 .htaccess 파일이 있고
.htaccess 파일에서 Options Indexes를 설정해준다면 위 코드에서 AllowOverride All 설정때문에
파일 리스트가 보인다.

특정 폴더만 이 옵션을 사용하려면

1.< Directory / www/ folder>
2.Options Indexes FollowSymLinks
3.AllowOverride All
4.< / Directory >

위 코드와 같이 폴더를 지정해주면 된다.

출처: http://www.guitina.com/category/it/apache/

top

Trackback Address :: http://www.ssial.com/trackback/294 관련글 쓰기

  1. Chanel Outlet 2011/09/17 21:29 댓글주소 | 수정/삭제 | 댓글

    vTime is what you make of it.

  2. Burberry Bags 2011/10/13 17:10 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog! From time to time students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. Thanks.

  3. Coach Outlet Online 2011/11/15 12:49 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog ! It's very good and thank you for sharing it !

  4. Coach Outlet Online 2011/11/15 12:49 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog ! It's very good and thank you for sharing it !

  5. abercrombie 2011/12/13 21:17 댓글주소 | 수정/삭제 | 댓글

    I think the author’s writing is very good, although the point of view a little bit different, but really is a good article, and the author can hope to have time to discuss some problems.

  6. abercrombie france 2011/12/13 21:17 댓글주소 | 수정/삭제 | 댓글

    This article is well written ,give a person very deep impression, I really have no language to describe it, I hope the authors make persistent efforts, come on!.

Write a comment


http://java.sun.com/javaee/5/docs/tutorial/doc/index.html
top

Trackback Address :: http://www.ssial.com/trackback/230 관련글 쓰기

  1. Chanel Outlet 2011/09/17 21:44 댓글주소 | 수정/삭제 | 댓글

    Time is what you make of it.

  2. Burberry Bags 2011/10/13 17:10 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog! From time to time students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. Thanks.

  3. Coach Outlet Online 2011/11/15 12:21 댓글주소 | 수정/삭제 | 댓글

    It's very good!Thank you for sharing it!I like buying handbags of the internet website:http://www.mycoachoutletstoreonline.com

  4. Coach Factory Online 2011/12/11 22:50 댓글주소 | 수정/삭제 | 댓글

    댓글주소 | 수정/삭제 | 댓글

  5. abercrombie 2011/12/13 21:17 댓글주소 | 수정/삭제 | 댓글

    I think the author’s writing is very good, although the point of view a little bit different, but really is a good article, and the author can hope to have time to discuss some problems.

  6. abercrombie france 2011/12/13 21:17 댓글주소 | 수정/삭제 | 댓글

    This article is well written ,give a person very deep impression, I really have no language to describe it, I hope the authors make persistent efforts, come on!.

  7. Coach Factory Outlet Online 2011/12/14 15:55 댓글주소 | 수정/삭제 | 댓글

    Great Coach Factory Outlet Online
    . A lot of useful information here. I’m sending it to some friends!

  8. Coach Factory Outlet Online 2011/12/14 15:56 댓글주소 | 수정/삭제 | 댓글

    Great Coach Factory Outlet Online
    . A lot of useful information here. I’m sending it to some friends!

  9. cheap jordan 13 2012/01/09 00:35 댓글주소 | 수정/삭제 | 댓글

    an manufacturer specifically prepares a very good aluminum

  10. Burberry Shop Online 2012/01/11 15:21 댓글주소 | 수정/삭제 | 댓글

    <p><strong><a href="http://www.burberrydiscount.org/">Burberry Discount</a></strong> developed a local community utilizing bags to write about in her appreciation and consciousness and also to preserve people within your loop about high quality replica artist handbag sites, such as touch bags.<br>
    <a href="http://www.burberryoutletshoponline.com/"><strong>Burberry Shop Online</strong></a> puts inside the work to can be found throughout only the extremely perfect high quality sites, steering toward magnitude of placing her on the internet protection inside the collection by attempting to purchase a replica artist handbag by method of the website itself.<br>
    <a href="http://www.onlinesburberryoutlet.com/"><strong>Burberry Outlet</strong></a> then talks concerning the website on blog of handbags. Luckily, these various quality websites are acquiring shut affordable inside the droves to make certain that people aren't scammed away from their hard-earned money.</p>

  11. Aaro 2012/02/01 17:35 댓글주소 | 수정/삭제 | 댓글

    This conversation is going no where. It’s lacking the place of a
    good leader to head the things to come out on conclusion.
    I am waiting for ur quick positive reply. Have a nice day,It is very helpful to know about different historical tourist places all the world. Thank you for providing such useful informations.

  12. ronnie-lott-jersey 2012/02/13 09:28 댓글주소 | 수정/삭제 | 댓글

    http://www.49ersfanaticsshop.com/y-a-tittle-jersey
    http://www.49ersfanaticsshop.com/patrick-willis-jersey
    http://www.49ersfanaticsshop.com/aldon-smith-jersey
    http://www.49ersfanaticsshop.com/joe-montana-jersey
    http://www.49ersfanaticsshop.com/frank-gore-jersey
    http://www.49ersfanaticsshop.com/jerry-rice-jersey
    http://www.49ersfanaticsshop.com/ronnie-lott-jersey
    http://www.49ersfanaticsshop.com/vernon-davis-jersey
    http://www.49ersfanaticsshop.com/justin-smith-jersey
    http://www.49ersfanaticsshop.com/steve-young-jersey
    http://www.49ersfanaticsshop.com/alex-smith-jersey
    http://www.49ersfanaticsshop.com/michael-crabtree-jersey
    http://www.49ersfanaticsshop.com/49ers-customized-jersey
    http://www.49ersfanaticsshop.com/anthony-davis-jersey
    http://www.49ersfanaticsshop.com/brian-westbrook-jersey
    http://www.49ersfanaticsshop.com/colin-kaepernick-jersey
    http://www.49ersfanaticsshop.com/deion-sanders-jersey
    http://www.49ersfanaticsshop.com/delanie-walker-jersey
    http://www.49ersfanaticsshop.com/isaac-sopoaga-jersey
    http://www.49ersfanaticsshop.com/mike-iupati-jersey
    http://www.49ersfanaticsshop.com/nate-clements-jersey
    http://www.49ersfanaticsshop.com/nate-davis-jersey
    http://www.49ersfanaticsshop.com/roger-craig-jersey
    http://www.49ersfanaticsshop.com/taylor-mays-jersey

Write a comment


[web.xml]
.
.
  <display-name>JSP60Test</display-name>
  <resource-ref>
   <res-ref-name>jdbc/mysqldb</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
  </resource-ref>
    <resource-ref>
   <res-ref-name>jdbc/oracledb</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
  </resource-ref>
.
.
.

[server.xml]:mysql Tomcat Container에서 직접 서버구동시
<GlobalNamingResources>
 <Resource name="jdbc/mysqldb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" loginTimeout="10" maxWait="5000" username="jspid" password="1234" url="jdbc:mysql://localhost:3306/jsptest" />
</GlobalNamingResources>
.
.
.
.
<Context docBase="C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\JSP60Test" path="/JSP60Test" reloadable="true">
 <Resource name="jdbc/mysqldb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" loginTimeout="10" maxWait="5000" username="jspid" password="1234" url="jdbc:mysql://localhost:3306/jsptest" />
</Context>

[server.xml]:mysql eclipse에서 서버구동시
<GlobalNamingResources>
 <Resource name="jdbc/mysqldb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" loginTimeout="10" maxWait="5000" username="jspid" password="1234" url="jdbc:mysql://localhost:3306/jsptest" />
</GlobalNamingResources>
.
.
.
.
<Context docBase="JSP60Test" path="/JSP60Test" reloadable="true" source="org.eclipse.jst.jee.server:JSP60Test">
 <Resource name="jdbc/mysqldb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" loginTimeout="10" maxWait="5000" username="jspid" password="1234" url="jdbc:mysql://localhost:3306/jsptest" />
</Context>


[server.xml]:Oracle Tomcat Container에서 직접 서버구동시
<GlobalNamingResources>
 <Resource name="jdbc/oracledb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" loginTimeout="10" maxWait="5000" username="oracleuser" password="1234" url="jdbc:oracle:thin:@303c2:1521:orcl" />
</GlobalNamingResources>
.
.
.
.
<Context docBase="C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\JSP60Test" path="/JSP60Test" reloadable="true">
 <Resource name="jdbc/oracledb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" loginTimeout="10" maxWait="5000" username="oracleuser" password="1234" url="jdbc:oracle:thin:@303c2:1521:orcl" />
</Context>

[server.xml]:Oracle eclipse에서 서버구동시
<GlobalNamingResources>
 <Resource name="jdbc/oracledb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" loginTimeout="10" maxWait="5000" username="oracleuser" password="1234" url="jdbc:oracle:thin:@303c2:1521:orcl" />
</GlobalNamingResources>
.
.
.
.
<Context docBase="JSP60Test" path="/JSP60Test" reloadable="true" source="org.eclipse.jst.jee.server:JSP60Test">
 <Resource name="jdbc/oracledb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" loginTimeout="10" maxWait="5000" username="oracleuser" password="1234" url="jdbc:oracle:thin:@303c2:1521:orcl" />
</Context>


위의 설정을 사용하는 코드는 다음처럼 한다.
<%@ page import="javax.sql.*"%>
<%@ page import="javax.naming.*"%>

<%
.
.

 Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup("java:comp/env");
 DataSource ds = (DataSource)envCtx.lookup("jdbc/MySQLDataSource");
 con = ds.getConnection();
.
.
.
%>

top

Trackback Address :: http://www.ssial.com/trackback/60 관련글 쓰기

  1. Tracked from 성용이의 블로그 2008/11/24 11:12 삭제

    Subject: DBCP server.xml & web.xml 설정

    DBCP server.xml web.xml 설정Server/web 2008/09/02 16:09 [web.xml].. display-nameJSP60Test/display-name resource-ref res-ref-namejdbc/mysqldb/res-ref-name res-typejavax.sql.DataSource/res-type res
  1. Chanel Outlet 2011/09/17 21:47 댓글주소 | 수정/삭제 | 댓글

    Time is what you make of it.

  2. Burberry Bags 2011/10/13 16:53 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog! From time to time students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. Thanks.

  3. Coach Outlet Online 2011/11/15 12:38 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog ! It's very good and thank you for sharing it !

  4. Coach Outlet Online 2011/11/15 12:40 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog ! It's very good and thank you for sharing it !

  5. abercrombie 2011/12/13 21:17 댓글주소 | 수정/삭제 | 댓글

    I think the author’s writing is very good, although the point of view a little bit different, but really is a good article, and the author can hope to have time to discuss some problems.

  6. abercrombie france 2011/12/13 21:18 댓글주소 | 수정/삭제 | 댓글

    This article is well written ,give a person very deep impression, I really have no language to describe it, I hope the authors make persistent efforts, come on!.

Write a comment


다운로드 : http://james.apache.org/download.cgi
사용자 삽입 이미지


Binary (ZIP Format): james-binary-2.3.1.zip (7.25M)

설치 :

1. 다운받은 파일의 압축을 풀면 설치가 완료
2. 압축푼 디렉토리를 환경변수에 추가 : JAMES_HOME = C:\was\james-2.3.1
3. %JAMES_HOME%\bin\run.bat 실행
4. 실행결과 화면
사용자 삽입 이미지

top

Trackback Address :: http://www.ssial.com/trackback/35 관련글 쓰기

  1. Chanel Outlet 2011/09/17 21:38 댓글주소 | 수정/삭제 | 댓글

    vTime is what you make of it.

  2. Coach Outlet Online 2011/11/15 12:48 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog ! It's very good and thank you for sharing it !

  3. The Proenza Schouler shoes are Crazy Beautiful 2012/02/12 12:50 댓글주소 | 수정/삭제 | 댓글

    The article is so beautiful, so I feel very good, thought I saw my favorite @ the same, thank you of you are very

Write a comment


다운로드주소 : http://www.jboss.org/jbossas/downloads/
사용자 삽입 이미지


최신 안정버전(Stable) : 2008년 8월 4일( 다운로드 )
jboss-4.2.3.GA-jdk6.zip      99667238 Byte(95MB)    Platform-Independent



설치 :

1. 다운받은 파일의 압축을 풀면 설치가 완료
2. 압축푼 디렉토리를 환경변수에 추가 : JBOSS_HOME = C:\was\jboss-4.2.3.GA
3. %JBOSS_HOME%\bin\run.bat 실행
               <- 주의 사항 : JAVA_HOME과 Path 등 자바 관련 환경변수가
                                    미리 입력되어져 있어야 한다.
                                    run.bat파일은 환경변수를 읽어들여서 JBoss를 실행시킨다.
4. 웹 브라우저의 주소 입력줄에 다음과 같이 입력  : http://localhost:8080/
5. 다음과 같은 Welcome to JBoss™ 페이지가 보면 설치 완료
사용자 삽입 이미지



top

Trackback Address :: http://www.ssial.com/trackback/34 관련글 쓰기

  1. Chanel Outlet 2011/09/17 21:40 댓글주소 | 수정/삭제 | 댓글

    Time is what you make of it.

  2. Coach Outlet Online 2011/11/15 12:48 댓글주소 | 수정/삭제 | 댓글

    It's very good!Thank you for sharing it!I like buying handbags of the internet website:http://www.mycoachoutletstoreonline.com

  3. 2011/12/23 18:31 댓글주소 | 수정/삭제 | 댓글

    비밀댓글입니다

  4. griffey shoes 2011/12/23 18:32 댓글주소 | 수정/삭제 | 댓글

    gdf

  5. Do you like Reed Krakoff or Christian Louboutin 2012/02/12 12:51 댓글주소 | 수정/삭제 | 댓글

    The article is so beautiful, so I feel very good, thought I saw my favorite @ the same, thank you of you are very

Write a comment


prject 이름의 xml 파일을 catalina_home의 conf폴더 아래에 있는 catalina\localhost\폴더에 생성한다.
예)
프로젝트명 abc, 파일명 abc.xml
디스크의 프로젝트 폴더경로  c:\choongang\web
컨텍스트경로 abc //임의의 URL Context

다음은 abc.xml의 내용임
======================== abc.xml ===========================
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="디스크의 폴더 경로" path="/컨텍스트 경로">
  <Realm className="org.apache.catalina.realm.JDBCRealm"
   connectionPassword="데이타베이스 접속 패스워드"
   userCredCol="유저 테이블의 PASSWORD 컬럼"
   userTable="유저 테이블"
   debug="0"
   validate="true"
   driverName="com.mysql.jdbc.Driver"
   roleNameCol="유저 권한 테이블의 권한컬럼"
   digest="MD5"
   connectionName="root"
   connectionURL="jdbc:mysql://localhost:3306/database"
   userNameCol="유저 권환 테이블과 유저테이블의 유저 번호 컬럼"
   userRoleTable="유저권한테이블"
   />

<Resource
      auth="Container"
      name="jdbc/MySQLDataSource"
      type="javax.sql.DataSource"
   driverClassName="com.mysql.jdbc.Driver"
   password="데이타베이스접속패스워드"
   maxIdle="2"
   maxWait="5000"
   username="데이타베이스접속유저"
   url="jdbc:mysql://localhost:3306/database"
   maxActive="4"/>
</Context>


======================== server.xml===========================
아래와 같이 Context를 디폴트로 사용하지도 않고, 따로 관리 사용하지도 않는 경우 server.xml안에 context 설정을 집어넣을 수 있다.

<?xml version="1.0" encoding="UTF-8"?>
<Server>
  <Listener className="org.apache.catalina.core.AprLifecycleListener"/>
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
  <GlobalNamingResources>
    <Environment
      name="simpleValue"
      type="java.lang.Integer"
      value="30"/>
    <Resource
      auth="Container"
      name="UserTransaction"
      type="javax.transaction.UserTransaction"/>

    <Resource
      auth="Container"
      description="User database that can be updated and saved"
      name="UserDatabase"
      type="org.apache.catalina.UserDatabase"
      pathname="conf/tomcat-users.xml"
      factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
 
   </GlobalNamingResources>
  <Service
      name="Catalina">
    <Connector
        port="8080"
        redirectPort="8443"
        minSpareThreads="25"
        connectionTimeout="20000"
        uRIEncoding="UTF-8"
        maxSpareThreads="75"
        maxThreads="150">
    </Connector>
    <Connector
        port="8009"
        redirectPort="8443"
        protocol="AJP/1.3">
    </Connector>
    <Engine
        defaultHost="localhost"
        name="Catalina">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
 
      <Host  appBase="webapps"   name="localhost">
   
 <Context docBase="디스크의 폴더 경로" path="/컨텍스트 경로">
  <Realm className="org.apache.catalina.realm.JDBCRealm"
   connectionPassword="데이타베이스 접속 패스워드"
   userCredCol="유저 테이블의 PASSWORD 컬럼"
   userTable="유저 테이블"
   debug="0"
   validate="true"
   driverName="com.mysql.jdbc.Driver"
   roleNameCol="유저 권한 테이블의 권한컬럼"
   digest="MD5"
   connectionName="root"
   connectionURL="jdbc:mysql://localhost:3306/database"
   userNameCol="유저 권환 테이블과 유저테이블의 유저 번호 컬럼"
   userRoleTable="유저권한테이블"
   />

<Resource
      auth="Container"
      name="jdbc/MySQLDataSource"
      type="javax.sql.DataSource"
   driverClassName="com.mysql.jdbc.Driver"
   password="데이타베이스접속패스워드"
   maxIdle="2"
   maxWait="5000"
   username="데이타베이스접속유저"
   url="jdbc:mysql://localhost:3306/database"
   maxActive="4"/>
</Context>

 
      </Host>
    </Engine>
  </Service>
</Server>



======================== context.xml===========================

이 context 파일은 conf 폴더에 있는 파일로써 기본 설정을 사용할 때 사용한다.

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

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
 
    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->
 <Resource
      auth="Container"
      name="jdbc/MySQLDataSource"
      type="javax.sql.DataSource"
   driverClassName="com.mysql.jdbc.Driver"
   password="1234"
   maxIdle="2"
   maxWait="5000"
   username="root"
   url="jdbc:mysql://localhost:3306/database"
   maxActive="4"/>

</Context>


top

Trackback Address :: http://www.ssial.com/trackback/27 관련글 쓰기

  1. Tracked from shheo's me2DAY 2009/05/07 11:12 삭제

    Subject: 허성훈의 생각

    tomcat Context 속성 적용하기

Write a comment


JSP Tomcat 개발환경 구축(window기준)

1. JDK 설치 

 1) 다운로드: http://developers.sun.com/downloads/

 2) 설치(6u10 Beta b25 for Windows기준):
     jdk기본경로 -> C:\Program Files\Java\jdk1.6.0_10
     jre기본경로 -> C:\Program Files\Java\jre6

 3) 환경변수(내컴퓨터->오른쪽단추->팝업페뉴->속성(등록정보)->고급->환경변수->(시스템변수 or 사용자변수)):
 
  JAVA_HOME = C:\Program Files\Java\jdk1.6.0_10
  (새로 만들어야 함, 주의할 것은 마지막에 ;(쌔미콜론)이 없어야함)
 
  CLASSPATH = .;%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\tools.jar

  Path = %Path%;%JAVA_HOME%\bin; (기존의 Path 뒷쪽에 추가)
  (%Path%;부분은 이전의 path를 의미)
  (실재로 추가하는 것은 ;%JAVA_HOME%\bin; 뿐임)
  (이때 ;(쌔미콜론)은 변수들을 구분하는 구분자로 사용되는 것임)

  예)Path = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin;

2. Tomcat 설치

 1) 다운로드: http://tomcat.apache.org/download-60.cgi -> Binary Distributions  Core: Windows Service Installer 버전 다운로드

 2) 설치(tomcat6.x기준)
     1. License Agreement -> I Agree 선택
     2. Choose Componets -> Full 선택(Examples 설치를 위해)
     3. Choose Install Location -> C:\Program Files\Apache Software Foundation\Tomcat 6.0 (tomcat기본경로)
     4. Configuration ->
   prot = 8080(수정가능)
   User Name = admin, Password = 1234 (tomcat manager와 tomcat admin 창에 들어가기 위해 필요)
     5. Java Virtual Machine -> C:\Program Files\Java\jre6 (기본 jre 경로)


 3) 환경변수(내컴퓨터->오른쪽단추->팝업페뉴->속성(등록정보)->고급->환경변수->(시스템변수 or 사용자변수)):

  CATALINA_HOME
  = C:\Program Files\Apache Software Foundation\Tomcat 6.0

  (새로 만들어야 함, 주의할 것은 마지막에 ;(쌔미콜론)이 없어야함)

  Path = %Path%;%JAVA_HOME%\bin;%CATALINA_HOME%\bin;
  (기존의 Path 뒷쪽에 추가)(실재로 추가하는 것은 ;%CATALINA_HOME%\bin; 뿐임)

  예)Path = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin;%CATALINA_HOME%\bin;

  ## command(프롬프트)창에서 set 입력해서 환경변수 적용 결과 확인 할 수 있음 ##


 4) 자바 ext폴더에 library 추가
   원본 파일 위치 = %CATALINA_HOME%\lib\servlet-api.jar 
    (javax.servlet패키지와 javax.servlet.http패키지 가 들어있다.)
   복사할 폴더 위치  =  %JAVA_HOME%\jre\lib\ext



3. Web Server 동작확인
 시작메뉴->모든 프로그램(p)->
Apache Tomcat6.0->
Moniter Tomcat->
윈도우작업표시줄->
트레이(Tray:시계표시부분)->
Moniter(빨간깃발 원안에 세모표시)->
오른쪽단추->Start Service->
인터넷익스플로러->
주소표시줄->
http://localhost:8080/->
열린창에서 좌측상단에 tomcat로고 보이면 정상동작->
화면 좌측메뉴->
Administration->
Tomcat Manager 클릭->
아이디=admin,패스워드=1234->
Manager 창 확인

####주의사항: 자바환경변수가 잘못 설치되면 톰캣이 정상작동하지 않음#####


4. Eclipse WPT Server 설치 및 동작 확인


1. eclipse의 주메뉴에서 Window -> Preferences 선택

2. Preferences창의 좌측 트리메뉴에서 Server -> Runtime Environments 선택

3. Server Runtime Environments창에서 Add 선택

4. new Server Runtime Environment 창의 트리메뉴에서 Apache -> Apache Tomcat v6.0 선택하고 Next 버튼 선택

5. Tomcat installation directory의 항목에 Browser 버튼을 선택한 후 설치된 CATALINA_HOME을 찾아서 지정한다.
예 : C:\Program Files\Apache Software Foundation\Tomcat 6.0

6. Finish 버튼을 선택하여 서버설정을 완료한다.

7. Server Runtime Environments창에서 OK버튼을 선택해서 빠져나온다.

8. eclipse의 뷰 중에서 Servers을 선택한다.

9. Servers 뷰의 내용창에서 마우스 오른쪽 버튼을 클릭해서 팝업메뉴의 New -> Server 를 선택한다.

10. New Server 창에서 설정내용을 확인 한 후 Finish를 선택한다.
 -> 이 과정이 끝나면 Servers뷰의 내용창에 tomcat 서버가 설정된 것이 보인다.

11. Project Explorer 뷰 내용창에 Servers 프로젝트가 추가된 것을 확인한다.

12. Project Explorer 뷰 내용창의 여백 부분을 마우스오른쪽버튼으로 클릭하고 팝업메뉴를 띄워 New -> Dynamic Web Project 를 선택한다.

13. New Dynamic Web Project 창에서 Project Name 항목에 새로운 프로젝트의 이름을 기록한다.     
   예:Test
   주의 : 만일 내용창에 Test라는 프로젝트가 보이지 않으면 마우스 오른쪽 버튼을 클릭해서 팝업메뉴에서 ReFresh를 선택하면 보인다.

14. Project Explorer 뷰 내용창의 프로젝트 목록중에서 새로 작성한 Test라는 프로젝트를 선택한다.

15. Test프로젝트의 하위 폴더인 WebContent에서 오른쪽 버튼을 클릭해서 팝업메뉴를 띄우고 New -> JSP른 선택한다.
 주의 : Project Explorer가 아닌 Explorer(Package,Navigator)에서는 New -> Other를 선택한다. 그리고 New 창의 트리메뉴에서 Web -> JSP를 선택한다.

16. New JavaServer Page 창에의 File name 항목에 새로운 JSP파일의 이름을 기록한다.
예 : test.jsp
주의 : 이때 확장자를 기록하지 않아도 된다.

17. edit 뷰 창의 test.jsp 내용창 안에 내용을 기록한다.
예 :
     <body>
        WTP server 테스트입니다.    <-- 이부분을 입력한다.
     <body>

18. eclipse의 주메뉴에서 File -> Save를 선택한다.

19. edit 뷰 창에서 마우스 오른쪽 버튼을 클릭해서 팝업메뉴를 띄우고 Run As -> Run on Server를 선택한다.

20. Run on Server창에서 Finish를 선택한다.
이과정까지 끝나면 브라우저가 에디트뷰에 하나 추가되면서 결과가 보인다.
결과 예 : WTP server 테스트입니다.

top

Trackback Address :: http://www.ssial.com/trackback/19 관련글 쓰기

  1. Burberry Bags 2011/10/13 17:09 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog! From time to time students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. Thanks.

  2. Burberry Bags 2011/10/13 17:25 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog! From time to time students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. Thanks.

Write a comment