Print
카테고리: [ Java ]
조회수: 21944

@ httpOnly 옵션?

 

 

@ 설정 방법

 1. Tomcat 

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

    <Context path="/myWebApplicationPath" useHttpOnly="true">

 

 2. JEUS

    <session-config>

        <session-cookie>

            <jsessionid-name>JSESSIONID</jsessionid-name>

            <version>0</version>

            <domain>.tmax.co.kr</domain>

            <path>/</path>

            <max-age>-1</max-age>

            <secure>false</secure>

            <http-only>true</http-only>

        </session-cookie>

    </session-config>

 

 3. JBoss 5.0.1 and JBOSS EAP 5.0.1

    <Context cookies="true" crossContext="true">

       <SessionCookie secure="true" httpOnly="true" />

 

 4. IBM Websphere 다음 링크 참고 (어드민 콘솔에서 설정)    http://pic.dhe.ibm.com/infocenter/tivihelp/v33r1/topic/com.ibm.mam.inswas.doc/install/t_configuringthehttponlyattribute.html

 

 5. servlet 3.0 지원되는 경우 web.xml 에 설정 가능.

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

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee " target="_blank">http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

...

    <session-config>

        <cookie-config>

            <http-only>true</http-only>

        </cookie-config>

    </session-config>

...