• 7
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Redirecting from http to https in Glassfish 3

How do you redirect port 80 -> 443 in Glassfish 3? My scenario is a web application SSL, and I want non-SSL requests to be automatically redirected.

You should look at this blog post on port unification in Glassfish 3. I believe it answers your question for you:

Granted, this solution offers a 302 redirect from only the protocol (e.g. http://blah:8000 to https://blah:8000) as opposed to a direct that changes the protocol and port, but is nifty nonetheless.

  • 1
Reply Report
    • The solution seems to be for glassfish 3.1, while I'm using 3.0.1. It kind of seems to work anyways, though glassfish throws null pointer exceptions every time it redirects. On the other hand, glassfish always throws exception whatever you do..
      • 2
    • Please always at least summarize answers here if you link off-site. Links go away, these answers get archived and freely distributed as a package with the questions.
      • 2
    • Does not work under glassfish 3.0.1: CLI001 Invalid Command: create-protocol-filter Command create-protocol-filter failed.

Trending Tags