OpenEMM Support Forum Index OpenEMM Support
Use this forum to get and provide free help regarding OpenEMM
 
 TOP   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Openemm on tomcat anyone?

 
Post new topic   Reply to topic    OpenEMM Support Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
sfantul



Joined: 15 Aug 2006
Posts: 40

PostPosted: Mon Sep 11, 2006 1:13 pm    Post subject: Openemm on tomcat anyone? Reply with quote

I was wandering if anyone managed to make openemm work on tomcat and if so i would ask him to write a short howto
Back to top
View user's profile Send private message
mitrax



Joined: 16 Aug 2007
Posts: 3

PostPosted: Tue Aug 21, 2007 6:37 am    Post subject: Reply with quote

Did you get any information on running OpenEMM with Tomcat?
I already tried, but i have problems with the paths to the config-files (especially mailgun.ini).
Back to top
View user's profile Send private message
ma
Site Admin


Joined: 03 Aug 2006
Posts: 529
Location: Munich, Germany

PostPosted: Tue Aug 21, 2007 7:13 am    Post subject: Tomcat vs. Resin Reply with quote

We are working on this. Problem is that servlet engine Resin and Tomcat do interpret some custom tags used in JSP pages slightly differently so that we would have to recode the tag classes (which could cause problems with Resin). Any insights welcome!
_________________
The OpenEMM Team
Back to top
View user's profile Send private message Visit poster's website
Liam



Joined: 22 Oct 2007
Posts: 3

PostPosted: Mon Jan 07, 2008 7:54 pm    Post subject: Any more info? Reply with quote

Any more information on getting OpenEMM running on Tomcat?
Back to top
View user's profile Send private message
ma
Site Admin


Joined: 03 Aug 2006
Posts: 529
Location: Munich, Germany

PostPosted: Tue Jan 08, 2008 10:45 am    Post subject: Reply with quote

To use Tomcat 5.5 or 6.0 instead of Resin, first you have to modify web.xml:

- DTD = http://java.sun.com/dtd/web-app_2.3.dtd
- change "/*do" to "*.do"
- remove JSPServlet definition and mapping (this is already done in the global web.xml of Tomcat)
- change the order of the elements to context-param, filter, filter-mapping, listener, servlet, servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib (because Tomcat is a little bit picky when interpreting the web.xml file)

Secondly you have to remove all Resin libraries from the classpath and add the Tomcat libraries like jsp-api.jar and servlet-api.jar as well as jta*.jar for transaction management.

Important: If you use Tomcat 5.5 and have problems with launching OpenEMM, you have to remove log4j.ja, because otherwise the log manager of Tomcat does not write all log entries (because of its singleton architecture). But to get OpenEMM finally running you have to add log4j.jar again (otherwise you will get an OpenSessionInViewFilter related error message).
_________________
The OpenEMM Team
Back to top
View user's profile Send private message Visit poster's website
Liam



Joined: 22 Oct 2007
Posts: 3

PostPosted: Tue Jan 08, 2008 3:40 pm    Post subject: Adding and Removing Reply with quote

I'm a little confused... how do you add log4j and remove it at the same time?
Do you have an example web.xml you could post?
Back to top
View user's profile Send private message
ma
Site Admin


Joined: 03 Aug 2006
Posts: 529
Location: Munich, Germany

PostPosted: Tue Jan 08, 2008 3:51 pm    Post subject: Reply with quote

you only have to remove log4j.jar in case OpenEMM does not launch properly and you have to check the log. This is my web.xml file:


Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2.3.dtd">
<web-app character-encoding="utf-8">

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml /WEB-INF/dataAccessContext.xml /WEB-INF/cronContext.xml</param-value>
        <description>spring context</description>
    </context-param>

   
    <filter>
        <filter-name>CharacterEncoding</filter-name>
        <filter-class>org.agnitas.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
           <param-name>encoding</param-name>
           <param-value>UTF-8</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>OpenSessionInView</filter-name>
        <filter-class>org.agnitas.dao.impl.OpenSessionInViewFilter</filter-class>
    </filter>


    <filter-mapping>
        <filter-name>CharacterEncoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
   
    <filter-mapping>
        <filter-name>OpenSessionInView</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>OpenSessionInView</filter-name>
        <url-pattern>/r</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>OpenSessionInView</filter-name>
        <url-pattern>/r.html</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>OpenSessionInView</filter-name>
        <url-pattern>/g</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>OpenSessionInView</filter-name>
        <url-pattern>/g.html</url-pattern>
    </filter-mapping>
   
    <filter-mapping>
        <filter-name>OpenSessionInView</filter-name>
        <url-pattern>/emm_webservice</url-pattern>
    </filter-mapping>


    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>


    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>detail</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>validate</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>ButtonServlet</servlet-name>
        <servlet-class>org.agnitas.web.ButtonRender</servlet-class>
    </servlet>
 
    <servlet>
        <servlet-name>ShowComponent</servlet-name>
        <servlet-class>org.agnitas.web.ShowComponent</servlet-class>
    </servlet>
 
    <servlet>
        <servlet-name>ShowImage</servlet-name>
        <servlet-class>org.agnitas.web.ShowImage</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>RedirectServlet</servlet-name>
        <servlet-class>org.agnitas.web.rdir</servlet-class>
    </servlet>
   
    <servlet>
       <servlet-name>TextFileDownload</servlet-name>
       <servlet-class>org.agnitas.web.TextFileDownload</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>OpenrateServlet</servlet-name>
        <servlet-class>org.agnitas.web.OnePixelCount</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>AxisServlet</servlet-name>
        <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
    </servlet>


    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ButtonServlet</servlet-name>
        <url-pattern>/button</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ShowComponent</servlet-name>
        <url-pattern>/sc</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ShowImage</servlet-name>
        <url-pattern>/image</url-pattern>
    </servlet-mapping>
 
    <servlet-mapping>
        <servlet-name>RedirectServlet</servlet-name>
        <url-pattern>/r</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>RedirectServlet</servlet-name>
        <url-pattern>/r.html</url-pattern>
    </servlet-mapping>
 
    <servlet-mapping>
       <servlet-name>TextFileDownload</servlet-name>
       <url-pattern>/file_download</url-pattern>
    </servlet-mapping>
   
    <servlet-mapping>
        <servlet-name>OpenrateServlet</servlet-name>
        <url-pattern>/g</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>OpenrateServlet</servlet-name>
        <url-pattern>/g.html</url-pattern>
    </servlet-mapping>
   
    <servlet-mapping>
        <servlet-name>AxisServlet</servlet-name>
        <url-pattern>/emm_webservice</url-pattern>
    </servlet-mapping>


    <session-config>
        <file-store>WEB-INF/sessions</file-store>
        <enable-cookies>false</enable-cookies>
        <enable-url-rewriting>true</enable-url-rewriting>
    </session-config>


    <mime-mapping>
        <extension>xsd</extension>
        <mime-type>text/xml</mime-type>
    </mime-mapping>


    <welcome-file-list>
        <welcome-file>/login.jsp</welcome-file>
    </welcome-file-list>


    <error-page exception-type="javax.servlet.ServletException" location="/error.jsp"/>
    <error-page exception-type="java.lang.Exception" location="/error.jsp"/>


    <taglib>
        <taglib-uri>
            WEB-INF/agnitas-taglib.tld
        </taglib-uri>
        <taglib-location>
            /WEB-INF/agnitas-taglib.tld
        </taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
 
</web-app>

_________________
The OpenEMM Team


Last edited by ma on Wed Jan 09, 2008 4:22 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
ma
Site Admin


Joined: 03 Aug 2006
Posts: 529
Location: Munich, Germany

PostPosted: Tue Jan 08, 2008 3:57 pm    Post subject: Reply with quote

BTW, I am using 5.4 alpha. Not sure, if it works with 5.3.2 as well.
_________________
The OpenEMM Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OpenEMM Support Forum Index -> Miscellaneous All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group