[opencms-dev] How to remove opencms/opencms in tomcat 8 without using apache

Jose Fermin Athie Campollo athiecampollo at gmail.com
Tue Jan 5 16:39:31 CET 2016


Hi!

I never got this work
<context-param>
         <param-name>OpenCmsServlet</param-name>
         <param-value>/*</param-value>
 </context-param>

Also if you are using *tuckey* UrlRewriteFilter you need the name of the
servlet, so keep it.

<context-param>
        <param-name>OpenCmsServlet</param-name>
        <param-value>/opencms/*</param-value>
    </context-param>

why? I understand in the urlrewrite.xml is expecting the name

<condition type="request-uri" operator="notequal">^/opencms/.*$</condition>

The first thing you have to try is to remove the first /opencms/ (the
context). Rename the opencms.war to ROOT.war or if you need to be a custom
name change it in web.xml

<context-param>
        <param-name>DefaultWebApplication</param-name>
        <param-value>ROOT</param-value> <-- Change ROOT for your custome
name
    </context-param>

Delete the filter and start tomcat, if you can see this
http://localhost:8080/opencms/ instead of this
http://localhost:8080/opencms/opencms/ move on to the servlet.

your filter is correct, so keep it.
<filter>
             <filter-name>UrlRewriteFilter</filter-name>
blah blah...
</filter>

I recommend you to set the filter after CMIS configuration, line 96 of the
web.xml

Hope this can help you

Regards.
Fermin.


El mar., 5 de ene. de 2016 a la(s) 08:27, Lorenz Lammersdorf <
lorenz.lammersdorf at kernbrand.ch> escribió:

> try:
>
> opencms-importexport.xml
>
> <rendersettings>
>         <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
>         <vfs-prefix>/</vfs-prefix>
>         <userelativelinks>false</userelativelinks>
>         <exporturl>http://127.0.0.1/handle404</exporturl>
>
> 2016-01-05 13:36 GMT+01:00  <Manoj.Sharma at nevagroup.com>:
> > Hi
> >
> > I am trying to deploy OpenCms 9 in Tomcat without using apache or any
> proxy.
> > I tried this
> > "
> http://www.opencms-wiki.org/wiki/Removing_the_/opencms/opencms_prefix_without_using_Apache
> "
> > and done all the things mentioned here but again i am not succeeded. I
> have
> > also tried these urls
> > "http://lists.opencms.org/pipermail/opencms-dev/2011q3/035947.html", "
> >
> https://blog.codecentric.de/en/2013/08/opencms-8-avoiding-opencmsopencms-in-url-2/
> ",
> > "http://www.ebel-computing.de/JSPWiki/Wiki.jsp?page=OpenCms", But again
> not
> > succeeded.
> >
> > opencms-importexport.xml
> >
> > <rendersettings>
> >         <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
> >         <vfs-prefix>${CONTEXT_NAME}</vfs-prefix>
> >         <userelativelinks>false</userelativelinks>
> >         <exporturl>http://127.0.0.1:80
> ${CONTEXT_NAME}/handle404</exporturl>
> > ....
> > </rendersettings>
> >
> > web.xml
> > <context-param>
> >         <param-name>OpenCmsServlet</param-name>
> >         <param-value>/*</param-value>
> >     </context-param>
> >
> >     <context-param>
> >         <param-name>DefaultWebApplication</param-name>
> >         <param-value>ROOT</param-value>
> >     </context-param>
> >
> > ....
> >
> > <filter>
> >             <filter-name>UrlRewriteFilter</filter-name>
> >
> >
> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
> >
> >             <init-param>
> >
>  <param-name>confReloadCheckInterval</param-name>
> >                           <param-value>-1</param-value>
> >                  </init-param>
> >
> >                  <init-param>
> >                           <param-name>logLevel</param-name>
> >                           <param-value>ERROR</param-value>
> >                  </init-param>
> >
> >                  <init-param>
> >                           <param-name>statusEnabled</param-name>
> >                           <param-value>false</param-value>
> >                  </init-param>
> >
> >                  <init-param>
> >                           <param-name>statusPath</param-name>
> >                         <param-value>/status</param-value>
> >                 </init-param>
> >         </filter>
> >
> >         <filter-mapping>
> >                 <filter-name>UrlRewriteFilter</filter-name>
> >                 <url-pattern>/*</url-pattern>
> >         </filter-mapping>
> >
> >
> > And whatever the configuration in the opencms, i have not changed. I have
> > also created urlrewrite.xml
> >
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN"
> > "http://tuckey.org/res/dtds/urlrewrite2.6.dtd">
> > <urlrewrite>
> >   <rule>
> >    <condition type="request-uri"
> > operator="notequal">^/export/.*$</condition>
> >    <condition type="request-uri"
> > operator="notequal">^/resources/.*$</condition>
> >    <condition type="request-uri"
> > operator="notequal">^/opencms-errorhandler/.*$</condition>
> >    <condition type="request-uri"
> > operator="notequal">^/webdav/.*$</condition>
> >    <condition type="request-uri"
> > operator="notequal">^/opencms/.*$</condition>
> >    <condition type="request-uri"
> operator="notequal">^/setup/.*$</condition>
> > <--- This rule is probably not necessary
> >    <from>^/(.*)$</from>
> >    <to>/opencms/$1</to>
> > </rule>
> > </urlrewrite>
> >
> >
> >
> > Please help in this regard.
> >
> > With Regards
> > Manoj Kumar Sharma
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> >
> >
> >
> >
>
>
>
> --
> Kernbrand baut aus und bekommt mehr Platz: Ab 1.2.2016 sind wir an der
> Teufenerstrasse 11, St.Gallen
> --
> Aktuell im Blog Mensch Marke: Besser bloggen statt werben
> Unseren Newsletter abonnieren
> --
> Lorenz Lammersdorf
> Senior Web Developer
>
> Kernbrand AG
> Technology
> Rorschacher Strasse 17
> 9000 St.Gallen
> +41 71 492 20 22
>
>
> --
>
> Verbinden Sie sich jetzt mit uns! Wir freuen uns auf Sie.
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20160105/e9b52396/attachment.htm>


More information about the opencms-dev mailing list