Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-07 Thread Robert Leland
Perhaps your problem is related to this Bug report ?

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14332

Also see topic strust-dev, why it may not be a bug in struts but in the 
Application Server.


http://marc.theaimsgroup.com/?l=struts-dev&m=103669629505455&w=3

Re: [Vote] Modify classloading in RequestUtils


-Rob



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-07 Thread Haseltine, Celeste
Steve, 

No, I understand what you are doing now that you've explained it.  I had not
thought of taking your approach.  

You might want to post your "fix" on the JRUN board, as a number of people
have tried to get JRUN 3.1 working with Struts 1.1b2 with no success.
Macromedia support has not responded to the issue, probably because JRUN 4.0
is out, and they would prefer that people upgrade.  You way sounds much
better than the round about way I found to get Struts 1.1b2 working with
JRUN 3.1

Thanks for the clarification!

Celeste



-Original Message-
From: Steve Fyfe [mailto:sdf@;cnicorp.com]
Sent: Wednesday, November 06, 2002 8:10 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Steps to Get JRUN 3.1 and Struts 1.1b2 working


Celeste,

In my case, in order to get Struts 1.1 to work in a JRun 3.1 system I
wrote one simple class, and plugged that class into the system by
specifying the class name in the web.xml file. The complete class was
included in my last email. All the class does is set the Action
Servlet's context class loader, then it starts the Action Servlet as
normal.

My class is not a class loader itself, nor does it modify the Struts
source code or require a rebuild of the struts.jar file. Yes, this is a
workaround, but I would not call it a "hack". You can completely
document the problem with its solution in a few comments in the web.xml
file to prevent confusion in the future.

If you are still confused, send me a message off-list with more
specific questions.

Steve

Steve Fyfe
CNI Corporation
Milford NH 03055

[EMAIL PROTECTED]

>>> "Haseltine, Celeste" <[EMAIL PROTECTED]> Tuesday, November
05, 2002 7:24:43 PM >>>
Steve, 

I'm a little confused.  Your first item was just a change in the JRUN
3.1
web.xml file, correct?  Or are you creating your own JRUN 3.1 action
class
loader to correctly preload the action class?  And the second item
regarding
the "public void init" method (as seen below), is this a modification
to the
Struts source code, and a local rebuild of the struts.jar file?  If so,
I
wanted to avoid this step, and use Struts 1.1b2 as is.  To me a
modification
of the struts source code is just a "hack" workaround that will end up
confusing the people who come after me on on this project.  

public void init(javax.servlet.ServletConfig sc) 
throws javax.servlet.ServletException {
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
super.init(sc);
}
}

Let me know if I misunderstood you. If there is a better way to get
Struts
1.1b2 working under JRUN 3.1, I will reconsider my decision to start
our new
project in Struts 1.02.  But I have to come up with a way that does
NOT
involve an "obscure" or "hack" work around, so that when I move onto
the
next project, and leave these guys to maintain this, they can rebuild
the
system without someone remembering that something "unusual" had to be
done
to get the project restored onto the server.  And modifying the Struts
source code is NOT an acceptable option for us.  What happened to our
partner who was based in the World Trade Center taught us a lesson the
hard
way, when it comes to reinstalling your web apps on new hardware, and
getting them up and running again.

Thanks for any additional insight/advice you can offer.

Celeste Haseltine, PE
MTL, Inc
Dallas, TX 


-Original Message-
From: Steve Fyfe [mailto:sdf@;cnicorp.com] 
Sent: Tuesday, November 05, 2002 1:52 PM
To: [EMAIL PROTECTED] 
Subject: Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working


>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.
 * 
 * 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

RE: Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-06 Thread Steve Fyfe
Celeste,

In my case, in order to get Struts 1.1 to work in a JRun 3.1 system I
wrote one simple class, and plugged that class into the system by
specifying the class name in the web.xml file. The complete class was
included in my last email. All the class does is set the Action
Servlet's context class loader, then it starts the Action Servlet as
normal.

My class is not a class loader itself, nor does it modify the Struts
source code or require a rebuild of the struts.jar file. Yes, this is a
workaround, but I would not call it a "hack". You can completely
document the problem with its solution in a few comments in the web.xml
file to prevent confusion in the future.

If you are still confused, send me a message off-list with more
specific questions.

Steve

Steve Fyfe
CNI Corporation
Milford NH 03055

[EMAIL PROTECTED]

>>> "Haseltine, Celeste" <[EMAIL PROTECTED]> Tuesday, November
05, 2002 7:24:43 PM >>>
Steve, 

I'm a little confused.  Your first item was just a change in the JRUN
3.1
web.xml file, correct?  Or are you creating your own JRUN 3.1 action
class
loader to correctly preload the action class?  And the second item
regarding
the "public void init" method (as seen below), is this a modification
to the
Struts source code, and a local rebuild of the struts.jar file?  If so,
I
wanted to avoid this step, and use Struts 1.1b2 as is.  To me a
modification
of the struts source code is just a "hack" workaround that will end up
confusing the people who come after me on on this project.  

public void init(javax.servlet.ServletConfig sc) 
throws javax.servlet.ServletException {
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
super.init(sc);
}
}

Let me know if I misunderstood you. If there is a better way to get
Struts
1.1b2 working under JRUN 3.1, I will reconsider my decision to start
our new
project in Struts 1.02.  But I have to come up with a way that does
NOT
involve an "obscure" or "hack" work around, so that when I move onto
the
next project, and leave these guys to maintain this, they can rebuild
the
system without someone remembering that something "unusual" had to be
done
to get the project restored onto the server.  And modifying the Struts
source code is NOT an acceptable option for us.  What happened to our
partner who was based in the World Trade Center taught us a lesson the
hard
way, when it comes to reinstalling your web apps on new hardware, and
getting them up and running again.

Thanks for any additional insight/advice you can offer.

Celeste Haseltine, PE
MTL, Inc
Dallas, TX 


-Original Message-
From: Steve Fyfe [mailto:sdf@;cnicorp.com] 
Sent: Tuesday, November 05, 2002 1:52 PM
To: [EMAIL PROTECTED] 
Subject: Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working


>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.
 * 
 * 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 :-)

Stev

RE: Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-05 Thread Haseltine, Celeste
Steve, 

I'm a little confused.  Your first item was just a change in the JRUN 3.1
web.xml file, correct?  Or are you creating your own JRUN 3.1 action class
loader to correctly preload the action class?  And the second item regarding
the "public void init" method (as seen below), is this a modification to the
Struts source code, and a local rebuild of the struts.jar file?  If so, I
wanted to avoid this step, and use Struts 1.1b2 as is.  To me a modification
of the struts source code is just a "hack" workaround that will end up
confusing the people who come after me on on this project.  

public void init(javax.servlet.ServletConfig sc) 
throws javax.servlet.ServletException {
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
super.init(sc);
}
}

Let me know if I misunderstood you. If there is a better way to get Struts
1.1b2 working under JRUN 3.1, I will reconsider my decision to start our new
project in Struts 1.02.  But I have to come up with a way that does NOT
involve an "obscure" or "hack" work around, so that when I move onto the
next project, and leave these guys to maintain this, they can rebuild the
system without someone remembering that something "unusual" had to be done
to get the project restored onto the server.  And modifying the Struts
source code is NOT an acceptable option for us.  What happened to our
partner who was based in the World Trade Center taught us a lesson the hard
way, when it comes to reinstalling your web apps on new hardware, and
getting them up and running again.

Thanks for any additional insight/advice you can offer.

Celeste Haseltine, PE
MTL, Inc
Dallas, TX 


-Original Message-
From: Steve Fyfe [mailto:sdf@;cnicorp.com]
Sent: Tuesday, November 05, 2002 1:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working


>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.
 * 
 * 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>

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




Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-05 Thread Steve Fyfe
>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.
 * 
 * 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:   
For additional commands, e-mail: 




Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-04 Thread John Owen
Thanks! If I ever run into a client that demands using JRun, this will come
in handy. :)
- Original Message -
From: "Haseltine, Celeste" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, November 04, 2002 11:20 AM
Subject: Steps to Get JRUN 3.1 and Struts 1.1b2 working


> 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.  Therefore, we discarded Struts 1.1b2 as a viable option for our
> upcoming project, and are going to stick with Struts 1.02.  If you are
using
> JRUN 4.0, these steps do NOT apply, and running 1.1b2 in it's own web
> application or web server should not be an issue for you.
>
> 1. Add 2 to Web.xml file
> 2. Add key to message resource parameter in struts-config.xml
>parameter="org.apache.struts.webapp.example.ApplicationResources"
> key="org.apache.struts.action.MESSAGE"/>
> 3. add following to action servlet in web.xml
>
> 
>   application
>
>
org.apache.struts.webapp.example.ApplicationResources lue>
> 
>
> 4. Move all the jar files assoc with Struts 1.1b2 into  Home>\lib\ext.  Moving them into it's own application server lib
directory,
> such as struts-example\WEB-INF\lib OR into it's own server lib directory
> (such as C:\Program Files\Allaire\JRun\servers\Struts1.1\lib) did NOT
work.
> The example application ONLY worked if I moved all the jar files into the
> \lib\ext directory.  This in effect killed all our applications
> running in Struts 1.02, as the jar files in the JRUN\lib\ext directory are
> loaded before the Struts jar files in the
\WEB-INF\lib
> directories.
>
> 5.  One last step, if you use the validator servlet, make sure you add it
to
> the web.xml file and load it first.
>
> 
> validator
> 
> config
> WEB-INF/validation.xml
> 
> 
> debug
> 2
> 
>
>
com.wintecinc.struts.action.ValidatorServlet
> validator
> 
> 1
> 
>
> If anyone finds a better way to get Struts 1.1b2 working in JRUN 3.1,
> particularly if you can get it working in it's own application server
> environment lib subdirectory, please post the steps you took to get it
> working.  I would be interested in seeing them.
>
> Celeste Haseltine, PE
> MTL, Inc
> Dallas, TX
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>

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




Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-04 Thread Haseltine, Celeste
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.  Therefore, we discarded Struts 1.1b2 as a viable option for our
upcoming project, and are going to stick with Struts 1.02.  If you are using
JRUN 4.0, these steps do NOT apply, and running 1.1b2 in it's own web
application or web server should not be an issue for you.

1.  Add 2 to Web.xml file
2.  Add key to message resource parameter in struts-config.xml

3.  add following to action servlet in web.xml


  application

org.apache.struts.webapp.example.ApplicationResources


4.  Move all the jar files assoc with Struts 1.1b2 into \lib\ext.  Moving them into it's own application server lib directory,
such as struts-example\WEB-INF\lib OR into it's own server lib directory
(such as C:\Program Files\Allaire\JRun\servers\Struts1.1\lib) did NOT work.
The example application ONLY worked if I moved all the jar files into the
\lib\ext directory.  This in effect killed all our applications
running in Struts 1.02, as the jar files in the JRUN\lib\ext directory are
loaded before the Struts jar files in the \WEB-INF\lib
directories.  

5.  One last step, if you use the validator servlet, make sure you add it to
the web.xml file and load it first.


validator

config
WEB-INF/validation.xml


debug
2


com.wintecinc.struts.action.ValidatorServlet
validator

1


If anyone finds a better way to get Struts 1.1b2 working in JRUN 3.1,
particularly if you can get it working in it's own application server
environment lib subdirectory, please post the steps you took to get it
working.  I would be interested in seeing them.

Celeste Haseltine, PE
MTL, Inc
Dallas, TX 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: