ICEfaces
  1. ICEfaces
  2. ICE-1579

Seam: apps break when deployed in the context root

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.6DR#4
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      JBoss 4.0.5
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      create a 'serverBasePath' factory:

      <!--
           Factory to resolve the http request base path as in http(s)://<host-name>:<server-port>/<context-path>/
           Usage: <base href="#{serverBasePath}"/> to be placed in the html 'head' of each template page.
           -->
           <factory
            name="serverBasePath"
            auto-create="true"
            value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/"/>
       
      Then use it in a page or template like so:

       <head>
           <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
           <title>Title here</title>
        [b]<base href="#{serverBasePath}"/>[/b]
           <link rel='stylesheet' type='text/css' href='./xmlhttp/css/xp/xp.css'/>
           <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
       </head>
      Show
      create a 'serverBasePath' factory: <!--      Factory to resolve the http request base path as in http(s)://<host-name>:<server-port>/<context-path>/      Usage: <base href="#{serverBasePath}"/> to be placed in the html 'head' of each template page.      -->      <factory       name="serverBasePath"       auto-create="true"       value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/"/>   Then use it in a page or template like so:  <head>      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />      <title>Title here</title>   [b]<base href="#{serverBasePath}"/>[/b]      <link rel='stylesheet' type='text/css' href='./xmlhttp/css/xp/xp.css'/>      <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />  </head>

      Description

      application resources don't resolve properly and posts hang when running a Seam app in the context root:

      <module>
           <web>
               <web-uri>Ice-seam-gen.war</web-uri>
               <context-root>/Ice-seam-gen</context-root>
           </web>
       </module>

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Breau
          • Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: