Re: comments in .properties file

2001-01-31 Thread Craig R. McClanahan

Peter Doyle wrote:

> Thanks Steve for your reply.
>
> Peter
>

Just as an FYI, the file format for properties files is actually
documented, but the location is a little bit obscure -- check out the
Javadocs for the load() method of the java.util.Properties class for JDK
1.2 or later.

Craig McClanahan





RE: Struts on WebSphere

2001-01-31 Thread Torben Norling

Hi Andreas,
We use Websphere 3.5.2 on NT and it works ok for us.
There are no "Struts-specific" issues that I know about except for Websphere
being the product it is...

If you plan on using Struts with Websphere on Linux the issue is that there
is no WAS fixpack 2 for linux, this means there is no Servlet 2.2 / JSP 1.1
support that is required for using Struts 1.0. WAS Fixpack 3 should fix this
in mid februari.

We have at some point got into problems with reading the struts-config file
but in the end it always turn out to be the ing classloader(s) in
websphere that caused the problem...

Sorry, but I'm not to impressed with Websphere.

If you have an option to choose another appserver I would strongly recommend
that.

// Torben

-Original Message-
From: Gehmeyr Andreas [mailto:[EMAIL PROTECTED]]
Sent: den 31 januari 2001 20:58
To: '[EMAIL PROTECTED]'
Subject: Struts on WebSphere


Has anyone installed a current version of struts on WebSphere3.5.2? Any
problems/hints?
Thanx,
Andreas



Re: action.xml

2001-01-31 Thread John Hunt

If a formBean is spread acroos multiple but
consecutive ( again consecutive ) pages, should I put
the bean in session or will the request scope do
because they are consecutive pages.

--- "Craig R. McClanahan"
<[EMAIL PROTECTED]> wrote:
> 
> 
> John Hunt wrote:
> 
> > Hi
> > In the deprecated action.xml was there a way to
> > specify scope for the form beans. If yes how.
> > Is the scope attribute in the new
> struts-config.xml a
> > scope for the form bean???
> > Thanks
> > Hunt
> >
> 
> In both versions, the "scope" attribute of the
>  element
> determines whether the form bean goes in request
> scope or session scope.
> 
> Craig
> 
> 


__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Latest binaries problem

2001-01-31 Thread Wong Kok Wai

The latest 20010131 binaries is only 1k byte in size!

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



RE: Struts on WebSphere

2001-01-31 Thread Hines, Bill

Someone a while back said they had Struts working or almost working on WAS.
It seems that was before the 3.5.2 fixpack that brought WAS up to servlet
2.2 and JSP 1.1, so I don't know how that could be. Probably because it was
'early Struts' that still used JDK 1.1, servlet 2.1, and JSP 1.0. I'm
interested as well, if anyone has notes on this. I know that IBM is planning
to release WAS 4.0 this quarter, which is supposed to be fully J2EE 1.2
compliant, so we might just hold off until then. But I'd like to actually
play with Struts on our WAS 3.5.2 test box if that's possible.

Bill Hines
Hershey Foods

-Original Message-
From: Gehmeyr Andreas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 2:58 PM
To: '[EMAIL PROTECTED]'
Subject: Struts on WebSphere

Has anyone installed a current version of struts on WebSphere3.5.2? Any
problems/hints?
Thanx,
Andreas



Re: Dynamic form action?

2001-01-31 Thread Craig R. McClanahan

Peter Alfors wrote:

> Currently, we do not use the  tag.
> I haven't had a chance to look into them yet.
>
> I would think that the action attribute would not be required, but maybe there
> is a good reason for it to be?
> Someone with more experience with the  tags will have to help you there.
> Anyone?
>

The action attribute is used for two things:
* Create the destination hyperlink to submit to (which
  you don't need in this scenario)
* To look up the corresponding ActionMapping entry
  and, from there, determine what form bean to use.
  This information is used by all the nested field tags.

If you don't need either of these features, you probably don't need the
 tag.

> Pete
>

Craig





Re: action.xml

2001-01-31 Thread JamesW


> If a formBean is spread acroos multiple but
> consecutive ( again consecutive ) pages, should I put
> the bean in session or will the request scope do
> because they are consecutive pages.

I believe, session, since each visit to each page in sequence is a separate
request.

Regards,
James W.

--
This e-mail is from Cards Etc Pty Ltd (ACN: 069 533 302). It may contain
privileged and confidential information. It is intended for the named
recipient(s) only. If you are not an intended recipient, please notify us
immediately by reply e-mail or by phone on +61 2 9212 7773 & delete this
e-mail from your system.
--





action.xml

2001-01-31 Thread John Hunt

Hi
In the deprecated action.xml was there a way to
specify scope for the form beans. If yes how.
Is the scope attribute in the new struts-config.xml a
scope for the form bean???
Thanks
Hunt

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Re: action.xml

2001-01-31 Thread Craig R. McClanahan



John Hunt wrote:

> Hi
> In the deprecated action.xml was there a way to
> specify scope for the form beans. If yes how.
> Is the scope attribute in the new struts-config.xml a
> scope for the form bean???
> Thanks
> Hunt
>

In both versions, the "scope" attribute of the  element
determines whether the form bean goes in request scope or session scope.

Craig





RE: Struts and MySQL

2001-01-31 Thread Michael Mok

Ted

MySQL does support transaction (check out this article
http://www.mysql.com/news/article-54.html ).

You will need to set your table type to "BDB" to enable transaction support.
I am using mm.mysql JDBC driver version 2.0.3 which is JDBC 2.0 driver and
it is quite stable. I would recommend that you to upgrade to this version of
the JDBC driver.

Regards,

Michael Mok
-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 1 February 2001 9:10
To: Struts List; Struts List
Subject: Re: Struts and MySQL

I've been using MySQL locally on Tomcat and Resin for some time without
any problem.

MySQL doesn't support transactions, so I have to keep autocommit off.

>  (driver "mm.mysql.jdbc-1.2c" => class "org.gjt.mm.mysql.Driver")

I'm not sure what you are saying here. I have a recent mm-mysql.jar on
my classpath, and then use this datasource config, but that's it.

 
  
  


*** REPLY SEPARATOR  ***

On 1/31/2001 at 1:11 PM Matthias Bauer wrote:

Hi all,

I tried to use struts with MySQL (driver "mm.mysql.jdbc-1.2c" => class
"org.gjt.mm.mysql.Driver") and ran into an Exception each time I tried
to start
Tomcat:

> Exception in thread "main" java.lang.AbstractMethodError
> at
org.apache.struts.util.GenericConnection.(GenericConnection.java:1
18)
> at
org.apache.struts.util.GenericDataSource.createConnection(GenericDataSou
rce.java:623)
> at
org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:561
)
> at
org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.jav
a:998)
> at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:444)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
> at org.apache.tomcat.core.Handler.init(Handler.java:215)
> at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnSta
rtupInterceptor.java:130)
> at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:49
1)
> at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

Digging into the GenericConnection class code teached me the following:
The
mysql driver's Connection.getTypeMap() method throws an
AbstractMethodError
exception when called in:

>public GenericConnection(GenericDataSource source, Connection
conn,
> boolean autoCommit, boolean readOnly)
>throws SQLException {

at this location:

> try {
> this.map = conn.getTypeMap();
> } catch (SQLException e) {
> ;   // PostgreSQL throws a "not yet implemented"
exception
> } catch (UnsupportedOperationException e) {
> ;   // JDBC-ODBC bridge throws this
> }


So I changed the catch statements in order to fix it for me.

> try {
> this.map = conn.getTypeMap();
> } catch (SQLException e) {
> ;   // PostgreSQL throws a "not yet implemented"
exception
> } catch (UnsupportedOperationException e) {
> ;   // JDBC-ODBC bridge throws this
> } catch (AbstractMethodError e) {
> ;  // mm.mysql driver throws this one
>   }

I think it would make sense to include this little change in the
official struts
code. What do you developers think? If would be happy if someone could
make this
change.

Thanks,

--- Matthias


Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++
www.livinglogic.de



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/




Re: logic:greaterEqual tag (also logic:iterate with Arrays thread)

2001-01-31 Thread Craig R. McClanahan

Pete Black wrote:

> Does anybody know whether this will be the preferred method of accessing
> bean methods using logic tags in Struts?
>
> It seems a little confusing that you have to know the names of the bean you
> are using when you use logic:xxx tags, but not with html:xxx tags.
>
> If it counts for anything, my vote would be to keep the default case in all
> the tags consistent - when there is no name parameter defined, the property
> tag refers to the bean bound to the current action in struts-config.xml. It
> makes things clean and magical like they should be.
>
> Is the current behaviour set in stone for version 1?
>

Consider a case where the Struts example application uses a conditional tag
outside the scope of an  tag -- the check for which type of
transaction is being performed at the top of "registration.jsp" in several
places, including when creating the  element:





If the name attribute were not entered here, I don't see how the tag could know
what bean you are referring to.

It would be feasible to make an assumption that, if you're inside a form, then
you must be talking about the form bean -- although that risks confusion as
well because the tag would behave quite differently depending on where it was
placed.

>
> Thanks
>
> -Pete
>

Craig McClanahan





Re: configuring database connection pool

2001-01-31 Thread Craig R. McClanahan

Steve A Drake wrote:

>  As a follow-up to the problem I was having with the setReadOnly() method
> for the Connection object (using Informix), I downloaded the
> latest/greatest JDBC driver that I could find (SQLJ 2.20.JC1 from
> www.informix.com/evaluate) and found the same problem. From the release
> notes (file: jdbcrel.txt) it's clear that Informix (Dynamic Server
> 7.24.UC7-1) doesn't support read-only mode:
>
> -79745 Read only mode not supported
>
> Informix does not support read-only mode.
>
> That answers that question.
>

Thanks for doing the research, Steve.  I just checked in your patch, so it will
show up in tonight's nightly build.

Craig





html:errors and property attribute

2001-01-31 Thread dion

In the code I have (2000-01-19) neither of the ErrorsTag classes in
org.apache.struts.taglib.html or org.apache.struts.taglib.form have methods
to support the property attribute. Am I missing somthing on this one?
--
dIon Gillard, Multitask Consulting
Work:  http://www.multitask.com.au
NetRexx: http://www.multitask.com.au/NetRexx.nsf




Re: Testing equality of bean properties

2001-01-31 Thread Craig R. McClanahan

Peter Alfors wrote:

> You could retrieve the bean2:prop2 value into a JSP scriptlet and then pass
> it to the logic:equal tag.
>
> <% theValue = yourBean.property2() %>
> 
>

Or, in a similar vein:




Craig





RE: Struts on WebSphere

2001-01-31 Thread Bielby, Randy J.

Bill,

We have the example app running on NT with WAS 3.5.2. I didn't configure it
myself but I don't think there was much special we had to do other than make
sure that you have the right jar in the classpath (xml parser etc) since WAS
puts xalan.jar and xml4j.jar in the classpath for you.  I think if you use
the WAR file to XML utility you can create an xml configuration file that
you can import into the admin console for the example app or whatever other
app you want to use.  There are two utilities you can use wartowebapp
(http://www-4.ibm.com/software/webservers/appserv/doc/v35/ae/infocenter/was/
040210.html) and wartoxmlconfig
(http://www-4.ibm.com/software/webservers/appserv/doc/v35/ae/infocenter/was/
060600020104.html).  I'm not sure which is the most appropriate to use (I
think wartoxmlconfig) but you can find them in the bin directory.  Also,
remember that if you are also using VAJ the WTE does NOT support servlet api
2.2, use the Tomcat test environment instead.

Randy Bielby
Consultant
Greenbrier & Russel: The People You Trust with eBusiness
Madison, Wisconsin
www.gr.com
(608) 827-6760
[EMAIL PROTECTED]


> -Original Message-
> From: Hines, Bill [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 3:04 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: Struts on WebSphere
> 
> Someone a while back said they had Struts working or almost working on
> WAS.
> It seems that was before the 3.5.2 fixpack that brought WAS up to servlet
> 2.2 and JSP 1.1, so I don't know how that could be. Probably because it
> was
> 'early Struts' that still used JDK 1.1, servlet 2.1, and JSP 1.0. I'm
> interested as well, if anyone has notes on this. I know that IBM is
> planning
> to release WAS 4.0 this quarter, which is supposed to be fully J2EE 1.2
> compliant, so we might just hold off until then. But I'd like to actually
> play with Struts on our WAS 3.5.2 test box if that's possible.
> 
> Bill Hines
> Hershey Foods
> 
> -Original Message-
> From: Gehmeyr Andreas [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 2:58 PM
> To: '[EMAIL PROTECTED]'
> Subject: Struts on WebSphere
> 
> Has anyone installed a current version of struts on WebSphere3.5.2? Any
> problems/hints?
> Thanx,
> Andreas



Re: html:errors and property attribute

2001-01-31 Thread Incze Lajos

On Thu, Feb 01, 2001 at 09:30:52AM +1100, [EMAIL PROTECTED] wrote:
> In the code I have (2000-01-19) neither of the ErrorsTag classes in
> org.apache.struts.taglib.html or org.apache.struts.taglib.form have methods
> to support the property attribute. Am I missing somthing on this one?
   a newer version.
 incze



Missing message for key index.title

2001-01-31 Thread Justin Kennedy

I grabbed the latest nightly build, recompiled struts, dropped
struts-example.war in the webapps dir, but when I try to run it I get the
above error. I noticed quite a few threads on this, but most pertaining to
the Orion server. I'm using Tomcat.

Everything was working with my 0.5 tree, but I decided to upgrade and here I
am. The properties file it is looking for in web.xml does exist, and there
is indeed an entry for index.title.

any suggestions ?

Root cause:
javax.servlet.jsp.JspException: Missing message for key index.title
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:261)


thanx
-Justin




RE: logic:greaterEqual tag (also logic:iterate with Arrays thread)

2001-01-31 Thread Pete Black

Yep, you're right.. i'm still getting my head around the tools Struts
provides.

Thanks for your help

-Pete

> -Original Message-
> From: Craig R. McClanahan [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 01, 2001 1:32 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: logic:greaterEqual tag (also logic:iterate with Arrays
> thread)
> 
> Pete Black wrote:
> 
> > Does anybody know whether this will be the preferred method of accessing
> > bean methods using logic tags in Struts?
> >
> > It seems a little confusing that you have to know the names of the bean
> you
> > are using when you use logic:xxx tags, but not with html:xxx tags.
> >
> > If it counts for anything, my vote would be to keep the default case in
> all
> > the tags consistent - when there is no name parameter defined, the
> property
> > tag refers to the bean bound to the current action in struts-config.xml.
> It
> > makes things clean and magical like they should be.
> >
> > Is the current behaviour set in stone for version 1?
> >
> 
> Consider a case where the Struts example application uses a conditional
> tag
> outside the scope of an  tag -- the check for which type of
> transaction is being performed at the top of "registration.jsp" in several
> places, including when creating the  element:
> 
>  scope="request" value="Create">
> 
> 
> 
> If the name attribute were not entered here, I don't see how the tag could
> know
> what bean you are referring to.
> 
> It would be feasible to make an assumption that, if you're inside a form,
> then
> you must be talking about the form bean -- although that risks confusion
> as
> well because the tag would behave quite differently depending on where it
> was
> placed.
> 
> >
> > Thanks
> >
> > -Pete
> >
> 
> Craig McClanahan
> 



Re: Is "request" shared across a redirect?

2001-01-31 Thread Craig R. McClanahan

James Howe wrote:

> I have two JSP pages which I want to have share a bean.  In the first JSP
> page I do something like this:
>
> [...]
> 
> 
> 
> [...]
>
> In "foo.jsp", I have code which looks like this:
>
> [...]
> 
> Message not available
> 
> 
> 
> 
> 
> [...]
>
> When I invoke the first page, I make the transition to the second page, but
> the bean property is never found.  I've debugged the code and it appears
> that the request object used by the second page does not have the attribute
> defined by the first page.  I guess I thought that objects put into the
> request scope were maintained across a redirection.  Was I wrong or am I
> just doing something stupid?
>

Request scope objects are retained across a *forward* but not across a
*redirect*.  The reason is that a redirect is actually a message sent back to
the browser, which then submits a second request to the new URL.  The request
attributes are not shared because it is not the same request any longer.

Session scope objects, on the other hand, would be retained across the
redirect.

>
> Thanks.

Craig





Re: Tag Library Definition Inheritence

2001-01-31 Thread Craig R. McClanahan

[EMAIL PROTECTED] wrote:

> Just as functionality can be inherited as you subclass the tag handlers, is
> it also possible to inherit the corresponding tag interface definitions in
> the library file?  The TLD files are growing unnecessarily large.  Thanks.

Unfortunately, it is not.  There is no way to say that "this tag has all the
same attributes as that tag, plus a few more."

Craig McClanahan





RE: Templates in Struts

2001-01-31 Thread Deadman, Hal
Title: Blank



The subordinate file tags are processed. The 
subordinate files are included via a PageContext.include() which is like a 
jsp:include. The subordinate file can be a full fledged jsp but it will inherit 
some things from the outer jsp (like the buffer size) and share the same 
request/respone objects. 

  -Original Message-From: Carl Tallis 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, January 31, 2001 
  5:14 PMTo: Struts Users Mailing ListSubject: Templates 
  in Struts
  Hi - 
   
      Am I correct in 
  inferring that the Struts templates don't process Struts tags in the 
  subordinate files?
   
  Carl Tallis
  Director Of Products
  SupplyLinks, Inc.
  Tel: (703) 796-6010
  Fax: (703) 796-6014
  email: [EMAIL PROTECTED]
  *** 
  This email message contains confidential information for the above 
  addressee only. If you are not the intended addressee you must not disclose or 
  use the information in any manner whatsoever. Any opinion or views 
  contained in this email message are those of the sender, do not represent 
  those of the Company in any way and reliance should not be placed upon its 
  contents. Unless otherwise stated this email message is not intended to be 
  contractually binding. Where an Agreement exists between our respective 
  companies and there is conflict between the contents of this email message and 
  the Agreement then the terms of that Agreement shall prevail. 
  *** 
  
   


Re: Setting initial page to be an action

2001-01-31 Thread renzo estrella

I tried this a couple of days ago but the results
 back where a directly listing. I also had to add
 an entry in my action.xml to handle "index" action
 but it still returned the directory listing.
While specifying index.do does give the correct
result.
Perhaps this behavior is due to weblogic5.1 ?

--- "Craig R. McClanahan"
<[EMAIL PROTECTED]> wrote:
> "Winters, Jason" wrote:
> 
> > I'm trying to setup my application so that the
> initial page is an action.
> > When the user enters a URL like this,
> http://server/myapp they should be
> > sent to http://server/myapp/index.do.  At the
> moment, they get forwarded to
> > http://server/myapp/index.jsp which crashes
> because stuff that was setup in
> > the index action does not exist.
> >
> 
> In your web.xml file, you can define a "welcome
> file" that is used by the
> servlet container (that's how it knows to try
> index.html or index.jsp).  So,
> you could add something like this:
> 
> 
> index.do
> 
> 
> One thing to note is that your index.do method will
> get called for any
> "directory name" within the app as well.
> 
> >
> > Any ideas on how to accomplish this would be
> greatly appreciated!
> >
> > Jason Winters
> 
> Craig McClanahan
> 
> 


__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



RE: Help: DiskMultipartRequestHandler

2001-01-31 Thread Prasad Kashyap

Hi Mike,

Thanx for your reply.

I think there is a bug in the upload package. The file is getting uploaded
into the specified directory  (tempDir parameter) but is not getting
renamed to the original name. It remains as strts.tmp.  The data inside
is valid and so is the file size.

I am forced to use struts 0.5. Hence I pulled back the upload package into
struts 0.5. I instantiated DiskMultipartRequestHandler and called it's
handleRequest().

Or am I doing something wrong ?

Any help would be greatly appreciated.

Thanx
Prasad.

"Schachter, Michael" <[EMAIL PROTECTED]> on 01/31/2001 11:23:36 AM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject:  RE: Help: DiskMultipartRequestHandler




>Where in the ActionServlet is the DiskMultipartRequestHandler class
>instantiated ?

DiskMultipartRequestHandler (or whatever implementation is used) is created
inside of RequestUtils.populate(Object,String,String,HttpServletRequest).
The RequestUtils.populate method is called from
ActionServlet.processPopulate()


>What makes the handleRequest() to be called as the first method
>automatically ? Who calls it ?

handleRequest(HttpServletRequest request) is an interface method in
MultipartRequestHandler that is specified to be called on to handle
multipart requests.  "Handling" multipart requests consists of doing
whatever the implementation wants it to do.  The
DiskMultipartRequestHandler
reads the ServletInputStream and obtains form input entries and file input
entries.  It's called inside of RequestUtils.populate() soon after the
MultipartRequestHandler class is instantiated.






Re: ActionForm in this case

2001-01-31 Thread Craig R. McClanahan

Anand Raman wrote:

> Hi Hunt
> Sorry for the late response but i just managed doing something very
> similar..
>
> its quite easy to do and can be comfortably accomplished using struts..
>
> The link which leads to ur edit page will have the action mapping and
> also a requestParameter to identify the operation that needs to be
> performed..
>
> eg myActionClass.do?perform="populate"
>

The Struts example application does something similar to this -- the only
difference is that I chose to use two different actions (/editSubscription.do
versus /saveSubscription.do) for the two distinct functions of populating the
form bean versus saving the results to the database.

Craig McClanahan





RE: logic:greaterEqual tag (also logic:iterate with Arrays thread)

2001-01-31 Thread Pete Black

Does anybody know whether this will be the preferred method of accessing
bean methods using logic tags in Struts?

It seems a little confusing that you have to know the names of the bean you
are using when you use logic:xxx tags, but not with html:xxx tags.

If it counts for anything, my vote would be to keep the default case in all
the tags consistent - when there is no name parameter defined, the property
tag refers to the bean bound to the current action in struts-config.xml. It
makes things clean and magical like they should be.

Is the current behaviour set in stone for version 1?

Thanks

-Pete





> -Original Message-
> From: Ted Husted [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 01, 2001 3:04 AM
> To:   Struts List
> Subject:  RE: logic:greaterEqual tag
> 
> > I don't have to specify, for example,  property="myText">, i can just say ..
> shouldn't the logic tags follow this model by default?
> 
> I think here the logic tags are following the general bean-tag model by
> default. 
> 
> In the case of the HTML tag there is an implicit, default
> name="[formbean]" parameter to the  tags, which is then made
> the default name parameter to the tags nested within the form. Of
> course, you can override this in either case by supplying another name
> parameter. 
> 
> I'm actually surprised that you were able to use the greaterEqual tag
> without a name parameter. I hadn't realized the logic tags were
> consulting the action mappings now.
> 
> *** REPLY SEPARATOR  ***
> 
> On 1/31/2001 at 3:41 PM Pete Black wrote:
> 
> That fixed my problem, but worries me a little.
> 
> Shouldn't this be implicit - i.e. whatever FormBean is associated with
> the
> Action in struts-config.xml is the default 'id' attribute?
> 
> This is how the html:text tags etc. work.
> 
> I don't have to specify, for example,  property="myText">, i can just say ..
> shouldn't
> the logic tags follow this model by default?
> 
> -Pete
> 
> > -Original Message-
> > From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > Sent:   Wednesday, January 31, 2001 3:37 PM
> > To: [EMAIL PROTECTED]
> > Subject:Re: logic:greaterEqual tag
> > 
> > 
> > Pete,
> > 
> > You need to also specify the 'id' attribute, supplying the name of
> the
> > bean
> > (within some scope) that the value of the 'property' attribute is a
> > property of!
> > 
> > Regards,
> > James W.
> > 
> >
> 
> --
> > This e-mail is from Cards Etc Pty Ltd (ACN: 069 533 302). It may
> contain
> > privileged and confidential information. It is intended for the named
> > recipient(s) only. If you are not an intended recipient, please
> notify us
> > immediately by reply e-mail or by phone on +61 2 9212 7773 & delete
> this
> > e-mail from your system.
> >
> 
> --
> >
> 
> 
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 425-0252; Fax 716 223-2506.
> -- http://www.husted.com/about/struts/
> 



ActionForward: scope of modifications?

2001-01-31 Thread John Raley

I didn't do a thorough walk through the source, but it appears that if I
modify an ActionForward returned from an ActionMapping passed to
Action.perform I am changing global state in struts.  Is this correct?
If so, I think this should be in the javadoc for ActionMapping, and
ActionForward should be cloneable or have a copy constructor.

Thanks,
John




Re: Is "request" shared across a redirect?

2001-01-31 Thread James Howe

Certainly makes sense.  I was able to change to using forward and now I'm 
getting the results I expected.  Thanks!

At 02:51 PM 1/31/2001 -0500, you wrote:
>Requests are not preserved over a redirect because this generates a redirect
>response back to the browser. The browser responds by requesting the URL 
>provided
>in the redirect response.
>
>Request and response objects are preserved over forward because this is 
>internal
>to the webserver.
>
>-- Jason
>
>James Howe wrote:
> >
> > I have two JSP pages which I want to have share a bean.  In the first JSP
> > page I do something like this:
> >
> > [...]
> > 
> > 
> > 
> > [...]
> >
> > In "foo.jsp", I have code which looks like this:
> >
> > [...]
> > 
> > Message not available
> > 
> > 
> > 
> > 
> > 
> > [...]
> >
> > When I invoke the first page, I make the transition to the second page, but
> > the bean property is never found.  I've debugged the code and it appears
> > that the request object used by the second page does not have the attribute
> > defined by the first page.  I guess I thought that objects put into the
> > request scope were maintained across a redirection.  Was I wrong or am I
> > just doing something stupid?
> >
> > Thanks.

James W. Howe   mailto:[EMAIL PROTECTED]
Allen Creek Software, Inc.  pgpkey: http://ic.net/~jwh/pgpkey.html
Ann Arbor, MI 48103




Re: Is "request" shared across a redirect?

2001-01-31 Thread Bear

James,

A redirect causes the client to make a new request of the server. As such, 
the target of the redirect is a new request and will not share attributes 
with the previous request.

hth,
bear

At 02:46 PM 1/31/2001 -0500, you wrote:
>I have two JSP pages which I want to have share a bean.  In the first JSP 
>page I do something like this:
>
>[...]
>
>
>
>[...]
>
>In "foo.jsp", I have code which looks like this:
>
>[...]
>
> Message not available
>
>
> 
> 
>
>[...]
>
>When I invoke the first page, I make the transition to the second page, 
>but the bean property is never found.  I've debugged the code and it 
>appears that the request object used by the second page does not have the 
>attribute defined by the first page.  I guess I thought that objects put 
>into the request scope were maintained across a redirection.  Was I wrong 
>or am I just doing something stupid?
>
>Thanks.




Re: Is "request" shared across a redirect?

2001-01-31 Thread John Raley

A redirect instructs the client to generate a new request, so by the time
foo.jsp is invoked the request containing the bean is gone.

James Howe wrote:

> I have two JSP pages which I want to have share a bean.  In the first JSP
> page I do something like this:
>
> [...]
> 
> 
> 
> [...]
>
> In "foo.jsp", I have code which looks like this:
>
> [...]
> 
> Message not available
> 
> 
> 
> 
> 
> [...]
>
> When I invoke the first page, I make the transition to the second page, but
> the bean property is never found.  I've debugged the code and it appears
> that the request object used by the second page does not have the attribute
> defined by the first page.  I guess I thought that objects put into the
> request scope were maintained across a redirection.  Was I wrong or am I
> just doing something stupid?
>
> Thanks.




Struts on WebSphere

2001-01-31 Thread Gehmeyr Andreas

Has anyone installed a current version of struts on WebSphere3.5.2? Any problems/hints?
Thanx,
Andreas



Re: Is "request" shared across a redirect?

2001-01-31 Thread Jason Kitchen

Requests are not preserved over a redirect because this generates a redirect
response back to the browser. The browser responds by requesting the URL provided
in the redirect response.

Request and response objects are preserved over forward because this is internal
to the webserver.

-- Jason

James Howe wrote:
> 
> I have two JSP pages which I want to have share a bean.  In the first JSP
> page I do something like this:
> 
> [...]
> 
> 
> 
> [...]
> 
> In "foo.jsp", I have code which looks like this:
> 
> [...]
> 
> Message not available
> 
> 
> 
> 
> 
> [...]
> 
> When I invoke the first page, I make the transition to the second page, but
> the bean property is never found.  I've debugged the code and it appears
> that the request object used by the second page does not have the attribute
> defined by the first page.  I guess I thought that objects put into the
> request scope were maintained across a redirection.  Was I wrong or am I
> just doing something stupid?
> 
> Thanks.



Is "request" shared across a redirect?

2001-01-31 Thread James Howe

I have two JSP pages which I want to have share a bean.  In the first JSP 
page I do something like this:

[...]



[...]

In "foo.jsp", I have code which looks like this:

[...]

Message not available





[...]

When I invoke the first page, I make the transition to the second page, but 
the bean property is never found.  I've debugged the code and it appears 
that the request object used by the second page does not have the attribute 
defined by the first page.  I guess I thought that objects put into the 
request scope were maintained across a redirection.  Was I wrong or am I 
just doing something stupid?

Thanks.




Help Please: Resource not found

2001-01-31 Thread TMalvos

When trying to call a JSP I receive the following message from Tomcat:

javax.servlet.ServletException: Cannot find bean under name
org.apache.struts.taglib.html.BEAN
   at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)


I checked the STRUTS distribution and did not find it.  Has anyone
encountered this before?  Thanks.




Re: IE4.0 / linked stylesheet problem?

2001-01-31 Thread Peter Alfors

have you tried adding the type attribute?



Ned Seagoon wrote:

> Hi all,
>
> I hope you can really help me out here, I'm really stuck for ideas. I'm
> running Struts 28/1/01, tomcat 3.2.1 and IE 4 version 4.72.3110.8
>
> I have just spotted a problem that does not replicate under IE 5 (which i
> have always used).
>
> I have a jsp could be accessed by localhost:8080/test/showsomething.jsp .
> That jsp has the following
>
> 
>
> (have have tried with no directory and at root, still not working).
>
> Now under IE 5, the site displays correctly with the stylesheets. If I
> access from IE 4, then the stylesheets are not loaded. However if I enter
> localhost:8080/test/site.css, I can access the stylesheet.
>
> Other sites with css can be seen from this browser.
>
> Is this a struts or tomcat issue do you think?
>
> Cheers
> Ned
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif">Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: IE4.0 / linked stylesheet problem?

2001-01-31 Thread Ned Seagoon


Ignore me! This is not a webserver problem. The stylesheets I was given had 
underscores in their class names - that's what was screwing IE4, but it 
appeared fine in IE5

sorry everyone

Ned

>From: "Ned Seagoon" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: IE4.0 / linked stylesheet problem?
>Date: Wed, 31 Jan 2001 17:05:42 -
>
>
>Hi all,
>
>I hope you can really help me out here, I'm really stuck for ideas. I'm
>running Struts 28/1/01, tomcat 3.2.1 and IE 4 version 4.72.3110.8
>
>I have just spotted a problem that does not replicate under IE 5 (which i
>have always used).
>
>I have a jsp could be accessed by localhost:8080/test/showsomething.jsp .
>That jsp has the following
>
>
>
>(have have tried with no directory and at root, still not working).
>
>Now under IE 5, the site displays correctly with the stylesheets. If I
>access from IE 4, then the stylesheets are not loaded. However if I enter
>localhost:8080/test/site.css, I can access the stylesheet.
>
>Other sites with css can be seen from this browser.
>
>Is this a struts or tomcat issue do you think?
>
>Cheers
>Ned
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: WebLogic 6 & Example App

2001-01-31 Thread John LeGassic



Carl,
I was wondering if you could give me a hand.  I have been trying
to migrate a Struts 0.5 App that ran on weblogic 5.1sp6 to weblogic 6. 
Perhaps you could answer the following:


What version of struts are you using?


Did you upgrade Weblogic 6 to use the EJB 2.0 jar


In weblogic5.1 there needed to be a WebAppStartup.class, which I believe
modified the order in which classes where loaded.  Did you need this
class in weblogic 6?   If so how did you specify where to find
the class in weblogic 6?  Could you share your config.xml file?


Finally, could you share any other details that may be of use.

Any help you can provide would be appreciated.  Thanks!!!
John LeGassic
Nightfire Software
Carl Tallis wrote:

All
-
Never mind.  Turns out that was the only error, and the app runs fine,
now.  One interesting note - to compile Struts, you need Xalan version
1.x - version 2.x won't work.  Carl
TallisDirector Of ProductsSupplyLinks,
Inc.Tel: (703) 796-6010Fax:
(703) 796-6014email: [EMAIL PROTECTED] 
-Original Message-
From: Carl Tallis [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 9:52 PM
To: Struts Users Mailing List
Subject: WebLogic 6 & Example App
 
Hi
- Testing
a seventh (!) app server, my luck continues unabated: Parsing
of JSP File '/index.jsp' failed:
/index.jsp(3): Error in
using tag library uri='html' prefix='/WEB-INF/struts-html.tld': There is
no setter method for property 'lowsrc', for Tag class 'org.apache.struts.taglib.html.ImgTag'
probably occurred due to an
error in /index.jsp line 3:
<%@
taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> 
Tue Jan 30 21:23:26 EST 2001Sure
enough, this class has methods getlowSrc and setLowsrc.  How is this
not hosing everyone?  Is there a flag to keep WebLogic from validating
all the setter/getters in an application? This looks like an error that
_someone_ must have solved, simply. Carl
TallisDirector Of ProductsSupplyLinks,
Inc.Tel: (703) 796-6010Fax:
(703) 796-6014email: [EMAIL PROTECTED] 





begin:vcard 
n:le gassic;john
tel;fax:510.500.1100
tel;work:510.500.1146
x-mozilla-html:FALSE
org:Nightfire Software
version:2.1
email;internet:[EMAIL PROTECTED]
title:Software Engineer
adr;quoted-printable:;;300 Lakeside Drive=0D=0ASuite 2100;Oakland;CA;94612;
fn:john le gassic
end:vcard



IE4.0 / linked stylesheet problem?

2001-01-31 Thread Ned Seagoon


Hi all,

I hope you can really help me out here, I'm really stuck for ideas. I'm 
running Struts 28/1/01, tomcat 3.2.1 and IE 4 version 4.72.3110.8

I have just spotted a problem that does not replicate under IE 5 (which i 
have always used).

I have a jsp could be accessed by localhost:8080/test/showsomething.jsp . 
That jsp has the following



(have have tried with no directory and at root, still not working).

Now under IE 5, the site displays correctly with the stylesheets. If I 
access from IE 4, then the stylesheets are not loaded. However if I enter 
localhost:8080/test/site.css, I can access the stylesheet.

Other sites with css can be seen from this browser.

Is this a struts or tomcat issue do you think?

Cheers
Ned
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: paging for web application

2001-01-31 Thread Peter Alfors

check out the pager taglib:  http://jsptags.com/tags/navigation/pager/


"Boulatian, Misak" wrote:

> Hi alI,
>
> I am trying to implement paging for web application. The query may return
> over thousand records and it is a bad idea to dump all of those to the
> client. I was thinking to feed only 50 records at a time and have client to
> click for next or previous page. We are using struts with EJBs. Our action
> classes call session EJBs, which return information as a javabean. Does
> anyone have any ideas or done anything with struts in regards to paging (it
> may not even have to do anything with struts).
>
> I appreciate any responses.
> Thanks,
> Misak


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif">Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



paging for web application

2001-01-31 Thread Boulatian, Misak

Hi alI,

I am trying to implement paging for web application. The query may return
over thousand records and it is a bad idea to dump all of those to the
client. I was thinking to feed only 50 records at a time and have client to
click for next or previous page. We are using struts with EJBs. Our action
classes call session EJBs, which return information as a javabean. Does
anyone have any ideas or done anything with struts in regards to paging (it
may not even have to do anything with struts).

I appreciate any responses.
Thanks,
Misak



RE: Help: DiskMultipartRequestHandler

2001-01-31 Thread Schachter, Michael


>Where in the ActionServlet is the DiskMultipartRequestHandler class
>instantiated ?

DiskMultipartRequestHandler (or whatever implementation is used) is created
inside of RequestUtils.populate(Object,String,String,HttpServletRequest).
The RequestUtils.populate method is called from
ActionServlet.processPopulate()


>What makes the handleRequest() to be called as the first method
>automatically ? Who calls it ?

handleRequest(HttpServletRequest request) is an interface method in
MultipartRequestHandler that is specified to be called on to handle
multipart requests.  "Handling" multipart requests consists of doing
whatever the implementation wants it to do.  The DiskMultipartRequestHandler
reads the ServletInputStream and obtains form input entries and file input
entries.  It's called inside of RequestUtils.populate() soon after the
MultipartRequestHandler class is instantiated.




Re: Testing equality of bean properties

2001-01-31 Thread Ted Husted

> which is not possible currently since the logic:equal tag only
supports comparison between a bean property and and constant value...
Any ideas?

It might be time to resort to a scriplet. (But then, in other
languages, I've been also known to use a (gasp!) GOTO).

*** REPLY SEPARATOR  ***

On 1/31/2001 at 5:13 PM Lind Jürgen wrote:

Hi there,

is there a possibbility within a struts-enabled jsp to compare
two bean properties? I am looking for something like

>
 ...do something...


which is not possible currently since the logic:equal tag only supports
comparison between a bean property and and constant value... Any ideas?

Regards,

Jürgen



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: Testing equality of bean properties

2001-01-31 Thread Peter Alfors

You could retrieve the bean2:prop2 value into a JSP scriptlet and then pass
it to the logic:equal tag.

<% theValue = yourBean.property2() %>



Lind Jürgen wrote:

> Hi there,
>
> is there a possibbility within a struts-enabled jsp to compare
> two bean properties? I am looking for something like
>
>  property="prop2">>
>  ...do something...
> 
>
> which is not possible currently since the logic:equal tag only supports
> comparison between a bean property and and constant value... Any ideas?
>
> Regards,
>
> Jürgen


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif">Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Help: DiskMultipartRequestHandler

2001-01-31 Thread Prasad Kashyap

Where in the ActionServlet is the DiskMultipartRequestHandler class
instantiated ?

What makes the handleRequest() to be called as the first method
automatically ? Who calls it ?





Testing equality of bean properties

2001-01-31 Thread Lind Jürgen

Hi there,

is there a possibbility within a struts-enabled jsp to compare
two bean properties? I am looking for something like

>
 ...do something...


which is not possible currently since the logic:equal tag only supports
comparison between a bean property and and constant value... Any ideas?

Regards,

Jürgen



RE: Struts and MySQL

2001-01-31 Thread Alix Jermyn


I have been using mm.mysql-2.0.3 with the struts GenericDataSource for the
past fortnight without any problems, using the jRelationalFramework at
http://sourceforge.net/projects/jrf/  (you will have to apply the uncommited
MySQLDatabasePolicy patch as listed at
http://sourceforge.net/patch/?group_id=8796 and create any needed custom
ColumnSpec classes (pretty simple cut and paste job).

I am quite taken with jRelation; it does most of the work for you, but still
leaves you with quite a bit of flexibility and portability across most
serious databases.  If you are not going to use EJBs for data access, take a
look.
/alix


I've been using mm.mysql-2.0.2 - but checking <
http://mmmysql.sourceforge.net/ >. I see 2.0.4 is the latest stable
version as of 25-JAN. (The MySQL page is stale.)

I installed Resin last week, but had been using Tomcat 3.2 - and both
still work.

I just updated my MySQL version to 3.23 (declared "stable" as of
22-JAN), but it had worked with an early version too.

-T.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/




Struts installation notes - WebLogic 5.1

2001-01-31 Thread rhayden


I have put together the following install notes for WebLogic 5.1 based on my
experience over the past few weeks. Any comments or suggestions? I am
particularly disturbed by the fact that I can't get WL to deploy unzipped
web applications without including app-specific classes in the WL classpath!
Does anyone have another approach to this? Another problem I can't seem to
get around- Deployment of wars requires manually extracting the resource
file(s). Perhaps there is a way to get WL to find all files in the war (and
not just *.class)?

BTW- the builds for the past few nights have a problem with the lowsrc
property in class ImgTag (Thanks Carl for pointing out that problem with the
case in that method).


-Bob

~~

WEBLOGIC 5.1 (service pack 8)

(1) Obtain and install the Xerces XML parser (do not use the Sun reference
implementation). Put xerces.jar in your WebLogic system path.

(2) Obtain and unpack the Struts binary distribution (this procedure assumes
it was extracted to C:\jakarta-struts).

(3) Add an entry to weblogic.properties for each of the Struts web
applications that you would like to configure. For example, to make the
struts-example application available, add the following line to
weblogic.properties:

weblogic.httpd.webApp.strutsexample=c:/jakarta-struts/webapps/struts-example
.war

(4) You do not need to include struts.jar or any of the application specific
classes in the WebLogic classpath, since this will be done automatically
(unless deploying an unpacked web archive- see below).

(5) Start WebLogic server and point your web browser to the struts
application. For example, to connect to the example application added in
step 3:

http://localhost:7001/strutsexample

* This example application depends on the Struts specific resource file
ApplicationResources.properties to be present on the classpath. However,
WebLogic only extracts *.class files from the archive so this file will not
be found, resulting in an error the first time it is needed- something
similar to: javax.servlet.ServletException: runtime failure in custom tag
'message'. Steps 6 & 7 will need to be performed for this application, and
any other that relies on ApplicationResources.properties.

(6)  Extract ApplicationResources.properties from the *.war file, and
manually copy it to the respective package in the _tmp_war_ directory
WebLogic created for this application. Again referring to the struts-example
application, this would be:

c:\jakarta-struts\webapps\WEB-INF\_tmp_war_strutsexample

(7) Restart WebLogic. You will now be able to run the application:

http://localhost:7001/strutsexample


* The above steps should be followed for applications deployed as *.war
files. For unpacked web applications, configuration involves adding both
struts.jar and /WEB-INF/classes to the WebLogic classpath. For this reason,
I would suggest deploying applications as war files to WebLogic. However,
the same example application can be successfully deployed in extracted
format by modifying weblogic.properties (assuming the war was extracted to
directory webapps/struts-example):

weblogic.httpd.webApp.strutsexample=c:/jakarta-struts/webapps/struts-example
/

And starting WebLogic with the updated WebLogic classpath. For example:

c:\jdk1.3\bin\java -ms16m -mx64m -classpath
c:\weblogic\lib\weblogic510sp8boot.jar;C:\weblogic\classes\boot;c:\xerces\xe
rces.jar
-Dweblogic.class.path=c:\weblogic\lib\weblogic510sp8.jar;C:\weblogic\license
;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\weblogic\lib\webl
ogicaux.jar;C:\jakarta-struts\lib\struts.jar;C:\jakarta-struts\webapps\strut
s-example\WEB-INF\classes -Dweblogic.system.home=c:\weblogic
-Djava.security.manager -Djava.security.policy=c:\weblogic\weblogic.policy
weblogic.Server












Re: Struts and MySQL

2001-01-31 Thread Ted Husted

I've been using mm.mysql-2.0.2 - but checking <
http://mmmysql.sourceforge.net/ >. I see 2.0.4 is the latest stable
version as of 25-JAN. (The MySQL page is stale.)

I installed Resin last week, but had been using Tomcat 3.2 - and both
still work.

I just updated my MySQL version to 3.23 (declared "stable" as of
22-JAN), but it had worked with an early version too.

-T.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Tag Library Definition Inheritence

2001-01-31 Thread TMalvos

Just as functionality can be inherited as you subclass the tag handlers, is
it also possible to inherit the corresponding tag interface definitions in
the library file?  The TLD files are growing unnecessarily large.  Thanks.




Re: Struts and MySQL

2001-01-31 Thread Carl Yau


I have the same experience as Matthias with autocommit off. I simply
need to comment off the conn.getTypeMap() statement because I found 
the method is not supported by mm-mysql 1.2c jdbc driver Connection. 
I think it should actually throw UnsupportedOperationException or 
SQLException in the get/setTypeMap(). 

Ted, could you possibly be using Caucho Mysql driver?

Carl

Ted Husted wrote:
> 
> I've been using MySQL locally on Tomcat and Resin for some time without
> any problem.
> 
> MySQL doesn't support transactions, so I have to keep autocommit off.
> 
> >  (driver "mm.mysql.jdbc-1.2c" => class "org.gjt.mm.mysql.Driver")
> 
> I'm not sure what you are saying here. I have a recent mm-mysql.jar on
> my classpath, and then use this datasource config, but that's it.
> 
>  
> autoCommit="true"
> description="wxxi-gavel"
> driverClass="org.gjt.mm.mysql.Driver"
>maxCount="4"
>minCount="2"
>password=""
> url="jdbc:mysql://localhost/test"
>user="admin"
>   />
>   
> 
> *** REPLY SEPARATOR  ***
> 
> On 1/31/2001 at 1:11 PM Matthias Bauer wrote:
> 
> Hi all,
> 
> I tried to use struts with MySQL (driver "mm.mysql.jdbc-1.2c" => class
> "org.gjt.mm.mysql.Driver") and ran into an Exception each time I tried
> to start
> Tomcat:
> 
> > Exception in thread "main" java.lang.AbstractMethodError
> > at
> org.apache.struts.util.GenericConnection.(GenericConnection.java:1
> 18)
> > at
> org.apache.struts.util.GenericDataSource.createConnection(GenericDataSou
> rce.java:623)
> > at
> org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:561
> )
> > at
> org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.jav
> a:998)
> > at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:444)
> > at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> > at
> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
> > at org.apache.tomcat.core.Handler.init(Handler.java:215)
> > at
> org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> > at
> org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnSta
> rtupInterceptor.java:130)
> > at
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:49
> 1)
> > at
> org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
> > at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
> > at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
> 
> Digging into the GenericConnection class code teached me the following:
> The
> mysql driver's Connection.getTypeMap() method throws an
> AbstractMethodError
> exception when called in:
> 
> >public GenericConnection(GenericDataSource source, Connection
> conn,
> > boolean autoCommit, boolean readOnly)
> >throws SQLException {
> 
> at this location:
> 
> > try {
> > this.map = conn.getTypeMap();
> > } catch (SQLException e) {
> > ;   // PostgreSQL throws a "not yet implemented"
> exception
> > } catch (UnsupportedOperationException e) {
> > ;   // JDBC-ODBC bridge throws this
> > }
> 
> So I changed the catch statements in order to fix it for me.
> 
> > try {
> > this.map = conn.getTypeMap();
> > } catch (SQLException e) {
> > ;   // PostgreSQL throws a "not yet implemented"
> exception
> > } catch (UnsupportedOperationException e) {
> > ;   // JDBC-ODBC bridge throws this
> > } catch (AbstractMethodError e) {
> > ;  // mm.mysql driver throws this one
> >   }
> 
> I think it would make sense to include this little change in the
> official struts
> code. What do you developers think? If would be happy if someone could
> make this
> change.
> 
> Thanks,
> 
> --- Matthias
> 
> Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++
> www.livinglogic.de
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 425-0252; Fax 716 223-2506.
> -- http://www.husted.com/about/struts/



Re: Struts and MySQL

2001-01-31 Thread Matthias Bauer

Hi Ted,

thanks for the quick response. Pls see my comments below.


> I've been using MySQL locally on Tomcat and Resin for some time without
> any problem.
> 
> MySQL doesn't support transactions, so I have to keep autocommit off.

This is true. Here is my datasource config section (looks pretty much equivalent
to yours):

  

  


> >  (driver "mm.mysql.jdbc-1.2c" => class "org.gjt.mm.mysql.Driver")
> 
> I'm not sure what you are saying here. 

All I wanted to say is what version I am using: 1.2c (from
mm.mysql.jdbc-1.2c.tar.gz)

> I have a recent mm-mysql.jar on
> my classpath, and then use this datasource config, but that's it.
> [...]

I have a mm-mysql.jar in my classpath, too. And as I already said, my datasource
config looks almost perfectly the same.

What I did in order to narrow down the error was a call to conn.getTypeMap() in
a separate (non truts test application). This call always throws an
AbstractMethodError exception.

Maybe you are using a different version of the MySQL driver? Maybe 2.0preX
(which is pre-release beta)?

--- Matthias

Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++ www.livinglogic.de



Sorry....RE: Struts installation notes - example's setLocale on JRun

2001-01-31 Thread Moore, Mark A

Sorry for the screwy mail before.  Here is what I sent.

My project got hold of JRun 3 SP2 yesterday and noticed that this is a Known
Issue (e.g. Unfixed Bug) in the service pack.  I don't have the bug number
handy.  There is no news on when an SP3 might be available.  I had
complained about this a few weeks ago in the JRun support forum, but there
was no response from any Allaire folks.  
 
Mark


-Original Message-
From: Carl Tallis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 9:06 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts installation notes - example's setLocale on JRun


Still broken.  Despite the assurances of the JRun tech
(http://forums.allaire.com/jrunconf/Thread.cfm?&Thread_ID=214627&mc=2), the
demo still doesn't run under SP2 (Version 3.02.11140).  I get the same error
as before.

Carl Tallis
Director Of Products
SupplyLinks, Inc.
Tel: (703) 796-6010
Fax: (703) 796-6014
email: [EMAIL PROTECTED] 

> -Original Message-
> From: Erik G. Dybdahl [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 1:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Struts installation notes - example's setLocale on JRun
>
>
>
> --- Peter Doyle <[EMAIL PROTECTED]> skrev: > Hi,
> >  I was writing up the Installation notes for the example and
> documentation
> > web applications for JRun when I came across the same problem.
> (I haven't
> > installed the example app since 0.5)
> >
> > allaire.jrun.scripting.DefaultCFE:
> > Errors reported by
> >
> compiler:D:/smartserver/peter/serving_eng/Struts-Example/WEB-INF/j
> sp/jrun__i
> > ndex2ejspa.java:44:1:44:27: Error: No match was found for method
> > "setLocale(java.lang.String)".
> >
> > The deployment is grand, its this setLocale method that stops
> the example.
> > I'll check out Allaire and the JRun postings for updates and include any
> > findings.
> >
> Appear it's been corrected in JRun 3.0 sp2.
> See
> http://forums.allaire.com/jrunconf/Index.cfm?CFID=184276&CFTOKEN=2
8308124&&Message_ID=649418
(I have not tried it, though)
erik

_
Do You Yahoo!?
Få din egen, gratis @yahoo.no-adresse på http://mail.yahoo.no

*
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized.

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.
*



RE: Struts installation notes - example's setLocale on JRun

2001-01-31 Thread Moore, Mark A

*
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter. 
*



My project got hold of JRun 3 SP2 yesterday 
and noticed that this is a Known Issue (e.g. Unfixed Bug) in the service 
pack.  I don't have the bug number handy.  There is no news on when an 
SP3 might be available.  I had complained about this a few weeks ago in the 
JRun support forum, but there was no response from any Allaire folks.  

 
Mark

  -Original Message-From: Peter Doyle 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, January 30, 2001 11:35 
  AMTo: [EMAIL PROTECTED]Subject: Struts 
  installation notes - example's setLocale on JRun
  Hi,
   I was writing up the Installation 
  notes for the example and documentation web applications for JRun when I 
  came across the same problem. (I haven't installed the example app since 
  0.5)
   
  allaire.jrun.scripting.DefaultCFE: 
  Errors reported by 
  compiler:D:/smartserver/peter/serving_eng/Struts-Example/WEB-INF/jsp/jrun__index2ejspa.java:44:1:44:27: 
  Error: No match was found for method 
  "setLocale(java.lang.String)".
   
  The deployment is grand, its this 
  setLocale method that stops the example.
  I'll check out Allaire and the JRun 
  postings for updates and include any findings.
   
  I'm not on struts-dev so I will check 
  there for updates.
   
  Peter
   
  PS
  what's with this funny 
  background?
   
  
-Original Message-From: Craig R. McClanahan 
[mailto:[EMAIL PROTECTED]]Sent: 28 January 2001 
05:03To: [EMAIL PROTECTED]Subject: Re: 
Can't run nightly releasesCarl Tallis wrote: 

  
  Hi, all - I'm using JRun, and the 0.5 
  classes/tags work great, but I can't even get the later sample application 
  to run:/newstrutsdemo/: 
  javax.servlet.ServletException: Compilation error occured: 
  allaire.jrun.scripting.DefaultCFE: Errors reported by 
  compiler:C:/Program Files/Allaire/JRun/servers/default/New Struts 
  Demo/WEB-INF/jsp/jrun__index2ejspa.java:41:1:41:27: Error: No match was 
  found for method "setLocale(java.lang.String)". Pretty basic stuff.  However, looking at the 
  messages on this list, it's obvious that people *are* using the nightly 
  builds. Anyone ever seen this error? What execution environments are 
  people using who can run the later distributions (i.e. post 
  0.5)?Carl TallisDirector Of 
  ProductsSupplyLinks, Inc.Tel: (703) 796-6010Fax: 
  (703) 796-6014email: [EMAIL PROTECTED] Unfortunately, 
it appears that JRun has an implementation bug. 
The servlet container is supposed to do automatic type conversions when 
the data type of a custom tag property is something other than a 
String.  In this particular case, the "locale" property accepts a 
boolean value. 
The set of required conversions are in Table 2-4 on page 65 of the JSP 
1.1 specification.  Originally, it was not clear (in the spec) that 
these conversions applied to custom tag attributes, as well as 
, but this was cleared up in an errata to the spec 
that was published last April, at: 
    http://java.sun.com/products/jsp/errata_1_1_a_042800.html 

As a workaround on JRun, you can add a String setter for each non-String 
property, but this is not a good long term solution, because such a tag will 
not work on any other servlet engine (because the Java reflection code will 
see two setter methods, and therefore decide that neither of them is 
appropriate -- so the property will be considered read only). 
Craig McClanahan   


db connection pool

2001-01-31 Thread Andre Wittenburg

Hello,

i just looked at the GenericDataSource and thought it would be a nice
feature to shrink the pool size when the connections are not needed
anymore. If you all agree, imho there should be two more values in the
dtd for the data-source and GenericDataSource. 
true/false
100

What you think?

Andre



RE: Struts installation notes - example's setLocale on JRun

2001-01-31 Thread Carl Tallis

Still broken.  Despite the assurances of the JRun tech
(http://forums.allaire.com/jrunconf/Thread.cfm?&Thread_ID=214627&mc=2), the
demo still doesn't run under SP2 (Version 3.02.11140).  I get the same error
as before.

Carl Tallis
Director Of Products
SupplyLinks, Inc.
Tel: (703) 796-6010
Fax: (703) 796-6014
email: [EMAIL PROTECTED] 

> -Original Message-
> From: Erik G. Dybdahl [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 1:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Struts installation notes - example's setLocale on JRun
>
>
>
> --- Peter Doyle <[EMAIL PROTECTED]> skrev: > Hi,
> >  I was writing up the Installation notes for the example and
> documentation
> > web applications for JRun when I came across the same problem.
> (I haven't
> > installed the example app since 0.5)
> >
> > allaire.jrun.scripting.DefaultCFE:
> > Errors reported by
> >
> compiler:D:/smartserver/peter/serving_eng/Struts-Example/WEB-INF/j
> sp/jrun__i
> > ndex2ejspa.java:44:1:44:27: Error: No match was found for method
> > "setLocale(java.lang.String)".
> >
> > The deployment is grand, its this setLocale method that stops
> the example.
> > I'll check out Allaire and the JRun postings for updates and include any
> > findings.
> >
> Appear it's been corrected in JRun 3.0 sp2.
> See
> http://forums.allaire.com/jrunconf/Index.cfm?CFID=184276&CFTOKEN=2
8308124&&Message_ID=649418
(I have not tried it, though)
erik

_
Do You Yahoo!?
Få din egen, gratis @yahoo.no-adresse på http://mail.yahoo.no





RE: logic:greaterEqual tag

2001-01-31 Thread Ted Husted

> I don't have to specify, for example, , i can just say ..
shouldn't the logic tags follow this model by default?

I think here the logic tags are following the general bean-tag model by
default. 

In the case of the HTML tag there is an implicit, default
name="[formbean]" parameter to the  tags, which is then made
the default name parameter to the tags nested within the form. Of
course, you can override this in either case by supplying another name
parameter. 

I'm actually surprised that you were able to use the greaterEqual tag
without a name parameter. I hadn't realized the logic tags were
consulting the action mappings now.

*** REPLY SEPARATOR  ***

On 1/31/2001 at 3:41 PM Pete Black wrote:

That fixed my problem, but worries me a little.

Shouldn't this be implicit - i.e. whatever FormBean is associated with
the
Action in struts-config.xml is the default 'id' attribute?

This is how the html:text tags etc. work.

I don't have to specify, for example, , i can just say ..
shouldn't
the logic tags follow this model by default?

-Pete

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 3:37 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: logic:greaterEqual tag
> 
> 
> Pete,
> 
> You need to also specify the 'id' attribute, supplying the name of
the
> bean
> (within some scope) that the value of the 'property' attribute is a
> property of!
> 
> Regards,
> James W.
> 
>

--
> This e-mail is from Cards Etc Pty Ltd (ACN: 069 533 302). It may
contain
> privileged and confidential information. It is intended for the named
> recipient(s) only. If you are not an intended recipient, please
notify us
> immediately by reply e-mail or by phone on +61 2 9212 7773 & delete
this
> e-mail from your system.
>

--
>



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: using logic:iterate with Arrays

2001-01-31 Thread Ted Husted

See if adding 

name="myFormBean" 

as a parameter to the logic tag helps.

*** REPLY SEPARATOR  ***

On 1/31/2001 at 6:11 PM Pete Black wrote:

Hi there,

can anyone help me out with the syntax for dealing with iterating
through an
array of Strings, returned by a FormBean property?

my current code looks like:

logic:iterate id="element" property="records">



the method getRecords() in my FormBean returns a String[] array, but i
get
this error:

java.lang.NullPointerException at
java.util.Hashtable.get(Hashtable.java,
Compiled Code) 

It looks like Struts thinks it is trying to iterate over a Hashtable.
The
docs suggest that arrays are supported, since i don't really need a
Hashtable.. Does using an array require a different syntax, or should i
use
another type of object, rather than an Array?

Thanks

-Pete



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: Struts and MySQL

2001-01-31 Thread Ted Husted

I've been using MySQL locally on Tomcat and Resin for some time without
any problem. 

MySQL doesn't support transactions, so I have to keep autocommit off. 

>  (driver "mm.mysql.jdbc-1.2c" => class "org.gjt.mm.mysql.Driver") 

I'm not sure what you are saying here. I have a recent mm-mysql.jar on
my classpath, and then use this datasource config, but that's it.

 
  
  


*** REPLY SEPARATOR  ***

On 1/31/2001 at 1:11 PM Matthias Bauer wrote:

Hi all,

I tried to use struts with MySQL (driver "mm.mysql.jdbc-1.2c" => class
"org.gjt.mm.mysql.Driver") and ran into an Exception each time I tried
to start
Tomcat:

> Exception in thread "main" java.lang.AbstractMethodError
> at
org.apache.struts.util.GenericConnection.(GenericConnection.java:1
18)
> at
org.apache.struts.util.GenericDataSource.createConnection(GenericDataSou
rce.java:623)
> at
org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:561
)
> at
org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.jav
a:998)
> at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:444)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
> at org.apache.tomcat.core.Handler.init(Handler.java:215)
> at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnSta
rtupInterceptor.java:130)
> at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:49
1)
> at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

Digging into the GenericConnection class code teached me the following:
The
mysql driver's Connection.getTypeMap() method throws an
AbstractMethodError
exception when called in:

>public GenericConnection(GenericDataSource source, Connection
conn,
> boolean autoCommit, boolean readOnly)
>throws SQLException {

at this location:

> try {
> this.map = conn.getTypeMap();
> } catch (SQLException e) {
> ;   // PostgreSQL throws a "not yet implemented"
exception
> } catch (UnsupportedOperationException e) {
> ;   // JDBC-ODBC bridge throws this
> }


So I changed the catch statements in order to fix it for me.

> try {
> this.map = conn.getTypeMap();
> } catch (SQLException e) {
> ;   // PostgreSQL throws a "not yet implemented"
exception
> } catch (UnsupportedOperationException e) {
> ;   // JDBC-ODBC bridge throws this
> } catch (AbstractMethodError e) {
> ;  // mm.mysql driver throws this one
>   }

I think it would make sense to include this little change in the
official struts
code. What do you developers think? If would be happy if someone could
make this
change.

Thanks,

--- Matthias


Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++
www.livinglogic.de



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





multiple action forms with one action

2001-01-31 Thread Anand Raman

hi guys

How do we associate more than one ActionForm with a Action 

Thanks for your help
Anand 



Struts and MySQL

2001-01-31 Thread Matthias Bauer

Hi all,

I tried to use struts with MySQL (driver "mm.mysql.jdbc-1.2c" => class
"org.gjt.mm.mysql.Driver") and ran into an Exception each time I tried to start
Tomcat:

> Exception in thread "main" java.lang.AbstractMethodError
> at 
>org.apache.struts.util.GenericConnection.(GenericConnection.java:118)
> at 
>org.apache.struts.util.GenericDataSource.createConnection(GenericDataSource.java:623)
> at org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:561)
> at 
>org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.java:998)
> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:444)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
> at org.apache.tomcat.core.Handler.init(Handler.java:215)
> at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> at 
>org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
> at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
> at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

Digging into the GenericConnection class code teached me the following: The
mysql driver's Connection.getTypeMap() method throws an AbstractMethodError
exception when called in:

>public GenericConnection(GenericDataSource source, Connection conn,
> boolean autoCommit, boolean readOnly)
>throws SQLException {

at this location:

> try {
> this.map = conn.getTypeMap();
> } catch (SQLException e) {
> ;   // PostgreSQL throws a "not yet implemented" exception
> } catch (UnsupportedOperationException e) {
> ;   // JDBC-ODBC bridge throws this
> }


So I changed the catch statements in order to fix it for me.

> try {
> this.map = conn.getTypeMap();
> } catch (SQLException e) {
> ;   // PostgreSQL throws a "not yet implemented" exception
> } catch (UnsupportedOperationException e) {
> ;   // JDBC-ODBC bridge throws this
> } catch (AbstractMethodError e) {
> ;  // mm.mysql driver throws this one
>   }

I think it would make sense to include this little change in the official struts
code. What do you developers think? If would be happy if someone could make this
change.

Thanks,

--- Matthias


Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++ www.livinglogic.de