Changeset 4447

Show
Ignore:
Timestamp:
04/06/09 13:09:36 (3 years ago)
Author:
mlhartme
Message:

dump standalone.tomcat

Location:
trunk
Files:
18 modified

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r4435 r4447  
     12009-04-06  Michael Hartmeier <michael.hartmeier@1und1.de> 
     2 
     3        Dump standalone.tomcat. It was always true since we have a war file build now. 
     4 
    152009-04-02  Martin Leidig  <mleidig@schlund.de> 
    26 
  • trunk/pom.xml

    r4428 r4447  
    2323  <properties> 
    2424    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    25     <standalone.tomcat>true</standalone.tomcat> 
    2625    <makemode>test</makemode> 
    2726  </properties> 
  • trunk/profiles.xml.sample

    r4391 r4447  
    99      <properties> 
    1010        <makemode>test</makemode> 
    11         <standalone.tomcat>true</standalone.tomcat> 
    1211      </properties> 
    1312    </profile> 
  • trunk/pustefix-archetypes/pustefix-archetype-application/src/main/resources/archetype-resources/profiles.xml

    r4391 r4447  
    88      <properties> 
    99        <makemode>test</makemode> 
    10         <standalone.tomcat>true</standalone.tomcat> 
    1110      </properties> 
    1211    </profile> 
  • trunk/pustefix-archetypes/pustefix-archetype-application/src/main/resources/archetype-resources/src/main/pustefix/conf/pustefix.xml

    r4394 r4447  
    2020     
    2121    <!-- URL for the Pustefix editor --> 
    22     <choose> 
    23       <when test="${symbol_dollar}standalone.tomcat = 'true'"> 
    24         <prop name="xmlserver.editor_url">http://cmsskel.${symbol_dollar}{fqdn}:8080</prop> 
    25       </when> 
    26       <otherwise> 
    27         <prop name="xmlserver.editor_url">http://cmsskel.${symbol_dollar}{fqdn}</prop> 
    28       </otherwise> 
    29     </choose> 
     22    <prop name="xmlserver.editor_url">http://cmsskel.${symbol_dollar}{fqdn}:8080</prop> 
    3023         
    3124    <choose> 
  • trunk/pustefix-core/src/main/java/de/schlund/pfixxml/config/BuildTimeProperties.java

    r4383 r4447  
    5454    } 
    5555     
    56     public static void generate(Properties props, String mode, String machine, String fqdn, String uid, boolean standaloneTomcat) throws IOException { 
     56    public static void generate(Properties props, String mode, String machine, String fqdn, String uid) throws IOException { 
    5757        props.setProperty("mode", mode); 
    5858        props.setProperty("machine", machine); 
    5959        props.setProperty("fqdn", fqdn); 
    6060        props.setProperty("uid", uid); 
    61         props.setProperty("standalone.tomcat", Boolean.toString(standaloneTomcat)); 
    6261        props.store(ResourceUtil.getFileResourceFromDocroot("buildtime.prop").getOutputStream(), "Properties used at buildtime"); 
    6362    } 
  • trunk/pustefix-core/src/main/java/de/schlund/pfixxml/config/GlobalConfig.java

    r4314 r4447  
    110110     * Returns the servlet context 
    111111     *  
    112      * @return The servlet context or <code>null</code> if this instance of 
    113      *         Pustefix is shared across different contexts (e.g. in standalone mode) 
     112     * @return The servlet context or <code>null</code> if not available 
    114113     */ 
    115114    public static ServletContext getServletContext() { 
  • trunk/pustefix-core/src/main/java/org/pustefixframework/http/DocrootRequestHandler.java

    r3756 r4447  
    3939 
    4040/** 
    41  * In standalone mode this servlet serves the static files from the docroot. 
    42  * In all modes, it serves files from the webapplication directory below 
    43  * /xml because they would usually be masked by the files within the docroot.    
     41 * This servlet serves the static files from the docroot.    
    4442 *  
    4543 * @author Sebastian Marsching <sebastian.marsching@1und1.de> 
  • trunk/pustefix-core/src/main/java/org/pustefixframework/http/internal/FactoryInitWorker.java

    r4249 r4447  
    9898     
    9999    private boolean warMode = false; 
    100     private boolean standaloneMode = false; 
     100    private boolean docrootSpecified = false; 
    101101     
    102102    private final static Object initLock = new Object(); 
     
    158158            String docrootstr = servletContext.getInitParameter("pustefix.docroot"); 
    159159            if (docrootstr != null && !docrootstr.equals("")) { 
    160                 standaloneMode = true; 
     160                docrootSpecified = true; 
    161161            } else { 
    162162                docrootstr = servletContext.getRealPath("/WEB-INF/pfixroot"); 
     
    226226    private void configureLogging(Properties properties, ServletContext servletContext) throws ServletException { 
    227227        String containerProp = properties.getProperty(PROP_PREFER_CONTAINER_LOGGING); 
    228         if (warMode || (!standaloneMode && (containerProp != null && containerProp.toLowerCase().equals("true")))) { 
     228        if (warMode || (!docrootSpecified && (containerProp != null && containerProp.toLowerCase().equals("true")))) { 
    229229            ProxyLogUtil.getInstance().configureLog4jProxy(); 
    230230            ProxyLogUtil.getInstance().setServletContext(servletContext); 
  • trunk/pustefix-core/src/main/resources/build/create_serverxml.xsl

    r3958 r4447  
    77                > 
    88 
    9   <xsl:param name="standalone">true</xsl:param> 
    109  <xsl:param name="portbase"/> 
    1110  <xsl:param name="warmode">false</xsl:param> 
     
    112111      <xsl:if test="not(string($maxprocessors)='')"><xsl:attribute name="maxThreads"><xsl:value-of select="$maxprocessors"/></xsl:attribute></xsl:if> 
    113112    </Connector> 
    114     <xsl:if test="$standalone = 'true'"> 
    115       <Connector maxHttpHeaderSize="8192" 
    116                  maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
    117                  enableLookups="false" acceptCount="100" 
    118                  connectionTimeout="20000" disableUploadTimeout="true"  
    119                  useBodyEncodingForURI="true"> 
    120         <xsl:attribute name="debug"><xsl:value-of select="$debug"/></xsl:attribute> 
    121         <xsl:attribute name="port"><xsl:value-of select="$portbase+80"/></xsl:attribute> 
    122         <xsl:attribute name="redirectport"><xsl:value-of select="$portbase+443"/></xsl:attribute> 
    123       </Connector> 
    124       <Connector maxHttpHeaderSize="8192" 
    125                  maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
    126                  enableLookups="false" disableUploadTimeout="true" 
    127                  acceptCount="100" scheme="https" secure="true" 
    128                  clientAuth="false" sslProtocol="TLS" keystoreFile="conf/keystore" keystorePass="secret" 
    129                  useBodyEncodingForURI="true"> 
    130         <xsl:attribute name="port"><xsl:value-of select="$portbase+443"/></xsl:attribute> 
    131         <xsl:attribute name="debug"><xsl:value-of select="$debug"/></xsl:attribute> 
    132       </Connector> 
    133     </xsl:if> 
     113    <Connector maxHttpHeaderSize="8192" 
     114               maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
     115               enableLookups="false" acceptCount="100" 
     116               connectionTimeout="20000" disableUploadTimeout="true"  
     117               useBodyEncodingForURI="true"> 
     118      <xsl:attribute name="debug"><xsl:value-of select="$debug"/></xsl:attribute> 
     119      <xsl:attribute name="port"><xsl:value-of select="$portbase+80"/></xsl:attribute> 
     120      <xsl:attribute name="redirectport"><xsl:value-of select="$portbase+443"/></xsl:attribute> 
     121    </Connector> 
     122    <Connector maxHttpHeaderSize="8192" 
     123               maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
     124               enableLookups="false" disableUploadTimeout="true" 
     125               acceptCount="100" scheme="https" secure="true" 
     126               clientAuth="false" sslProtocol="TLS" keystoreFile="conf/keystore" keystorePass="secret" 
     127               useBodyEncodingForURI="true"> 
     128      <xsl:attribute name="port"><xsl:value-of select="$portbase+443"/></xsl:attribute> 
     129      <xsl:attribute name="debug"><xsl:value-of select="$debug"/></xsl:attribute> 
     130    </Connector> 
    134131  </xsl:template> 
    135132 
     
    187184      </xsl:with-param> 
    188185      <xsl:with-param name="staticDocBase"> 
    189         <xsl:if test="$standalone = 'true'"> 
    190           <xsl:if test="p:application/p:docroot-path/text()"> 
    191             <xsl:variable name="docroot" select="p:application/p:docroot-path/text()"/> 
    192             <xsl:variable name="abs_path"> 
    193               <xsl:choose> 
    194                 <xsl:when test="starts-with(normalize-space(text()), 'pfixroot:')"> 
    195                   <xsl:value-of select="$docroot"/><xsl:value-of select="substring-after(normalize-space(text()), 'pfixroot:')"/> 
    196                 </xsl:when> 
    197                 <xsl:when test="starts-with(normalize-space(text()), 'file:')"> 
    198                   <xsl:value-of select="substring-after(normalize-space(text()), 'file:')"/> 
    199                 </xsl:when> 
    200                 <xsl:otherwise> 
    201                   <xsl:value-of select="normalize-space(text())"/> 
    202                 </xsl:otherwise> 
    203               </xsl:choose> 
    204             </xsl:variable> 
     186        <xsl:if test="p:application/p:docroot-path/text()"> 
     187          <xsl:variable name="docroot" select="p:application/p:docroot-path/text()"/> 
     188          <xsl:variable name="abs_path"> 
    205189            <xsl:choose> 
    206               <xsl:when test="ext:exists($abs_path)"> 
    207                 <xsl:value-of select="$abs_path"/> 
     190              <xsl:when test="starts-with(normalize-space(text()), 'pfixroot:')"> 
     191                <xsl:value-of select="$docroot"/><xsl:value-of select="substring-after(normalize-space(text()), 'pfixroot:')"/> 
     192              </xsl:when> 
     193              <xsl:when test="starts-with(normalize-space(text()), 'file:')"> 
     194                <xsl:value-of select="substring-after(normalize-space(text()), 'file:')"/> 
    208195              </xsl:when> 
    209196              <xsl:otherwise> 
    210                 <xsl:message>CAUTION: documentroot does not exist: <xsl:value-of select="$abs_path"/></xsl:message> 
     197                <xsl:value-of select="normalize-space(text())"/> 
    211198              </xsl:otherwise> 
    212199            </xsl:choose> 
    213           </xsl:if> 
     200          </xsl:variable> 
     201          <xsl:choose> 
     202            <xsl:when test="ext:exists($abs_path)"> 
     203              <xsl:value-of select="$abs_path"/> 
     204            </xsl:when> 
     205            <xsl:otherwise> 
     206              <xsl:message>CAUTION: documentroot does not exist: <xsl:value-of select="$abs_path"/></xsl:message> 
     207            </xsl:otherwise> 
     208          </xsl:choose> 
    214209        </xsl:if> 
    215210      </xsl:with-param> 
  • trunk/pustefix-plugins/pustefix-webapp-plugin/src/main/java/org/pustefixframework/maven/plugins/PustefixWebappMojo.java

    r4383 r4447  
    113113 
    114114    /** 
    115      * @parameter default-value="true" 
    116      */ 
    117     private boolean standaloneTomcat; 
    118      
    119      
    120     /** 
    121115     * @parameter expression="${project}" 
    122116     * @required 
     
    172166            ant.setProperty("pfixroot", pfixroot); 
    173167            ant.setProperty("aptdir", aptdir); 
    174             ant.setProperty("standalone.tomcat", Boolean.toString(standaloneTomcat)); 
    175168            ant.setProperty("makemode", makemode); 
    176169            ant.setProperty("data.tar.gz", getDataTarGz()); 
     
    218211     
    219212    private void buildtimeProps() throws IOException { 
    220         BuildTimeProperties.generate(getProperties(), makemode, getMachine(), getFqdn(), System.getProperty("user.name"), standaloneTomcat); 
     213        BuildTimeProperties.generate(getProperties(), makemode, getMachine(), getFqdn(), System.getProperty("user.name")); 
    221214    } 
    222215    private Properties getProperties() { 
  • trunk/pustefix-samples/pustefix-sample-firstapp/src/main/pustefix/conf/pustefix.xml

    r4371 r4447  
    1818     
    1919    <!-- URL for the Pustefix editor --> 
    20     <choose> 
    21       <when test="$standalone.tomcat = 'true'"> 
    22         <prop name="xmlserver.editor_url">http://cmsskel.${fqdn}:8080</prop> 
    23       </when> 
    24       <otherwise> 
    25         <prop name="xmlserver.editor_url">http://cmsskel.${fqdn}</prop> 
    26       </otherwise> 
    27     </choose> 
     20    <prop name="xmlserver.editor_url">http://cmsskel.${fqdn}:8080</prop> 
    2821         
    2922    <choose> 
  • trunk/pustefix-samples/pustefix-sample1/src/main/pustefix/conf/pustefix.xml

    r4370 r4447  
    1616     
    1717    <!-- URL for the Pustefix editor --> 
    18     <choose> 
    19       <when test="$standalone.tomcat = 'true'"> 
    20         <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 
    21       </when> 
    22       <otherwise> 
    23         <prop name="xmlserver.editor_url">http://cms.${fqdn}</prop> 
    24       </otherwise> 
    25     </choose> 
     18    <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 
    2619     
    2720    <choose> 
  • trunk/pustefix-samples/pustefix-samplebank/src/main/pustefix/conf/pustefix.xml

    r4371 r4447  
    1616     
    1717    <!-- URL for the Pustefix editor --> 
    18     <choose> 
    19       <when test="$standalone.tomcat = 'true'"> 
    20         <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 
    21       </when> 
    22       <otherwise> 
    23         <prop name="xmlserver.editor_url">http://cms.${fqdn}</prop> 
    24       </otherwise> 
    25     </choose> 
     18    <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 
    2619     
    2720    <choose> 
  • trunk/pustefix-samples/pustefix-testsuite/src/main/pustefix/conf/pustefix.xml

    r4371 r4447  
    1616     
    1717    <!-- URL for the Pustefix editor --> 
    18     <choose> 
    19       <when test="$standalone.tomcat = 'true'"> 
    20         <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 
    21       </when> 
    22       <otherwise> 
    23         <prop name="xmlserver.editor_url">http://cms.${fqdn}</prop> 
    24       </otherwise> 
    25     </choose> 
     18    <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 
    2619     
    2720    <choose> 
  • trunk/pustefix-samples/pustefix-webservice/pom.xml

    r4401 r4447  
    103103              <tasks> 
    104104                <taskdef name="pfx-webservice" classname="org.pustefixframework.webservices.jaxws.generate.WebserviceTask" classpathref="maven.compile.classpath" description="Generates/deploys WSDL, WSDD and JS stubs from web service interfaces/configuration" /> 
    105                 <pfx-webservice tmpdir="target/webservice" prjdir="src/main/pustefix" builddir="target/classes" gendir="target/generated-sources" webappdir="target/${artifactId}-${version}/" classpathref="maven.compile.classpath" standalone="${standalone.tomcat}" portbase="80" includes="**/conf/project.xml" /> 
     105                <pfx-webservice tmpdir="target/webservice" prjdir="src/main/pustefix" builddir="target/classes" gendir="target/generated-sources" webappdir="target/${artifactId}-${version}/" classpathref="maven.compile.classpath" portbase="80" includes="**/conf/project.xml" /> 
    106106              </tasks> 
    107107            </configuration> 
  • trunk/pustefix-samples/pustefix-webservice/src/main/pustefix/conf/pustefix.xml

    r4371 r4447  
    1616     
    1717    <!-- URL for the Pustefix editor --> 
    18     <choose> 
    19       <when test="$standalone.tomcat = 'true'"> 
    20         <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 
    21       </when> 
    22       <otherwise> 
    23         <prop name="xmlserver.editor_url">http://cms.${fqdn}</prop> 
    24       </otherwise> 
    25     </choose> 
     18    <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 
    2619     
    2720    <choose> 
  • trunk/pustefix-webservices/pustefix-webservices-jaxws/src/main/java/org/pustefixframework/webservices/jaxws/generate/WebserviceTask.java

    r4384 r4447  
    6565    private File gendir; 
    6666    private Path classPath; 
    67     private boolean standalone; 
    6867    private int portbase; 
    6968     
     
    213212                                    String srvName = "HOST"; 
    214213                                    String srvPort = ""; 
    215                                     if (standalone) srvPort = ":" + (portbase + 80); 
     214                                    srvPort = ":" + (portbase + 80); 
    216215                                    String wsUrl = "http://" + srvName + srvPort + globConf.getRequestPath() + "/" + conf.getName(); 
    217216                                    FileUtils.searchAndReplace(wsdlFile, "UTF-8", "REPLACE_WITH_ACTUAL_URL", wsUrl); 
     
    327326 
    328327    /** 
    329      * Set if it's build in Tomcat standalone mode. 
    330      */ 
    331     public void setStandalone(boolean standalone) { 
    332         this.standalone = standalone; 
    333     } 
    334  
    335     /** 
    336328     * Set the relative port for the Tomcat. 
    337329     */