users@glassfish.java.net

Re: How to Config Servlet with SSL on GlassFish

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Mar 2010 19:30:25 PST

Thanks for all you kindly help! I still got some problems.

web.xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <servlet>
        <servlet-name>ContentService</servlet-name>
        <servlet-class>com.servlets.ContentService</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>ContentService</servlet-name>
        <url-pattern>/ContentService</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>ContentService</welcome-file>
    </welcome-file-list>
    <security-constraint>
        <display-name>AIS</display-name>
        <web-resource-collection>
            <web-resource-name>AIS</web-resource-name>
            <description/>
            <url-pattern>/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
            <description/>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
</web-app>

When I try to access the service with HTTP like http://IPAddr:8080/..., it redirect to https://IPAddr:8181/..., But it couldn't open the page, just time out. I try to access directly with https://IPAddr:8181/..., it also time out. How can I deal with it?
[Message sent by forum member 'jessema' (83853891_at_163.com)]

http://forums.java.net/jive/thread.jspa?messageID=391398