You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by John Pettit <jp...@logictier.com> on 2000/02/11 04:34:33 UTC
Does tomcat work with SSL?
Sorry for the basic question, but I am trying to get tomcat (3.1) running
with apche 1.3.9 with SSL. If I go straight to tomcat at
http://myserver:8080/blah, I receive header information. If I go to
https://myserver/blah, and print out the values of the headers ... there
aren't any.
The jsp file I'm using is below. It successfully sets a cookie, but all all
the request headers are always empty:
<%@ page import="javax.servlet.http.*, java.util.*" %>
<%
Cookie c1 = new Cookie("xzzMyCookie2" , "baz76");
c1.setMaxAge(1900);
c1.setPath("/");
c1.setSecure(true);
response.addCookie(c1);
%>
<html>
<body>
Cookies in:<%= request.getHeader("cookie") %><br>
Cookies in:<%= request.getCookies() %><br>
Many cookies?<br>
<%
Cookie[] cookies = request.getCookies();
for (int i=0; i < cookies.length; i++)
{
out.write(cookies[i].getName());
}
out.write("<p>Now, the headers...<br>");
for (Enumeration e=request.getHeaderNames(); e.hasMoreElements(); )
{
String theHeader = (String) e.nextElement();
out.write(theHeader + "=" + request.getHeader(theHeader) +
"<br>");
}
%>
Tried to set a cookie!
</body></html>
Thanks for any help.
John