Re: web application initialization

2001-07-21 Thread Calvin Yu


Another thing you can do is use the ServiceManager extension that's
under the contrib 
directory in CVS.  I've just started to look at it myself.  Its seems to
be a fairly
new contributions, so documentation is pretty scarse.

Calvin



19 Jul 2001 21:05:32 -0700, Fabien Le Floc'h wrote:
> Thank you for the tip, this is definitely working and is not too ugly.
> 
> However I still find a little bit stupid we have to create a new Servlet just to use 
>its init method. Or maybe not if your Log4j servlet allows you to modify the logging 
>/ the log4j properties remotely (but that is another project, and it is bad not to 
>use struts for that).
> 
> I tried just to extend the ActionServlet and rewrite the init method (adding lines 
>to it). After modifying the web.xml, it still did not work. Has anyone a clue why? 
>Did anybody try to extend ActionServlet?
> 
> Regards,
> 
> Fabien
> 
> "Abraham Kang" <[EMAIL PROTECTED]> writes:
> 
> > Hi Fabien,
> > 
> >I typically do this in a StartupServlet in my web.xml.
> > 
> >Here is an example of how I initialize Log4j:
> > 
> > 
> > 
> >   
> > weblogic.jsp.keepgenerated
> > true
> >   
> > 
> >   
> > log4j
> > 
> > com.infogain.DOG.logging.servlet.Log4jServlet
> > 
> >   debug
> >   2
> > 
> > 
> >   wlpi_log4j_conf
> >   /WEB-INF/wlpi_log4j_conf.properties
> > 
> > 
> >   base_category
> >   com.infogain.DOG
> > 
> > 
> >   base_priority
> >   info
> > 
> >   1
> >   
> > 
> > ...
> > 
> >The init() method of Log4jServlet handles stuff that needs to run before
> > Struts (struts's  is 2).
> > 
> > --Abraham
> > 
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> > > Fabien Le Floc'h
> > > Sent: Wednesday, July 18, 2001 10:58 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: web application initialization
> > >
> > >
> > > Hi,
> > >
> > > I would like to know if it is possible to have some code called
> > > at the web application initialization (something like the init()
> > > method of the first servlet called by the web app - which here is
> > > ActionServlet).
> > >
> > > Should I just extend ActionServlet?
> > >
> > >
> > > regards,
> > >
> > > Fabien
> > >
> > >





Re: web application initialization

2001-07-21 Thread Fabien Le Floc'h

ok you are right (don't know what I did in my previous test) but extending 
ActionServlet works fine :).

Thank you

Fabien

"Martin, Margaret" <[EMAIL PROTECTED]> writes:

> I've had success with this, but I only overrode initApplication(), rather
> than all of init(). is your web.xml pointing to your new subclass?
> 
> -Original Message-
> From: Fabien Le Floc'h [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 19, 2001 11:06 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: web application initialization
> 
> 
> Thank you for the tip, this is definitely working and is not too ugly.
> 
> However I still find a little bit stupid we have to create a new Servlet
> just to use its init method. Or maybe not if your Log4j servlet allows you
> to modify the logging / the log4j properties remotely (but that is another
> project, and it is bad not to use struts for that).
> 
> I tried just to extend the ActionServlet and rewrite the init method (adding
> lines to it). After modifying the web.xml, it still did not work. Has anyone
> a clue why? Did anybody try to extend ActionServlet?
> 
> Regards,
> 
> Fabien
> 
> "Abraham Kang" <[EMAIL PROTECTED]> writes:
> 
> > Hi Fabien,
> > 
> >I typically do this in a StartupServlet in my web.xml.
> > 
> >Here is an example of how I initialize Log4j:
> > 
> > 
> > 
> >   
> > weblogic.jsp.keepgenerated
> > true
> >   
> > 
> >   
> > log4j
> > 
> >
> com.infogain.DOG.logging.servlet.Log4jServlet
> > 
> >   debug
> >   2
> > 
> > 
> >   wlpi_log4j_conf
> >   /WEB-INF/wlpi_log4j_conf.properties
> > 
> > 
> >   base_category
> >   com.infogain.DOG
> > 
> > 
> >   base_priority
> >   info
> > 
> >   1
> >   
> > 
> > ...
> > 
> >The init() method of Log4jServlet handles stuff that needs to run
> before
> > Struts (struts's  is 2).
> > 
> > --Abraham
> > 
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> > > Fabien Le Floc'h
> > > Sent: Wednesday, July 18, 2001 10:58 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: web application initialization
> > >
> > >
> > > Hi,
> > >
> > > I would like to know if it is possible to have some code called
> > > at the web application initialization (something like the init()
> > > method of the first servlet called by the web app - which here is
> > > ActionServlet).
> > >
> > > Should I just extend ActionServlet?
> > >
> > >
> > > regards,
> > >
> > > Fabien
> > >
> > >




code reuse

2001-07-21 Thread Steve LeClair



Our firm is has been using the struts framework to 
build our application demos. Now that we are shifting into a development cycle 
for a production release, we'd like to know more about how to build the struts 
side of our codebase with reuse in mind. 
 
Has anyone collected threads on reuse 
strategies?
 
For instance, in the demo we display/update 
coporate Address information on the Order form,  on the Account 
Maintenance form and also in a popup (independent) form. Now it 
seems silly to have three sets of form/action classes to manage the same 
data (at least we only use one EJB ;>)
 
Advice?
 
Thanks...Steve


RE: web application initialization

2001-07-21 Thread Martin, Margaret

I've had success with this, but I only overrode initApplication(), rather
than all of init(). is your web.xml pointing to your new subclass?

-Original Message-
From: Fabien Le Floc'h [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 11:06 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: web application initialization


Thank you for the tip, this is definitely working and is not too ugly.

However I still find a little bit stupid we have to create a new Servlet
just to use its init method. Or maybe not if your Log4j servlet allows you
to modify the logging / the log4j properties remotely (but that is another
project, and it is bad not to use struts for that).

I tried just to extend the ActionServlet and rewrite the init method (adding
lines to it). After modifying the web.xml, it still did not work. Has anyone
a clue why? Did anybody try to extend ActionServlet?

Regards,

Fabien

"Abraham Kang" <[EMAIL PROTECTED]> writes:

> Hi Fabien,
> 
>I typically do this in a StartupServlet in my web.xml.
> 
>Here is an example of how I initialize Log4j:
> 
> 
> 
>   
> weblogic.jsp.keepgenerated
> true
>   
> 
>   
> log4j
> 
>
com.infogain.DOG.logging.servlet.Log4jServlet
> 
>   debug
>   2
> 
> 
>   wlpi_log4j_conf
>   /WEB-INF/wlpi_log4j_conf.properties
> 
> 
>   base_category
>   com.infogain.DOG
> 
> 
>   base_priority
>   info
> 
>   1
>   
> 
> ...
> 
>The init() method of Log4jServlet handles stuff that needs to run
before
> Struts (struts's  is 2).
> 
> --Abraham
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Fabien Le Floc'h
> > Sent: Wednesday, July 18, 2001 10:58 PM
> > To: [EMAIL PROTECTED]
> > Subject: web application initialization
> >
> >
> > Hi,
> >
> > I would like to know if it is possible to have some code called
> > at the web application initialization (something like the init()
> > method of the first servlet called by the web app - which here is
> > ActionServlet).
> >
> > Should I just extend ActionServlet?
> >
> >
> > regards,
> >
> > Fabien
> >
> >



Re: web application initialization

2001-07-21 Thread Fabien Le Floc'h

Thank you for the tip, this is definitely working and is not too ugly.

However I still find a little bit stupid we have to create a new Servlet just to use 
its init method. Or maybe not if your Log4j servlet allows you to modify the logging / 
the log4j properties remotely (but that is another project, and it is bad not to use 
struts for that).

I tried just to extend the ActionServlet and rewrite the init method (adding lines to 
it). After modifying the web.xml, it still did not work. Has anyone a clue why? Did 
anybody try to extend ActionServlet?

Regards,

Fabien

"Abraham Kang" <[EMAIL PROTECTED]> writes:

> Hi Fabien,
> 
>I typically do this in a StartupServlet in my web.xml.
> 
>Here is an example of how I initialize Log4j:
> 
> 
> 
>   
> weblogic.jsp.keepgenerated
> true
>   
> 
>   
> log4j
> 
> com.infogain.DOG.logging.servlet.Log4jServlet
> 
>   debug
>   2
> 
> 
>   wlpi_log4j_conf
>   /WEB-INF/wlpi_log4j_conf.properties
> 
> 
>   base_category
>   com.infogain.DOG
> 
> 
>   base_priority
>   info
> 
>   1
>   
> 
> ...
> 
>The init() method of Log4jServlet handles stuff that needs to run before
> Struts (struts's  is 2).
> 
> --Abraham
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Fabien Le Floc'h
> > Sent: Wednesday, July 18, 2001 10:58 PM
> > To: [EMAIL PROTECTED]
> > Subject: web application initialization
> >
> >
> > Hi,
> >
> > I would like to know if it is possible to have some code called
> > at the web application initialization (something like the init()
> > method of the first servlet called by the web app - which here is
> > ActionServlet).
> >
> > Should I just extend ActionServlet?
> >
> >
> > regards,
> >
> > Fabien
> >
> >




Re: Struts with Oracle 9i Application Server and Jdeveloper....

2001-07-21 Thread SRadford


I (and others) have had problems with OC4J and it's
ApplicationContextClassLoader. Not a struts specific issue but has ocurred
in all web-apps deployed into OC4J. Orion seem to be ignoring this bug
report (#389).


Regards,


Sean


--
Dr Sean Radford, MBBS, MSc
Senior Consultant
Agora Professional Services Ltd
[EMAIL PROTECTED]
http://www.agora.co.uk
--
Agora Professional Services is an entrepreneurial consulting firm
specialising in e-Business and innovative solutions since 1995.




   

"Jean-Francoi  

s Brassard"  To: <[EMAIL PROTECTED]>  

Subject: Struts with Oracle 9i 
Application Server and Jdeveloper  
   

20/07/2001 

17:42  

Please 

respond to 

struts-user

   

   






Hi,

I want to know if Struts works well with Oracle 9i  Application Server and
Jdeveloper!!!

Thanks you in advance






Re: XML question

2001-07-21 Thread Robert Egan

Hi Domingo,

These notes may or may not help with your problem.

**

  =
Release Notes
=

$Id: RELEASE-NOTES-4.0-B5.txt,v 1.1 2001/05/11 05:55:11 craigmcc Exp $


...

Tomcat 4.0 and XML Parsers:
--
Previous versions of Tomcat 4.0 exposed the XML parser used by Jasper (the
JAXP/1.1 reference implementation)
to web applications.  This is no longer
the case, because Jasper loads its parser with a new class loader instead.

Keep the following points in mind when considering how to use XML parsers in
Tomcat 4.0 and your web applications:
If you wish to make the JAXP/1.1 RI XML parser available to all web
applications,
simply move the "jaxp.jar" and "crimson.jar" files from the
"$TOMCAT_HOME/jasper" directory
to the "$TOMCAT_HOME/lib" directory.
If you wish to make another XML parser that is JAXP/1.1-compatible available to
all web applications,
install that parser into the
  "$TOMCAT_HOME/lib" directory and remove "jaxp.jar" and "crimson.jar"
from the "$TOMCAT_HOME/jasper" directory.  It has been reported that Xerces
1.3.1 can be used in this fashion,
but 2.x alpha releases can not be.
If you wish to use an XML parser (such as Xerces) in the WEB-INF/lib directory
of your web application,
this should now be possible, because of the modified JAXP 1.1 parser mentioned
below.
WARNING:  Tomcat 4.0 now ships with a modified version of the JAXP/1.1
(Final) "jaxp.jar" and "crimson.jar"
files in the "jasper" subdirectory.
The "sealed" attribute has been removed from the manifest file for these two
JARs,
to avoid "package sealing violation" errors that were caused by them in a JDK
1.3 environment.
You MUST NOT replace these files with a different (or later) release of JAXP,
unless that later
release has had the sealed attribute removed, or you will encounter "package
sealing violation" errors
when trying to use a different XML parser in a web application.
*

Good luck,
Rob


Domingo Aguilera wrote:

> I am trying to run the struts-example that is included in nightly build ( 18
> july )
>
> Tomcat can't run because there's a problem when trying to run the digester
> duties.
>
> README file states that :
>
> "Download and install an XML parser that is compatible with the Java
> API"
>
> I am trying Xerces 1.4.1.  Is this ok ?
>
> Should I place the xerces.jar under
> $TOMCAT_HOME/webapps/struts-example/WEB-INF/lib ?
>
> or it has to be added to classpath in tomcat.sh ?
>
> One more... is there anything else that I have to include besides xerces.jar
> ? ( I mean crimson.jar , jaxp.jar, etc. )
>
> Domingo Aguilera
> Chief Technical Officer
> Sinergia Servicios,S.C.
>
> www.sinergia.com.mx




RE: html:img questions

2001-07-21 Thread Jake Thompson

Ok, followup on my own question.

I have Tomcat 3.2.3 running with Apache.  If I go to tomcat directly (port
8080) that is, it handles everything fine.  It seems that Apache flubs up on
the images encoded with the session.  Has anyone else experienced this and
is there an easy solution?

Thanks,
Jake T.

-Original Message-
From: Jake Thompson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 7:26 AM
To: '[EMAIL PROTECTED]'
Subject: html:img questions


Hi all,
I'm new to the list, so sorry if this has come up before.

When I use the  or , it
will encode the session id into this a cause the images not to load.  Is
there a fix or am I doing somthing wrong?

Thanks in advance,
Jake T.