Re: Iterating over Hastable ??

2001-03-30 Thread Dan Miser

The opening tag should read like this (note the lack of the terminator):
  

It looks like this is a bug in the docs.

Also, be sure you include a reference to the logic TLD in the JSP page.
--
Dan Miser
http://www.distribucon.com

- Original Message - 
From: "Christof Ettl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 6:10 AM
Subject: Iterating over Hastable ??


> 
>   Next element is 
> 
> but an excetion like that:
> 
> javax.servlet.ServletException: IllegalAccessException accessing property
> value of bean hashEntry





Re: bean in session

2001-03-30 Thread Martin Cooper

The  and  tags do this. They are documented
here:

http://jakarta.apache.org/struts/struts-logic.html

Hope this helps.

--
Martin Cooper


- Original Message -
From: "Yuriy Zubarev" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 1:02 PM
Subject: bean in session


> Hello friends,
>
> I would like to ask if someone knows how to check for some bean
> presence/absence in jsp page by means of  tags.
>
> Thank you for your time.
>
> Best of luck,
> Yuriy Zubarev
>
>
> ___
> Do You Yahoo!?
> Get your free @yahoo.ca address at http://mail.yahoo.ca





Re: ITERATE-TAG

2001-03-30 Thread Martin Cooper

The getSalesProductHt() method must be public for the iterate tag to be able
to access it. You have it declared as protected, which is why you are seeing
the exception.

--
Martin Cooper


- Original Message -
From: "hunkpapa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 11:05 AM
Subject: ITERATE-TAG


> Hello,
>
> I have the following Problem
>
> I putted a Bean in  the ActionServlet in the Scope "session".This Bean
> implements
> an Hashtable(salesProduct) ,wich I want to iterate with the IterateTag
>
> "
>  scope="session">.
> "
>
> This throws following Exception:
>
> "
> No getter method for property salesProductHt of bean sp
> "
>
> I initalisated this Hashtable an the getter Method in the bean in  this
> very Static Way
>
> "
> Hashtable salesProductHt = new Hashtable();
>
> protected Hashtable getSalesProductHt (){
>
> salesProductHt.put("1","First");
> salesProductHt.put("2","Second");
> salesProductHt.put("3","Third");
> salesProductHt.put("4","Fourth");
> salesProductHt.put("5","Fifth");
>
> return (this.salesProductHt);
>
> }
> "
>
> if I put this Hashtable  in the ActionServlet in the Session and try to
> read its Elements
> this way it works well.
>
> "
>  scope="session" >
>  Element Value: 
> 
> "
>
> Whats the difference , why can t the getterMethod not be found ??
>
>
> Please Help me...
>
>
>
>
>





Re: value missing

2001-03-30 Thread Martin Cooper

That was fixed fairly recently. The latest nightly builds do the right thing.

--
Martin Cooper


At 03:24 PM 3/30/01, Jacob Thomas wrote:
>does not seem to output the "value" attribute of the corresponding tag. 
>Has anybody encountered this? -- Thanks Jacob





RE: Pooling with Oracle database

2001-03-30 Thread Abraham Kang

Hi All,

Is there any specific reason oci8 will not work with iPlanet?

I have used the Oracle oci drivers before and all that is required is a
client install of Oracle on the box that will be accessing Oracle.  All
"OCI" means is the JDBC drivers will be using the native SQL*NET drivers
(from the Oracle client install) to access the database instead of SQL*NET
implemented in Java (thin).  In addition, you have to make sure the oci*.dll
file is on the PATH of the iPlanet box.

--Abraham

> -Original Message-
> From: malcolm davis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 30, 2001 5:42 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Pooling with Oracle database
>
>
> Yes, your correct, I meant ‘oci8’.  Too many cups of Java. :)
>
> The issue with connection pooling depends on your production
> environment.  For instances, if you plan to deploy to iPlanet,
> you can NOT use ‘oci8’ directly, you have to use ‘thin’, or use
> iPlanet’s connection pooling.  iPlanet will not allow you to use
> ‘oci8’ directly.  This might be a problem with other Application
> servers.
>
> The typical use of the ‘thin’ is in a connect/disconnect type
> scenario.  What could happen, (and what I have seen), is that
> phantom connections on the Oracle database occurs when there is
> network problem.  The phantom connections use Oracle process.
> For some reason the open ‘thin’ driver can cause these phantom
> connections.  (I don’t know why, our Oracle admin has developed
> a process to recognized and kill these connections)
>
> The ‘oci8’ starts an Oracle process for each JDBC connect.
> ‘oci8’ connects and disconnects quicker than the ‘thin’.
> ‘oci8’ runs around 30% faster.
>
> Another thing to keep in mind is PreparedStatements.  Having
> PreparedStatements ready to use is a wonderful way of increasing
> performance.  Instead of having a connection pool, you could have a
> PreparedStatement for each thing you need to query.  PreparedStatement
> uses an Oracle Bind.
>
> Connection pooling is about 3x faster than connect/disconnect.
> PreparedStatement pooling is about 5x faster than Connection pooling.
>
> We have been able to drop some of our query times from 700 ms to 40 ms
> using PreparedStatement.  It all depends on your application and
> environment.
>
>
>
>
>   > -Original Message-
>   > From: Robert Hentosh [mailto:[EMAIL PROTECTED]]
>   > Sent: Friday, March 30, 2001 6:38 AM
>   > To: [EMAIL PROTECTED]
>   > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>   > Subject: Re: Pooling with Oracle database
>   >
>   >
>   > I think what was meant was oci8.  The valid values are thin,
>   > oci8 and kprb.
>   >
>   > The thin driver is entirely written in Java.
>   >
>   > The OCI is a mixture of C and Java, so that is the reason it
>   > can't be used
>   > in applets, since the C portion is not platform independent.
>   >
>   > The kprb is for, as the docs say, "server side JDBC driver
> when running
>   > inside [the] server".  Apparently that is useful when used with CORBA.
>   >
>   > If you want to use OCI then you need to make sure the oracle
> OCI client
>   > library (written in C) is installed on your client.
>   >
>   > I am not sure what Malcolm meant about the thin not being designed for
>   > connection pooling.  I haven't heard of any issues with
>   > connection pooling
>   > and using the thin driver.  In fact Oracle's own documentation
>   > (http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbcwhpap.htm)
>   >  mentions
>   > using connection pooling with the thin client. Did I miss something?
>   >
>   > If you are trying to get your connection up ... then just use
> the 'thin'
>   > driver.  I am about to try the OCI driver to see if there is
>   > any performance
>   > improvements with my application.
>   >
>   > > neither ora8 nor ori8 doesn't work.
>   > > I receive exception
>   > >
>   > > java.sql.SQLException: Invalid Oracle URL specified:
>   > > OracleDriver.connect
>   > >
>   > >
>   > > rz
>   > > - Original Message -
>   > > From: "malcolm davis" <[EMAIL PROTECTED]>
>   > > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>   > > Sent: Thursday, March 29, 2001 9:33 AM
>   > > Subject: RE: Pooling with Oracle database
>   > >
>   > >
>   > >> excuse me that 'ori8' not ora8
>   > >>
>   > >>   > -Original Message-
>   > >>   > From: malcolm davis [mailto:[EMAIL PROTECTED]]
>   > >>   > Sent: Wednesday, March 28, 2001 10:16 PM
>   > >>   > To: [EMAIL PROTECTED]
>   > >>   > Subject: RE: Pooling with Oracle database
>   > >>   >
>   > >>   >
>   > >>   > Rafal,
>   > >>   >
>   > >>   > You might want to change from the thin to ora8.
>   > >>   > 'ora8' was designed to be used for connection pooling.
>   > >>   > The 'thin' driver was developed for applets.
>   > >>   >
>   > >>   > - malcolm
>   > >>   >
>   > >>   >   > -Original Message-
>   > >>   >   > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>   > >>   >   > Sent: Wednesday, March 28, 2001 7:41 PM

retaining a reference to an object using digester

2001-03-30 Thread Derek Harding

I was wondering how to retain a reference to the first object created with
the Digester.  I don't quite understand the user's guide.  It says to push
the object onto the stack before parseing.  When I do this I get an End
event threw exception java.lang.NoSuchMethodException.  Any ideas?




struts-user@jakarta.apache.org

2001-03-30 Thread Peri Srinivas

Hi,
  I  havea  requirement  of  8  file attachments  in  a  page.Is there
any way that i  can have  FormFile[]  in  FormBean.  Currently  i have
file1,file2,file3  etc   in  form class  and   it  does not look good.


Thanks,
Peri




RE: Pooling with Oracle database

2001-03-30 Thread malcolm davis

Yes, your correct, I meant ‘oci8’.  Too many cups of Java. :)

The issue with connection pooling depends on your production
environment.  For instances, if you plan to deploy to iPlanet,
you can NOT use ‘oci8’ directly, you have to use ‘thin’, or use
iPlanet’s connection pooling.  iPlanet will not allow you to use
‘oci8’ directly.  This might be a problem with other Application
servers.

The typical use of the ‘thin’ is in a connect/disconnect type
scenario.  What could happen, (and what I have seen), is that
phantom connections on the Oracle database occurs when there is
network problem.  The phantom connections use Oracle process.
For some reason the open ‘thin’ driver can cause these phantom
connections.  (I don’t know why, our Oracle admin has developed
a process to recognized and kill these connections)

The ‘oci8’ starts an Oracle process for each JDBC connect.
‘oci8’ connects and disconnects quicker than the ‘thin’.
‘oci8’ runs around 30% faster.

Another thing to keep in mind is PreparedStatements.  Having
PreparedStatements ready to use is a wonderful way of increasing
performance.  Instead of having a connection pool, you could have a
PreparedStatement for each thing you need to query.  PreparedStatement
uses an Oracle Bind.

Connection pooling is about 3x faster than connect/disconnect.
PreparedStatement pooling is about 5x faster than Connection pooling.

We have been able to drop some of our query times from 700 ms to 40 ms
using PreparedStatement.  It all depends on your application and
environment.




  > -Original Message-
  > From: Robert Hentosh [mailto:[EMAIL PROTECTED]]
  > Sent: Friday, March 30, 2001 6:38 AM
  > To: [EMAIL PROTECTED]
  > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  > Subject: Re: Pooling with Oracle database
  >
  >
  > I think what was meant was oci8.  The valid values are thin,
  > oci8 and kprb.
  >
  > The thin driver is entirely written in Java.
  >
  > The OCI is a mixture of C and Java, so that is the reason it
  > can't be used
  > in applets, since the C portion is not platform independent.
  >
  > The kprb is for, as the docs say, "server side JDBC driver when running
  > inside [the] server".  Apparently that is useful when used with CORBA.
  >
  > If you want to use OCI then you need to make sure the oracle OCI client
  > library (written in C) is installed on your client.
  >
  > I am not sure what Malcolm meant about the thin not being designed for
  > connection pooling.  I haven't heard of any issues with
  > connection pooling
  > and using the thin driver.  In fact Oracle's own documentation
  > (http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbcwhpap.htm)
  >  mentions
  > using connection pooling with the thin client. Did I miss something?
  >
  > If you are trying to get your connection up ... then just use the 'thin'
  > driver.  I am about to try the OCI driver to see if there is
  > any performance
  > improvements with my application.
  >
  > > neither ora8 nor ori8 doesn't work.
  > > I receive exception
  > >
  > > java.sql.SQLException: Invalid Oracle URL specified:
  > > OracleDriver.connect
  > >
  > >
  > > rz
  > > - Original Message -
  > > From: "malcolm davis" <[EMAIL PROTECTED]>
  > > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
  > > Sent: Thursday, March 29, 2001 9:33 AM
  > > Subject: RE: Pooling with Oracle database
  > >
  > >
  > >> excuse me that 'ori8' not ora8
  > >>
  > >>   > -Original Message-
  > >>   > From: malcolm davis [mailto:[EMAIL PROTECTED]]
  > >>   > Sent: Wednesday, March 28, 2001 10:16 PM
  > >>   > To: [EMAIL PROTECTED]
  > >>   > Subject: RE: Pooling with Oracle database
  > >>   >
  > >>   >
  > >>   > Rafal,
  > >>   >
  > >>   > You might want to change from the thin to ora8.
  > >>   > 'ora8' was designed to be used for connection pooling.
  > >>   > The 'thin' driver was developed for applets.
  > >>   >
  > >>   > - malcolm
  > >>   >
  > >>   >   > -Original Message-
  > >>   >   > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
  > >>   >   > Sent: Wednesday, March 28, 2001 7:41 PM
  > >>   >   > To: [EMAIL PROTECTED]
  > >>   >   > Subject: Re: Pooling with Oracle database
  > >>   >   >
  > >>   >   >
  > >>   >   >
  > >>   >   >
  > >>   >   > On Wed, 28 Mar 2001, Rafal Zakrzewski wrote:
  > >>   >   >
  > >>   >   > > Hello,
  > >>   >   > >
  > >>   >   > > How to encode one pool of connections for whole application
  > >>   >   > > ? Should I encode this in some main servlet and then
  > >>   > receive connection
  > >>   >   > > from this servlet ?
  > >>   >   > >
  > >>   >   > > In struts-config.xml I have a section:
  > >>   >   > > 
  > >>   >   > >  >>   >   > >description="Trial access to database"
  > >>   >   > > driverClass="oracle.jdbc.driver.OracleDriver"
  > >>   >   > > maxCount="4"
  > >>   >   > > minCount="2"
  > >>   >   > > password="123"
  > >>   >   > >  url="jdbc:oracle:

AW: AW: using log4J with Struts

2001-03-30 Thread Rainer Alföldi



Hi 
Azeem,
 
I 
think I attached all needed files. I just renamed them and deleted everthing not 
needed for log4j.
 
- 
Startup-mailinglist.java:
Contains public void init(ServletConfig config) which 
is called during servlet initialisation. This method calls private void 
initLog4J( Properties initProps ).
 
- 
init-mailinglist.conf:
This is the properties file used by Startup-javaand 
contains all parameter used to init log4j. (Basically path for log4j config file 
and time intervall for the reload option of 
log4j.)
 
- 
log-config-mailinglist.xml:
this is the xml-config file for log4j. here you define 
what packages should be logging where to and at what logging level. This file is 
used in Startup.java at "DOMConfigurator.configureAndWatch( url, reloadTime );". 
Check the log4j documentation if you need more support on 
this.
 
Moving the application transparently? The appender 
files are still hardcoded. If we ever have to much time during this project, 
we´ll fix that up... ;-)). Everthing else is independent of absolute 
paths.
 
 
Greeting
 
Rainer
 
 
 

  -Ursprüngliche Nachricht-Von: Azeem Niazi 
  [mailto:[EMAIL PROTECTED]]Gesendet: Samstag, 31. März 2001 
  00:58An: [EMAIL PROTECTED]; 
  [EMAIL PROTECTED]Betreff: Re: AW: using log4J with 
  Struts
  
  Rainer
  You forgot to attach the routines and log4 J config file. I am new to both 
  Struts and Log4j.So what it is coming down to is you define init params in one 
  of the routines you are talking here and then reference them in web.xml, so it 
  gets registered with controller servlet. Could you send a sample of web.xml 
  with log4J categories registered in it along with some init routines.
  What would be the best way of passing config file for log4J to 
  PropertyConfigurator(config), in cases where you are developing your 
  application in one environment and then want to move your application 
  transparently to a differently env without affecting passing of config file 
  location(e.g moving from Windows to Unix) Thanks
  Azeem
  
  >From: Rainer Alföldi <[EMAIL PROTECTED]>
  >Reply-To: [EMAIL PROTECTED] 
  >To: <[EMAIL PROTECTED]>, "Jon Wilmoth" 
  <[EMAIL PROTECTED]>
  >Subject: AW: using log4J with Struts 
  >Date: Sat, 31 Mar 2001 00:27:06 +0200 
  > 
  >Hi Jon, 
  > 
  >we set up a startup servlet, that initializes our application. 
  This is very 
  >simple and basically just calls various init routines. (No 
  subclassing) 
  >After that the ActionServlet is called. 
  > 
  >All applications use init.props to get up and running. The same 
  with log4j. 
  >I have attached the routines for startup as well as the 
  configuration for 
  >log4j. 
  > 
  >I really wounldn´t start mixing the ActionServlet with anything 
  else but 
  >Struts. 
  > 
  >Hope this helps. 
  > 
  > 
  >Greeting 
  > 
  > 
  >Rainer 
  > -Ursprüngliche Nachricht- 
  > Von: Jon Wilmoth [mailto:[EMAIL PROTECTED]] 
  > Gesendet: Freitag, 30. März 2001 23:56 
  > An: [EMAIL PROTECTED] 
  > Betreff: Re: using log4J with Struts 
  > 
  > 
  > So your suggesting subclassing the default controller, 
  >org.apache.struts.action.ActionServlet, to override only the 
  init method? 
  >Also, I'm not familiar enough with the web.xml format as to be 
  able to 
  >configure the org.apache.log4j.PropertyConfigurator. How would 
  one do this? 
  > 
  > Thanks, 
  > Jon Wilmoth 
  > - Original Message - 
  > From: Tomer Meshorer 
  > To: '[EMAIL PROTECTED]' 
  > Sent: Friday, March 30, 2001 11:28 AM 
  > Subject: RE: using log4J with Struts 
  > 
  > 
  > Yes, In the init() method of the controller servlet define all 
  your 
  >categories and give them a priority. You may also want to put 
  the categris 
  >in web.xml so you can read them in runtime and thus be able to 
  change the 
  >log detail level (i.e. only ERROR log messages) when you are in 
  production. 
  > 
  > Tomer Meshorer 
  > NewChannel 
  > 
  > 
  > 
  > 
  > -Original Message- 
  > From: Azeem Niazi [mailto:[EMAIL PROTECTED]] 
  > Sent: Friday, March 30, 2001 11:22 AM 
  > To: [EMAIL PROTECTED] 
  > Subject: using log4J with Struts 
  > 
  > 
  > Has anyone used log4J with struts. If so, how did you do it. 
  Do you 
  >need to register log4j with controller servlet? 
  > 
  > 
  >-- 

  > Get your FREE download of MSN Explorer at 
  http://explorer.msn.com 
  > 
  > 
  ><< init-mailinglist.conf >> 
  ><< log-config-mailinglist.xml >> 
  ><< Startup-mailinglist.java >> 
  
  
  Get your FREE download of MSN Explorer at http://explorer.msn.com
  


value missing

2001-03-30 Thread Jacob Thomas

 does not seem to output the "value" attribute of the
corresponding  tag. Has anybody encountered this?
--
Thanks
Jacob



Re: AW: using log4J with Struts

2001-03-30 Thread Azeem Niazi

Rainer
You forgot to attach the routines and log4 J config file. I am new to both Struts and Log4j.So what it is coming down to is you define init params in one of the routines you are talking here and then reference them in web.xml, so it gets registered with controller servlet. Could you send a sample of web.xml with log4J categories registered in it along with some init routines.
What would be the best way of passing config file for log4J to PropertyConfigurator(config), in cases where you are developing your application in one environment and then want to move your application transparently to a differently env without affecting passing of config file location(e.g moving from Windows to Unix) Thanks
Azeem

>From: Rainer Alföldi <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED] 
>To: <[EMAIL PROTECTED]>, "Jon Wilmoth" <[EMAIL PROTECTED]>
>Subject: AW: using log4J with Struts 
>Date: Sat, 31 Mar 2001 00:27:06 +0200 
> 
>Hi Jon, 
> 
>we set up a startup servlet, that initializes our application. This is very 
>simple and basically just calls various init routines. (No subclassing) 
>After that the ActionServlet is called. 
> 
>All applications use init.props to get up and running. The same with log4j. 
>I have attached the routines for startup as well as the configuration for 
>log4j. 
> 
>I really wounldn´t start mixing the ActionServlet with anything else but 
>Struts. 
> 
>Hope this helps. 
> 
> 
>Greeting 
> 
> 
>Rainer 
> -Ursprüngliche Nachricht- 
> Von: Jon Wilmoth [mailto:[EMAIL PROTECTED]] 
> Gesendet: Freitag, 30. März 2001 23:56 
> An: [EMAIL PROTECTED] 
> Betreff: Re: using log4J with Struts 
> 
> 
> So your suggesting subclassing the default controller, 
>org.apache.struts.action.ActionServlet, to override only the init method? 
>Also, I'm not familiar enough with the web.xml format as to be able to 
>configure the org.apache.log4j.PropertyConfigurator. How would one do this? 
> 
> Thanks, 
> Jon Wilmoth 
> - Original Message - 
> From: Tomer Meshorer 
> To: '[EMAIL PROTECTED]' 
> Sent: Friday, March 30, 2001 11:28 AM 
> Subject: RE: using log4J with Struts 
> 
> 
> Yes, In the init() method of the controller servlet define all your 
>categories and give them a priority. You may also want to put the categris 
>in web.xml so you can read them in runtime and thus be able to change the 
>log detail level (i.e. only ERROR log messages) when you are in production. 
> 
> Tomer Meshorer 
> NewChannel 
> 
> 
> 
> 
> -Original Message- 
> From: Azeem Niazi [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, March 30, 2001 11:22 AM 
> To: [EMAIL PROTECTED] 
> Subject: using log4J with Struts 
> 
> 
> Has anyone used log4J with struts. If so, how did you do it. Do you 
>need to register log4j with controller servlet? 
> 
> 
>-- 
> Get your FREE download of MSN Explorer at http://explorer.msn.com 
> 
> 
><< init-mailinglist.conf >> 
><< log-config-mailinglist.xml >> 
><< Startup-mailinglist.java >> 
Get your FREE download of MSN Explorer at http://explorer.msn.com


RE: JUNIT and Struts

2001-03-30 Thread RAP

Absolutely,

Well done, and a very worthwhile contribution.

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: 30 March 2001 14:14
> To: [EMAIL PROTECTED]
> Subject: Re: JUNIT and Struts
> 
> 
> Vincent and Ron have been working on some things. Take a look at the
> web/test directory in the nightly build.
> 
> Vincent is also in midst of donating J2EEUnit to Apache/Jakarta. Yeah
> Vincent!
> 
> > Padma Ginnaram wrote:
> > Is there a sample available for testing struts with j2eeunit



AW: using log4J with Struts

2001-03-30 Thread Rainer Alföldi



Hi 
Jon,
 
we set 
up a startup servlet, that initializes our application. This is very simple and 
basically just calls various init routines. (No subclassing) After that the 
ActionServlet is called.
 
All 
applications use init.props to get up and running. The same with log4j. I have 
attached the routines for startup as well as the configuration for 
log4j.
 
I 
really wounldn´t start mixing the ActionServlet with anything else but 
Struts.
 
Hope 
this helps.
 
 
Greeting
 
 
Rainer

  -Ursprüngliche Nachricht-Von: Jon Wilmoth 
  [mailto:[EMAIL PROTECTED]]Gesendet: Freitag, 30. März 2001 
  23:56An: [EMAIL PROTECTED]Betreff: Re: 
  using log4J with Struts
  So your suggesting subclassing the default 
  controller, org.apache.struts.action.ActionServlet, to override only the init 
  method?  Also, I'm not familiar enough with the web.xml format as to be 
  able to configure the org.apache.log4j.PropertyConfigurator.  How would 
  one do this?
   
  Thanks,
  Jon Wilmoth
  
- Original Message - 
From: 
Tomer Meshorer 
To: '[EMAIL PROTECTED]' 

Sent: Friday, March 30, 2001 11:28 
AM
Subject: RE: using log4J with 
Struts

Yes, In the init() method of the controller servlet 
define all your categories and give them a priority. You may also want 
to put the categris in web.xml so you can read them in runtime and thus be 
able to change the log detail level (i.e. only ERROR log messages) when you 
are in production.
 
Tomer Meshorer
NewChannel
 
 
 
 

  -Original Message-From: Azeem Niazi 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, March 30, 2001 11:22 
  AMTo: [EMAIL PROTECTED]Subject: using 
  log4J with Struts
  Has anyone used log4J with struts. If so, how did you do it. Do you 
  need to register log4j with controller servlet?
  
  Get your FREE download of MSN Explorer at http://explorer.msn.com
  
 init-mailinglist.conf








	
		
				
		
			
			
	

	
		
		
			

	
  
	
		
		
			

	



  
	  
	

	
	  
	


	
	  
	

	
	  
	


  
	  
	  
	
	
	
	  
	

	
	  
	

  
		
		
		
	



 Startup-mailinglist.java


actions without using struts-config.xml?

2001-03-30 Thread Derek Harding

I am wondering if there is a way to call actions without going through the
struts-config.xml.  For example if i have just action-mappings in an xml
file similar to what is in the struts-config, and parse the xml with the
digeseter, am I able to call actions this way?  if so how.  thanks




Re: using log4J with Struts

2001-03-30 Thread Jon Wilmoth



So your suggesting subclassing the default 
controller, org.apache.struts.action.ActionServlet, to override only the init 
method?  Also, I'm not familiar enough with the web.xml format as to be 
able to configure the org.apache.log4j.PropertyConfigurator.  How would one 
do this?
 
Thanks,
Jon Wilmoth

  - Original Message - 
  From: 
  Tomer 
  Meshorer 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Friday, March 30, 2001 11:28 
  AM
  Subject: RE: using log4J with 
Struts
  
  Yes, 
  In the init() method of the controller servlet define all your categories and 
  give them a priority. You may also want to put the categris in web.xml so 
  you can read them in runtime and thus be able to change the log detail level 
  (i.e. only ERROR log messages) when you are in production.
   
  Tomer Meshorer
  NewChannel
   
   
   
   
  
-Original Message-From: Azeem Niazi 
[mailto:[EMAIL PROTECTED]]Sent: Friday, March 30, 2001 11:22 
AMTo: [EMAIL PROTECTED]Subject: using 
log4J with Struts
Has anyone used log4J with struts. If so, how did you do it. Do you 
need to register log4j with controller servlet?

Get your FREE download of MSN Explorer at http://explorer.msn.com



RE: contribution - menuing component

2001-03-30 Thread Scott Sayles


Ted Husted has gracially put a copy of my Struts compatible menuing
component on his site at http://husted.com/about/struts.  Thanks Ted.

The basic overview:
Menus can be modeled in an XML file and displayed by JSP via tags.  The
strings used to display the menus in HTML are contained in a properties file
that can be modified (or just use your own custom one).  Customized menu
displayers can be used by implementing the MenuDisplayer interface.
This is in it's early stages and is a work in progress.  Please review the
README for more specific info.
>From my point of view, this is probably more suited for web based
applications as opposed to content driven ones.

Notes about the example:
The example has been internationalized for Russian (with english being the
default).  Just switch your browser language to Russian to see the Russian
prompts.  Unfortunately, I don't have a firm grasp on creating dynamic menus
that are mutli-browser compliant.  So, to see the dynamic menus properly
please use IE 5.0 > (sorry :( ).  I would greatly appreciate some assitence
in the area of dynamic menus.

I've tried to describe most of what's going on in the README.  However,
please feel free to e-mail me/and or the struts list about any specific
questions or comments.

Thanks

---
Scott Sayles
Software Developer
FGM Inc.


> -Original Message-
> From: Scott Sayles [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 30, 2001 2:23 PM
> To: [EMAIL PROTECTED]
> Subject: contribution - menuing component
>
>
>
> I've developed a menuing component for Struts and would like to
> contribute it.  At the least I'd like to submit it to the
> user/and or dev list for feedback.  I have a binary distribution
> that includes the source code and is about 500k (tarred and
> compressed).  I'm concerned that this may be a bit too large for
> the mailing list.  Shall I go ahead and send it? (The reason it's
> this big is that I've included some libraries in the example app.
> just to make it easier for users to try it out.  I could change
> it.)  Of course, I'd be more than happy to send it directly to anyone.
>
> Attached is a copy of the README file to give you an idea about
> what this is.  It is not entirely ready for contribution to
> Struts but I just wanted to get some feedback before I decide
> what to do next.
>
> Thanks
>
> Scott
>




Re: Internationalized JavaScript?...Solved!!

2001-03-30 Thread Dallas_Browning


I do appreciate the suggestions presented to me.  Let me share with you how
I solved the problem.
It was actually quite simple.  I simply added the following line to my
resin.conf (I'm using resin, but the same type of solution should work for
anything) file:
  
That way I can still keep the ".js" extension, but it will be considered a
jsp file to the servlet container.  I then placed the bean:message tags
wherever I needed internationalized text (example: confirm("" )) and ... voila!  It works!  I think.  I tested it
only a couple times and only in one instance, but I think it will work for
what I need it for.

-Dallas



   
 
Dallas_Brownin 
 
[EMAIL PROTECTED]To: [EMAIL PROTECTED]   
 
  cc:  
 
03/30/01 10:58Fax to:  
 
AMSubject: Internationalized 
JavaScript?... 
Please respond 
 
to struts-user 
 
   
 
   
 





Let's say you have an alert box that has a message.  You want that message
to be internationalized.  Let's also assume that you want your JavaScript
source to not be in the jsp/html page, you would rather link to it (i.e.

bean in session

2001-03-30 Thread Yuriy Zubarev

Hello friends,

I would like to ask if someone knows how to check for some bean
presence/absence in jsp page by means of  tags.

Thank you for your time.

Best of luck,
Yuriy Zubarev


___
Do You Yahoo!?
Get your free @yahoo.ca address at http://mail.yahoo.ca



SOLVED: What has changed in the DataSource part?

2001-03-30 Thread Shamdasani Nimmi-ANS004

It was a small mistake



RE: using log4J with Struts

2001-03-30 Thread Tomer Meshorer



Yes, 
In the init() method of the controller servlet define all your categories and 
give them a priority. You may also want to put the categris in web.xml so 
you can read them in runtime and thus be able to change the log detail level 
(i.e. only ERROR log messages) when you are in production.
 
Tomer 
Meshorer
NewChannel
 
 
 
 

  -Original Message-From: Azeem Niazi 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, March 30, 2001 11:22 
  AMTo: [EMAIL PROTECTED]Subject: using log4J 
  with Struts
  Has anyone used log4J with struts. If so, how did you do it. Do you need 
  to register log4j with controller servlet?
  
  Get your FREE download of MSN Explorer at http://explorer.msn.com
  


using log4J with Struts

2001-03-30 Thread Azeem Niazi
Has anyone used log4J with struts. If so, how did you do it. Do you need to register log4j with controller servlet?Get your FREE download of MSN Explorer at http://explorer.msn.com


Re: Internationalized JavaScript?...

2001-03-30 Thread Peter Alfors

Dallas,

We chose to do option 1.  We found it to be the most flexible.
For instance, we use a javascript confirm to ask the user:  'Are you sure you
want to delete widget XYZ?'
Where XYZ is the item he clicked on.  The rest of the text is
internationalized.

HTH,
Pete

[EMAIL PROTECTED] wrote:

> Let's say you have an alert box that has a message.  You want that message
> to be internationalized.  Let's also assume that you want your JavaScript
> source to not be in the jsp/html page, you would rather link to it (i.e.
> 

ITERATE-TAG

2001-03-30 Thread hunkpapa

Hello,

I have the following Problem

I putted a Bean in  the ActionServlet in the Scope "session".This Bean
implements
an Hashtable(salesProduct) ,wich I want to iterate with the IterateTag

"
.
"

This throws following Exception:

"
No getter method for property salesProductHt of bean sp
"

I initalisated this Hashtable an the getter Method in the bean in  this
very Static Way

"
Hashtable salesProductHt = new Hashtable();

protected Hashtable getSalesProductHt (){

salesProductHt.put("1","First");
salesProductHt.put("2","Second");
salesProductHt.put("3","Third");
salesProductHt.put("4","Fourth");
salesProductHt.put("5","Fifth");

return (this.salesProductHt);

}
"

if I put this Hashtable  in the ActionServlet in the Session and try to
read its Elements
this way it works well.

"

 Element Value: 

"

Whats the difference , why can t the getterMethod not be found ??


Please Help me...








Populating object array in ActionForm bean from a request

2001-03-30 Thread Jacob Thomas

Has any one tried populating a property in an ActionForm bean that is an
array, through the default handling of a request? This is about presenting
serveral choices on page each of which has a checkbox and then determining
which choices were selected by the user.
--
Thanks in advance.
Jacob



Internationalized JavaScript?...

2001-03-30 Thread Dallas_Browning


Let's say you have an alert box that has a message.  You want that message
to be internationalized.  Let's also assume that you want your JavaScript
source to not be in the jsp/html page, you would rather link to it (i.e.

RE: CVS directory structure

2001-03-30 Thread Assenza, Chris

How it is deployed in production and how you develop will probably look
different.  I prefer to have a tree such as:

Project Name
- build
- dist
- doc
- src
- bin
* stuff for building app (you should use ANT IMO) or
other executable utils (like bat files)
- com
* packages,etc. incl. utils, ejb's, all that.
- docroot
* JSP's, HTML, etc.
-images
-scripts 
*for external javascripts
-styles
*for stylesheets
-WEB-INF
*web.xml, tld's, etc.
-lib
*libraries supporting web app, such
as struts.jar
- lib
* for full third-part distributions, like the whole
struts.zip, ant, jaxp, regexp. That way developers have consistent releases
available to them - no need to d/l and unzip. 
- META-INF
* deployment descriptors for EJB's (if necessary),
application.xml (if necessary).

This type of setup has worked so far for me. If done correctly using ANT, it
will build into how it should look deployment wise, once there (it will do
this under build directory) ANT jars everything up and you should be able to
drop your war or ear into some server's deploy directory and that's that! :)

My $0.02 :)

-Chris Assenza



-Original Message-
From: Mitesh Mehta [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 1:33 PM
To: '[EMAIL PROTECTED]'
Cc: Mitesh Mehta
Subject: CVS directory structure


I am trying to figure out the CVS directory structure for a large
multi-component web application. 
I know that the Servlet/JSP specs prescribe a certain directory structure
that is used to build war files.  I am interested in knowing if any of you
have added to that structure or have any advise or pointers based on your
own experience.
Thanks, 
Mitesh Mehta 
S1 Corp (http://www.s1.com) 



CVS directory structure

2001-03-30 Thread Mitesh Mehta
Title: CVS directory structure





I am trying to figure out the CVS directory structure for a large multi-component web application.


I know that the Servlet/JSP specs prescribe a certain directory structure that is used to build war files.  I am interested in knowing if any of you have added to that structure or have any advise or pointers based on your own experience.

Thanks,


Mitesh Mehta
S1 Corp (http://www.s1.com)





MYSQL

2001-03-30 Thread James Bell



Thanks everyone
 
I opted for mm.mysql  v2.0.4.  I have had 
no problems so far.  
 
James


Need extended functionality of and

2001-03-30 Thread Mindaugas Idzelis

I need some extra functionality of these two tags. These tags limit what you
can use for the "value" attribute to a static value. It would be nice to use
the value of a bean or a dynamic property for this. For example:

Currently:
">

It would be great to do something like this:


Would something like this be possible in the next coming version of struts?
The same applies for the taglib for .

Thanks!!




What has changed in the DataSource part?

2001-03-30 Thread Shamdasani Nimmi-ANS004

Hi,

My application works great with struts  version 1 of 1/29/01 but now I want to move to 
the latest version of struts and its not working. No changes have been made to the 
application itself. I have tried even beta 1 version and other versions after that but 
no luck.

The problem seems to be the DATASOURCE. I do not get an error but it seems the 
application is not connecting to the database. Has something changed in Datasource 
definition in struts-config file.

This is what I have it defined as(and it works fine with 1/29/01 version):

  



Thanks in advance

-Nimmi





RE: using struts in a load-balanced environement

2001-03-30 Thread Doug Wright

thanks for all your great advice!

-Original Message-
From: Doug Wright [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 4:50 PM
To: [EMAIL PROTECTED]
Subject: using struts in a load-balanced environement


I am very curious about whether the struts framework could be
applied in a 'load-balanced' or 'webserver-farm' environment.  One of the
main requirements of the application I am currently working on is that it
function properly in such a distributed or load-balanced environment where
each request may or may not come from the same web server.
This obviously precludes us from using session and application
scopes in the application.  We have been using the database to maintain
state, but it seems like a very inefficient and dirty solution.
I would love to be able to use the model 2 architecture (and
specifically the struts framework), but it seems like most of the benefits
can only be had in an environment where the same web server will be used for
each request (our load-balancers support 'sticky-sessions' but these rely on
cookies and we don't want cookies to be a requirement for using the
application).
Am I missing something?  Is there a way to effectively use struts
and the session and application scope in a load-balanced environment? 
I greatly appreciate any advice that anyone has on this subject.
---DougWright



Re: JavaScript in Struts

2001-03-30 Thread David Winterfeldt

There is an article in last months Java Pro that shows
how to define menus in xml and then generate
javascript menus based off of them.  I just tried to
look at it and it doesn't work (generating an
Exception) and I also had to fix the web.xml file to
even get it running.  Maybe some of the code will
still be helpful.

Source for April Issue
http://www.java-pro.com/code/2001/JP0104.zip

David

--- Tom Miller <[EMAIL PROTECTED]> wrote:
> Thanks, Ted.
> 
> I like Craig's suggestion about combining dynamic
> Javascript menu systems
> with Struts. I wonder if anyone has tried this. I'm
> looking for a Javascript
> tree or slider menu to adapt in this way and would
> appreciate it if anyone
> could share any research.
> 
> I have looked at "Morten's Javascript Tree Menu"
>
http://html.tucows.com/programmer/scriptarchives/jsarchive/jstreemenu.html
> which is impressive and free. However, it is frame
> based,  too elaborate for
> my needs, and uses Windows Explorer tree icons,
> which is not what I had in
> mind.
> 
> Thanks
> Tom
> 
> Ted Husted wrote:
> 
> > I've added these to our Jyve FAQ:
> >
> > How Do I use Javascript in my Struts forms?
> > ---
> >
> > The relevant HTML tags provide support for the
> Javascript event handlers
> > onblur, onchange, onclick, ondblclick, onfocus,
> onkeydown, onkeypress,
> > onkeyup, onmousedown, onmousemove, onmouseout,
> onmouseover, onmouseup.
> >
> > For more about Javascript events, see the Netscape
> Javascript Reference
> > guide <
> >
>
http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm
> > >.
> >
> > For more about HTML tags, see the Struts HTML Tag
> Guide <
> >
>
http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm
> > >.
> >
> > The Javascript itself can then be placed
> >
> > 1. Inline, if it is simple enough, like
> onclick="history.go(-1)"
> > 2. As a 

RE: getting value from bean

2001-03-30 Thread Nishit Trivedi

thanx all...got it...i just had to type cast the form varible
to "MyBean" which is passed in perform method..and then call getter...

thanx again..

Nishit

-Original Message-
From: Assenza, Chris [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 11:11 AM
To: '[EMAIL PROTECTED]'
Subject: RE: getting value from bean


Check out the sample app! :) Here's the code for the logon screen that gets
the data from the ActionForm.

String username = ((LogonForm) form).getUsername();
String password = ((LogonForm) form).getPassword();

LogonForm is the name of the Form Bean and form is from the arguments you
mentioned (ActionForm form). The getXXX() methods are methods in your Form
Bean that match up to the form-fields on your JSP! :)

That's just an example, but it should be pretty easy for you to replicate
with your bean, MyBean.

Chris Assenza


-Original Message-
From: Nishit Trivedi [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 10:58 AM
To: '[EMAIL PROTECTED]'
Subject: RE: getting value from bean


ok..
so i am upto this point..
I have perform method in ProcessMyBean.java
it has four aguements : ActionMapping mapping,ActionForm
form,HttpServletRequest request,HttpServletResponse response

so how do i get the reference of "MyBean" in this ProcessBeanClass without
creating new object of  "MyBean"..??

Please bear with me..as i just started working on struts...

Nishit

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 12:51 AM
To: [EMAIL PROTECTED]
Subject: Re: getting value from bean


See comments intermixed.

- Original Message -
From: "Nishit Trivedi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 3:29 PM
Subject: RE: getting value from bean


> This is what i think should happen...
> (Correct me wherever i am wrong...)
>
> This is how i call bean for setting values in config file:
> 
> 
>  type="org.apache.struts.dir1.dir2.MyBean"
> scope="session"/>
> 

The 'scope' attribute does not apply to the  element. It applies
aonly to the  element, as you use it below.

It seems odd that your form is under the Struts package, but it won't cause
any problems.

> then after i set the values and after validate method, control goes as
> follows:
> ---
> 
>  has form it has
> action as
> "/struts-example/doSomeAction.do" -->
>type="org.apache.struts.dir1.dir2.ProcessMyBean"
>name="myForm"
>   scope="session"
>validate="false">
>   
>   
> 
> ---

This looks OK. When doSomeAction.do is invoked, Struts will look for an
instance of your form in the session, under the attribute name "myBean". If
it does not find one, it will create a new one for you. It will then
populate the bean with the values from the request.

> So in ProcessMyBean class, i instantiated object MyBean with:
> MyBean mb = new MyBean();
> and then i called the getter to get the value which was set before:
> (here is somewhat i am missing)

I think this is where your problem lies. You should not be creating an
instance of your form bean. Struts will do that for you, and call the
appropriate setter methods based on the query string for the request. The
form bean will then be passed to your action's perform() method, and you can
call the getter methods as necessary.

Hope this helps.

--
Martin Cooper


>
> Please help me...
> Nishit
> -Original Message-
> From: Jacob Thomas [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 5:58 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: getting value from bean
>
>
> I think your  tag is instantiating a new Form bean and hence
the
> fields have their default values when the page is rendered. When the page
is
> submitted another form bean is getting created. You may want to set the
> scope to 'session' and remove the bean appropriately.
> --
> Jacob
>
> -Original Message-
> From: Nishit Trivedi [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 2:49 PM
> To: [EMAIL PROTECTED]
> Subject: getting value from bean
>
>
> hi.
>
> I am new to struts...
>
> I have a problem with getting a value from bean...
> here are some pieces of my code where i set and get values:
>
>  In jsp page i have this:
> -
>
> 
>   
> 
> 
>
>  In class i have getter and setter as:
> --
>  public String getTotalCopies(){
>System.out.println("getting total copies:"+this.totalCopies);
>return this.totalCopies;
>  }
>
>  public void setTotalCopies(String totCopy){
>this.totalCopies = 

RE: Communicating with EJB's from Action

2001-03-30 Thread Deadman, Hal

I like this description, mainly because it sounds like what I have been
doing. Something like this might make a good section in the documentation -
Struts & EJBs. I would consider the stateless session beans part of the
model because they contain business logic. You also talk about "basic value
checking of attributes". Would you also do this same value checking in the
ActionForm validate method? 

Thanks, Hal

> -Original Message-
> From: Handy, Steve [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 6:04 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Communicating with EJB's from Action
> 
> 
> Chris,
> 
> What we've done is this:
> 
> - Put a layer of business logic session stateless beans above 
> the entity
> EJBs.  The beans in this layer have methods that perform 
> specific business
> functions.
> 
> - Have the Action classes translate the user's click into one 
> or more calls
> to the business logic layer.  We don't pass the ActionForm to 
> the business
> layer, because the ActionForm is too close to the view.  If 
> we need to pass
> a set of related data items to the business layer, we do it 
> with a value
> object that represents the kind of businessy attributes you'd 
> find in an
> EJB.
> 
> So, we partition responsibility like this:
> 
> JSPs: rendering. To us this is View.
> 
> Actions: translation of user actions into business operations 
> (if necessary)
> and always a decision about what to display next.  This layer doesn't
> implement business operations, but knows what high level 
> business operation
> it needs to call to fulfill the user's request.  We consider 
> this layer to
> be Controller.
> 
> Business session stateless beans: fulfillment of business 
> function.  For
> cross-entity operations, do the details here.  Speak in only 
> business terms,
> not in any view terms.  Completely independent of Struts.  
> Still Controller
> for us.
> 
> Entity EJBs: Fulfill single-entity business operations here 
> (like basic
> value checking of attributes).  Of course, these EJBs also 
> give us all the
> entity-bean function we get from the container.  Only this 
> layer knows about
> the database.  In general, we don't let an entity EJB 
> interact with another
> entity EJB; we leave this to the session stateless beans 
> above.  This is our
> Model.
> 
> Utility classes:
>   ActionForms - for passing view-specific information around 
> between Actions
> & JSPs, etc.
>   Value objects - for passing entity-specific information 
> around, including
> up to and down from the Actions.
> 
> Steve
> 
> -Original Message-
> From: Assenza, Chris [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 4:59 PM
> To: '[EMAIL PROTECTED]'
> Subject: Communicating with EJB's from Action
> 
> 
> Hello! :) 
> 
> Our dev team for a big enterprise app has been going back and 
> forth on how
> to send the data from the ActionForm to a Session bean.  We 
> have a number of
> options and I was hoping for some feedback because we've had 
> enough talk and
> its time to decide! :) (Our architecture is as of now to use 
> only Session
> Beans, but we will probably start wrapping Entity beans with 
> Session beans
> eventually).
> 
> 1) Send the ActionForm to the EJB from Action perform()
>   Pros: Easy and less work
>   Cons: Defeats the purpose of Struts in that the 
> Business Logic is no
> longer self-contained and independent of the V in MVC :). If 
> for whatever
> reason we overhaul the front end and remove Struts, we're not 
> in the ideal
> position to do so. 
> 
> 2) Create a special utility class that with special methods, that when
> invoked from the Action perform() method, will put the data 
> from ActionForm
> into a HashTable.  Then, we'll pass that object to the EJB 
> and do whatever
> business logic is necessary.  
> 
> 3) JMS - Sort of an adaptation of the number 2 as JMS uses 
> HashMaps and the
> like but it follows a specific spec and has a lot more to it 
> then what we'd
> be doing above.  However, none of us really know much about 
> JMS yet. :|
> Obviously we can learn, but is it a recommended path to 
> follow from your
> experience? (in regards to Struts specifically as well). 
> 
> 4) RMI or RMI-IIOP.  Create a remote object within the client 
> and pass the
> remote reference to the EJB.  The EJB can then use this 
> reference to make
> callbacks to the client.  Not sure about this one either, seems rather
> inefficient.
> 
> Oh, and one other question, since DataTable (Java collection) 
> is basically
> made up of vectors, can one use the iterate tag to move through it?
> 
> Any thoughts or experiences?? :)
> 
> Thanks,
> 
> Chris Assenza
> 



RE: getting value from bean

2001-03-30 Thread Assenza, Chris

Check out the sample app! :) Here's the code for the logon screen that gets
the data from the ActionForm.

String username = ((LogonForm) form).getUsername();
String password = ((LogonForm) form).getPassword();

LogonForm is the name of the Form Bean and form is from the arguments you
mentioned (ActionForm form). The getXXX() methods are methods in your Form
Bean that match up to the form-fields on your JSP! :)

That's just an example, but it should be pretty easy for you to replicate
with your bean, MyBean.

Chris Assenza


-Original Message-
From: Nishit Trivedi [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 10:58 AM
To: '[EMAIL PROTECTED]'
Subject: RE: getting value from bean


ok..
so i am upto this point..
I have perform method in ProcessMyBean.java
it has four aguements : ActionMapping mapping,ActionForm
form,HttpServletRequest request,HttpServletResponse response

so how do i get the reference of "MyBean" in this ProcessBeanClass without
creating new object of  "MyBean"..??

Please bear with me..as i just started working on struts...

Nishit

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 12:51 AM
To: [EMAIL PROTECTED]
Subject: Re: getting value from bean


See comments intermixed.

- Original Message -
From: "Nishit Trivedi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 3:29 PM
Subject: RE: getting value from bean


> This is what i think should happen...
> (Correct me wherever i am wrong...)
>
> This is how i call bean for setting values in config file:
> 
> 
>  type="org.apache.struts.dir1.dir2.MyBean"
> scope="session"/>
> 

The 'scope' attribute does not apply to the  element. It applies
aonly to the  element, as you use it below.

It seems odd that your form is under the Struts package, but it won't cause
any problems.

> then after i set the values and after validate method, control goes as
> follows:
> ---
> 
>  has form it has
> action as
> "/struts-example/doSomeAction.do" -->
>type="org.apache.struts.dir1.dir2.ProcessMyBean"
>name="myForm"
>   scope="session"
>validate="false">
>   
>   
> 
> ---

This looks OK. When doSomeAction.do is invoked, Struts will look for an
instance of your form in the session, under the attribute name "myBean". If
it does not find one, it will create a new one for you. It will then
populate the bean with the values from the request.

> So in ProcessMyBean class, i instantiated object MyBean with:
> MyBean mb = new MyBean();
> and then i called the getter to get the value which was set before:
> (here is somewhat i am missing)

I think this is where your problem lies. You should not be creating an
instance of your form bean. Struts will do that for you, and call the
appropriate setter methods based on the query string for the request. The
form bean will then be passed to your action's perform() method, and you can
call the getter methods as necessary.

Hope this helps.

--
Martin Cooper


>
> Please help me...
> Nishit
> -Original Message-
> From: Jacob Thomas [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 5:58 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: getting value from bean
>
>
> I think your  tag is instantiating a new Form bean and hence
the
> fields have their default values when the page is rendered. When the page
is
> submitted another form bean is getting created. You may want to set the
> scope to 'session' and remove the bean appropriately.
> --
> Jacob
>
> -Original Message-
> From: Nishit Trivedi [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 2:49 PM
> To: [EMAIL PROTECTED]
> Subject: getting value from bean
>
>
> hi.
>
> I am new to struts...
>
> I have a problem with getting a value from bean...
> here are some pieces of my code where i set and get values:
>
>  In jsp page i have this:
> -
>
> 
>   
> 
> 
>
>  In class i have getter and setter as:
> --
>  public String getTotalCopies(){
>System.out.println("getting total copies:"+this.totalCopies);
>return this.totalCopies;
>  }
>
>  public void setTotalCopies(String totCopy){
>this.totalCopies = totCopy;
>System.out.println("setting total copies:"+this.totalCopies);
>  }
> -
>
> Print statement of setter is perfectly fine as i expected but
> the statement in getter returns null...?? what's wrong?
> TIA..
>
> Nishit Trivedi
> Software Engineer
> Planet Access Networks - An InSage Comp

RE: getting value from bean

2001-03-30 Thread Nishit Trivedi

ok..
so i am upto this point..
I have perform method in ProcessMyBean.java
it has four aguements : ActionMapping mapping,ActionForm
form,HttpServletRequest request,HttpServletResponse response

so how do i get the reference of "MyBean" in this ProcessBeanClass without
creating new object of  "MyBean"..??

Please bear with me..as i just started working on struts...

Nishit

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 12:51 AM
To: [EMAIL PROTECTED]
Subject: Re: getting value from bean


See comments intermixed.

- Original Message -
From: "Nishit Trivedi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 3:29 PM
Subject: RE: getting value from bean


> This is what i think should happen...
> (Correct me wherever i am wrong...)
>
> This is how i call bean for setting values in config file:
> 
> 
>  type="org.apache.struts.dir1.dir2.MyBean"
> scope="session"/>
> 

The 'scope' attribute does not apply to the  element. It applies
only to the  element, as you use it below.

It seems odd that your form is under the Struts package, but it won't cause
any problems.

> then after i set the values and after validate method, control goes as
> follows:
> ---
> 
>  has form it has
> action as
> "/struts-example/doSomeAction.do" -->
>type="org.apache.struts.dir1.dir2.ProcessMyBean"
>name="myForm"
>   scope="session"
>validate="false">
>   
>   
> 
> ---

This looks OK. When doSomeAction.do is invoked, Struts will look for an
instance of your form in the session, under the attribute name "myBean". If
it does not find one, it will create a new one for you. It will then
populate the bean with the values from the request.

> So in ProcessMyBean class, i instantiated object MyBean with:
> MyBean mb = new MyBean();
> and then i called the getter to get the value which was set before:
> (here is somewhat i am missing)

I think this is where your problem lies. You should not be creating an
instance of your form bean. Struts will do that for you, and call the
appropriate setter methods based on the query string for the request. The
form bean will then be passed to your action's perform() method, and you can
call the getter methods as necessary.

Hope this helps.

--
Martin Cooper


>
> Please help me...
> Nishit
> -Original Message-
> From: Jacob Thomas [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 5:58 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: getting value from bean
>
>
> I think your  tag is instantiating a new Form bean and hence
the
> fields have their default values when the page is rendered. When the page
is
> submitted another form bean is getting created. You may want to set the
> scope to 'session' and remove the bean appropriately.
> --
> Jacob
>
> -Original Message-
> From: Nishit Trivedi [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 2:49 PM
> To: [EMAIL PROTECTED]
> Subject: getting value from bean
>
>
> hi.
>
> I am new to struts...
>
> I have a problem with getting a value from bean...
> here are some pieces of my code where i set and get values:
>
>  In jsp page i have this:
> -
>
> 
>   
> 
> 
>
>  In class i have getter and setter as:
> --
>  public String getTotalCopies(){
>System.out.println("getting total copies:"+this.totalCopies);
>return this.totalCopies;
>  }
>
>  public void setTotalCopies(String totCopy){
>this.totalCopies = totCopy;
>System.out.println("setting total copies:"+this.totalCopies);
>  }
> -
>
> Print statement of setter is perfectly fine as i expected but
> the statement in getter returns null...?? what's wrong?
> TIA..
>
> Nishit Trivedi
> Software Engineer
> Planet Access Networks - An InSage Company
> 973-691-4704 X157




Re: JavaScript in Struts

2001-03-30 Thread Jean-Noel Ribette

- Original Message - 
From: Tom Miller <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 3:33 PM
Subject: Re: JavaScript in Struts


> Thanks, Ted.
> 
> I like Craig's suggestion about combining dynamic Javascript menu systems
> with Struts. I wonder if anyone has tried this. I'm looking for a Javascript
> tree or slider menu to adapt in this way and would appreciate it if anyone
> could share any research.
> 
I have begun to work on menu components for an internal library I am developing with 
the following features:
- menu support localization and can be static or dynamic (possibiliy to add / remove 
items)
- static menu are created using special tags in the jsp page.
- dynamic menu are created in the Action class, put in the session/request and 
displayed by a tag.
- submenu can be expanded / collapsed. Submenu status is stored with cookies on the 
client browser (for IE4+ NS6+)

I can post the code with some exemple next week.

Jean-Noel




Re: tag libraries [for WML or HDML]

2001-03-30 Thread Eduardo Pelegri-Llopart

I did a quick look and found this:

http://coldjava.hypermart.net/servlets/escape.htm
  useful for WAP/WML developers - converts on the fly HTML to WML

http://coldjava.hypermart.net/servlets/wapdtd.htm
  Writes a standard WAP DTD header for your wml file.

http://coldjava.hypermart.net/servlets/wmltags.htm
  JSP tags library for WAP/WML developers.

It would be nice to have a jakarta-taglibs project on this area

- eduard/o

> Jesse Vitrone wrote:
> 
> Does anyone know if they have tag libs for anything besides HTML?  Are
> there any tig libs for WML or HDML out there?
> 
> Thanks,
> Jesse Vitrone



AW: MySQL

2001-03-30 Thread D. Veniseleas

Hi James,

I use the archive mm.mysql-2.0.4-bin.jar, got it at 
http://www.worldserver.com/mm.mysql,
works quite fine...

Dimitris



>
> I want to use MySQL with Struts.  Although not a Struts specific 
question, what jdbc driver is the best to use.  I downloaded the driver 
from caucho and noticed that it was marked as experimental.  I know that 
may mean that it is still a good driver.  But I would like an independent 
opionion.
>
> Thanks in Advance
> James Bell
>  << Datei: ATT9.htm,html,asp,php >> 



Re: MySQL

2001-03-30 Thread Richard Reich

Yes, use the org.gjt.mm.mysql driver.  But be sure to get 2.0.4 (or later if
it exists).

-r
- Original Message -
From: James Bell
To: [EMAIL PROTECTED]
Sent: Thursday, March 29, 2001 23:59
Subject: MySQL


Hi everyone

I want to use MySQL with Struts.  Although not a Struts specific question,
what jdbc driver is the best to use.  I downloaded the driver from caucho
and noticed that it was marked as experimental.  I know that may mean that
it is still a good driver.  But I would like an independent opionion.

Thanks in Advance
James Bell




Re: Can i get the exact Exception.

2001-03-30 Thread Dan Miser

Can i get the exact Exception.In addition to the suggestion about the server
logs, turn off the "Show friendly HTTP error messages" option in IE. It's in
Tools | Internet Options | Advanced.
--
Dan Miser
http://www.distribucon.com

- Original Message -
From: Tewathia, Atul
To: [EMAIL PROTECTED]
Sent: Friday, March 30, 2001 6:44 AM
Subject: Can i get the exact Exception.

Is there a way for me to see the exact Exception on the browser that has
occurred ?




RE: JavaScript in Struts

2001-03-30 Thread Hines, Bill

Tom,

Here is another JavaScript fly-out type tree menu:
http://developer.netscape.com/docs/examples/javascript/menu/menu.html

Bill Hines
Hershey Foods

-Original Message-
From: Tom Miller [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 8:34 AM
To: [EMAIL PROTECTED]
Subject: Re: JavaScript in Struts


Thanks, Ted.

I like Craig's suggestion about combining dynamic Javascript menu systems
with Struts. I wonder if anyone has tried this. I'm looking for a Javascript
tree or slider menu to adapt in this way and would appreciate it if anyone
could share any research.

I have looked at "Morten's Javascript Tree Menu"
http://html.tucows.com/programmer/scriptarchives/jsarchive/jstreemenu.html
which is impressive and free. However, it is frame based,  too elaborate for
my needs, and uses Windows Explorer tree icons, which is not what I had in
mind.

Thanks
Tom

Ted Husted wrote:

> I've added these to our Jyve FAQ:
>
> How Do I use Javascript in my Struts forms?
> ---
>
> The relevant HTML tags provide support for the Javascript event handlers
> onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress,
> onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup.
>
> For more about Javascript events, see the Netscape Javascript Reference
> guide <
> http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm
> >.
>
> For more about HTML tags, see the Struts HTML Tag Guide <
> http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm
> >.
>
> The Javascript itself can then be placed
>
> 1. Inline, if it is simple enough, like onclick="history.go(-1)"
> 2. As a 

Re: Pooling with Oracle database

2001-03-30 Thread Robert Hentosh

I think what was meant was oci8.  The valid values are thin, oci8 and kprb.  

The thin driver is entirely written in Java.  

The OCI is a mixture of C and Java, so that is the reason it can't be used
in applets, since the C portion is not platform independent.  

The kprb is for, as the docs say, "server side JDBC driver when running
inside [the] server".  Apparently that is useful when used with CORBA.  

If you want to use OCI then you need to make sure the oracle OCI client
library (written in C) is installed on your client. 

I am not sure what Malcolm meant about the thin not being designed for
connection pooling.  I haven't heard of any issues with connection pooling
and using the thin driver.  In fact Oracle's own documentation
(http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbcwhpap.htm) mentions
using connection pooling with the thin client. Did I miss something?

If you are trying to get your connection up ... then just use the 'thin'
driver.  I am about to try the OCI driver to see if there is any performance
improvements with my application.

> neither ora8 nor ori8 doesn't work.
> I receive exception
> 
> java.sql.SQLException: Invalid Oracle URL specified:
> OracleDriver.connect
> 
> 
> rz
> - Original Message -
> From: "malcolm davis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, March 29, 2001 9:33 AM
> Subject: RE: Pooling with Oracle database
> 
> 
>> excuse me that 'ori8' not ora8
>>
>>   > -Original Message-
>>   > From: malcolm davis [mailto:[EMAIL PROTECTED]]
>>   > Sent: Wednesday, March 28, 2001 10:16 PM
>>   > To: [EMAIL PROTECTED]
>>   > Subject: RE: Pooling with Oracle database
>>   >
>>   >
>>   > Rafal,
>>   >
>>   > You might want to change from the thin to ora8.
>>   > 'ora8' was designed to be used for connection pooling.
>>   > The 'thin' driver was developed for applets.
>>   >
>>   > - malcolm
>>   >
>>   >   > -Original Message-
>>   >   > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>>   >   > Sent: Wednesday, March 28, 2001 7:41 PM
>>   >   > To: [EMAIL PROTECTED]
>>   >   > Subject: Re: Pooling with Oracle database
>>   >   >
>>   >   >
>>   >   >
>>   >   >
>>   >   > On Wed, 28 Mar 2001, Rafal Zakrzewski wrote:
>>   >   >
>>   >   > > Hello,
>>   >   > >
>>   >   > > How to encode one pool of connections for whole application
>>   >   > > ? Should I encode this in some main servlet and then
>>   > receive connection
>>   >   > > from this servlet ?
>>   >   > >
>>   >   > > In struts-config.xml I have a section:
>>   >   > > 
>>   >   > > >   >   > >description="Trial access to database"
>>   >   > > driverClass="oracle.jdbc.driver.OracleDriver"
>>   >   > > maxCount="4"
>>   >   > > minCount="2"
>>   >   > > password="123"
>>   >   > >  url="jdbc:oracle:thin:@ado:1521:123"
>>   >   > >  user="123" />
>>   >   > >
>>   >   > >   
>>   >   > >
>>   >   > >
>>   >   > > tnx
>>   >   > >
>>   >   >
>>   >   > With this entry in struts-config.xml, Struts will create a
>>   >   > single connection pool, and will also make it available in
>>   >   > different
> ways:
>>   >   >
>>   >   > * If you have a reference to the controller servlet (as in
>>   > an Action),
>>   >   >   you can call servlet.findDataSource(null);
>>   >   >
>>   >   > * If you have access to the servlet context (as in a
>>   > different servlet
>>   >   >   in the same webapp), you can call
>>   >   >   getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
>>   >   >
>>   >   > * In a custom tag implementation class, you can call
>>   >   >   pageContext.getAttribute(Action.DATA_SOURCE_KEY,
>>   >   >PageContext.APPLICATION_SCOPE);
>>   >   >
>>   >   > * In a scriptlet embedded in a JSP page, you can call
>>   >   >   application.getAttribute(Action.DATA_SOURCE_KEY);
>>   >   >
>>   >   > In all of these cases you are referencing exactly the same
>>   > connection
>>   >   > pool.
>>   >   >
>>   >   > Craig
>>   >   >
> 
> 
> 
> -- 
>  





Re: iterate tag, once again

2001-03-30 Thread Jean-Noel Ribette


>- Original Message -
>From: Marcin Baj <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, March 30, 2001 2:37 PM
>Subject: iterate tag, once again
>

>Hello,
>I've read themessage:
>
>You must use  to introduce a reference to an existing bean, if you wish 
>to reference that bean with other
standard JSP tags (such >as  or ). If you only wish 
to reference such beans with other
Struts tags, use of  is not >required.
>
>,so I thougth, that I shouln't write something like this, because I don't like it:
>
>
>
>
>
> 
>
>  
>
> 
>
>
>
>I wanted to write something in that way:
>
>
>name="custom.LanguageBean"
>property="langCollection"
>scope="application">
>  
>
>  
>
>  
>
>
>
>but it doesn't work. Why? I don't want to use 
>
Could you give the error message ? What does the browser display ?

Here are some points you can check:
- do you include the tags to use the taglibs ?
- do you put your bean in application scope under the name "custom.LanguageBean" 
somewhere (for example in an Action) ?
- does this bean have a method getLangCollection() giving a collection ?

Hope this help,

Jean-Noel




Re: JavaScript in Struts

2001-03-30 Thread Tom Miller

Thanks, Ted.

I like Craig's suggestion about combining dynamic Javascript menu systems
with Struts. I wonder if anyone has tried this. I'm looking for a Javascript
tree or slider menu to adapt in this way and would appreciate it if anyone
could share any research.

I have looked at "Morten's Javascript Tree Menu"
http://html.tucows.com/programmer/scriptarchives/jsarchive/jstreemenu.html
which is impressive and free. However, it is frame based,  too elaborate for
my needs, and uses Windows Explorer tree icons, which is not what I had in
mind.

Thanks
Tom

Ted Husted wrote:

> I've added these to our Jyve FAQ:
>
> How Do I use Javascript in my Struts forms?
> ---
>
> The relevant HTML tags provide support for the Javascript event handlers
> onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress,
> onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup.
>
> For more about Javascript events, see the Netscape Javascript Reference
> guide <
> http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm
> >.
>
> For more about HTML tags, see the Struts HTML Tag Guide <
> http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm
> >.
>
> The Javascript itself can then be placed
>
> 1. Inline, if it is simple enough, like onclick="history.go(-1)"
> 2. As a 

Re: Can i get the exact Exception.

2001-03-30 Thread Todd Hoff


Usually the web server will have logs where you
can get more information. Apache, for example, has error
and access logs. You should look at both to help figure
out what is going on. The other way is to try and run
the code standalone, without the browser. And your
server system may have logs too.
"Tewathia, Atul" wrote:
 
While experimenting with struts I generally
get following error on the browser.
Error 500--Internal Server
Error
It makes debugging difficult.
Is there a way for me to see the exact
Exception on the browser that has occurred ?



tag libraries

2001-03-30 Thread Jesse Vitrone
Title: tag libraries





Does anyone know if they have tag libs for anything besides HTML?  Are there any tig libs for WML or HDML out there?


Thanks,
    Jesse Vitrone





Re: JUNIT and Struts

2001-03-30 Thread Ted Husted

Vincent and Ron have been working on some things. Take a look at the
web/test directory in the nightly build.

Vincent is also in midst of donating J2EEUnit to Apache/Jakarta. Yeah
Vincent!

> Padma Ginnaram wrote:
> Is there a sample available for testing struts with j2eeunit



Re: .properties file

2001-03-30 Thread Ted Husted

I believe the message resource is implemented as a hashmap. The resource
is loaded into memory for each locale (when 1 or more users need it),
and so storing a relatively big amount of text this way may be unwise. 

You want to determine the locale within your view and then display or
include the alternate text that way. I would then document the other
text files as comments in the application resource file, so that it is
still the master reference to the i18n text. You might even store the
reference to an include file in the application resource and read it
back to determine the user's locale.

Yuriy Zubarev wrote:
> 
> Hello friends,
> 
> I was wondering if there is a way to store a relatively big amount of text
> (which can't be fitted in one single line) assigned to some variable in
> the ApplicationResources.properties file. This text eventually will be
> local-sensitive that's why I want to put it into the .properties file.
> 
> Thank you for your time.
> 
> Best of luck,
> Yuriy Zubarev
> 
> ___
> Do You Yahoo!?
> Get your free @yahoo.ca address at http://mail.yahoo.ca

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Can i get the exact Exception.

2001-03-30 Thread Tewathia, Atul
Title: Can i get the exact Exception.






While experimenting with struts I generally get following error on the browser. 
Error 500--Internal Server Error


It makes debugging difficult. 


Is there a way for me to see the exact Exception on the browser that has occurred ?





iterate tag, once again

2001-03-30 Thread Marcin Baj



Hello,
I've read themessage:
 
You must use  to 
introduce a reference to an existing bean, if you wish to reference that bean 
with other standard JSP tags (such as  or 
). If you only wish to reference such beans with other 
Struts tags, use of  is not 
required.
,so I thougth, that I shouln't write something like 
this, because I don't like it:
 
 

       
 
 
I wanted to write something in that 
way:
 
    name="custom.LanguageBean"    
property="langCollection"    
scope="application">              

but it doesn't work. Why? I don't want to use 

 
Thanks in advance,
Bajo


RE: MySQL

2001-03-30 Thread Alix Jermyn


I also use the mm driver (with jRelation Framework (jrf)) and have never had
any problems


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, 30 March 2001 14:16
To: [EMAIL PROTECTED]
Subject: Re: MySQL


I use Mark Matthew's driver < http://mmmysql.sourceforge.net/ >, which
works well with Resin (and everything else under the sun). Caucho even
puts it in their own examples.

> James Bell wrote:
> 
> Hi everyone
> 
> I want to use MySQL with Struts.  Although not a Struts specific
> question, what jdbc driver is the best to use.  I downloaded the
> driver from caucho and noticed that it was marked as experimental.  I
> know that may mean that it is still a good driver.  But I would like
> an independent opionion.
> 
> Thanks in Advance
> James Bell



Re: MySQL

2001-03-30 Thread Ted Husted

I use Mark Matthew's driver < http://mmmysql.sourceforge.net/ >, which
works well with Resin (and everything else under the sun). Caucho even
puts it in their own examples.

> James Bell wrote:
> 
> Hi everyone
> 
> I want to use MySQL with Struts.  Although not a Struts specific
> question, what jdbc driver is the best to use.  I downloaded the
> driver from caucho and noticed that it was marked as experimental.  I
> know that may mean that it is still a good driver.  But I would like
> an independent opionion.
> 
> Thanks in Advance
> James Bell



Iterating over Hastable ??

2001-03-30 Thread Christof Ettl

My code like this:
---
<%
  {
java.util.Hashtable ht = new java.util.Hashtable();
ht.put(new Integer(1), "First");
ht.put(new Integer(2), "Second");
ht.put(new Integer(3), "Third");
pageContext.setAttribute("ht", ht, PageContext.PAGE_SCOPE);
  }
%>

  Next element is 

--

but an excetion like that:

javax.servlet.ServletException: IllegalAccessException accessing property
value of bean hashEntry

--

In the struts docu
(http://jakarta.apache.org/struts/struts-logic.html#iterate)
something like this:

So, if you wish to iterate over the values of a Hashtable, you would
implement code like the following:


Next element is 
 


thanks in advance for your help,

   Christof Ettl



Re: Pooling with Oracle database

2001-03-30 Thread Rafal Zakrzewski

neither ora8 nor ori8 doesn't work.
I receive exception

java.sql.SQLException: Invalid Oracle URL specified: OracleDriver.connect


rz
- Original Message -
From: "malcolm davis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 9:33 AM
Subject: RE: Pooling with Oracle database


> excuse me that 'ori8' not ora8
>
>   > -Original Message-
>   > From: malcolm davis [mailto:[EMAIL PROTECTED]]
>   > Sent: Wednesday, March 28, 2001 10:16 PM
>   > To: [EMAIL PROTECTED]
>   > Subject: RE: Pooling with Oracle database
>   >
>   >
>   > Rafal,
>   >
>   > You might want to change from the thin to ora8.
>   > 'ora8' was designed to be used for connection pooling.
>   > The 'thin' driver was developed for applets.
>   >
>   > - malcolm
>   >
>   >   > -Original Message-
>   >   > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>   >   > Sent: Wednesday, March 28, 2001 7:41 PM
>   >   > To: [EMAIL PROTECTED]
>   >   > Subject: Re: Pooling with Oracle database
>   >   >
>   >   >
>   >   >
>   >   >
>   >   > On Wed, 28 Mar 2001, Rafal Zakrzewski wrote:
>   >   >
>   >   > > Hello,
>   >   > >
>   >   > > How to encode one pool of connections for whole application ?
>   >   > > Should I encode this in some main servlet and then
>   > receive connection
>   >   > > from this servlet ?
>   >   > >
>   >   > > In struts-config.xml I have a section:
>   >   > > 
>   >   > >>   > >description="Trial access to database"
>   >   > > driverClass="oracle.jdbc.driver.OracleDriver"
>   >   > > maxCount="4"
>   >   > > minCount="2"
>   >   > > password="123"
>   >   > >  url="jdbc:oracle:thin:@ado:1521:123"
>   >   > >  user="123" />
>   >   > >
>   >   > >   
>   >   > >
>   >   > >
>   >   > > tnx
>   >   > >
>   >   >
>   >   > With this entry in struts-config.xml, Struts will create a single
>   >   > connection pool, and will also make it available in different
ways:
>   >   >
>   >   > * If you have a reference to the controller servlet (as in
>   > an Action),
>   >   >   you can call servlet.findDataSource(null);
>   >   >
>   >   > * If you have access to the servlet context (as in a
>   > different servlet
>   >   >   in the same webapp), you can call
>   >   >   getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
>   >   >
>   >   > * In a custom tag implementation class, you can call
>   >   >   pageContext.getAttribute(Action.DATA_SOURCE_KEY,
>   >   >PageContext.APPLICATION_SCOPE);
>   >   >
>   >   > * In a scriptlet embedded in a JSP page, you can call
>   >   >   application.getAttribute(Action.DATA_SOURCE_KEY);
>   >   >
>   >   > In all of these cases you are referencing exactly the same
>   > connection
>   >   > pool.
>   >   >
>   >   > Craig
>   >   >



-- 
 



Re: Validating dates

2001-03-30 Thread William Jaynes

Here are some utility methods I use for date validation and rendering to and from 
strings. Nothing
fancy.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 2:53 PM
Subject: Validating dates


>
>
> Does anyone have a code example for validating a date field in the validate
> method of actionform?   Actually, a date in a string attribute.
>
> thanks in advance for your help,
> Donnie Hall
>
>

 DateUtil.java


Antwort: Re: Pooling with Oracle database

2001-03-30 Thread michael . brohl




Hi Craig,

I tried the first example (servlet.findDataSource(null);) but get the following
error when compiling
my source:

"LogonAction.java": Error #: 314 : cannot access class javax.sql.DataSource;
neither class nor source found for javax.sql.DataSource at line 75, column 13

Can you please tell me where to find the needed package?

Thank you.

Regards,

Michael Brohl





|+--->
||  "Craig R.|
||  McClanahan"  |
||   |
||   |
||  29.03.2001   |
||  05:40|
||  Bitte|
||  antworten an |
||  struts-user  |
||   |
|+--->
  >|
  ||
  |   An: [EMAIL PROTECTED]   |
  |   Kopie:  (Blindkopie: Michael Brohl/Lynx/DE)  |
  |   Thema:  Re: Pooling with Oracle database |
  >|







On Wed, 28 Mar 2001, Rafal Zakrzewski wrote:

> Hello,
>
> How to encode one pool of connections for whole application ?
> Should I encode this in some main servlet and then receive connection
> from this servlet ?
>
> In struts-config.xml I have a section:
> 
> description="Trial access to database"
> driverClass="oracle.jdbc.driver.OracleDriver"
> maxCount="4"
> minCount="2"
> password="123"
>  url="jdbc:oracle:thin:@ado:1521:123"
>  user="123" />
>
>   
>
>
> tnx
>

With this entry in struts-config.xml, Struts will create a single
connection pool, and will also make it available in different ways:

* If you have a reference to the controller servlet (as in an Action),
  you can call servlet.findDataSource(null);

* If you have access to the servlet context (as in a different servlet
  in the same webapp), you can call
  getServletContext().getAttribute(Action.DATA_SOURCE_KEY);

* In a custom tag implementation class, you can call
  pageContext.getAttribute(Action.DATA_SOURCE_KEY,
   PageContext.APPLICATION_SCOPE);

* In a scriptlet embedded in a JSP page, you can call
  application.getAttribute(Action.DATA_SOURCE_KEY);

In all of these cases you are referencing exactly the same connection
pool.

Craig







RE: Internationalised 'alt' text

2001-03-30 Thread Howard Moore

I see, you are using the html:image tag not the html:img tag. Looking at the
source for the latest version (the version in 1.0b1 is broken) there is a
bug that stops the altKey attribute working. 
 
I have reported it to bugzilla. See
http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=1155
  for details.
 

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 20:05
To: [EMAIL PROTECTED]
Subject: Re: Internationalised 'alt' text


I am sorry for sending this email again. But I made a mistake to point to
"name" attribute. This attribute has to be equal to "", because I do not use
it. But no attribute "alt" was generated. 

Maya 
P.S. here is my statement with the tag: 
 


Maya Muchnik wrote: 


No exception. Here is a short cut from view source: 
... 
 
 
 
 
Username: 
 
 
Password: 
 
 
 
 
 
 
... 
 
 
... 
 
... 

As you can see name is empty. 


Maya 


Howard Moore wrote: 


It's possible I suppose. I've tried it with Tomcat 3.2 using pageKey rather 
than src and it works ok (using Struts 1.0b1). What happens when you try to 
use the tag, e.g. what html is produced or what exception is thrown? 

> -Original Message- 
> From: Maya Muchnik [ mailto:[EMAIL PROTECTED]
 ] 
> Sent: 29 March 2001 14:01 
> To: [EMAIL PROTECTED] 
> Subject: Re: Internationalised 'alt' text 
> 
> 
> Thank you, Howard. And if this does not work for me, is that 
> meant, because I 
> am using Tomcat 3.1? In your example below I am using pageKey 
> instead of src. 
> 
> 
> 
> Howard Moore wrote: 
> 
> > The html:img tag now contains an altKey attribute that does 
> what you want. 
> > 
> > e.g. 
> > 
> >  
> > 
> > > -Original Message- 
> > > From: Maya Muchnik [ mailto:[EMAIL PROTECTED]
 ] 
> > > Sent: 28 March 2001 21:54 
> > > To: [EMAIL PROTECTED] 
> > > Subject: Re: Internationalised 'alt' text 
> > > 
> > > 
> > > Hi, this is an old email, but not resolved, at least for me. 
> > > Maybe somebody can give 
> > > me a hunt. 
> > > I have tried both suggestions. Both are not working. Maybe I 
> > > am doing something 
> > > wrong. 
> > > Thanks in advance. 
> > > Maya 
> > > 
> > > Craig Tataryn wrote: 
> > > 
> > > > How about this: 
> > > > 
> > > > < 
-- MyResources would be replaced with whatever class name 
> > > you used in the 
> > > > application 
> > > > init-param you setup for the ActionServlet 
> > > > --> 
> > > >  
> > > > 
> > > >  
> > > > 
> > > > Craig T. 
> > > > 
> > > > Peter Alfors wrote: 
> > > > 
> > > > > scratch that.  You would need to have a bean that had 
> > > access to the messages. 
> > > > > 
> > > > > Peter Alfors wrote: 
> > > > > 
> > > > > > I think that   does what you want. 
> > > > > > 
> > > > > >  
> > > > > >  
> > > > > > 
> > > > > > HTH, 
> > > > > > Pete 
> > > > > > 
> > > 
>