[jboss-user] [JBoss Seam] - Pages.encodeScheme(), HTTPS, and context root '/'

flashguru do-not-reply at jboss.com
Wed Mar 7 23:38:06 EST 2007


Hello everybody!

   public String encodeScheme(String viewId, FacesContext context, String url)
  |    {
  |       String scheme = getScheme(viewId);
  |       if (scheme != null)
  |       {
  |          String requestUrl = getRequestUrl(context);
  |          if (requestUrl!=null)
  |          {
  |             try
  |             {
  |                URL serverUrl = new URL(requestUrl);
  |                url = scheme + "://" + serverUrl.getHost() + ':' + serverUrl.getPort() + '/' + url;
  |             }
  |             catch (MalformedURLException ex) 
  |             {
  |                throw new RuntimeException(ex);
  |             }
  |          }
  |       }
  |       return url;   
I have Apache in front of JBoss AS. And my application is mounted as the ROOT context '/'. My http and https ports are 80, 443. The https redirect does not work with such a configuration. And I think it is related to the above code in Seam Pages.java.
serverUrl.getHost() returns -1. And an extra '/' is always added before the view id, resulting in something like https://www.test.com:-1//index.seam

This really looks like a bug to me. Any thoughts!



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026112#4026112

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026112



More information about the jboss-user mailing list