>As promised, I am posting the steps I took to get Struts 1.1b2 working
in
>JRUN 3.1.  I only got the example application working, I did not
bother to
>get the other web apps bundled with Struts 1.1b2 working.  So I can't
>guarantee that I found EVERY problem in getting Struts 1.1b2 working
in JRUN
>3.1. As you can see, the steps necessary to get Struts 1.1b2 working
are
>such that you cannot run any 1.02 Struts apps on the same physical
server in
>JRUN 3.1.  

I cannot comment on all the steps you went through, but I do know that
I was able to get my Struts application to load and run from the
standard WEB-INF folders. So in my case, it should be possible to share
the machine with Struts 1.0.2 based webapps.

I avoided the classloader problems by using the following code to
initialize the Action Servlet's context class loader at startup:

/**
 * Inserts initialization code into the beginning of the
ActionServlet.
 * <p>
 * For JRun 3.1, replace the class specified for the ActionServlet in
web.xml with
 * the full name of this class.
 */
public class Struts11JrunAdaptor extends
org.apache.struts.action.ActionServlet {
        
        /**
         * Before running the code in the standard Struts v1.1
ActionServlet, initialize
         * the thread's classloader. This problem is fixed in JRun v4,
so only use this
         * module on JRun v3.1.
         *
         * @param sc ServletContext for the current servlet
         * @throws ServletException If thrown by the super class.
         */     
        public void init(javax.servlet.ServletConfig sc) 
                        throws javax.servlet.ServletException {
                Thread.currentThread().setContextClassLoader(
                                this.getClass().getClassLoader());
                super.init(sc);
        }
}

I'm using JRun 3.1 on Win XP with JDK 1.3

I did this a while ago, so I may be overlooking some other critical
configuration detail. Your milage may vary :-)

Steve Fyfe
CNI Corporation
Milford NH 03055

[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to