RE: generate struts ActionForm & strut's jsp from hibernate's map ping

2004-04-23 Thread Dionisius Purba
David, you're right that I oversimplified the situation regarding
the HTML Input's type,
For my situations, the inputs in JSPs will be put between




etc.
The  and  and it's closing tags will be generated too
to minimize copy & pasting (the jsp phsycial file itself 
would be generated automatically). 
It happened that there are lots of JSPs to generates, more than 100 JSPs,
so I hope if I decided to do that, it wont be too counterproductive.

I've never use map-backed ActionForm before, I'll look at it then.
Thanks for your opinions.

regards,
~dion

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 2:03 PM
To: Struts Users Mailing List
Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
mapping


I'd be incredibly surprised if someone wrote a program (or ant task) to
auto-create a basic JSP listing html:whatever tags.  How could a programmer
know from the *.hbm.xml file if a field should be a checkbox, a radio
button, an input field, a file upload, a textarea, or anything else?  If it
did make them all html:text tags, you would still have to cut/paste
everything around the page into your layout (or into another JSP which
contains your table layout).  It sounds counterproductive when I try to
envision the JSP creator in this wording. :(

Regardless, I hope you find it.

If you're looking for a String-based form, why not use a map-backed
actionForm and let BeanUtils.copyProperties() (or whatever it's called) copy
and convert the Strings into your Hibernate saveable/updatable object?  See:

http://jakarta.apache.org/struts/userGuide/building_controller.html#map_acti
on_form_classes

On the JSP issue, I personally think you're nuts (unless you've got a
simpler description than my guess above) unless you have tens or hundreds of
JSP's to make and have no layout you require (as it would require nearly
equivalent amounts of cutting & pasting).

Regards,
David

-Original Message-
From: Dionisius Purba [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 1:40 AM
To: 'Struts Users Mailing List'
Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
mapping


David, It works perfectly fine.
You see, based on, for instance, Person.hbm.xml,
hbm2java will generate Person.java
but since I use struts, I still need to generate PersonForm.java
and Person.jsp

PersonForm would be very similar to Person.java, with the difference is that
in PersonForm, all fields's type (firstName, lastName, age)
become String.

Then in the AddPerson.jsp I will have something repeated like this:




Is there anyone outthere who makes tool for such thing?
It should not be very difficult to make one, but I just want to avoid
reinvent the wheel.

regards,
Dion

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 1:30 PM
To: Struts Users Mailing List
Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
mapping


What's wrong with the hibernate extension tools
and the Code Generator that creates .java files from
the hbm.xml files you give it?

See:
http://prdownloads.sourceforge.net/hibernate/?sort_by=date&sort=desc
Item: hibernate-extensions-2.1.zip (or the 2.0.2 zip file for 2.0.X
versions)

I've only used the extension's hbm2java program, not the other way around.
Now that I'm using Xdoclet, I have no further need for those extension
tools.

Regards,
David

-Original Message-
From: Dionisius Purba [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 1:21 AM
To: 'Struts Users Mailing List'
Subject: generate struts ActionForm & strut's jsp from hibernate's
mapping


Altough my question is related to hibernate, I hope it's still relevant.
Is anyone aware of tools, open source is better, that can generate
ActionForm and the JSP's (containing struts's HTML Input tag)
based on a hibernate's mapping (i.e. *.hmb.xml)?

cheers,
dion

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: generate struts ActionForm & strut's jsp from hibernate's mapping

2004-04-23 Thread Jimmy Coyne
Hi Dion ,
Haven't used this  , but I think  middlegen
(http://boss.bekk.no/boss/middlegen/ ) might  solve some  of the
problems for you .It looks
At the db schema and generates the hmb.xml / jsp ,  actionforms etc .
Hope it helps.
Jimmy



-Original Message-
From: Dionisius Purba [mailto:[EMAIL PROTECTED] 
Sent: 23 April 2004 06:21
To: 'Struts Users Mailing List'
Subject: generate struts ActionForm & strut's jsp from hibernate's
mapping

Altough my question is related to hibernate, I hope it's still relevant.
Is anyone aware of tools, open source is better, that can generate
ActionForm and the JSP's (containing struts's HTML Input tag) based on a
hibernate's mapping (i.e. *.hmb.xml)?

cheers,
dion

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Advantages/Disadvantages of One Action for each Use Case

2004-04-23 Thread Takhar, Sandeep
Do you use subclasses for common methods or do you use helper classes or neither?

sandeep

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 3:54 PM
To: Struts Users Mailing List
Subject: RE: Advantages/Disadvantages of One Action for each Use Case


+1. 

I've been down the "option 2" road and things get messy fast.
I've since switched to the first option and applications scale much
easier.

robert

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper
> Sent: Thursday, April 22, 2004 1:52 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Advantages/Disadvantages of One Action for each Use Case
> 
> 
> There are some major advantages to the first option, especially when you're
> building a large and/or highly customisable application. A couple of
> examples:
> 
> * It is much easier to reconfigure your application. without needing to
> change any Java code. You may think you know which "actions" are related
> today, and what the flow of your application is, but when requirements
> change later, it's much easier to just change the config than to have to
> tear up your Action classes and move things around.
> 
> * Your struts-config file is much more self-documenting. If you have an
> Action class that actually handles multiple "actions", then you can't tell
> from the config file alone which forwards are used by which "actions".
> Depending on your code, you may have trouble knowing when you can remove a
> given forward from the config file, since you'd have to check all of the
> "actions" to see whether or not it is still used.
> 
> I've developed large Struts applications using both techniques, and I
> wouldn't go back, now, to overloading one Action class to do multiple
> things. I saw the comment from someone else about large numbers of classes,
> and yes, that can happen, but as long as you're organised and make judicious
> use of Java packages, it's not a problem.
> 
> --
> Martin Cooper
> 
> 
> "Dionisius Purba" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > I was wondering what's the advantage and disadvantage of
> > creating one Action for each use case, i.e. creating
> > NewAccountAction.java
> > EditAccountAction.java
> > or even with NewAccountFormAction.java
> >
> > vs
> >
> > AccountAction.java
> > and inside the AccountAction we can check parameter from the JSP
> > then execute proper method (i.e createNewAccount, editAccount, etc) ?
> >
> > Perhaps the first option is similar to GoF's command pattern.
> > Thanks a lot in advance.
> > Dion
> >
> >
> > -Original Message-
> > From: David Friedman [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, April 22, 2004 12:42 PM
> > To: Struts Users Mailing List
> > Subject: RE: Struts and Hibernate
> >
> >
> > Mario,
> >
> > I'm glad to hear it is working.  I couldn't get my properties file to work
> > with spaces, I had to use equals signs:
> >
> > hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
> > hibernate.connection.username=X
> > hibernate.connection.password=Y
> > hibernate.connection.url=jdbc:mysql://localhost:3306/test
> > hibernate.connection.driver_class=com.mysql.jdbc.Driver
> >
> > As for your Eclipse problem, if you are using Eclipse v2.1.X (I'm on
> 2.1.3),
> > try this: go to the Java perspective, right clicking on the project name,
> > choose properties, select "Java Build Path", and edit the "Source folders
> on
> > build path" entry so
> > $TOMCAT/webapps/example1/WEB-INF/src becomes
> > $TOMCAT/webapps/example1/WEB-INF/src/java and make sure the "Default
> Output
> > Folder" lists $TOMCAT/webapps/example1/WEB-INF/classes.  That should class
> > compilation so java files under WEB-INF/src/java compile WEB-INF/classes
> > instead of showing up under WEB-INF/classes/java.  I.E.
> > WEB-INF/src/java/com/edhand/whatever.java shows up now (as you described
> > below) compiled as WEB-INF/classes/java/com/edhand/whatever.java when this
> > change would make it compile properly as
> > WEB-INF/classes/com/edhand/whatever.java
> >
> > Regards,
> > David
> >
> > -Original Message-
> > From: Mario St-Gelais [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, April 21, 2004 10:14 PM
> > To: Struts Users Mailing List
> > Subject: Re: Struts and Hibernate
> >
> >
> > David Friedman wrote:
> >
> > >Mario,
> > >
> > >Where is your hibernate.properties file? in WEB-INF/classes or somewhere
> > >else?
> > >
> > >Regards,
> > >David
> > >
> > >-Original Message-
> > >From: Jesse Alexander (KXT) [mailto:[EMAIL PROTECTED]
> > >Sent: Wednesday, April 21, 2004 5:09 AM
> > >To: 'Struts Users Mailing List'
> > >Subject: RE: Struts and Hibernate
> > >
> > >
> > >could the problem lie beneath the different jdbc-drivers you two guys
> use?
> > >Joe, you are using the newest generation mysql-driver. Mario uses the old
> > >one.
> > >I also experienced strange stuff using the old one. worked after
> switching
> > >to
> 

Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?

2004-04-23 Thread bOOyah
Niall Pemberton wrote:

It should be 


  

.. or even


  

Sorry for the delay in replying Niall...my wife MADE ME down tools for a 
day.

Yes, indeed both your suggestions work perfectly.  I'm using the 2nd 
one.  Am I right then in guessing that

  

  
would display all messages (errors or otherwise)?  Is it now that simple?

What threw me originally is that 'org.apache.struts.action.ERROR' no 
longer exists in the online Struts javadocs.  So I got embroiled in 
following the path of deprecation, and I couldn't get the current 
recommendations to work :-(

Thanks a mill for your help.

--
bOOyah
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?

2004-04-23 Thread bOOyah
Takhar, Sandeep wrote:

Craig McLanahan wrote something about this recently.

I may be wrong since I haven't done this, but you may need '' quotes around the property since there are '.'s in it.
No Sandeep, wrapping single quotes around the property didn't seem to 
make any difference.  Not even wrapping the single quotes in double 
quotes ;-)  Niall's suggestion worked well though.

Thanks anyway.

--
bOOyah
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Non-Form Based Mapped Properties

2004-04-23 Thread Hubert Rabago
Michael,

The tag eventually ends up calling BeanUtils'
PropertyUtils.getNestedProperty(), which has special handling for
collections, including maps.  It's actually pretty powerful.  It enables
resolving Strings that eventually results in an object or an object's
property.  With it, bean:write (or any caller; it's a public method) can
resolve strings like "map1(foo).bar[2].name", with the proper object, of
course.  Also, AFAIK, its use isn't tied to ActionForms or DynaBeans.

Hubert

--- Michael McGrady <[EMAIL PROTECTED]> wrote:
> How can this be, Martin, when the method getMap() has no parameters?  What 
> is the point of the getValue/setValue methods?  This is very confusing to 
> me at this point.
> 
> At 10:33 AM 4/22/2004, Martin Cooper wrote:
> >What are you actually trying to do, Michael? Given the code you have
> below,
> >and assuming you have a Page instance stored as an attribute named "foo"
> and
> >want to print out the value of the "bar" entry in your map, this might be
> >what you want:
> >
> >
> >
> >The "map" refers to your getMap/setMap property - you can call it whatever
> >you want. Your getValue/setValue methods won't be used.
> >
> >--
> >Martin Cooper
> >
> >
> >"Michael McGrady" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> > > The class is the following, Niall:
> > >
> > > import java.util.Collections;
> > > import java.util.HashMap;
> > > import java.util.Map;
> > >
> > > public class Page {
> > >private Map keys;
> > >
> > >public Page() {
> > >  int size = 89;
> > >  this.keys = Collections.synchronizedMap(new HashMap(size));
> > >}
> > >
> > >public void setMap(Map keys) {
> > >  this.keys = keys;
> > >}
> > >
> > >public Map getMap() {
> > >  return keys;
> > >}
> > >
> > >public void setValue(Object key, Object value) {
> > >  keys.put(key,value);
> > >}
> > >
> > >public Object getValue(Object key) {
> > >  Object value = keys.get(key);
> > >  if(value == null) {
> > >return "? [" + (String)key + "] ?";
> > >  } else {
> > >return value;
> > >  }
> > >}
> > > } ///;-) Michael McGrady
> > >
> > > At 04:22 PM 4/21/2004, Niall Pemberton wrote:
> > > >Haven't done this but either your class needs to be a Map
> implementation
> >or
> > > >you need getter/setter for your Map
> > > >
> > > >  public void setMyMap(Map myMap)
> > > >  public Map getMyMap()
> > > >
> > > >The problem with using the  tags and not having your Map as a
> >property
> > > >of the ActionForm is that when the form is submitted, Struts is going
> to
> >try
> > > >to populate these properties in the form.
> > > >
> > > >Niall
> > > >
> > > >- Original Message -
> > > >From: "Michael McGrady" <[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
> > > ><[EMAIL PROTECTED]>
> > > >Sent: Wednesday, April 21, 2004 11:50 PM
> > > >Subject: Re: Non-Form Based Mapped Properties
> > > >
> > > >
> > > > > I created a simple class with the map and setValue(Object key,
> Object
> > > > > value) as well as getValue(Object key).  Then tested the class by
> >putting
> > > > > an instance of the class into session scope on a page, retrieving
> the
> > > > > object on the same page, and trying to access the properties via
> the
> > > >mapped
> > > > > properties value("keyName").  I made sure the object was obtained
> via
> >the
> > > > > logic tag, but the mapped property does not work for me.  Any
> ideas?
> >If
> > > > > not, I will put the whole thing into this exchange.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Michael
> > > > >
> > > > > At 08:56 AM 4/21/2004, Bill Siggelkow wrote:
> > > > > >Michael McGrady wrote:
> > > > > >>Is there a way to use non-form based mapped and indexed
> properties
> >with
> > > > > >>bean and/or html tags?  Apparently not?
> > > > > >
> > > > > >Yes -- you can used both mapped and indexed properties from normal
> > > > > >JavaBeans.  You can be more specific on the problem you are
> having?
> > > > > >
> > > > > >Bill Siggelkow
> > > > > >





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: generate struts ActionForm & strut's jsp from hibernate's mapping

2004-04-23 Thread David Friedman
Shhh! Script it with PERL in 10 minutes... SHH!
Don't let the group know I was previously into
PERL, before Java programming. LOL.

Regards,
David

-Original Message-
From: Dionisius Purba [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 4:24 AM
To: 'Struts Users Mailing List'
Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
mapping


David, you're right that I oversimplified the situation regarding
the HTML Input's type,
For my situations, the inputs in JSPs will be put between




etc.
The  and  and it's closing tags will be generated too
to minimize copy & pasting (the jsp phsycial file itself
would be generated automatically).
It happened that there are lots of JSPs to generates, more than 100 JSPs,
so I hope if I decided to do that, it wont be too counterproductive.

I've never use map-backed ActionForm before, I'll look at it then.
Thanks for your opinions.

regards,
~dion

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 2:03 PM
To: Struts Users Mailing List
Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
mapping


I'd be incredibly surprised if someone wrote a program (or ant task) to
auto-create a basic JSP listing html:whatever tags.  How could a programmer
know from the *.hbm.xml file if a field should be a checkbox, a radio
button, an input field, a file upload, a textarea, or anything else?  If it
did make them all html:text tags, you would still have to cut/paste
everything around the page into your layout (or into another JSP which
contains your table layout).  It sounds counterproductive when I try to
envision the JSP creator in this wording. :(

Regardless, I hope you find it.

If you're looking for a String-based form, why not use a map-backed
actionForm and let BeanUtils.copyProperties() (or whatever it's called) copy
and convert the Strings into your Hibernate saveable/updatable object?  See:

http://jakarta.apache.org/struts/userGuide/building_controller.html#map_acti
on_form_classes

On the JSP issue, I personally think you're nuts (unless you've got a
simpler description than my guess above) unless you have tens or hundreds of
JSP's to make and have no layout you require (as it would require nearly
equivalent amounts of cutting & pasting).

Regards,
David

-Original Message-
From: Dionisius Purba [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 1:40 AM
To: 'Struts Users Mailing List'
Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
mapping


David, It works perfectly fine.
You see, based on, for instance, Person.hbm.xml,
hbm2java will generate Person.java
but since I use struts, I still need to generate PersonForm.java
and Person.jsp

PersonForm would be very similar to Person.java, with the difference is that
in PersonForm, all fields's type (firstName, lastName, age)
become String.

Then in the AddPerson.jsp I will have something repeated like this:




Is there anyone outthere who makes tool for such thing?
It should not be very difficult to make one, but I just want to avoid
reinvent the wheel.

regards,
Dion

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 1:30 PM
To: Struts Users Mailing List
Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
mapping


What's wrong with the hibernate extension tools
and the Code Generator that creates .java files from
the hbm.xml files you give it?

See:
http://prdownloads.sourceforge.net/hibernate/?sort_by=date&sort=desc
Item: hibernate-extensions-2.1.zip (or the 2.0.2 zip file for 2.0.X
versions)

I've only used the extension's hbm2java program, not the other way around.
Now that I'm using Xdoclet, I have no further need for those extension
tools.

Regards,
David

-Original Message-
From: Dionisius Purba [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 1:21 AM
To: 'Struts Users Mailing List'
Subject: generate struts ActionForm & strut's jsp from hibernate's
mapping


Altough my question is related to hibernate, I hope it's still relevant.
Is anyone aware of tools, open source is better, that can generate
ActionForm and the JSP's (containing struts's HTML Input tag)
based on a hibernate's mapping (i.e. *.hmb.xml)?

cheers,
dion

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Advantages/Disadvantages of One Action for each Use Case

2004-04-23 Thread Robert Taylor
I've ended up using something I call ActionUtils classes which contain
common operations. For example if I had a store section in my web application, 
I would have a StoreActionUtils for operations common to Action classes in
the store section.

robert

> -Original Message-
> From: Takhar, Sandeep [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 7:22 AM
> To: Struts Users Mailing List
> Subject: RE: Advantages/Disadvantages of One Action for each Use Case
> 
> 
> Do you use subclasses for common methods or do you use helper classes or neither?
> 
> sandeep
> 
> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 22, 2004 3:54 PM
> To: Struts Users Mailing List
> Subject: RE: Advantages/Disadvantages of One Action for each Use Case
> 
> 
> +1. 
> 
> I've been down the "option 2" road and things get messy fast.
> I've since switched to the first option and applications scale much
> easier.
> 
> robert
> 
> > -Original Message-
> > From: news [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper
> > Sent: Thursday, April 22, 2004 1:52 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Advantages/Disadvantages of One Action for each Use Case
> > 
> > 
> > There are some major advantages to the first option, especially when you're
> > building a large and/or highly customisable application. A couple of
> > examples:
> > 
> > * It is much easier to reconfigure your application. without needing to
> > change any Java code. You may think you know which "actions" are related
> > today, and what the flow of your application is, but when requirements
> > change later, it's much easier to just change the config than to have to
> > tear up your Action classes and move things around.
> > 
> > * Your struts-config file is much more self-documenting. If you have an
> > Action class that actually handles multiple "actions", then you can't tell
> > from the config file alone which forwards are used by which "actions".
> > Depending on your code, you may have trouble knowing when you can remove a
> > given forward from the config file, since you'd have to check all of the
> > "actions" to see whether or not it is still used.
> > 
> > I've developed large Struts applications using both techniques, and I
> > wouldn't go back, now, to overloading one Action class to do multiple
> > things. I saw the comment from someone else about large numbers of classes,
> > and yes, that can happen, but as long as you're organised and make judicious
> > use of Java packages, it's not a problem.
> > 
> > --
> > Martin Cooper
> > 
> > 
> > "Dionisius Purba" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Hi,
> > >
> > > I was wondering what's the advantage and disadvantage of
> > > creating one Action for each use case, i.e. creating
> > > NewAccountAction.java
> > > EditAccountAction.java
> > > or even with NewAccountFormAction.java
> > >
> > > vs
> > >
> > > AccountAction.java
> > > and inside the AccountAction we can check parameter from the JSP
> > > then execute proper method (i.e createNewAccount, editAccount, etc) ?
> > >
> > > Perhaps the first option is similar to GoF's command pattern.
> > > Thanks a lot in advance.
> > > Dion
> > >
> > >
> > > -Original Message-
> > > From: David Friedman [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, April 22, 2004 12:42 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Struts and Hibernate
> > >
> > >
> > > Mario,
> > >
> > > I'm glad to hear it is working.  I couldn't get my properties file to work
> > > with spaces, I had to use equals signs:
> > >
> > > hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
> > > hibernate.connection.username=X
> > > hibernate.connection.password=Y
> > > hibernate.connection.url=jdbc:mysql://localhost:3306/test
> > > hibernate.connection.driver_class=com.mysql.jdbc.Driver
> > >
> > > As for your Eclipse problem, if you are using Eclipse v2.1.X (I'm on
> > 2.1.3),
> > > try this: go to the Java perspective, right clicking on the project name,
> > > choose properties, select "Java Build Path", and edit the "Source folders
> > on
> > > build path" entry so
> > > $TOMCAT/webapps/example1/WEB-INF/src becomes
> > > $TOMCAT/webapps/example1/WEB-INF/src/java and make sure the "Default
> > Output
> > > Folder" lists $TOMCAT/webapps/example1/WEB-INF/classes.  That should class
> > > compilation so java files under WEB-INF/src/java compile WEB-INF/classes
> > > instead of showing up under WEB-INF/classes/java.  I.E.
> > > WEB-INF/src/java/com/edhand/whatever.java shows up now (as you described
> > > below) compiled as WEB-INF/classes/java/com/edhand/whatever.java when this
> > > change would make it compile properly as
> > > WEB-INF/classes/com/edhand/whatever.java
> > >
> > > Regards,
> > > David
> > >
> > > -Original Message-
> > > From: Mario St-Gelais [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, April 21, 2004 10:14 PM
> > > To: Struts Users Ma

problems with onclick=submit()

2004-04-23 Thread Jaakko Rytinki
Anyone else had problems with  Error page 500, because such paths are not visible and/or usable
for normal user





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problems with onclick=submit()

2004-04-23 Thread Jarnot Voytek Contr AU/SC
have you tried href="javascript:void(0)"?  this is an html issue - not
struts.

--
Voytek Jarnot
Quantum materiae materietur marmota monax si marmota monax materiam possit
materiari?


> -Original Message-
> From: Jaakko Rytinki [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 8:01 AM
> To: Struts Users Mailing List
> Subject: problems with onclick=submit()
> 
> 
> Anyone else had problems with  Im using tiles and the problem is that when I click a link to submit
> a form, the link throws me to /myApp/layouts/myLayout.jsp# if I use
>  
> --> Error page 500, because such paths are not visible and/or usable
> for normal user
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problems with onclick=submit()

2004-04-23 Thread Guillermo Meyer
You should also return false in the onclick  event. If return false,
the link wont be executed.


-Original Message-
From: Jarnot Voytek Contr AU/SC [mailto:[EMAIL PROTECTED] 
Sent: Viernes, 23 de Abril de 2004 10:06 a.m.
To: 'Struts Users Mailing List'
Subject: RE: problems with onclick=submit()


have you tried href="javascript:void(0)"?  this is an html issue - not
struts.

--
Voytek Jarnot
Quantum materiae materietur marmota monax si marmota monax materiam
possit materiari?


> -Original Message-
> From: Jaakko Rytinki [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 8:01 AM
> To: Struts Users Mailing List
> Subject: problems with onclick=submit()
> 
> 
> Anyone else had problems with  tiles and the problem is that when I click a link to submit a form, 
> the link throws me to /myApp/layouts/myLayout.jsp# if I use  href="#, plain  
> --> Error page 500, because such paths are not visible and/or usable
> for normal user
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problems with onclick=submit()

2004-04-23 Thread Shyamal Shah
Try javascript:void(0) or submit the page from a javascript function and do
"return 0" at the end of the method.


- Original Message - 
From: "Jaakko Rytinki" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 9:01 AM
Subject: problems with onclick=submit()


> Anyone else had problems with  Im using tiles and the problem is that when I click a link to submit
> a form, the link throws me to /myApp/layouts/myLayout.jsp# if I use
> 
> --> Error page 500, because such paths are not visible and/or usable
> for normal user
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



html:select - can't display default option

2004-04-23 Thread Matthew Hegarty

Hi all

I am using , and trying to get the drop-down to default to a Boolean 
value in a bean, ie true, false, or blank if the bean is null.
My bean (MyBean) contains the method getMyValue() which returns a Boolean object.

In the code snippet below, the c:out statement confirms that the value of the property 
is 'true'.  I expect that the 'true' option will be pre-selected (which it is if you 
add "value='true'" to html:select), but doing this dynamically with the c:out tag 
doesn't work - the blank value is always the
one pre-selected.

Can someone suggest anything I am doing wrong, or suggest a better approach (i'm 
relatively new to Struts).








Thanks
Matt

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problems with onclick=submit()

2004-04-23 Thread Jaakko Rytinki
Yup, javascript:void(0)" somehow prevents the whole form from
being submitted. ( the link doesn't do anything at all )

-Original Message-
From: Jarnot Voytek Contr AU/SC [mailto:[EMAIL PROTECTED] 
Sent: 23. huhtikuuta 2004 16:06
To: 'Struts Users Mailing List'
Subject: RE: problems with onclick=submit()

have you tried href="javascript:void(0)"?  this is an html issue - not
struts.

--
Voytek Jarnot
Quantum materiae materietur marmota monax si marmota monax materiam
possit
materiari?


> -Original Message-
> From: Jaakko Rytinki [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 8:01 AM
> To: Struts Users Mailing List
> Subject: problems with onclick=submit()
> 
> 
> Anyone else had problems with  Im using tiles and the problem is that when I click a link to submit
> a form, the link throws me to /myApp/layouts/myLayout.jsp# if I use
>  
> --> Error page 500, because such paths are not visible and/or usable
> for normal user
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Where can I catch FileUploadException?

2004-04-23 Thread Jing Teng
Martin,

Thanks for the reply. 

If I throw a ServletException in my Action, my app catches it. The question
here is if there is a way to catch this FileUploadException wraped as a
ServletExcption, maybe tweaking the web container somehow? I am using
Websphere 5.0.2

Jing Teng



-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 22, 2004 5:46 PM
To: [EMAIL PROTECTED]
Subject: Re: Where can I catch FileUploadException?


"Jing Teng" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All,
>
> I am using the file upload features in a web application. Basically 
> the
app
> has three components. Application.jsp has a html form, the form is
captured
> in JobApplicationActionForm,  the action of the form is to apply.do.
>
> The application runs well at most of the time, but when the resume 
> file
that
> is to be uploaded is locked by another process(meaning the file can't 
> be read.), the application blows up.
>
> Following is the code:



> I inserted the debug code in the constructor and execute() method of 
> ApplyForJobAction, I found that ApplyForJobAction is actually not called.
I
> tried to catch the exception in process() method of my overriden 
> ActionServlet, had no luck.
>
> Where else can I try to catch the exception?

You can't, at least not without extending RequestProcessor or modifying (or
wrapping) CommonsMultipartRequestHandler. The FileUploadException is thrown
when the request is being parsed, which is at the time the form bean is
being populated. That happens before your action is invoked. The exception
is caught by Struts, and converted to a ServletException. Unfortunately,
this doesn't propagate to the global exception handler (although perhaps it
should), so it bubbles right out the top.

--
Martin Cooper


>
> Thanks
> Jing
>
>
> DISCLAIMER: This message contains information which may be 
> confidential and/or privileged, and is intended only for the use of the
addressee(s).
> Any use, disclosure or copying of this message or any part thereof by 
> any person other than such addressee(s) is unauthorized and strictly
prohibited.
> If you have received this message in error, please notify the sender 
> by return e-mail and delete the message.  Thank you for your cooperation.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


DISCLAIMER: This message contains information which may be confidential
and/or privileged, and is intended only for the use of the addressee(s).
Any use, disclosure or copying of this message or any part thereof by any
person other than such addressee(s) is unauthorized and strictly prohibited.
If you have received this message in error, please notify the sender by
return e-mail and delete the message.  Thank you for your cooperation. 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problems with onclick=submit()

2004-04-23 Thread Jarnot Voytek Contr AU/SC
weird, how about href="javascript:submit(); return(false);"

> -Original Message-
> From: Jaakko Rytinki [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 8:19 AM
> To: 'Struts Users Mailing List'
> Subject: RE: problems with onclick=submit()
> 
> 
> Yup, javascript:void(0)" somehow prevents the whole form from
> being submitted. ( the link doesn't do anything at all )
> 
> -Original Message-
> From: Jarnot Voytek Contr AU/SC [mailto:[EMAIL PROTECTED] 
> Sent: 23. huhtikuuta 2004 16:06
> To: 'Struts Users Mailing List'
> Subject: RE: problems with onclick=submit()
> 
> have you tried href="javascript:void(0)"?  this is an html issue - not
> struts.
> 
> --
> Voytek Jarnot
> Quantum materiae materietur marmota monax si marmota monax materiam
> possit
> materiari?
> 
> 
> > -Original Message-
> > From: Jaakko Rytinki [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 23, 2004 8:01 AM
> > To: Struts Users Mailing List
> > Subject: problems with onclick=submit()
> > 
> > 
> > Anyone else had problems with  > Im using tiles and the problem is that when I click a link to submit
> > a form, the link throws me to /myApp/layouts/myLayout.jsp# if I use
> >  > 
> > --> Error page 500, because such paths are not visible and/or usable
> > for normal user
> > 
> > 
> > 
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select - can't display default option

2004-04-23 Thread Paul McCulloch
The html:select tag should do this automatically for you I think. Try not
explicitly setting the value attribute.

Looking at your code I'm surprised it works - you can;t nest jsp tags inside
other tags as far as I know (or is that a JSP 2 feature?).

Paul

> -Original Message-
> From: Matthew Hegarty [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 2:14 PM
> To: 'Struts Users Mailing List'
> Subject: html:select - can't display default option
> 
> 
> 
> Hi all
> 
> I am using , and trying to get the drop-down to 
> default to a Boolean value in a bean, ie true, false, or 
> blank if the bean is null.
> My bean (MyBean) contains the method getMyValue() which 
> returns a Boolean object.
> 
> In the code snippet below, the c:out statement confirms that 
> the value of the property is 'true'.  I expect that the 
> 'true' option will be pre-selected (which it is if you add 
> "value='true'" to html:select), but doing this dynamically 
> with the c:out tag doesn't work - the blank value is always the
> one pre-selected.
> 
> Can someone suggest anything I am doing wrong, or suggest a 
> better approach (i'm relatively new to Struts).
> 
> 
>  value="">
>  key="jsp.form.booleandropdown.default" bundle="JSP_LABELS" />
>  key="jsp.form.booleandropdown.true" bundle="JSP_LABELS" />
>  key="jsp.form.booleandropdown.false" bundle="JSP_LABELS" />
> 
> 
> Thanks
> Matt
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: setLocale 2.0

2004-04-23 Thread Hernan Soulages
Seems your right.
(Locale) request.getSession().getAttribute(Globals.LOCALE_KEY);
does give me the Locale I just set. My problem is that I wan't to
programatically set the language for all the aplication, including the
 in the JSPs. I thought setLocale() did the
trick. How do I set de Locale for the bean:message tags?

Thanks
Hernan

> My understanding of it (which could be incorrect) is that
> setLocale(request,
> locale) only sets the locale that Struts uses internally.  It doesn't set
> the
> locale that the request object uses, or any other processes that looks for
> locale in the request object.
> If you somehow need the locale that you've set in this code, call "locale
> =
> (Locale) request.getSession().getAttribute(Globals.LOCALE_KEY);" in Struts
> 1.1, or "RequestUtils.getUserLocale(request, null);" in 1.2.
>
> Hubert


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select - can't display default option

2004-04-23 Thread Victor R. Cardona
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Matthew Hegarty wrote:
| Hi all
|
| I am using , and trying to get the drop-down to default
to a Boolean value in a bean, ie true, false, or blank if the bean is null.
| My bean (MyBean) contains the method getMyValue() which returns a
Boolean object.
|
| In the code snippet below, the c:out statement confirms that the value
of the property is 'true'.  I expect that the 'true' option will be
pre-selected (which it is if you add "value='true'" to html:select), but
doing this dynamically with the c:out tag doesn't work - the blank value
is always the
| one pre-selected.
|
| Can someone suggest anything I am doing wrong, or suggest a better
approach (i'm relatively new to Struts).
|
| 
| 
| 
| 
| 
| 
This is just a guess, but you could try writing it like this:

...

I think the problem is the c:out tag in the value attribute. In any
case, you don't need it. You can use EL expressions anywhere if you are
using a container that supports the JSP2.0 specs.
HTH,
Victor
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAiSVC8MW+BaXrmuERAtoRAJ4mYhJQUnzUeU6FVIkdHaWPLUaIyACeL4sk
uZyNMxCBOt/0QnSq9nVwJNo=
=9qXm
-END PGP SIGNATURE-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: setLocale 2.0

2004-04-23 Thread Hubert Rabago
I recently used  with locale in the way you're describing, and
it picked up the locale that's set as Globals.LOCALE_KEY.  If you want, you
can get the code in http://www.rabago.net/struts/formdef/downloads.htm.  Look
for the locale.war sample app.

Hubert

--- Hernan Soulages <[EMAIL PROTECTED]> wrote:
> Seems your right.
> (Locale) request.getSession().getAttribute(Globals.LOCALE_KEY);
> does give me the Locale I just set. My problem is that I wan't to
> programatically set the language for all the aplication, including the
>  in the JSPs. I thought setLocale() did the
> trick. How do I set de Locale for the bean:message tags?
> 
> Thanks
> Hernan
> 
> > My understanding of it (which could be incorrect) is that
> > setLocale(request,
> > locale) only sets the locale that Struts uses internally.  It doesn't set
> > the
> > locale that the request object uses, or any other processes that looks
> for
> > locale in the request object.
> > If you somehow need the locale that you've set in this code, call "locale
> > =
> > (Locale) request.getSession().getAttribute(Globals.LOCALE_KEY);" in
> Struts
> > 1.1, or "RequestUtils.getUserLocale(request, null);" in 1.2.
> >
> > Hubert
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select - can't display default option

2004-04-23 Thread Matthew Hegarty
Thanks for the responses.
Still not quite there though...

Victor wrote: 
> 
>   ...
> 

This has the effect of always defaulting to the empty string option, regardless of the 
value of 'myValue'.

Paul wrote:
> Try not explicitly setting the value attribute.

This works insofar as the drop-down displays correctly if the value is true or false, 
but if the value is null, then the drop-down defaults to 'no' (false) instead of ''.

Matt

-Original Message-
From: Victor R. Cardona [mailto:[EMAIL PROTECTED]
Sent: 23 April 2004 15:17
To: Struts Users Mailing List
Subject: Re: html:select - can't display default option


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matthew Hegarty wrote:
| Hi all
|
| I am using , and trying to get the drop-down to default
to a Boolean value in a bean, ie true, false, or blank if the bean is null.
| My bean (MyBean) contains the method getMyValue() which returns a
Boolean object.
|
| In the code snippet below, the c:out statement confirms that the value
of the property is 'true'.  I expect that the 'true' option will be
pre-selected (which it is if you add "value='true'" to html:select), but
doing this dynamically with the c:out tag doesn't work - the blank value
is always the
| one pre-selected.
|
| Can someone suggest anything I am doing wrong, or suggest a better
approach (i'm relatively new to Struts).
|
| 
| 
| 
| 
| 
| 

This is just a guess, but you could try writing it like this:

...


I think the problem is the c:out tag in the value attribute. In any
case, you don't need it. You can use EL expressions anywhere if you are
using a container that supports the JSP2.0 specs.

HTH,
Victor
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAiSVC8MW+BaXrmuERAtoRAJ4mYhJQUnzUeU6FVIkdHaWPLUaIyACeL4sk
uZyNMxCBOt/0QnSq9nVwJNo=
=9qXm
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select - can't display default option

2004-04-23 Thread Hubert Rabago

--- Matthew Hegarty <[EMAIL PROTECTED]> wrote:
> Thanks for the responses.
> Still not quite there though...
> 
> Paul wrote:
> > Try not explicitly setting the value attribute.
> 
> This works insofar as the drop-down displays correctly if the value is true
> or false, but if the value is null, then the drop-down defaults to 'no'
> (false) instead of ''.
> 
> Matt
> 

If you want the option with a '' value to be selected, set the corresponding
property in your bean to ''.





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select - can't display default option

2004-04-23 Thread Matthew Hegarty
> If you want the option with a '' value to be selected, set the corresponding
> property in your bean to ''.

I can't because the type is Boolean.
I was wanting to display the empty option if the value returned is null.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: use strings for form beans (was: html:select - can't display default option)

2004-04-23 Thread Hubert Rabago
Form values really should be strings.  There are reasons for this, and
they've been discussed lots of times in this list already.  Use Strings for
your form beans and match the value in the form bean with the value in the
HTML form.  Actually, your scenario is an illustration of why they really
should be strings.

--- Matthew Hegarty <[EMAIL PROTECTED]> wrote:
> > If you want the option with a '' value to be selected, set the
> corresponding
> > property in your bean to ''.
> 
> I can't because the type is Boolean.
> I was wanting to display the empty option if the value returned is null.
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: generate struts ActionForm & strut's jsp from hibernate's mapping

2004-04-23 Thread Joe Hertz


Look a FormDef, it's a tool to generate DynaBeans based on your Business
Classes.

I'm using it with Hibernate. It required some minor changes to get that
to happen, and I'm not promising their all there yet, but it's worth
looking at.

> -Original Message-
> From: Dionisius Purba [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 23, 2004 1:21 AM
> To: 'Struts Users Mailing List'
> Subject: generate struts ActionForm & strut's jsp from 
> hibernate's mapping
> 
> 
> Altough my question is related to hibernate, I hope it's 
> still relevant. Is anyone aware of tools, open source is 
> better, that can generate 
> ActionForm and the JSP's (containing struts's HTML Input tag) 
> based on a hibernate's mapping (i.e. *.hmb.xml)?
> 
> cheers,
> dion
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OT/ CalendarTag like behaviour

2004-04-23 Thread Marco Mistroni
Hi all,
I know this is off-topic but I m sure someone on
This list had this issue to face already
I have to implement a 'calendar like' tag (u know, those kind of
Tags that when u click on the button a small popup window is shown, you
Select the day and by clicking on the day you will return to the
original
Page with the value filled)

I have to implement similar functionalities does anyone know any
Examples/tutorial/docs about similar things?

Thanx in advance and regards
Marco



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select - can't display default option

2004-04-23 Thread Paul McCulloch
A Boolean has two states, true & false, but you want to represent this
through a three state list - this mismatch is the cause of your problem.

Why not expose your boolean bean property via String accessors using "true",
"false" and "null"?

Paul

> -Original Message-
> From: Matthew Hegarty [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 3:35 PM
> To: 'Struts Users Mailing List'
> Subject: RE: html:select - can't display default option
> 
> 
> > If you want the option with a '' value to be selected, set 
> the corresponding
> > property in your bean to ''.
> 
> I can't because the type is Boolean.
> I was wanting to display the empty option if the value 
> returned is null.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: setLocale 2.0

2004-04-23 Thread Hernan Soulages
Problem solved!
It was all a programming error. We added session.invalidate() after the
setLocale. That made the default Locale to be used.
Good to know that setLocale(myRequest, locale) doesn't set the myRequest
locale (as I assumed), but the Globals.LOCALE_KEY object in the session.

Thanks for the help
Hernan
> I recently used  with locale in the way you're describing,
> and
> it picked up the locale that's set as Globals.LOCALE_KEY.  If you want,
> you
> can get the code in http://www.rabago.net/struts/formdef/downloads.htm.
> Look
> for the locale.war sample app.
>
> Hubert
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: OT/ CalendarTag like behaviour

2004-04-23 Thread Paul McCulloch
I'm a big fan of http://www.mattkruse.com/javascript/calendarpopup/

It's primarily a pure client side JS implementation but there is (was) also
a prototype JSP custom tag implentation - search the archives of this list
to find the URL.

Paul

> -Original Message-
> From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 3:55 PM
> To: 'Struts Users Mailing List'
> Subject: OT/ CalendarTag like behaviour
> 
> 
> Hi all,
>   I know this is off-topic but I m sure someone on
> This list had this issue to face already
> I have to implement a 'calendar like' tag (u know, those kind of
> Tags that when u click on the button a small popup window is 
> shown, you
> Select the day and by clicking on the day you will return to the
> original
> Page with the value filled)
> 
> I have to implement similar functionalities does anyone know any
> Examples/tutorial/docs about similar things?
> 
> Thanx in advance and regards
>   Marco
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: OT/ CalendarTag like behaviour

2004-04-23 Thread Geeta Ramani
and if you cannot find it, contact me offlist. I know I have an implementation 
somewhere; i can look for it over the weekend. :)

> -Original Message-
> From: Paul McCulloch [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 11:04 AM
> To: 'Struts Users Mailing List'
> Subject: RE: OT/ CalendarTag like behaviour
> 
> 
> I'm a big fan of http://www.mattkruse.com/javascript/calendarpopup/
> 
> It's primarily a pure client side JS implementation but there 
> is (was) also
> a prototype JSP custom tag implentation - search the archives 
> of this list
> to find the URL.
> 
> Paul
> 
> > -Original Message-
> > From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 23, 2004 3:55 PM
> > To: 'Struts Users Mailing List'
> > Subject: OT/ CalendarTag like behaviour
> > 
> > 
> > Hi all,
> > I know this is off-topic but I m sure someone on
> > This list had this issue to face already
> > I have to implement a 'calendar like' tag (u know, those kind of
> > Tags that when u click on the button a small popup window is 
> > shown, you
> > Select the day and by clicking on the day you will return to the
> > original
> > Page with the value filled)
> > 
> > I have to implement similar functionalities does anyone know any
> > Examples/tutorial/docs about similar things?
> > 
> > Thanx in advance and regards
> > Marco
> > 
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> **
> Axios Email Confidentiality Footer
> Privileged/Confidential Information may be contained in this 
> message. If you are not the addressee indicated in this 
> message (or responsible for delivery of the message to such 
> person), you may not copy or deliver this message to anyone. 
> In such case, you should destroy this message, and notify us 
> immediately. If you or your employer does not consent to 
> Internet email messages of this kind, please advise us 
> immediately. Opinions, conclusions and other information 
> expressed in this message are not given or endorsed by my 
> Company or employer unless otherwise indicated by an 
> authorised representative independent of this message.
> WARNING:
> While Axios Systems Ltd takes steps to prevent computer 
> viruses from being transmitted via electronic mail 
> attachments we cannot guarantee that attachments do not 
> contain computer virus code.  You are therefore strongly 
> advised to undertake anti virus checks prior to accessing the 
> attachment to this electronic mail.  Axios Systems Ltd grants 
> no warranties regarding performance use or quality of any 
> attachment and undertakes no liability for loss or damage 
> howsoever caused.
> **
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: OT/ CalendarTag like behaviour

2004-04-23 Thread Lowery, Mat
I recently wrapped this JavaScript calendar with a custom tag:

http://sourceforge.net/projects/jscalendar/

or here's the author's site:

http://dynarch.com/mishoo/calendar.epl


-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 23, 2004 10:55 AM
To: 'Struts Users Mailing List'
Subject: OT/ CalendarTag like behaviour

Hi all,
I know this is off-topic but I m sure someone on
This list had this issue to face already
I have to implement a 'calendar like' tag (u know, those kind of
Tags that when u click on the button a small popup window is shown, you
Select the day and by clicking on the day you will return to the
original
Page with the value filled)

I have to implement similar functionalities does anyone know any
Examples/tutorial/docs about similar things?

Thanx in advance and regards
Marco



"The sender believes that this E-Mail and any attachments were free of any virus, 
worm, Trojan horse, and/or malicious code when sent. This message and its attachments 
could have been infected during transmission.  By reading the message and opening any 
attachments, the recipient accepts full responsibility for taking proactive and 
remedial action about viruses and other defects. The sender's business entity is not 
liable for any loss or damage arising in any way from this message or its attachments."


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Non-Form Based Mapped Properties

2004-04-23 Thread Michael McGrady
Thanks, Herbert, let me state more particularly what I am doing.  I want to 
use Struts tags rather than JSP.  I know how to do things in JSP 
easily.  With the tags, outside of ActionForms, I am confused.  In JSP, I 
get my results as follows:

<%
Host host = (Host)session.getAttribute(SiteConstant.HOST);
Page key = (Page)host.getPage(SiteConstant.ECLIPSE_BANNER);
%>
<%= key.getValue("bannerLeftBackgroundColor") %>

I want to do with the Struts bean tag what I do now with JSP tags.  How do 
I do that?  This should be simple, but something is not working.  I am 
either erring with the "define" or the "write" attribute and all the 
combinations I try don't work.  People have indicated that I need to 
retrieve a Map object with getMap().  I don't see why, given what I read in 
the literature.  If you could help, I would be eternally (or a very long 
time) grateful. The classes are given below:

public class Host {
  private Map pages;
  public Host() {
int size = 89;
this.pages = Collections.synchronizedMap(new HashMap(size));
  }
  public void setMap(Map pages) {
this.pages = pages;
  }
  public Map getMap() {
return pages;
  }
  public void setPage(Object key, Object page) {
pages.put(key,page);
  }
  public Object getPage(Object key) {
return pages.get(key);
  }
} ///;-) Michael McGrady
public class Page {
  private Map keys;
  public Page() {
int size = 89;
this.keys = Collections.synchronizedMap(new HashMap(size));
  }
  public void setMap(Map keys) {
this.keys = keys;
  }
  public Map getMap() {
return keys;
  }
  public void setValue(Object key, Object value) {
keys.put(key,value);
  }
  public Object getValue(Object key) {
Object value = keys.get(key);
com.crackwillow.log.StdOut.redirect("log.VALUE: " + value);
if(value == null) {
  return "? [" + (String)key + "] ?";
} else {
  return value;
}
  }
} ///;-) Michael McGrady
At 05:02 AM 4/23/2004, Hubert Rabago wrote:
Michael,

The tag eventually ends up calling BeanUtils'
PropertyUtils.getNestedProperty(), which has special handling for
collections, including maps.  It's actually pretty powerful.  It enables
resolving Strings that eventually results in an object or an object's
property.  With it, bean:write (or any caller; it's a public method) can
resolve strings like "map1(foo).bar[2].name", with the proper object, of
course.  Also, AFAIK, its use isn't tied to ActionForms or DynaBeans.
Hubert

--- Michael McGrady <[EMAIL PROTECTED]> wrote:
> How can this be, Martin, when the method getMap() has no parameters?  What
> is the point of the getValue/setValue methods?  This is very confusing to
> me at this point.
>
> At 10:33 AM 4/22/2004, Martin Cooper wrote:
> >What are you actually trying to do, Michael? Given the code you have
> below,
> >and assuming you have a Page instance stored as an attribute named "foo"
> and
> >want to print out the value of the "bar" entry in your map, this might be
> >what you want:
> >
> >
> >
> >The "map" refers to your getMap/setMap property - you can call it whatever
> >you want. Your getValue/setValue methods won't be used.
> >
> >--
> >Martin Cooper
> >
> >
> >"Michael McGrady" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> > > The class is the following, Niall:
> > >
> > > import java.util.Collections;
> > > import java.util.HashMap;
> > > import java.util.Map;
> > >
> > > public class Page {
> > >private Map keys;
> > >
> > >public Page() {
> > >  int size = 89;
> > >  this.keys = Collections.synchronizedMap(new HashMap(size));
> > >}
> > >
> > >public void setMap(Map keys) {
> > >  this.keys = keys;
> > >}
> > >
> > >public Map getMap() {
> > >  return keys;
> > >}
> > >
> > >public void setValue(Object key, Object value) {
> > >  keys.put(key,value);
> > >}
> > >
> > >public Object getValue(Object key) {
> > >  Object value = keys.get(key);
> > >  if(value == null) {
> > >return "? [" + (String)key + "] ?";
> > >  } else {
> > >return value;
> > >  }
> > >}
> > > } ///;-) Michael McGrady
> > >
> > > At 04:22 PM 4/21/2004, Niall Pemberton wrote:
> > > >Haven't done this but either your class needs to be a Map
> implementation
> >or
> > > >you need getter/setter for your Map
> > > >
> > > >  public void setMyMap(Map myMap)
> > > >  public Map getMyMap()
> > > >
> > > >The problem with using the  tags and not having your Map as a
> >property
> > > >of the ActionForm is that when the form is submitted, Struts is going
> to
> >try
> > > >to populate these properties in the form.
> > > >
> > > >Niall
> > > >
> > > >- Original Message -
> > > >From: "Michael McGrady" <[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
> > > ><[EMAIL PROTECTED]>
> > > >Sent: Wednesday, April 21, 2004 11:50 PM
> > > >Subject: Re: Non-Form Based Mapped Properties
> > > >
> > > >
> > > > > I created a simple class

How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread Riyad Kalla
Hello,
I have a situation where my LookupDispatchAction (LDA) has all my 
functionality for a particular entity defined in it (lets say 
"Product"). So that includes adding, removing, listing, editing and 
changing their order (moving them visually up/down in the table they are 
listed in).

So far everything works fine, however I am running into a problem when I 
have my LDA returning a forward BACK to itself. This situation arises 
when someone changes the order of a product (maybe they move it down), 
so what happens is the "Down" button is pressed, execution goes to the 
"moveDown" method in the LDA. At the end of that method, a forward is 
returned that actually points to the same LDA, but is suppose to call 
the "showList" method (different path). This is done because after the 
order of the products is changed, you need to refresh the page with the 
list of products again so the user sees the changed ordering.

However, as you can imagine, I get the following exception after 
returning the forward:

javax.servlet.ServletException: Request[/forward/product/showList] does not contain 
handler parameter named method

org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:199)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
I've tried (at the end of the 'moveDown' method) to manually set a 
parameter (get an IllegalStateException because 'Config is Frozen') and 
tried to add a request attribute all by the name I have defined for the 
parameter (it happens to be 'method') and none of it worked.

So to recap if this isn't clear so far, going into my LDA to change the 
ordering is fine because its from a JSP link where a value for 
'parameter' is defined, so the LDA knows which method to call. However 
by the end of the "moveDown" method, where I need to send execution over 
to the "showList" method, I have no way to define a parameter value, so 
when the forward is returned, and execution comes BACK to the LDA, it 
has no parameter value (hence the exception). I've looked into using the 
"unspecified" method, but it SEEMS to me like that has the exact same 
problem... if no parameter is specified, I STILL want to forward to the 
showList method in the LDA, but I still won't be able to set the 
parameter, and it seems ugly to do a:

protected ActionForward unspecified(

   ActionMapping mapping,

   ActionForm form,

   HttpServletRequest request,

   HttpServletResponse response)

   throws Exception

   {

   

   return showList();

   }

Does anyone know how I would be able to forward from one method in an 
LDA to another method in the same LDA (or any other LDA for that 
matter...)? My entire site is a 1:1 mapping for actions and JSPs, so 
users never actually see ".jsp" in their address bar, its always ".do", 
so being able to go between LDAs is pretty important to me ;)

Thank you for any help you can provide!
-Riyad
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread Riyad Kalla
UPDATE:
I just tried doing what I thought would be ugly:
protected ActionForward unspecified(

  ActionMapping mapping,

  ActionForm form,

  HttpServletRequest request,

  HttpServletResponse response)

  throws Exception

  {

  return showList(mapping, form, request, response);

  }

And it didn't work either, it threw the same exception, EVEN THOUGH the 
forward that returns from "showList" is actually pointing to a JSP page 
(not another Action or LDA like was my original problem). To be honest 
I'm not even entirely sure that my unspecified method got called, 
because the exception I get is EXACTLY the same... I'm using Struts 1.1, 
and I thought I saw somewhere in a longer thread from March I think that 
this didn't work in 1.1 but works in 1.2 (nightly build)?

Riyad Kalla wrote:

Hello,
I have a situation where my LookupDispatchAction (LDA) has all my 
functionality for a particular entity defined in it (lets say 
"Product"). So that includes adding, removing, listing, editing and 
changing their order (moving them visually up/down in the table they 
are listed in).

So far everything works fine, however I am running into a problem when 
I have my LDA returning a forward BACK to itself. This situation 
arises when someone changes the order of a product (maybe they move it 
down), so what happens is the "Down" button is pressed, execution goes 
to the "moveDown" method in the LDA. At the end of that method, a 
forward is returned that actually points to the same LDA, but is 
suppose to call the "showList" method (different path). This is done 
because after the order of the products is changed, you need to 
refresh the page with the list of products again so the user sees the 
changed ordering.

However, as you can imagine, I get the following exception after 
returning the forward:

javax.servlet.ServletException: Request[/forward/product/showList] 
does not contain handler parameter named method
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:199) 

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 

org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
I've tried (at the end of the 'moveDown' method) to manually set a 
parameter (get an IllegalStateException because 'Config is Frozen') 
and tried to add a request attribute all by the name I have defined 
for the parameter (it happens to be 'method') and none of it worked.

So to recap if this isn't clear so far, going into my LDA to change 
the ordering is fine because its from a JSP link where a value for 
'parameter' is defined, so the LDA knows which method to call. However 
by the end of the "moveDown" method, where I need to send execution 
over to the "showList" method, I have no way to define a parameter 
value, so when the forward is returned, and execution comes BACK to 
the LDA, it has no parameter value (hence the exception). I've looked 
into using the "unspecified" method, but it SEEMS to me like that has 
the exact same problem... if no parameter is specified, I STILL want 
to forward to the showList method in the LDA, but I still won't be 
able to set the parameter, and it seems ugly to do a:

protected ActionForward unspecified(

   ActionMapping mapping,

   ActionForm form,

   HttpServletRequest request,

   HttpServletResponse response)

   throws Exception

   {

  
   return showList();

   }

Does anyone know how I would be able to forward from one method in an 
LDA to another method in the same LDA (or any other LDA for that 
matter...)? My entire site is a 1:1 mapping for actions and JSPs, so 
users never actually see ".jsp" in their address bar, its always 
".do", so being able to go between LDAs is pretty important to me ;)

Thank you for any help you can provide!
-Riyad
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Memory Leak issues

2004-04-23 Thread Guillermo Vasconcelos
Hi, I have a problems with leaked memory in my webapp using struts.
It starts fine, but over a few days of running it becomes slower and gives bad 
performance.
Its memory consumption grows, never releasing part of it...
¿Which tools do you recomend to try to eliminate this memory leak?
Thanks a lot

Re: Memory Leak issues

2004-04-23 Thread dennis . graham
JProbe: http://www.quest.com/jprobe/





"Guillermo Vasconcelos" <[EMAIL PROTECTED]>
04/23/2004 12:49 PM
Please respond to "Struts Users Mailing List"
 
To: <[EMAIL PROTECTED]>
cc: 
Subject:Memory Leak issues


Hi, I have a problems with leaked memory in my webapp using struts.
It starts fine, but over a few days of running it becomes slower and gives 
bad performance.
Its memory consumption grows, never releasing part of it...
¿Which tools do you recomend to try to eliminate this memory leak?
Thanks a lot


Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread Riyad Kalla
UPDATE:
Upgraded my Struts install to nightly build and now the code snippet 
below works. I'm still curious if anyone knows how one LDA can forward 
to another (or the same) LDA, even if it takes manually setting the 
parameter value (how?)

Thanks!
Riyad
Riyad Kalla wrote:

UPDATE:
I just tried doing what I thought would be ugly:
protected ActionForward unspecified(

  ActionMapping mapping,

  ActionForm form,

  HttpServletRequest request,

  HttpServletResponse response)

  throws Exception

  {

  return showList(mapping, form, request, response);

  }

And it didn't work either, it threw the same exception, EVEN THOUGH 
the forward that returns from "showList" is actually pointing to a JSP 
page (not another Action or LDA like was my original problem). To be 
honest I'm not even entirely sure that my unspecified method got 
called, because the exception I get is EXACTLY the same... I'm using 
Struts 1.1, and I thought I saw somewhere in a longer thread from 
March I think that this didn't work in 1.1 but works in 1.2 (nightly 
build)?

Riyad Kalla wrote:

Hello,
I have a situation where my LookupDispatchAction (LDA) has all my 
functionality for a particular entity defined in it (lets say 
"Product"). So that includes adding, removing, listing, editing and 
changing their order (moving them visually up/down in the table they 
are listed in).

So far everything works fine, however I am running into a problem 
when I have my LDA returning a forward BACK to itself. This situation 
arises when someone changes the order of a product (maybe they move 
it down), so what happens is the "Down" button is pressed, execution 
goes to the "moveDown" method in the LDA. At the end of that method, 
a forward is returned that actually points to the same LDA, but is 
suppose to call the "showList" method (different path). This is done 
because after the order of the products is changed, you need to 
refresh the page with the list of products again so the user sees the 
changed ordering.

However, as you can imagine, I get the following exception after 
returning the forward:

javax.servlet.ServletException: Request[/forward/product/showList] 
does not contain handler parameter named method

org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:199) 


org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 


org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 


org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

I've tried (at the end of the 'moveDown' method) to manually set a 
parameter (get an IllegalStateException because 'Config is Frozen') 
and tried to add a request attribute all by the name I have defined 
for the parameter (it happens to be 'method') and none of it worked.

So to recap if this isn't clear so far, going into my LDA to change 
the ordering is fine because its from a JSP link where a value for 
'parameter' is defined, so the LDA knows which method to call. 
However by the end of the "moveDown" method, where I need to send 
execution over to the "showList" method, I have no way to define a 
parameter value, so when the forward is returned, and execution comes 
BACK to the LDA, it has no parameter value (hence the exception). 
I've looked into using the "unspecified" method, but it SEEMS to me 
like that has the exact same problem... if no parameter is specified, 
I STILL want to forward to the showList method in the LDA, but I 
still won't be able to set the parameter, and it seems ugly to do a:

protected ActionForward unspecified(

   ActionMapping mapping,

   ActionForm form,

   HttpServletRequest request,

   HttpServletResponse response)

   throws Exception

   {

 return showList();

   }

Does anyone know how I would be able to forward from one method in an 
LDA to another method in the same LDA (or any other LDA for that 
matter...)? My entire site is a 1:1 mapping for actions and JSPs, so 
users never actually see ".jsp" in their address bar, its always 
".do", so being able to go between LDAs is pretty important to me ;)

Thank you for any help you can provide!
-Riyad
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


how to do "

2004-04-23 Thread Julia Weaver
Hi,

I get this error massage:
Cannot find bean form in any scope' 

in my jsp file:





What attribute should for name?

How I can do "http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ActionErrors in my JSP: how can I rewrite this RT snippet as EL?

2004-04-23 Thread Niall Pemberton
Ha, ha - you have to stand firm mate ;-) - having said that if my wife says
"down tools" I do too - PDQ!

The ActionMessages class and  tag are new versions which it
seems are there to replace ActionErrors and  so I guess they
are the future. So far I haven't got round to moving over to them yet but
yes, essentially it does the same thing but in a slightly different way.
>From what I understand the  tag differs in the following
ways:

* You specify an "id" attribute in  which specifies a page
scope bean in which the tag will store the current message for each
iteration - I believe you then have to use something to write out the
message - like 

* Using the message="true" will display messages stored under the
Globals.MESSAGE_KEY constant (rather than the default Globals.ERROR_KEY ) -
means you can use it for other messages as well as errors.

*  uses the "errors.footer" and "errors.header" keys to get the
header/footer from the application resources -  you can
specify these keys using "header" and "footer" attributes on the tag - means
you can have different header/footer for different pages.


So to do you're example I believe you would have to do the following:

 
 
 
   
 

rather than

 

 


As I said, I haven't tried them out yet - maybe someone who uses them can
confirm whether this is correct or not.

Niall

- Original Message - 
From: "bOOyah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 12:49 PM
Subject: Re: ActionErrors in my JSP: how can I rewrite this RT snippet as
EL?


> Niall Pemberton wrote:
>
> > It should be
> >
> > 
> >   
> > 
> >
> > .. or even
> >
> > 
> >   
> > 
>
> Sorry for the delay in replying Niall...my wife MADE ME down tools for a
> day.
>
> Yes, indeed both your suggestions work perfectly.  I'm using the 2nd
> one.  Am I right then in guessing that
>
>
>  
>
>
> would display all messages (errors or otherwise)?  Is it now that simple?
>
> What threw me originally is that 'org.apache.struts.action.ERROR' no
> longer exists in the online Struts javadocs.  So I got embroiled in
> following the path of deprecation, and I couldn't get the current
> recommendations to work :-(
>
> Thanks a mill for your help.
>
> -- 
> bOOyah
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Non-Form Based Mapped Properties

2004-04-23 Thread Hubert Rabago
Those tags are meant to work with JavaBeans-style classes.  I think there's
been lots of questions about accessing stuff like SiteConstant.HOST and
SiteConstant.ECLIPSE_BANNER, but I don't remember seeing a solution for that.
 One way around it (not that it's the best way) is to provide accessors that
directly give you what (Page)host.getPage(SiteConstant.ECLIPSE_BANNER)
returns.

Hubert

--- Michael McGrady <[EMAIL PROTECTED]> wrote:
> 
> Thanks, Herbert, let me state more particularly what I am doing.  I want to
use Struts tags rather than 
> JSP.  I know how to do things in JSP easily.  With the tags, outside of 
> ActionForms, I am confused.  In JSP, I get my results as follows:
> 
> 
> <%
> Host host = (Host)session.getAttribute(SiteConstant.HOST);
> Page key = (Page)host.getPage(SiteConstant.ECLIPSE_BANNER);
> %>
> 
> <%= key.getValue("bannerLeftBackgroundColor") %>
> 
> I want to do with the Struts bean tag what I do now with JSP tags.  How do 
> I do that?  This should be simple, but something is not working.  I am 
> either erring with the "define" or the "write" attribute and all the 
> combinations I try don't work.  People have indicated that I need to 
> retrieve a Map object with getMap().  I don't see why, given what I read in
> 
> the literature.  If you could help, I would be eternally (or a very long 
> time) grateful. The classes are given below:
> 
> public class Host {
>private Map pages;
> 
>public Host() {
>  int size = 89;
>  this.pages = Collections.synchronizedMap(new HashMap(size));
>}
> 
>public void setMap(Map pages) {
>  this.pages = pages;
>}
> 
>public Map getMap() {
>  return pages;
>}
> 
>public void setPage(Object key, Object page) {
>  pages.put(key,page);
>}
> 
>public Object getPage(Object key) {
>  return pages.get(key);
>}
> } ///;-) Michael McGrady
> 
> 
> public class Page {
>private Map keys;
> 
>public Page() {
>  int size = 89;
>  this.keys = Collections.synchronizedMap(new HashMap(size));
>}
> 
>public void setMap(Map keys) {
>  this.keys = keys;
>}
> 
>public Map getMap() {
>  return keys;
>}
> 
>public void setValue(Object key, Object value) {
>  keys.put(key,value);
>}
> 
>public Object getValue(Object key) {
>  Object value = keys.get(key);
>  com.crackwillow.log.StdOut.redirect("log.VALUE: " + value);
>  if(value == null) {
>return "? [" + (String)key + "] ?";
>  } else {
>return value;
>  }
>}
> } ///;-) Michael McGrady
> 
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread bOOyah
Riyad Kalla wrote:



Does anyone know how I would be able to forward from one method in an 
LDA to another method in the same LDA (or any other LDA for that 
matter...)?
I do exactly this in my own apps.  I use Struts forward Actions in my 
struts-config.  What about something like this? (I'm assuming your 
exsiting Struts forwards and 'showList' method work):

Struts-Config.xml:
=


  



Your Action class:
=
public ActionForward execute(/* the usual args */) {
ActionForward forward = new ActionForward("defaultErrHandler");
String method= request.getParameter("method");

if (method!= null && !method.equals("")) {
if (method.equalsIgnoreCase("showList")) {
forward = showList(mapping, form, request, response);
}
else {
forward = super.execute(mapping, form, request, response);
}
}
return forward;
}
...
public ActionForward moveDown(/* the usual args */) {
...
// Success! Now refresh the re-ordered list:
return mapping.FindForward("successShowList");
}
public ActionForward showList(/* the usual args */) {
// hit the DB for the new list and forward to the JSP
// etc.
}
To summarise:
(1) The 'moveDown' handler is called.
(2) It looks up "successShowList" thereby forwarding to 
"/forward/product/showList".
(4) "/forward/product/showList" forwards back into your Struts Action 
class with a 'method' parameter called 'showList' causing your existing 
'showList' method to execute.

That's all off the top of my head Riyad.  But I use that approach all 
the time.

--
bOOyah
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread bOOyah
Riyad Kalla wrote:

UPDATE:
Upgraded my Struts install to nightly build and now the code snippet 
below works. I'm still curious if anyone knows how one LDA can forward 
to another (or the same) LDA, even if it takes manually setting the 
parameter value (how?)


protected ActionForward unspecified(
  ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
  throws Exception
  {
  return showList(mapping, form, request, response);
  }
I have also used this in the past, but without execution errors (I'm 
using Struts 1.1 stable).  But as you've rightly spotted, you are 
limited to only being able to forward to another method in the same Action.

I, too, felt this was an 'ugly' solution because the Struts Controller 
is bypassed and you cannot change your mind about unchaining those 
actions without editing Java.  I read somewhere authoritative that 
ActionForward was created for just this purpose; you chain the actions 
in the Struts config file instead.

However, chaining actions programmatically could be a perfectly valid 
thing to do though...I've only been using Struts for three months ;-)

--
bOOyah
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JSTL Functions

2004-04-23 Thread Avinash Gangadharan
You're right Bill, I figured this out yesterday as I was looking at my
web.xml.

Thanks
Avinash

-Original Message-
From: Bill Siggelkow [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 22, 2004 7:01 PM
To: [EMAIL PROTECTED]
Subject: Re: JSTL Functions


Make sure that the DOCTYPE for your web.xml specifies Servlet 2.4

Avinash Gangadharan wrote:
> Hi All,
>I'm trying to use the jstl/functions tag library and cannot seem to 
> make it work. In my jsp I have something of the this sort:
> 
> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"; %>
> 
> 
> 
> The length is : ${fn:length( str )}
> 
> The standards-example webapp that comes as a part of the 
> jakarta-taglibs-standard-1.1.0 library dist works just fine.
> 
> Can you guys see where am I making a mistake or what do I need to do 
> to get this setup properly.
> 
> TIA
> Avinash


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to do "

2004-04-23 Thread Henrique VIECILI
use the same name you assigned to the form in struts-config.xml form-bean

in struts-config.xml


in the jsp file


note the form.myForm must be assigned to the action in the 

Henrique Viecili

- Original Message - 
From: "Julia Weaver" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 1:20 PM
Subject: how to do " Hi,
>
> I get this error massage:
> Cannot find bean form in any scope'
>
> in my jsp file:
>
> 
>
> 
>
> What attribute should for name?
>
> How I can do "
> Thanks!
>
>
>
>
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25¢
> http://photos.yahoo.com/ph/print_splash
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



1.2 Issues

2004-04-23 Thread Joe Hertz
1) I'm finding that calls to Action.getServlet() are returning null. I
can't imagine what I've done to cause this. If so, what should I be
looking for?

2) The following Snippet of code compiled as of the 3/27 Nightly.

DynaActionFormClass dynaClass =
DynaActionFormClass.createDynaActionFormClass(
formConfig);

Sometime before 4/14, it apparently dissapeared, now the snippet has to
read like this:

DynaActionFormClass dynaClass =
DynaActionFormClass.createDynaActionFormClass(
formConfig, moduleConfig);

Is there a reason they both can't exist?

(yes, my day is just ducky)

-Joe




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Non-Form Based Mapped Properties

2004-04-23 Thread Michael McGrady
Thanks, Herbert,

Isn't this solution supposed to be the standard solution as shown in the 
documentation?  Here is what the documentation on mapped properties says:

The idea of "mapped properties" as opposed to "indexed properties" is that 
the property represents a "map" type, as opposed to an array or collection 
type. The signature of the "get" and "set" methods for a mapped property 
are different from the same methods for an indexed property. In particular, 
instead of an "int" for the index, there is a "String" for the key.
The previous example for indexed properties can be changed to the following 
to demonstrate mapped properties:

package org.apache.struts.webapp.exercise;

import java.util.HashMap;

import org.apache.struts.action.ActionForm;

public class StringBean3 extends ActionForm {

private String strAry[] = { "String 0", "String 1", "String 2", 
"String 3", "String 4" };



private HashMap map = new HashMap();

public StringBean() {

map.put("zero", strAry[0]);

map.put("one", strAry[1]);

map.put("two", strAry[2]);

map.put("three", strAry[3]);

map.put("four", strAry[4]);

}

public Object getStringMapped(String key) {

return map.get(key);

}



public void setStringMapped(String key, Object value) {

map.put(key, value);

}

}

Note the "get" and "set" methods to represent the mapped property.



<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>





Note the property value of "stringMapped(two)". This will reference the 
mapped property "stringMapped", using the key value of "two".
When this page is executed, it will print just the string "String 2", which 
is the string stored in the HashMap with the key "two".

So, this is what I do.  Why doesn't the define attribute of the bean tag do 
this for me?

At 09:29 AM 4/23/2004, Hubert Rabago wrote:
Those tags are meant to work with JavaBeans-style classes.  I think there's
been lots of questions about accessing stuff like SiteConstant.HOST and
SiteConstant.ECLIPSE_BANNER, but I don't remember seeing a solution for that.
 One way around it (not that it's the best way) is to provide accessors that
directly give you what (Page)host.getPage(SiteConstant.ECLIPSE_BANNER)
returns.
Hubert

--- Michael McGrady <[EMAIL PROTECTED]> wrote:
>
> Thanks, Herbert, let me state more particularly what I am doing.  I want to
use Struts tags rather than
> JSP.  I know how to do things in JSP easily.  With the tags, outside of
> ActionForms, I am confused.  In JSP, I get my results as follows:
>
>
> <%
> Host host = (Host)session.getAttribute(SiteConstant.HOST);
> Page key = (Page)host.getPage(SiteConstant.ECLIPSE_BANNER);
> %>
>
> <%= key.getValue("bannerLeftBackgroundColor") %>
>
> I want to do with the Struts bean tag what I do now with JSP tags.  How do
> I do that?  This should be simple, but something is not working.  I am
> either erring with the "define" or the "write" attribute and all the
> combinations I try don't work.  People have indicated that I need to
> retrieve a Map object with getMap().  I don't see why, given what I read in
>
> the literature.  If you could help, I would be eternally (or a very long
> time) grateful. The classes are given below:
>
> public class Host {
>private Map pages;
>
>public Host() {
>  int size = 89;
>  this.pages = Collections.synchronizedMap(new HashMap(size));
>}
>
>public void setMap(Map pages) {
>  this.pages = pages;
>}
>
>public Map getMap() {
>  return pages;
>}
>
>public void setPage(Object key, Object page) {
>  pages.put(key,page);
>}
>
>public Object getPage(Object key) {
>  return pages.get(key);
>}
> } ///;-) Michael McGrady
>
>
> public class Page {
>private Map keys;
>
>public Page() {
>  int size = 89;
>  this.keys = Collections.synchronizedMap(new HashMap(size));
>}
>
>public void setMap(Map keys) {
>  this.keys = keys;
>}
>
>public Map getMap() {
>  return keys;
>}
>
>public void setValue(Object key, Object value) {
>  keys.put(key,value);
>}
>
>public Object getValue(Object key) {
>  Object value = keys.get(key);
>  com.crackwillow.log.StdOut.redirect("log.VALUE: " + value);
>  if(value == null) {
>return "? [" + (String)key + "] ?";
>  } else {
>return value;
>  }
>}
> } ///;-) Michael McGrady
>
>




__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Non-Form Based Mapped Properties

2004-04-23 Thread Michael McGrady
The value of SiteConstant.HOST is just "host" and is merely the session 
attribute key for the Host object, Herbert.  I could have just put in 
"host" and "ecliplse_banner" but I have this fear of hard 
coding.  LOL  Does that change your thoughts?

At 09:29 AM 4/23/2004, Hubert Rabago wrote:
Those tags are meant to work with JavaBeans-style classes.  I think there's
been lots of questions about accessing stuff like SiteConstant.HOST and
SiteConstant.ECLIPSE_BANNER, but I don't remember seeing a solution for that.
 One way around it (not that it's the best way) is to provide accessors that
directly give you what (Page)host.getPage(SiteConstant.ECLIPSE_BANNER)
returns.
Hubert

--- Michael McGrady <[EMAIL PROTECTED]> wrote:
>
> Thanks, Herbert, let me state more particularly what I am doing.  I want to
use Struts tags rather than
> JSP.  I know how to do things in JSP easily.  With the tags, outside of
> ActionForms, I am confused.  In JSP, I get my results as follows:
>
>
> <%
> Host host = (Host)session.getAttribute(SiteConstant.HOST);
> Page key = (Page)host.getPage(SiteConstant.ECLIPSE_BANNER);
> %>
>
> <%= key.getValue("bannerLeftBackgroundColor") %>
>
> I want to do with the Struts bean tag what I do now with JSP tags.  How do
> I do that?  This should be simple, but something is not working.  I am
> either erring with the "define" or the "write" attribute and all the
> combinations I try don't work.  People have indicated that I need to
> retrieve a Map object with getMap().  I don't see why, given what I read in
>
> the literature.  If you could help, I would be eternally (or a very long
> time) grateful. The classes are given below:
>
> public class Host {
>private Map pages;
>
>public Host() {
>  int size = 89;
>  this.pages = Collections.synchronizedMap(new HashMap(size));
>}
>
>public void setMap(Map pages) {
>  this.pages = pages;
>}
>
>public Map getMap() {
>  return pages;
>}
>
>public void setPage(Object key, Object page) {
>  pages.put(key,page);
>}
>
>public Object getPage(Object key) {
>  return pages.get(key);
>}
> } ///;-) Michael McGrady
>
>
> public class Page {
>private Map keys;
>
>public Page() {
>  int size = 89;
>  this.keys = Collections.synchronizedMap(new HashMap(size));
>}
>
>public void setMap(Map keys) {
>  this.keys = keys;
>}
>
>public Map getMap() {
>  return keys;
>}
>
>public void setValue(Object key, Object value) {
>  keys.put(key,value);
>}
>
>public Object getValue(Object key) {
>  Object value = keys.get(key);
>  com.crackwillow.log.StdOut.redirect("log.VALUE: " + value);
>  if(value == null) {
>return "? [" + (String)key + "] ?";
>  } else {
>return value;
>  }
>}
> } ///;-) Michael McGrady
>
>




__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread Riyad Kalla
booya I really appreciate the code snippets and explination! I hadn't gotten 
involved in ActionForwards and appreciate you shedding light on the situation 
for me.

Best,
Riyad

On Friday 23 April 2004 09:34 am, bOOyah wrote:
> Riyad Kalla wrote:
>
> 
>
> > Does anyone know how I would be able to forward from one method in an
> > LDA to another method in the same LDA (or any other LDA for that
> > matter...)?
>
> I do exactly this in my own apps.  I use Struts forward Actions in my
> struts-config.  What about something like this? (I'm assuming your
> exsiting Struts forwards and 'showList' method work):
>
> Struts-Config.xml:
> =
>  
>  ...
>
>
>  
>
>  
>parameter="/processMyProducts.do?method=showList"
>  type="org.apache.struts.actions.ForwardAction"/>
>
>
> Your Action class:
> =
> public ActionForward execute(/* the usual args */) {
>  ActionForward forward = new ActionForward("defaultErrHandler");
>
>  String method= request.getParameter("method");
>
>  if (method!= null && !method.equals("")) {
>  if (method.equalsIgnoreCase("showList")) {
>  forward = showList(mapping, form, request, response);
>  }
>  else {
>  forward = super.execute(mapping, form, request, response);
>  }
>  }
>  return forward;
> }
> ...
> public ActionForward moveDown(/* the usual args */) {
>  ...
>  // Success! Now refresh the re-ordered list:
>  return mapping.FindForward("successShowList");
> }
>
> public ActionForward showList(/* the usual args */) {
>  // hit the DB for the new list and forward to the JSP
>  // etc.
> }
>
> To summarise:
> (1) The 'moveDown' handler is called.
> (2) It looks up "successShowList" thereby forwarding to
> "/forward/product/showList".
> (4) "/forward/product/showList" forwards back into your Struts Action
> class with a 'method' parameter called 'showList' causing your existing
> 'showList' method to execute.
>
>
> That's all off the top of my head Riyad.  But I use that approach all
> the time.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Non-Form Based Mapped Properties

2004-04-23 Thread Hubert Rabago
Well, I'm not sure the Struts tags (or Bean/PropertyUtils) can evaluate
SiteConstant.HOST.  The last time I remember that somebody asked about a
similar situation, I think the suggestion was to provide accessors for them. 
I know, it ain't what you wanna hear, but I guess they just weren't written
to work that way.

Hubert

--- Michael McGrady <[EMAIL PROTECTED]> wrote:
> The value of SiteConstant.HOST is just "host" and is merely the session 
> attribute key for the Host object, Herbert.  I could have just put in 
> "host" and "ecliplse_banner" but I have this fear of hard 
> coding.  LOL  Does that change your thoughts?
> 
> At 09:29 AM 4/23/2004, Hubert Rabago wrote:
> >Those tags are meant to work with JavaBeans-style classes.  I think
> there's
> >been lots of questions about accessing stuff like SiteConstant.HOST and
> >SiteConstant.ECLIPSE_BANNER, but I don't remember seeing a solution for
> that.
> >  One way around it (not that it's the best way) is to provide accessors
> that
> >directly give you what (Page)host.getPage(SiteConstant.ECLIPSE_BANNER)
> >returns.
> >
> >Hubert
> >
> >--- Michael McGrady <[EMAIL PROTECTED]> wrote:
> > >
> > > Thanks, Herbert, let me state more particularly what I am doing.  I
> want to
> >use Struts tags rather than
> > > JSP.  I know how to do things in JSP easily.  With the tags, outside of
> > > ActionForms, I am confused.  In JSP, I get my results as follows:
> > >
> > >
> > > <%
> > > Host host = (Host)session.getAttribute(SiteConstant.HOST);
> > > Page key = (Page)host.getPage(SiteConstant.ECLIPSE_BANNER);
> > > %>
> > >
> > > <%= key.getValue("bannerLeftBackgroundColor") %>
> > >
> > > I want to do with the Struts bean tag what I do now with JSP tags.  How
> do
> > > I do that?  This should be simple, but something is not working.  I am
> > > either erring with the "define" or the "write" attribute and all the
> > > combinations I try don't work.  People have indicated that I need to
> > > retrieve a Map object with getMap().  I don't see why, given what I
> read in
> > >
> > > the literature.  If you could help, I would be eternally (or a very
> long
> > > time) grateful. The classes are given below:
> > >
> > > public class Host {
> > >private Map pages;
> > >
> > >public Host() {
> > >  int size = 89;
> > >  this.pages = Collections.synchronizedMap(new HashMap(size));
> > >}
> > >
> > >public void setMap(Map pages) {
> > >  this.pages = pages;
> > >}
> > >
> > >public Map getMap() {
> > >  return pages;
> > >}
> > >
> > >public void setPage(Object key, Object page) {
> > >  pages.put(key,page);
> > >}
> > >
> > >public Object getPage(Object key) {
> > >  return pages.get(key);
> > >}
> > > } ///;-) Michael McGrady
> > >
> > >
> > > public class Page {
> > >private Map keys;
> > >
> > >public Page() {
> > >  int size = 89;
> > >  this.keys = Collections.synchronizedMap(new HashMap(size));
> > >}
> > >
> > >public void setMap(Map keys) {
> > >  this.keys = keys;
> > >}
> > >
> > >public Map getMap() {
> > >  return keys;
> > >}
> > >
> > >public void setValue(Object key, Object value) {
> > >  keys.put(key,value);
> > >}
> > >
> > >public Object getValue(Object key) {
> > >  Object value = keys.get(key);
> > >  com.crackwillow.log.StdOut.redirect("log.VALUE: " + value);
> > >  if(value == null) {
> > >return "? [" + (String)key + "] ?";
> > >  } else {
> > >return value;
> > >  }
> > >}
> > > } ///;-) Michael McGrady
> > >
> > >
> >
> >
> >
> >
> >
> >__
> >Do you Yahoo!?
> >Yahoo! Photos: High-quality 4x6 digital prints for 25¢
> >http://photos.yahoo.com/ph/print_splash
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread bOOyah
Riyad Kalla wrote:

booya I really appreciate the code snippets and explination! I hadn't gotten 
involved in ActionForwards and appreciate you shedding light on the situation 
for me.
No problems Riyad!  I'm glad to give back to this list after sucking it 
dry for three months ;-)

--
bOOyah
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Geeta Ramani
Hello all:

I have always worked with Sun Studio One and making log4j work was a piece of cake. 
Throw the jar in the classpath, put the log4j.properties in WEB-INF/classes, restart 
tomcat and bob's your uncle.

However the company i work for now uses eclipse and I assumed (wrongly as it turns 
out) that I could integrate log4j easily into this IDE too. *Wrong!!*. I have googled 
till I'm going cross-eyed. One person suggested I create a log4j plug-in. Another 
suggested I create a Log4jInit servlet. But I can't help thinking "Come **on**, can it 
be that involved??!!" 

So folks, if you've successfully solved this problem, make my day, will ya? In words 
of two syllables or less, please - my brain's fried already..(:(

Many thanks in advance!
Geeta

P.S Btw, I did manage to create a Java **application** (with a main method and all) to 
talk to log4j within eclipse and no, it did not invlove writing servlets and plugins 
and what not. My problems arise when I try to get my *Struts app* to recognize log4j. 
(hey, maybe this makes it on-topic after all!! ;))

P.P.S. Oh yeah, I guess it may help to show you the error I get.  Here it is:

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Mike Zatko
1. Right click project -> Properties
2. Select Java Build Path
3. Click Libraries Tab
4. Add Log4j jar
Geeta Ramani wrote:

Hello all:

I have always worked with Sun Studio One and making log4j work was a piece of cake. Throw the jar in the classpath, put the log4j.properties in WEB-INF/classes, restart tomcat and bob's your uncle.

However the company i work for now uses eclipse and I assumed (wrongly as it turns out) that I could integrate log4j easily into this IDE too. *Wrong!!*. I have googled till I'm going cross-eyed. One person suggested I create a log4j plug-in. Another suggested I create a Log4jInit servlet. But I can't help thinking "Come **on**, can it be that involved??!!" 

So folks, if you've successfully solved this problem, make my day, will ya? In words of two syllables or less, please - my brain's fried already..(:(

Many thanks in advance!
Geeta
P.S Btw, I did manage to create a Java **application** (with a main method and all) to talk to log4j within eclipse and no, it did not invlove writing servlets and plugins and what not. My problems arise when I try to get my *Struts app* to recognize log4j. (hey, maybe this makes it on-topic after all!! ;))

P.P.S. Oh yeah, I guess it may help to show you the error I get.  Here it is:

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



--

Michael H. Zatko
WebSphere Developer
Boscov's Information Services
Work: 610-929-7317
Home: 610-562-2407
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Geeta Ramani
Already did that: that's how the Java app worked ok I guess.. But cannot seem to amke 
it work for my struts app..(:(  But thanks for the reply!  Any other suggestions?

> -Original Message-
> From: Mike Zatko [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 3:24 PM
> To: Struts Users Mailing List
> Subject: Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j
> 
> 
> 1. Right click project -> Properties
> 2. Select Java Build Path
> 3. Click Libraries Tab
> 4. Add Log4j jar
> 
> Geeta Ramani wrote:
> 
> >Hello all:
> >
> >I have always worked with Sun Studio One and making log4j 
> work was a piece of cake. Throw the jar in the classpath, put 
> the log4j.properties in WEB-INF/classes, restart tomcat and 
> bob's your uncle.
> >
> >However the company i work for now uses eclipse and I 
> assumed (wrongly as it turns out) that I could integrate 
> log4j easily into this IDE too. *Wrong!!*. I have googled 
> till I'm going cross-eyed. One person suggested I create a 
> log4j plug-in. Another suggested I create a Log4jInit 
> servlet. But I can't help thinking "Come **on**, can it be 
> that involved??!!" 
> >
> >So folks, if you've successfully solved this problem, make 
> my day, will ya? In words of two syllables or less, please - 
> my brain's fried already..(:(
> >
> >Many thanks in advance!
> >Geeta
> >
> >P.S Btw, I did manage to create a Java **application** (with 
> a main method and all) to talk to log4j within eclipse and 
> no, it did not invlove writing servlets and plugins and what 
> not. My problems arise when I try to get my *Struts app* to 
> recognize log4j. (hey, maybe this makes it on-topic after all!! ;))
> >
> >P.P.S. Oh yeah, I guess it may help to show you the error I 
> get.  Here it is:
> >
> >log4j:WARN No appenders could be found for logger
> >(org.apache.commons.digester.Digester).
> >log4j:WARN Please initialize the log4j system properly.
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> 
> -- 
> 
> Michael H. Zatko
> WebSphere Developer
> Boscov's Information Services
> Work: 610-929-7317
> Home: 610-562-2407
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Mike Zatko
I was being lazy and didn't read your whole post. Basically that error 
is happening because you need to initialize log4j which you probably 
have figured out. Usually you initialize lo4j through an xml or 
properties file, and if it can't find and load these files before you 
actually try to log something, it will throw your said error.

For myself, I created a Log4jPluginAction:

/**
* @version 1.0
* @author
*/
public class Log4jPluginAction implements PlugIn {
   public void init(ActionServlet actionServlet, ModuleConfig config)
   throws ServletException {
  
   //BasicConfigurator.configure();
   String realPath = 
actionServlet.getServletContext().getRealPath(".");
   DOMConfigurator.configure(realPath + "/WEB-INF/classes/log4j.xml");
   }

   public void destroy() {

   }
}
Plugins are guaranteed to be executed before any of your other code, so 
its perfect for initializing log4j.
You have to define this plugin in your Web Deployment Descriptor. The 
log4j.xml file is in the root of my
Java Resources directory. (i'm on wsad, so things may be slightly 
different in terminology)



Geeta Ramani wrote:

Already did that: that's how the Java app worked ok I guess.. But cannot seem to amke it work for my struts app..(:(  But thanks for the reply!  Any other suggestions?

 

-Original Message-
From: Mike Zatko [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 3:24 PM
To: Struts Users Mailing List
Subject: Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j
1. Right click project -> Properties
2. Select Java Build Path
3. Click Libraries Tab
4. Add Log4j jar
Geeta Ramani wrote:

   

Hello all:

I have always worked with Sun Studio One and making log4j 
 

work was a piece of cake. Throw the jar in the classpath, put 
the log4j.properties in WEB-INF/classes, restart tomcat and 
bob's your uncle.
   

However the company i work for now uses eclipse and I 
 

assumed (wrongly as it turns out) that I could integrate 
log4j easily into this IDE too. *Wrong!!*. I have googled 
till I'm going cross-eyed. One person suggested I create a 
log4j plug-in. Another suggested I create a Log4jInit 
servlet. But I can't help thinking "Come **on**, can it be 
that involved??!!" 
   

So folks, if you've successfully solved this problem, make 
 

my day, will ya? In words of two syllables or less, please - 
my brain's fried already..(:(
   

Many thanks in advance!
Geeta
P.S Btw, I did manage to create a Java **application** (with 
 

a main method and all) to talk to log4j within eclipse and 
no, it did not invlove writing servlets and plugins and what 
not. My problems arise when I try to get my *Struts app* to 
recognize log4j. (hey, maybe this makes it on-topic after all!! ;))
   

P.P.S. Oh yeah, I guess it may help to show you the error I 
 

get.  Here it is:
   

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 

--

Michael H. Zatko
WebSphere Developer
Boscov's Information Services
Work: 610-929-7317
Home: 610-562-2407
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



--

Michael H. Zatko
WebSphere Developer
Boscov's Information Services
Work: 610-929-7317
Home: 610-562-2407
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Colin Kilburn
Did you actually put log4j.properties in your WEB-INF/classes (as stated 
below) or in your src directory?  ... a build would blow it away if it's 
in the classes (because it's an output dir).

HTH,
Colin
Geeta Ramani wrote:

Already did that: that's how the Java app worked ok I guess.. But cannot seem to amke it work for my struts app..(:(  But thanks for the reply!  Any other suggestions?

 

-Original Message-
From: Mike Zatko [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 3:24 PM
To: Struts Users Mailing List
Subject: Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j
1. Right click project -> Properties
2. Select Java Build Path
3. Click Libraries Tab
4. Add Log4j jar
Geeta Ramani wrote:

   

Hello all:

I have always worked with Sun Studio One and making log4j 
 

work was a piece of cake. Throw the jar in the classpath, put 
the log4j.properties in WEB-INF/classes, restart tomcat and 
bob's your uncle.
   

However the company i work for now uses eclipse and I 
 

assumed (wrongly as it turns out) that I could integrate 
log4j easily into this IDE too. *Wrong!!*. I have googled 
till I'm going cross-eyed. One person suggested I create a 
log4j plug-in. Another suggested I create a Log4jInit 
servlet. But I can't help thinking "Come **on**, can it be 
that involved??!!" 
   

So folks, if you've successfully solved this problem, make 
 

my day, will ya? In words of two syllables or less, please - 
my brain's fried already..(:(
   

Many thanks in advance!
Geeta
P.S Btw, I did manage to create a Java **application** (with 
 

a main method and all) to talk to log4j within eclipse and 
no, it did not invlove writing servlets and plugins and what 
not. My problems arise when I try to get my *Struts app* to 
recognize log4j. (hey, maybe this makes it on-topic after all!! ;))
   

P.P.S. Oh yeah, I guess it may help to show you the error I 
 

get.  Here it is:
   

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 

--

Michael H. Zatko
WebSphere Developer
Boscov's Information Services
Work: 610-929-7317
Home: 610-562-2407
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Hubert Rabago
Any chance you're using Log4j under a commons-logging interface?
I'm forced to use WSAD, which is Eclipse underneath, at work, but I'm not
sure if the solution that worked for me with work for you.  I'm thinking
since WSAD & Eclipse are both IBM (c'mon, it's Friday, no flaming), they both
prefer the IBM-sponsored JDK logging, which takes over your commons-logging.
I found a solution (longer than two syllalbes) here:
http://www-106.ibm.com/developerworks/forums/dw_thread.jsp?forum=266&thread=28061&message=176187&cat=9

Hubert

--- Geeta Ramani <[EMAIL PROTECTED]> wrote:
> Hello all:
> 
> I have always worked with Sun Studio One and making log4j work was a piece
> of cake. Throw the jar in the classpath, put the log4j.properties in
> WEB-INF/classes, restart tomcat and bob's your uncle.
> 
> However the company i work for now uses eclipse and I assumed (wrongly as
> it turns out) that I could integrate log4j easily into this IDE too.
> *Wrong!!*. I have googled till I'm going cross-eyed. One person suggested I
> create a log4j plug-in. Another suggested I create a Log4jInit servlet. But
> I can't help thinking "Come **on**, can it be that involved??!!" 
> 
> So folks, if you've successfully solved this problem, make my day, will ya?
> In words of two syllables or less, please - my brain's fried already..(:(
> 
> Many thanks in advance!
> Geeta
> 
> P.S Btw, I did manage to create a Java **application** (with a main method
> and all) to talk to log4j within eclipse and no, it did not invlove writing
> servlets and plugins and what not. My problems arise when I try to get my
> *Struts app* to recognize log4j. (hey, maybe this makes it on-topic after
> all!! ;))
> 
> P.P.S. Oh yeah, I guess it may help to show you the error I get.  Here it
> is:
> 
> log4j:WARN No appenders could be found for logger
> (org.apache.commons.digester.Digester).
> log4j:WARN Please initialize the log4j system properly.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Geeta Ramani
Ah yes, i thought of that! I fixed build.xml so the properties file did get copied 
over on rebuild-all. And yes, i checked and it is there. So really eclipse ought to 
find it..

Maybe i do need to create that Log4jPluginAction that Mike Zatko gave me. Just can't 
believe it should be this involved. (ok, ok, I know how difficult is it to cut n paste 
code, right? My point is, why didn't I need to do this with Sun studio one? or for the 
application project in eclipse??)

> -Original Message-
> From: Colin Kilburn [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 3:29 PM
> To: Struts Users Mailing List
> Subject: Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j
> 
> 
> Did you actually put log4j.properties in your WEB-INF/classes 
> (as stated 
> below) or in your src directory?  ... a build would blow it 
> away if it's 
> in the classes (because it's an output dir).
> 
> HTH,
> Colin
> 
> Geeta Ramani wrote:
> 
> >Already did that: that's how the Java app worked ok I 
> guess.. But cannot seem to amke it work for my struts 
> app..(:(  But thanks for the reply!  Any other suggestions?
> >
> >  
> >
> >>-Original Message-
> >>From: Mike Zatko [mailto:[EMAIL PROTECTED]
> >>Sent: Friday, April 23, 2004 3:24 PM
> >>To: Struts Users Mailing List
> >>Subject: Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j
> >>
> >>
> >>1. Right click project -> Properties
> >>2. Select Java Build Path
> >>3. Click Libraries Tab
> >>4. Add Log4j jar
> >>
> >>Geeta Ramani wrote:
> >>
> >>
> >>
> >>>Hello all:
> >>>
> >>>I have always worked with Sun Studio One and making log4j 
> >>>  
> >>>
> >>work was a piece of cake. Throw the jar in the classpath, put 
> >>the log4j.properties in WEB-INF/classes, restart tomcat and 
> >>bob's your uncle.
> >>
> >>
> >>>However the company i work for now uses eclipse and I 
> >>>  
> >>>
> >>assumed (wrongly as it turns out) that I could integrate 
> >>log4j easily into this IDE too. *Wrong!!*. I have googled 
> >>till I'm going cross-eyed. One person suggested I create a 
> >>log4j plug-in. Another suggested I create a Log4jInit 
> >>servlet. But I can't help thinking "Come **on**, can it be 
> >>that involved??!!" 
> >>
> >>
> >>>So folks, if you've successfully solved this problem, make 
> >>>  
> >>>
> >>my day, will ya? In words of two syllables or less, please - 
> >>my brain's fried already..(:(
> >>
> >>
> >>>Many thanks in advance!
> >>>Geeta
> >>>
> >>>P.S Btw, I did manage to create a Java **application** (with 
> >>>  
> >>>
> >>a main method and all) to talk to log4j within eclipse and 
> >>no, it did not invlove writing servlets and plugins and what 
> >>not. My problems arise when I try to get my *Struts app* to 
> >>recognize log4j. (hey, maybe this makes it on-topic after all!! ;))
> >>
> >>
> >>>P.P.S. Oh yeah, I guess it may help to show you the error I 
> >>>  
> >>>
> >>get.  Here it is:
> >>
> >>
> >>>log4j:WARN No appenders could be found for logger
> >>>(org.apache.commons.digester.Digester).
> >>>log4j:WARN Please initialize the log4j system properly.
> >>>
> >>>---
> --
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>> 
> >>>
> >>>  
> >>>
> >>-- 
> >>
> >>Michael H. Zatko
> >>WebSphere Developer
> >>Boscov's Information Services
> >>Work: 610-929-7317
> >>Home: 610-562-2407
> >>
> >>
> >>
> -
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >  
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Geeta Ramani
Hey i can't belive this! the thought actually crossed my mind that i may want to 
remove this jar called commons-logging which, yes, is very much in my class path!! Not 
that i did anything about it of course. Ok, I guess I have enough things to try now.. 
(However, I'll be back mewling if nothing works..)
Thanks very much!
Geeta

> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 3:40 PM
> To: Struts Users Mailing List
> Subject: Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j
> 
> 
> Any chance you're using Log4j under a commons-logging interface?
> I'm forced to use WSAD, which is Eclipse underneath, at work, 
> but I'm not
> sure if the solution that worked for me with work for you.  
> I'm thinking
> since WSAD & Eclipse are both IBM (c'mon, it's Friday, no 
> flaming), they both
> prefer the IBM-sponsored JDK logging, which takes over your 
> commons-logging.
> I found a solution (longer than two syllalbes) here:
> http://www-106.ibm.com/developerworks/forums/dw_thread.jsp?for
> um=266&thread=28061&message=176187&cat=9
> 
> Hubert
> 
> --- Geeta Ramani <[EMAIL PROTECTED]> wrote:
> > Hello all:
> > 
> > I have always worked with Sun Studio One and making log4j 
> work was a piece
> > of cake. Throw the jar in the classpath, put the log4j.properties in
> > WEB-INF/classes, restart tomcat and bob's your uncle.
> > 
> > However the company i work for now uses eclipse and I 
> assumed (wrongly as
> > it turns out) that I could integrate log4j easily into this IDE too.
> > *Wrong!!*. I have googled till I'm going cross-eyed. One 
> person suggested I
> > create a log4j plug-in. Another suggested I create a 
> Log4jInit servlet. But
> > I can't help thinking "Come **on**, can it be that involved??!!" 
> > 
> > So folks, if you've successfully solved this problem, make 
> my day, will ya?
> > In words of two syllables or less, please - my brain's 
> fried already..(:(
> > 
> > Many thanks in advance!
> > Geeta
> > 
> > P.S Btw, I did manage to create a Java **application** 
> (with a main method
> > and all) to talk to log4j within eclipse and no, it did not 
> invlove writing
> > servlets and plugins and what not. My problems arise when I 
> try to get my
> > *Struts app* to recognize log4j. (hey, maybe this makes it 
> on-topic after
> > all!! ;))
> > 
> > P.P.S. Oh yeah, I guess it may help to show you the error I 
> get.  Here it
> > is:
> > 
> > log4j:WARN No appenders could be found for logger
> > (org.apache.commons.digester.Digester).
> > log4j:WARN Please initialize the log4j system properly.
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> 
>   
>   
> __
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25¢
> http://photos.yahoo.com/ph/print_splash
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 1.2 Issues

2004-04-23 Thread Niall Pemberton

Joe Hertz wrote:


> 1) I'm finding that calls to Action.getServlet() are returning null. I
> can't imagine what I've done to cause this. If so, what should I be
> looking for?

Don't understand why this happens AFAIK the only time the servlet is set to
null in an Action is when the RequestProcessor shuts down - i.e in its
destroy() method.


> 2) The following Snippet of code compiled as of the 3/27 Nightly.
>
> DynaActionFormClass dynaClass =
> DynaActionFormClass.createDynaActionFormClass(
> formConfig);
>
> Sometime before 4/14, it apparently dissapeared, now the snippet has to
> read like this:
>
> DynaActionFormClass dynaClass =
> DynaActionFormClass.createDynaActionFormClass(
> formConfig, moduleConfig);
>

My understanding is that the  form config used to have a reference to the
module config in it, but it was removed because it meant that if an
ActionForm was serialized then it tried to serialize the ModuleConfig as
well - so createDynaActionFormClass() used to get a reference for the
ModuleConfig from the form config, now it can't - so it needs to be passed
into the method.

> (yes, my day is just ducky)
>
> -Joe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT - OT - Friday!!] Eclipse, Struts app and log4j

2004-04-23 Thread Geeta Ramani
Mike, Colin, Hubert: 

Thanks very much for your replies! I now have my struts app log4j integrated into 
eclipse. :))

To help eliminate future headaches, here's a link that helped me:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg01266.html

i added the Log4jInit servlet, updated web.xml, rebuilt and restarted and viola`, 
log4j now is working as advertised!

I now believe Mike's Log4jPluginAction would have done the job too, since as he 
mentioned in his note, log4j was not getting initialised. (don't ask me why: i cannot 
figure that bit out..) Btw, I left commons-logging.jar alone, didn't seem to be a 
problem..

Thanks a lot again: it's been a pretty ok Friday after all..:)
Geeta

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



speaking of log4j......

2004-04-23 Thread Nathan Maves
I just starting getting this error today but only when I redeploy my  
struts app.

java.lang.ThreadDeath
at  
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader 
.java:1270)
at  
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader 
.java:1230)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at  
org.apache.log4j.spi.LoggingEvent.(LoggingEvent.java:145)
at org.apache.log4j.Category.forcedLog(Category.java:372)
at org.apache.log4j.Category.log(Category.java:864)
at  
org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:192)  
..

by the way I am running tomcat5

Nathan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[VERY OT] Wireless Mice...what gives??

2004-04-23 Thread bOOyah
It's Friday.

I need to buy a replacement for my borked Intellimouse Explorer.  It's 
starting to issue double-click events, which is pretty disconcerting. 
At least, I _hope_ it's my mouse, otherwise my RSI has taken a nasty 
turn for the worse.

I'm a fan of Microsoft's mice because the devices in its Explorer range 
are nice and big, just like my hands (Logitech's rodents tend to be 
smaller).  But nearly all the Microsoft mice available on Amazon.co.uk 
are wireless.  Ditto for my other favourite site, dabs.co.uk.  A quick 
excursion to Microsoft's corporate Mouse site reveals that, yes indeed, 
all the latest Explorer mice are wireless.

Despite finding the concept of an stationary, yet wireless device deeply 
crazy, I might just buy a wireless mouse and have done with it...life's 
just too short.  But I think having to replace batteries every 6 months 
would get right on my nerves.

Any opinions?  Does replacing the batteries in your wireless mouse or 
keyboard drive you nuts?  Are there real advantages to using a wireless 
input device that I just cannot see?

Trivially yours,
--
bOOyah
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Barett McGavock
I agree with you 100% and share your concerns about the wireless mice. I am
shopping for a non-wireless mouse for myself, as well. I'm looking at
products in stores from both Microsoft and Logitech that are not wireless. I
presume that these are not the newest-out products.

B

> -Original Message-
> From: bOOyah [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 23, 2004 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: [VERY OT] Wireless Mice...what gives??
> 
> 
> It's Friday.
> 
> I need to buy a replacement for my borked Intellimouse 
> Explorer.  It's starting to issue double-click events, 
> which is pretty disconcerting. At least, I _hope_ it's 
> my mouse, otherwise my RSI has taken a nasty turn for 
> the worse.
> 
> I'm a fan of Microsoft's mice because the devices in its 
> Explorer range are nice and big, just like my hands 
> (Logitech's rodents tend to be smaller).  But nearly all 
> the Microsoft mice available on Amazon.co.uk are wireless. 
> Ditto for my other favourite site, dabs.co.uk.  A quick 
> excursion to Microsoft's corporate Mouse site reveals that, 
> yes indeed, all the latest Explorer mice are wireless.
> 
> Despite finding the concept of an stationary, yet wireless 
> device deeply crazy, I might just buy a wireless mouse and 
> have done with it...life's just too short.  But I think 
> having to replace batteries every 6 months would get right 
> on my nerves.
> 
> Any opinions?  Does replacing the batteries in your wireless 
> mouse or keyboard drive you nuts?  Are there real advantages 
> to using a wireless input device that I just cannot see?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Riyad Kalla
On Friday 23 April 2004 02:11 pm, bOOyah wrote:
> It's Friday.
>
> I need to buy a replacement for my borked Intellimouse Explorer.  It's
> starting to issue double-click events, which is pretty disconcerting.
> At least, I _hope_ it's my mouse, otherwise my RSI has taken a nasty
> turn for the worse.

This EXACT same thing happened to me for about 3months. I thought I was going 
crazy... at first it was a annoying but I think many people would be 
surprised how descructive double clicking can be when its not indended when 
using an IDE or just working on your PC (accidentally moving the C:\Windows 
directory into the Program Files directory just because you tried to mouse 
over a directory and rename it).

>
> I'm a fan of Microsoft's mice because the devices in its Explorer range
> are nice and big, just like my hands (Logitech's rodents tend to be
> smaller).  But nearly all the Microsoft mice available on Amazon.co.uk
> are wireless.  Ditto for my other favourite site, dabs.co.uk.  A quick
> excursion to Microsoft's corporate Mouse site reveals that, yes indeed,
> all the latest Explorer mice are wireless.

The bluetooth desktop (mouth and keyboard) are very nice, I think you'd like 
them. But they are pricey.

>
> Despite finding the concept of an stationary, yet wireless device deeply
> crazy, I might just buy a wireless mouse and have done with it...life's
> just too short.  But I think having to replace batteries every 6 months
> would get right on my nerves.

IIRC its got a basestation you mount it on when you aren't using it that 
recharges it.

-Riyad

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Neale, Bennett
I have the wireless bluetooth mouse from M$.
It's cool for me because I have it hooked up to my pc at work and on my 
laptop at home. The thing that sucks is exactly what you hit on, the 
batteries. I've never owned a wireless mouse before but if I could get 6

months out of the batteries I'd be happy. On average for me they run out

about every 6 weeks.

B

-Original Message-
From: bOOyah [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 23, 2004 2:12 PM
To: [EMAIL PROTECTED]
Subject: [VERY OT] Wireless Mice...what gives??

It's Friday.

I need to buy a replacement for my borked Intellimouse Explorer.  It's 
starting to issue double-click events, which is pretty disconcerting. 
At least, I _hope_ it's my mouse, otherwise my RSI has taken a nasty 
turn for the worse.

I'm a fan of Microsoft's mice because the devices in its Explorer range 
are nice and big, just like my hands (Logitech's rodents tend to be 
smaller).  But nearly all the Microsoft mice available on Amazon.co.uk 
are wireless.  Ditto for my other favourite site, dabs.co.uk.  A quick 
excursion to Microsoft's corporate Mouse site reveals that, yes indeed, 
all the latest Explorer mice are wireless.

Despite finding the concept of an stationary, yet wireless device deeply

crazy, I might just buy a wireless mouse and have done with it...life's 
just too short.  But I think having to replace batteries every 6 months 
would get right on my nerves.

Any opinions?  Does replacing the batteries in your wireless mouse or 
keyboard drive you nuts?  Are there real advantages to using a wireless 
input device that I just cannot see?

Trivially yours,
-- 
bOOyah


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Riyad Kalla
You can't go wrong with an IntelliMouse Explorer 3.0

I personally don't like Logitec, but that's only cause I've had a series of 
bad luck with their opticals (keep crapping out).

On Friday 23 April 2004 02:29 pm, Barett McGavock wrote:
> I agree with you 100% and share your concerns about the wireless mice. I am
> shopping for a non-wireless mouse for myself, as well. I'm looking at
> products in stores from both Microsoft and Logitech that are not wireless.
> I presume that these are not the newest-out products.
>
> B
>
> > -Original Message-
> > From: bOOyah [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 23, 2004 2:12 PM
> > To: [EMAIL PROTECTED]
> > Subject: [VERY OT] Wireless Mice...what gives??
> >
> >
> > It's Friday.
> >
> > I need to buy a replacement for my borked Intellimouse
> > Explorer.  It's starting to issue double-click events,
> > which is pretty disconcerting. At least, I _hope_ it's
> > my mouse, otherwise my RSI has taken a nasty turn for
> > the worse.
> >
> > I'm a fan of Microsoft's mice because the devices in its
> > Explorer range are nice and big, just like my hands
> > (Logitech's rodents tend to be smaller).  But nearly all
> > the Microsoft mice available on Amazon.co.uk are wireless.
> > Ditto for my other favourite site, dabs.co.uk.  A quick
> > excursion to Microsoft's corporate Mouse site reveals that,
> > yes indeed, all the latest Explorer mice are wireless.
> >
> > Despite finding the concept of an stationary, yet wireless
> > device deeply crazy, I might just buy a wireless mouse and
> > have done with it...life's just too short.  But I think
> > having to replace batteries every 6 months would get right
> > on my nerves.
> >
> > Any opinions?  Does replacing the batteries in your wireless
> > mouse or keyboard drive you nuts?  Are there real advantages
> > to using a wireless input device that I just cannot see?
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Riyad Kalla
Oh that sucks... I thought there was a docking station, guess not!

6 weeks... that's kind of rediculous... common MS! Put a digital camera 
battery in it or something and give us a recharger.

On Friday 23 April 2004 02:19 pm, Neale, Bennett wrote:
> I have the wireless bluetooth mouse from M$.
> It's cool for me because I have it hooked up to my pc at work and on my
> laptop at home. The thing that sucks is exactly what you hit on, the
> batteries. I've never owned a wireless mouse before but if I could get 6
>
> months out of the batteries I'd be happy. On average for me they run out
>
> about every 6 weeks.
>
> B
>
> -Original Message-
> From: bOOyah [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: [VERY OT] Wireless Mice...what gives??
>
> It's Friday.
>
> I need to buy a replacement for my borked Intellimouse Explorer.  It's
> starting to issue double-click events, which is pretty disconcerting.
> At least, I _hope_ it's my mouse, otherwise my RSI has taken a nasty
> turn for the worse.
>
> I'm a fan of Microsoft's mice because the devices in its Explorer range
> are nice and big, just like my hands (Logitech's rodents tend to be
> smaller).  But nearly all the Microsoft mice available on Amazon.co.uk
> are wireless.  Ditto for my other favourite site, dabs.co.uk.  A quick
> excursion to Microsoft's corporate Mouse site reveals that, yes indeed,
> all the latest Explorer mice are wireless.
>
> Despite finding the concept of an stationary, yet wireless device deeply
>
> crazy, I might just buy a wireless mouse and have done with it...life's
> just too short.  But I think having to replace batteries every 6 months
> would get right on my nerves.
>
> Any opinions?  Does replacing the batteries in your wireless mouse or
> keyboard drive you nuts?  Are there real advantages to using a wireless
> input device that I just cannot see?
>
> Trivially yours,

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread bOOyah
Barett McGavock wrote:

I agree with you 100% and share your concerns about the wireless mice. I am
shopping for a non-wireless mouse for myself, as well. I'm looking at
products in stores from both Microsoft and Logitech that are not wireless. I
presume that these are not the newest-out products.
Let me know how you go Barett.  At worst I could buy another 
Intellimouse Explorer, but I'd like to inflict something new on my 
carpal tunnel.

One time before, I opted for a flashy Logitech.  But it was so small I 
had to operate it using tweezers.  Amazon must have taken its picture 
with an electron microscope.

--
Sean
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Riyad Kalla
On Friday 23 April 2004 02:21 pm, bOOyah wrote:
> Barett McGavock wrote:
> > I agree with you 100% and share your concerns about the wireless mice. I
> > am shopping for a non-wireless mouse for myself, as well. I'm looking at
> > products in stores from both Microsoft and Logitech that are not
> > wireless. I presume that these are not the newest-out products.
>
> Let me know how you go Barett.  At worst I could buy another
> Intellimouse Explorer, but I'd like to inflict something new on my
> carpal tunnel.
>
> One time before, I opted for a flashy Logitech.  But it was so small I
> had to operate it using tweezers.  Amazon must have taken its picture
> with an electron microscope.

LOL

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Neale, Bennett
Yeah, microsoft touted that the batteries should last over 6 months.
I dunno, maybe I'm some type of power user ;).
B

-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 23, 2004 2:20 PM
To: Struts Users Mailing List
Subject: Re: [VERY OT] Wireless Mice...what gives??

Oh that sucks... I thought there was a docking station, guess not!

6 weeks... that's kind of rediculous... common MS! Put a digital camera 
battery in it or something and give us a recharger.

On Friday 23 April 2004 02:19 pm, Neale, Bennett wrote:
> I have the wireless bluetooth mouse from M$.
> It's cool for me because I have it hooked up to my pc at work and on
my
> laptop at home. The thing that sucks is exactly what you hit on, the
> batteries. I've never owned a wireless mouse before but if I could get
6
>
> months out of the batteries I'd be happy. On average for me they run
out
>
> about every 6 weeks.
>
> B
>
> -Original Message-
> From: bOOyah [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: [VERY OT] Wireless Mice...what gives??
>
> It's Friday.
>
> I need to buy a replacement for my borked Intellimouse Explorer.  It's
> starting to issue double-click events, which is pretty disconcerting.
> At least, I _hope_ it's my mouse, otherwise my RSI has taken a nasty
> turn for the worse.
>
> I'm a fan of Microsoft's mice because the devices in its Explorer
range
> are nice and big, just like my hands (Logitech's rodents tend to be
> smaller).  But nearly all the Microsoft mice available on Amazon.co.uk
> are wireless.  Ditto for my other favourite site, dabs.co.uk.  A quick
> excursion to Microsoft's corporate Mouse site reveals that, yes
indeed,
> all the latest Explorer mice are wireless.
>
> Despite finding the concept of an stationary, yet wireless device
deeply
>
> crazy, I might just buy a wireless mouse and have done with
it...life's
> just too short.  But I think having to replace batteries every 6
months
> would get right on my nerves.
>
> Any opinions?  Does replacing the batteries in your wireless mouse or
> keyboard drive you nuts?  Are there real advantages to using a
wireless
> input device that I just cannot see?
>
> Trivially yours,

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Riyad Kalla
"Power User" w.r.t. to mice gives me a mental image of someone grunting and 
sweating while muscling their mouse around their desk... 

On Friday 23 April 2004 02:26 pm, Neale, Bennett wrote:
> Yeah, microsoft touted that the batteries should last over 6 months.
> I dunno, maybe I'm some type of power user ;).
> B
>
> -Original Message-
> From: Riyad Kalla [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 2:20 PM
> To: Struts Users Mailing List
> Subject: Re: [VERY OT] Wireless Mice...what gives??
>
> Oh that sucks... I thought there was a docking station, guess not!
>
> 6 weeks... that's kind of rediculous... common MS! Put a digital camera
> battery in it or something and give us a recharger.
>
> On Friday 23 April 2004 02:19 pm, Neale, Bennett wrote:
> > I have the wireless bluetooth mouse from M$.
> > It's cool for me because I have it hooked up to my pc at work and on
>
> my
>
> > laptop at home. The thing that sucks is exactly what you hit on, the
> > batteries. I've never owned a wireless mouse before but if I could get
>
> 6
>
> > months out of the batteries I'd be happy. On average for me they run
>
> out
>
> > about every 6 weeks.
> >
> > B
> >
> > -Original Message-
> > From: bOOyah [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 23, 2004 2:12 PM
> > To: [EMAIL PROTECTED]
> > Subject: [VERY OT] Wireless Mice...what gives??
> >
> > It's Friday.
> >
> > I need to buy a replacement for my borked Intellimouse Explorer.  It's
> > starting to issue double-click events, which is pretty disconcerting.
> > At least, I _hope_ it's my mouse, otherwise my RSI has taken a nasty
> > turn for the worse.
> >
> > I'm a fan of Microsoft's mice because the devices in its Explorer
>
> range
>
> > are nice and big, just like my hands (Logitech's rodents tend to be
> > smaller).  But nearly all the Microsoft mice available on Amazon.co.uk
> > are wireless.  Ditto for my other favourite site, dabs.co.uk.  A quick
> > excursion to Microsoft's corporate Mouse site reveals that, yes
>
> indeed,
>
> > all the latest Explorer mice are wireless.
> >
> > Despite finding the concept of an stationary, yet wireless device
>
> deeply
>
> > crazy, I might just buy a wireless mouse and have done with
>
> it...life's
>
> > just too short.  But I think having to replace batteries every 6
>
> months
>
> > would get right on my nerves.
> >
> > Any opinions?  Does replacing the batteries in your wireless mouse or
> > keyboard drive you nuts?  Are there real advantages to using a
>
> wireless
>
> > input device that I just cannot see?
> >
> > Trivially yours,
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread bOOyah
Riyad Kalla wrote:

"Power User" w.r.t. to mice gives me a mental image of someone grunting and 
sweating while muscling their mouse around their desk... 
That would be Steve Ballmer.

--
bOOyah
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread bOOyah
Neale, Bennett wrote:

I have the wireless bluetooth mouse from M$.
It's cool for me because I have it hooked up to my pc at work and on my 
laptop at home. The thing that sucks is exactly what you hit on, the 
batteries. I've never owned a wireless mouse before but if I could get 6
months out of the batteries I'd be happy. On average for me they run out
about every 6 weeks.
And bluetooth is generally pretty easy on power requirements.  Are you a 
gamer perchance?  I used to need a new mouse every few months when 
Tribes was de rigeur.
--
bOOyah

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Benefits of LookupDispatchAction without parameter nonsense

2004-04-23 Thread Riyad Kalla
Hey guys,
After playing with the LookupDispatchAction most of the day and converting 
over some existing functionality to using it, I've figured out that i love 
the consolidation of functionality into 1 class, but the problems I've run 
into (non stop) dealing with the parameter and making sure that all my 
buttons now have "property" values (which, for example, breaks some existing 
code like ) so that the LDA has a parameter to determine which 
method to call has gotten me really short on nerves.

Does anyone else have a nice clean way that they have consolidated all their 
CRUD functions into a 1 action, then found a nice way to delegate to the 
proper method based on say the URL that the user is trying to access (instead 
of the parameter value)?

Best,
Riyad

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validator with DynaValidatorForm

2004-04-23 Thread Mike Zatko
Hello,
  I have a DynaValidatorForm called EditProfileForm defined with a Form 
Property of "emails". The type for the property is EmailAddress[] and 
has no size property which means I generate it dynamically. The 
EmailAddress bean has a property of "address", denoting the actual value 
of the email adress. Now, in the JSP I have a textbox for each 
EmailAddress.








The source for the generated HTML is as follows:



In my validation.xml, I have the following for this property:

   
  depends="maxlength">


   
 maxlength
 50
   
   

The validator is not working on my dynamic fields. I do have other 
properties on this same page that are validated fine, just not this 
dynamic one.
Anybody have any ideas how to get it working?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Benefits of LookupDispatchAction without parameter nonsense

2004-04-23 Thread Riyad Kalla
Hrrm.. I just found MappingDispatchAction and that seems to be exactly what I 
was looking for... has anyone used this class?

On Friday 23 April 2004 03:00 pm, Riyad Kalla wrote:
> Hey guys,
> After playing with the LookupDispatchAction most of the day and converting
> over some existing functionality to using it, I've figured out that i love
> the consolidation of functionality into 1 class, but the problems I've run
> into (non stop) dealing with the parameter and making sure that all my
> buttons now have "property" values (which, for example, breaks some
> existing code like ) so that the LDA has a parameter to
> determine which method to call has gotten me really short on nerves.
>
> Does anyone else have a nice clean way that they have consolidated all
> their CRUD functions into a 1 action, then found a nice way to delegate to
> the proper method based on say the URL that the user is trying to access
> (instead of the parameter value)?
>
> Best,
> Riyad
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Benefits of LookupDispatchAction without parameter nonsense

2004-04-23 Thread Joe Hertz
1.2 Gives you MappingDispatchActions

The ActionMapping Path's will be different, but you can still
consolidate everything into one class.

/ObjectSave  -> ActionClass.save()
/ObjectEdit  -> ActionClass.edit()

You do this with the parameter attribute for each individual mapping.
You use the name of the method itself, rather than it being something
that gets looked up.

> -Original Message-
> From: Riyad Kalla [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 23, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Benefits of LookupDispatchAction without parameter nonsense
> 
> 
> Hey guys,
> After playing with the LookupDispatchAction most of the day 
> and converting 
> over some existing functionality to using it, I've figured 
> out that i love 
> the consolidation of functionality into 1 class, but the 
> problems I've run 
> into (non stop) dealing with the parameter and making sure 
> that all my 
> buttons now have "property" values (which, for example, 
> breaks some existing 
> code like ) so that the LDA has a parameter to 
> determine which 
> method to call has gotten me really short on nerves.
> 
> Does anyone else have a nice clean way that they have 
> consolidated all their 
> CRUD functions into a 1 action, then found a nice way to 
> delegate to the 
> proper method based on say the URL that the user is trying to 
> access (instead 
> of the parameter value)?
> 
> Best,
> Riyad
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [VERY OT] Wireless Mice...what gives??

2004-04-23 Thread Neale, Bennett
Well, I used to be when I worked at SquareSoft (makers of Final Fantasy
series). Tribes was a great game. I'm still playing Wolfenstein. After
getting a little older and out of the video game industry my interest
in games has somewhat curtailed. I guess too much reading to stay on top
of things. :(
B

-Original Message-
From: bOOyah [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 23, 2004 2:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [VERY OT] Wireless Mice...what gives??

Neale, Bennett wrote:

> I have the wireless bluetooth mouse from M$.
> It's cool for me because I have it hooked up to my pc at work and on
my 
> laptop at home. The thing that sucks is exactly what you hit on, the 
> batteries. I've never owned a wireless mouse before but if I could get
6
> months out of the batteries I'd be happy. On average for me they run
out
> about every 6 weeks.

And bluetooth is generally pretty easy on power requirements.  Are you a

gamer perchance?  I used to need a new mouse every few months when 
Tribes was de rigeur.
-- 
bOOyah


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Benefits of LookupDispatchAction without parameter nonsense

2004-04-23 Thread Josh Holtzman
I'm a newbie, but how about taking this approach in struts 1.1?

I imagine that you could create a LookupDispatchAction with a path mapping
of /MyLDA and then create individual mappings for each LDA function?  

Assuming your ActionServlet maps to .oxa,  you could have forward actions
access the following resources:







Would this work?  Or does the resource specified in the "parameter"
attribute only specify an internal resource (i.e., it is not inspected
Struts processing).

I would like to hear the thoughts of others.


Josh Holtzman

American Data Company

[EMAIL PROTECTED]

Voice: (310) 470-1257

Fax:(310) 362-8454

 

Sun Microsystems iForce Partner


-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 23, 2004 3:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Benefits of LookupDispatchAction without parameter nonsense

1.2 Gives you MappingDispatchActions

The ActionMapping Path's will be different, but you can still consolidate
everything into one class.

/ObjectSave  -> ActionClass.save()
/ObjectEdit  -> ActionClass.edit()

You do this with the parameter attribute for each individual mapping.
You use the name of the method itself, rather than it being something that
gets looked up.

> -Original Message-
> From: Riyad Kalla [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Benefits of LookupDispatchAction without parameter nonsense
> 
> 
> Hey guys,
> After playing with the LookupDispatchAction most of the day and 
> converting over some existing functionality to using it, I've figured 
> out that i love the consolidation of functionality into 1 class, but 
> the problems I've run into (non stop) dealing with the parameter and 
> making sure that all my buttons now have "property" values (which, for 
> example, breaks some existing code like ) so that the 
> LDA has a parameter to determine which method to call has gotten me 
> really short on nerves.
> 
> Does anyone else have a nice clean way that they have consolidated all 
> their CRUD functions into a 1 action, then found a nice way to 
> delegate to the proper method based on say the URL that the user is 
> trying to access (instead of the parameter value)?
> 
> Best,
> Riyad
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator with DynaValidatorForm

2004-04-23 Thread Niall Pemberton
Try 

 

Niall

- Original Message - 
From: "Mike Zatko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 11:08 PM
Subject: Validator with DynaValidatorForm


> Hello,
>I have a DynaValidatorForm called EditProfileForm defined with a Form 
> Property of "emails". The type for the property is EmailAddress[] and 
> has no size property which means I generate it dynamically. The 
> EmailAddress bean has a property of "address", denoting the actual value 
> of the email adress. Now, in the JSP I have a textbox for each 
> EmailAddress.
> 
> >  > items="${EditProfileForm.map.emails}">
> > 
> >  > style="width: 200px;" name="emails" indexed="true" 
> > property="address"/>
> > 
> > 
> 
> 
> 
> The source for the generated HTML is as follows:
> 
>  value="[EMAIL PROTECTED]" style="width: 200px;">
> 
> 
> In my validation.xml, I have the following for this property:
> 
> depends="maxlength">
>  
>   resource="false"/>
> 
>   maxlength
>   50
> 
> 
> 
> The validator is not working on my dynamic fields. I do have other 
> properties on this same page that are validated fine, just not this 
> dynamic one.
> Anybody have any ideas how to get it working?
> 
> Thanks.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT]

2004-04-23 Thread Oliver Thiel
Cool again an OFF-Topic Friday ... good chance 
to ask if some one knows a good tool to auto-archive
my CD's ... I've got a lot of CD's with a lot off 
different data ... and I'm searching for a good tool 
that reads in the content structure and stores it
in some kind of DB ...

ok .. google ... but all the tools I found so far
wheren't that nice ...

any suggestions ...

thx
Oliver  

-Ursprüngliche Nachricht-
Von: Neale, Bennett [mailto:[EMAIL PROTECTED] 
Gesendet: Samstag, 24. April 2004 00:15
An: Struts Users Mailing List; [EMAIL PROTECTED]
Betreff: RE: [VERY OT] Wireless Mice...what gives??

Well, I used to be when I worked at SquareSoft (makers of Final Fantasy
series). Tribes was a great game. I'm still playing Wolfenstein. After
getting a little older and out of the video game industry my interest
in games has somewhat curtailed. I guess too much reading to stay on top
of things. :(
B

-Original Message-
From: bOOyah [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 23, 2004 2:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [VERY OT] Wireless Mice...what gives??

Neale, Bennett wrote:

> I have the wireless bluetooth mouse from M$.
> It's cool for me because I have it hooked up to my pc at work and on
my 
> laptop at home. The thing that sucks is exactly what you hit on, the 
> batteries. I've never owned a wireless mouse before but if I could get
6
> months out of the batteries I'd be happy. On average for me they run
out
> about every 6 weeks.

And bluetooth is generally pretty easy on power requirements.  Are you a

gamer perchance?  I used to need a new mouse every few months when 
Tribes was de rigeur.
-- 
bOOyah


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Benefits of LookupDispatchAction without parameter nonsense

2004-04-23 Thread Niall Pemberton
Don't you still have to set the "parameter" using the MappingDispatchAction
class?

One way to do what you want (i.e. not specify the parameter) is to create
your own custom ActionMapping and override the getParameter() method with
some logic to look at the path and return the parameter based on it.
Something like:

public class ParameterActionMapping extends ActionMapping {

   public String getParameter() {

  if (path.endsWith("Create"))
 return "create";

  if (path.endsWith("Read"))
 return "read";

  if (path.endsWith("Update"))
 return "update";

  if (path.endsWith("Delete"))
 return "delete";

  return super.getParameter();

   }
}


Then in struts-config.xml you can use this mapping for all your actions by
setting the type:

 

or on indivdual actions using the className

  
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 11:08 PM
Subject: Re: Benefits of LookupDispatchAction without parameter nonsense


> Hrrm.. I just found MappingDispatchAction and that seems to be exactly
what I
> was looking for... has anyone used this class?
>
> On Friday 23 April 2004 03:00 pm, Riyad Kalla wrote:
> > Hey guys,
> > After playing with the LookupDispatchAction most of the day and
converting
> > over some existing functionality to using it, I've figured out that i
love
> > the consolidation of functionality into 1 class, but the problems I've
run
> > into (non stop) dealing with the parameter and making sure that all my
> > buttons now have "property" values (which, for example, breaks some
> > existing code like ) so that the LDA has a parameter to
> > determine which method to call has gotten me really short on nerves.
> >
> > Does anyone else have a nice clean way that they have consolidated all
> > their CRUD functions into a 1 action, then found a nice way to delegate
to
> > the proper method based on say the URL that the user is trying to access
> > (instead of the parameter value)?
> >
> > Best,
> > Riyad
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Non-Form Based Mapped Properties

2004-04-23 Thread Michael McGrady
For the tags, I would put in "host" and "eclipse_banner", Herbert.

At 11:23 AM 4/23/2004, Hubert Rabago wrote:
Well, I'm not sure the Struts tags (or Bean/PropertyUtils) can evaluate
SiteConstant.HOST.  The last time I remember that somebody asked about a
similar situation, I think the suggestion was to provide accessors for them.
I know, it ain't what you wanna hear, but I guess they just weren't written
to work that way.
Hubert

--- Michael McGrady <[EMAIL PROTECTED]> wrote:
> The value of SiteConstant.HOST is just "host" and is merely the session
> attribute key for the Host object, Herbert.  I could have just put in
> "host" and "ecliplse_banner" but I have this fear of hard
> coding.  LOL  Does that change your thoughts?
>
> At 09:29 AM 4/23/2004, Hubert Rabago wrote:
> >Those tags are meant to work with JavaBeans-style classes.  I think
> there's
> >been lots of questions about accessing stuff like SiteConstant.HOST and
> >SiteConstant.ECLIPSE_BANNER, but I don't remember seeing a solution for
> that.
> >  One way around it (not that it's the best way) is to provide accessors
> that
> >directly give you what (Page)host.getPage(SiteConstant.ECLIPSE_BANNER)
> >returns.
> >
> >Hubert
> >
> >--- Michael McGrady <[EMAIL PROTECTED]> wrote:
> > >
> > > Thanks, Herbert, let me state more particularly what I am doing.  I
> want to
> >use Struts tags rather than
> > > JSP.  I know how to do things in JSP easily.  With the tags, outside of
> > > ActionForms, I am confused.  In JSP, I get my results as follows:
> > >
> > >
> > > <%
> > > Host host = (Host)session.getAttribute(SiteConstant.HOST);
> > > Page key = (Page)host.getPage(SiteConstant.ECLIPSE_BANNER);
> > > %>
> > >
> > > <%= key.getValue("bannerLeftBackgroundColor") %>
> > >
> > > I want to do with the Struts bean tag what I do now with JSP tags.  How
> do
> > > I do that?  This should be simple, but something is not working.  I am
> > > either erring with the "define" or the "write" attribute and all the
> > > combinations I try don't work.  People have indicated that I need to
> > > retrieve a Map object with getMap().  I don't see why, given what I
> read in
> > >
> > > the literature.  If you could help, I would be eternally (or a very
> long
> > > time) grateful. The classes are given below:
> > >
> > > public class Host {
> > >private Map pages;
> > >
> > >public Host() {
> > >  int size = 89;
> > >  this.pages = Collections.synchronizedMap(new HashMap(size));
> > >}
> > >
> > >public void setMap(Map pages) {
> > >  this.pages = pages;
> > >}
> > >
> > >public Map getMap() {
> > >  return pages;
> > >}
> > >
> > >public void setPage(Object key, Object page) {
> > >  pages.put(key,page);
> > >}
> > >
> > >public Object getPage(Object key) {
> > >  return pages.get(key);
> > >}
> > > } ///;-) Michael McGrady
> > >
> > >
> > > public class Page {
> > >private Map keys;
> > >
> > >public Page() {
> > >  int size = 89;
> > >  this.keys = Collections.synchronizedMap(new HashMap(size));
> > >}
> > >
> > >public void setMap(Map keys) {
> > >  this.keys = keys;
> > >}
> > >
> > >public Map getMap() {
> > >  return keys;
> > >}
> > >
> > >public void setValue(Object key, Object value) {
> > >  keys.put(key,value);
> > >}
> > >
> > >public Object getValue(Object key) {
> > >  Object value = keys.get(key);
> > >  com.crackwillow.log.StdOut.redirect("log.VALUE: " + value);
> > >  if(value == null) {
> > >return "? [" + (String)key + "] ?";
> > >  } else {
> > >return value;
> > >  }
> > >}
> > > } ///;-) Michael McGrady
> > >
> > >
> >
> >
> >
> >
> >
> >__
> >Do you Yahoo!?
> >Yahoo! Photos: High-quality 4x6 digital prints for 25¢
> >http://photos.yahoo.com/ph/print_splash
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Benefits of LookupDispatchAction without parameter nonsense

2004-04-23 Thread Riyad Kalla
Everyone thank you for the feedback, actually I tried the MappingDispatch and 
it seems to be just what I was looking for. You specify the method name IN 
the parameter... so you can set say 3 actions, with different paths, all 
pointing to the same type, and you specify the method to call in the param:







Pretty slick... its not in 1.1 so I have to use nightly :(

On Friday 23 April 2004 03:39 pm, Niall Pemberton wrote:
> Don't you still have to set the "parameter" using the MappingDispatchAction
> class?
>
> One way to do what you want (i.e. not specify the parameter) is to create
> your own custom ActionMapping and override the getParameter() method with
> some logic to look at the path and return the parameter based on it.
> Something like:
>
> public class ParameterActionMapping extends ActionMapping {
>
>public String getParameter() {
>
>   if (path.endsWith("Create"))
>  return "create";
>
>   if (path.endsWith("Read"))
>  return "read";
>
>   if (path.endsWith("Update"))
>  return "update";
>
>   if (path.endsWith("Delete"))
>  return "delete";
>
>   return super.getParameter();
>
>}
> }
>
>
> Then in struts-config.xml you can use this mapping for all your actions by
> setting the type:
>
>  
>
> or on indivdual actions using the className
>
>   
> Niall
>
> - Original Message -
> From: "Riyad Kalla" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, April 23, 2004 11:08 PM
> Subject: Re: Benefits of LookupDispatchAction without parameter nonsense
>
> > Hrrm.. I just found MappingDispatchAction and that seems to be exactly
>
> what I
>
> > was looking for... has anyone used this class?
> >
> > On Friday 23 April 2004 03:00 pm, Riyad Kalla wrote:
> > > Hey guys,
> > > After playing with the LookupDispatchAction most of the day and
>
> converting
>
> > > over some existing functionality to using it, I've figured out that i
>
> love
>
> > > the consolidation of functionality into 1 class, but the problems I've
>
> run
>
> > > into (non stop) dealing with the parameter and making sure that all my
> > > buttons now have "property" values (which, for example, breaks some
> > > existing code like ) so that the LDA has a parameter to
> > > determine which method to call has gotten me really short on nerves.
> > >
> > > Does anyone else have a nice clean way that they have consolidated all
> > > their CRUD functions into a 1 action, then found a nice way to delegate
>
> to
>
> > > the proper method based on say the URL that the user is trying to
> > > access (instead of the parameter value)?
> > >
> > > Best,
> > > Riyad
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to get a value from the from bean

2004-04-23 Thread Billy Ng
In the JSP, I need to a get a value from a form bean's property.  How can I
do it in the JSP?

I tried to pageContext.findAttribute("org.apache.struts.taglib.html.BEAN")
to get the form bean, but it returned me null.  Please help!

Billy Ng

This mailbox protected from junk email by Matador
from MailFrontier, Inc. http://info.mailfrontier.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Workflow] WorkflowViolation Help

2004-04-23 Thread Derek
I have everything working using the Struts Workflow extension except
that I am having problems with the workflow violation mechanism.

I have a wizard consisting of 6 pages.  The workflow through the entire
6 pages is assigned a single primary workflow value.  So, I made one
violation mapping to handle violations.

What I want to happen is when the workflow is violated, I want the user
to be sent back to the wizard page they were currently on (ie. page 4)
and have a message on that page saying the violation.  I can't seem to
figure out how to get the user back to the page they were on ... given
that I have only one workflow/violation defined.

Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get a value from the from bean

2004-04-23 Thread Riyad Kalla
If you are trying to print out the value:

where nameOfForm is the name of the form defined in your struts-config 
and passed in via the 'name' argument in the action for this page.

And use bean:define to create a page-scoped bean if you just want to use 
it places (like in calculations and such). Also jsp:useBean works too.

Billy Ng wrote:

In the JSP, I need to a get a value from a form bean's property.  How can I
do it in the JSP?
I tried to pageContext.findAttribute("org.apache.struts.taglib.html.BEAN")
to get the form bean, but it returned me null.  Please help!
Billy Ng

This mailbox protected from junk email by Matador
from MailFrontier, Inc. http://info.mailfrontier.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: generate struts ActionForm & strut's jsp from hibernate's map ping

2004-04-23 Thread David Friedman
Nick,

I'm new to Xdoclet but in my class I used a @struts.form tag and it only
seemed to add entries in the struts-config.xml file Xdoclet created.  You
sound like you're suggesting Xdoclet can make a String-based derived form
class based on my bean/java class.  Can you provide and example?

Regards,
David

-Original Message-
From: Nick Heudecker [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 2:28 AM
To: Struts Users Mailing List
Subject: Re: generate struts ActionForm & strut's jsp from hibernate's
map ping


Some people use the @struts.form XDoclet tags to create their form classes,
although I wasn't able to get it to work with non-EJB classes.  I've written
an XDoclet extension to create dynamic form bean definitions to get around
this.

Your problem is that you're going from HBM > Java Bean > Form Bean, while
XDoclet is Java Bean > (HBM, DynaForm Bean Definition).  You could hit the
HBM files with some XSL to create your form beans, however.  Shouldn't be
too
hard and others may find it useful.



On 2004-Apr-23 13:04, Dionisius Purba wrote:
> David, It works perfectly fine.
> You see, based on, for instance, Person.hbm.xml,
> hbm2java will generate Person.java
> but since I use struts, I still need to generate PersonForm.java
> and Person.jsp
>
> PersonForm would be very similar to Person.java, with the difference is
that
> in PersonForm, all fields's type (firstName, lastName, age)
> become String.
>
> Then in the AddPerson.jsp I will have something repeated like this:
> 
> 
> 
>
> Is there anyone outthere who makes tool for such thing?
> It should not be very difficult to make one, but I just want to avoid
> reinvent the wheel.
>
> regards,
> Dion
>
> -Original Message-
> From: David Friedman [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 1:30 PM
> To: Struts Users Mailing List
> Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
> mapping
>
>
> What's wrong with the hibernate extension tools
> and the Code Generator that creates .java files from
> the hbm.xml files you give it?
>
> See:
> http://prdownloads.sourceforge.net/hibernate/?sort_by=date&sort=desc
> Item: hibernate-extensions-2.1.zip (or the 2.0.2 zip file for 2.0.X
> versions)
>
> I've only used the extension's hbm2java program, not the other way around.
> Now that I'm using Xdoclet, I have no further need for those extension
> tools.
>
> Regards,
> David
>
> -Original Message-
> From: Dionisius Purba [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 1:21 AM
> To: 'Struts Users Mailing List'
> Subject: generate struts ActionForm & strut's jsp from hibernate's
> mapping
>
>
> Altough my question is related to hibernate, I hope it's still relevant.
> Is anyone aware of tools, open source is better, that can generate
> ActionForm and the JSP's (containing struts's HTML Input tag)
> based on a hibernate's mapping (i.e. *.hmb.xml)?
>
> cheers,
> dion
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--
Nick Heudecker
System Mobile, Inc.
Email: [EMAIL PROTECTED]
Web: http://www.systemmobile.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Custom Request Processor is failing at startup.

2004-04-23 Thread Josh Holtzman
I have created a custom RequestProcessor that extends the default
RequestProcessor.
 
I would like to initialize it with a parameter from config file.  Using the
 element I've done the following in my config file:
 



 
And within my Request Processor:
 
private String ignoreSessionCheckPath = "";
 
 public void setIgnoreSessionCheckPath( String ignoreSessionCheckPath ) {
this.ignoreSessionCheckPath = ignoreSessionCheckPath;
}

public String getIgnoreSessionCheckPath( ) {
return this.ignoreSessionCheckPath;
}
 
When I try and load the application I receive the following error included
below.
 
Have I done something wrong in trying to set the property of this bean?  I
believe I have named the ignoreSessionCheckPath variable and accessor and
mutator properties to match the property name in the config file.
 
Any suggestions would be greatly appreciated.
 
Regards,
 
Josh
 
 
23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr: [ERROR] Digester -
-Begin event threw exception java.lang.NoSuchMethodException: Bean
has no property named ignoreSessionCheckPath
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:192)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.commons.digester.Rule.begin(Rule.java:200)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.commons.digester.Digester.startElement(Digester.java:1273)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1533)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.crimson.parser.Parser2.parse(Parser2.java:318)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.j
ava:1006)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:9
55)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:482)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:92
1)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3355)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2568)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
org.apache.catalina.loader.WebappContextNotifier.run(WebappLoader.java:1364)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
java.lang.Thread.run(Thread.java:536)
[23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr: [ERROR]
ActionServlet - -Parsing error processing resource path
java.lang.NoSuchMethodException: Bean has no property
named ignoreSessionCheckPath
[23/Apr/2004:17:30:48] SEVERE ( 9992): WebModule[]: Servlet  threw load()
exception
javax.servlet.UnavailableException: Parsing error processing resource path 
 at
org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.j
ava:1035)
 at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.j
ava:1014)
 at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:9
55)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:482)
 at javax.servlet.GenericServlet.init(GenericServlet.java:258)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:92
1)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
335

Re: Custom Request Processor is failing at startup.

2004-04-23 Thread Niall Pemberton
I believe that the  will try to set a property in the
ControllerConfig class. So you would need to extend ControllerConfig and put
your "ignoreSessionCheckPath" property with its getters/setters in that
class.

Then you in the struts-config.xml you can configure it to use your custom
ControllerConfig like this:

 
 
 


Then in your custom request processor you can use the following to get the
property value:

((MyControllerConfig)moduleConfig.getControllerConfig()).getIgnoreSessionChe
ckPath();


Niall


- Original Message - 
From: "Josh Holtzman" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Saturday, April 24, 2004 2:44 AM
Subject: Custom Request Processor is failing at startup.


> I have created a custom RequestProcessor that extends the default
> RequestProcessor.
>
> I would like to initialize it with a parameter from config file.  Using
the
>  element I've done the following in my config file:
>
>  contentType="text/html;charset=UTF-8"
> debug="3"
> locale="true"
> nocache="true"
>
> processorClass="com.americandatacorp.security.SecureRequestProcessor">
>  value="/login.html"/>
> 
>
> And within my Request Processor:
>
> private String ignoreSessionCheckPath = "";
>
>  public void setIgnoreSessionCheckPath( String ignoreSessionCheckPath ) {
> this.ignoreSessionCheckPath = ignoreSessionCheckPath;
> }
>
> public String getIgnoreSessionCheckPath( ) {
> return this.ignoreSessionCheckPath;
> }
>
> When I try and load the application I receive the following error included
> below.
>
> Have I done something wrong in trying to set the property of this bean?  I
> believe I have named the ignoreSessionCheckPath variable and accessor and
> mutator properties to match the property name in the config file.
>
> Any suggestions would be greatly appreciated.
>
> Regards,
>
> Josh
>
>
> 23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr: [ERROR]
Digester -
> -Begin event threw exception  property named ignoreSessionCheckPath>java.lang.NoSuchMethodException:
Bean
> has no property named ignoreSessionCheckPath
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
>
org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:192)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.commons.digester.Rule.begin(Rule.java:200)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.commons.digester.Digester.startElement(Digester.java:1273)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1533)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.crimson.parser.Parser2.parse(Parser2.java:318)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.commons.digester.Digester.parse(Digester.java:1548)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
>
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.j
> ava:1006)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
>
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:9
> 55)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:482)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> javax.servlet.GenericServlet.init(GenericServlet.java:258)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:92
> 1)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
>
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
> 3355)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
> org.apache.catalina.core.StandardContext.reload(StandardContext.java:2568)
> [23/Apr/2004:17:30:48] WARNING ( 9992): CORE3283: stderr:  at
>
org.apache.catalina.loade

nested tags and java.util.List

2004-04-23 Thread Ivan De La Pena
i have extended DynaValidatorForm and created form bean that holds a List.

It looks like this :


 

  


beans is a List of type Bean  which has only two variables name , age
 and the getter/setters for these two variables.

I am using lazy list to populate this List.

The business requirement is that the user wants to be able to dynamically
add Beans(which represent a  with two text boxes) from the html page. I
have already implemented that using row cloning using javascript.

But i have hardcoded one row on the page already..which looks like this






now the user can add more rows and i would rename the next row to 





..


This way i can succesfully pass all rows to the action class..but i
would get stuck if there are already Beans in the database , in that case i
would have to render those beans as rows having indexed names.

What i am looking for is a way to the following :

1.)Use nested tag to render the html elements with my naming convention ex.
beans[0].name...etc

2.)If possible initialize my "myForm" to have a List of size 1 , so that i
dont have hardcode the initial .
Also if there are any Beans in the database...then i could replace the List
of size 1 with the new one.

Hope i was clear enoughplease help






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Differences Between Struts1.1 and Struts1.2

2004-04-23 Thread ganesh g
Hi List,
Will u pls tell me Differences Between Struts 1.1 and Struts 1.2
 
Regards & Thanks
Ganesh


-
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

Multibyte string Tomcat ,struts IE

2004-04-23 Thread Kiran Kumar
Hi All,
  I need help on sending multibyte characters in URL
using html:link , we are following the steps mentioned
below
  i have searched for the information on google but
could not come across anything helpful ,
  (it is also mentioned in some post that IE adds its
own encoding when the data is submitted and that
browsers do not send the character encoding in "real
life") 
   hope someone on this list can help me out

1.Is is possible to send multibyte string in url
(using HTTP GET method) ?
2.If we have to encode the String what are the ways
that i can do the same and how do i decode the string
?
3. Is there any javascript which takes the query
string and submits it as POST method

Steps we Use 
1. EUC-JP string taken from postgres database
(database encoding is in EUC-JP),
2. The string is put in hashmap as well as a
ActionForm 
3. In jsp page we use 
 



 
Here the string is displayed properly
 
when we click on this link the EUC-JP string is
encoded and sent to the next action
 
when the string is accessed in action class it is
malformed
 
We have a setcharacterencoding filter (tomcat) that
has encoding as EUC_JP
We have tried
eucString = Actionform.getstring();
byte[] stringBytesISO =
eucString.getBytes("ISO-8859-1");
eucString = new String(stringBytesISO, "EUC-JP");
 
But this works perfectly if we use a POST method but
not on GET 
 
Version We Use 
Tomcat 4.1.27
Struts 1.1



Looking forward for your replies

Thanks,
Kiran








__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]