RE: I'm going back to just using regular Actions.. a question

2004-09-17 Thread Robert Taylor
Yep. I usually bunch all action type stuff in the action package.
Like forms, action utils, value objects used in actions, etc...
I guess it more or less represents the presentation part of the package
and the service represents the business part. I only see a need to dissect
it into these two because the actions should only need to talk to the 
service layer. The service layer should be talking to reusable components
in some other package like com.acme.components.whatever.

robert

> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 17, 2004 3:05 PM
> To: Struts Users Mailing List
> Subject: Re: I'm going back to just using regular Actions.. a question
> 
> 
> Robert Taylor wrote the following on 9/17/2004 2:58 PM:
> 
> > com.acme.applications.web.foo.account.action
> > com.acme.applications.web.foo.account.service
> 
> Yea that was my option 2 I posted. I'm still debating about this one as 
> well. I can see both approaches being decent:
> 
> 
> com.acme.applications.web.foo.account.action
> com.acme.applications.web.foo.account.form
> 
> com.acme.applications.web.foo.service.action
> com.acme.applications.web.foo.service.form
> 
> OR:
> 
> com.acme.applications.web.foo.action.account
> com.acme.applications.web.foo.action.service
> 
> com.acme.applications.web.foo.form.account
> com.acme.applications.web.foo.form.service
> 
> 
> I'm leaning towards the later approach since when I'm looking for 
> something I usually know that I'm looking for a form or an action so I 
> can then look to that top level and go down.
> 
> -- 
> Rick
> 
> -
> 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: I'm going back to just using regular Actions.. a question

2004-09-17 Thread Robert Taylor
Rick, 

I have been using the following package layout for a while and it seems to make sense.

For example, let's say the foo web application consists of various sub applications 
like
account, store, product download, etc


com.acme.applications.web.foo.account.action
com.acme.applications.web.foo.account.service

com.acme.applications.web.foo.store.action
com.acme.applications.web.foo.store.service

etc...


May not be the best way, but like I said, it seems to make sense and it works for me.


robert




> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 17, 2004 2:42 PM
> To: Struts Users Mailing List
> Subject: I'm going back to just using regular Actions.. a question
> 
> 
> After thinking about the flavors of Dispatch actions I use, and after 
> having used them as my primary type of Actions for the past 3+ years, 
> I've decided to go back to just using regular Actions. I like the 
> modular self contained Actions.
> 
> My question is more of design practice for those that just use standard 
> Actions. How do you design your packages? For example...
> 
> EmployeeUpdateAction:
>   
> 1) package com.acme.ui.action.employee;
>   
> or
>   
> 2) package com.acme.ui.employee.action;
>   
> or just put them all in one package:
>   
> 3) package com.acme.ui.action;
> 
> I'm leaning towards option 1 myself. Other thoughts?
> 
> -- 
> Rick
> 
> 
> -
> 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 DispatchAction...help!...newbie

2004-09-14 Thread Robert Taylor
ValidatorForm, ValidatorActionForm, DynaValidatorForm, and DynaValidatorActionForm 
allow
you to leverage the validation framework in Struts.

How you use DispatchAction determines what you need to do to make it
work with the validation framework.

For example there are two basic approaches:

1. Differentiate different validation routines based on form name.
   Using DispatchAction you could use the same form and identify it
   with different names in the struts-config.xml file. You can then
   ensure that each action mapping using the DispatchAction used the
   appropriate form name to invoke the appropriate validation rules
   in validation.xml.


2. Differentiate different validation routines based on action mapping.
   Using DispatchAction you could use the same form with the same
   identity. You can then use different action mappings which all map
   to the same DispatchAction using the same form. Each unique action
   mapping would then invoke the appropriate validation rules in
   validation.xml.



There are other variations of DispatchAction such as MappedDispatchAction
and LookupDispatchAction. Each of these might be leveraged differently
to work with the validation framework. I've yet to use them, so I can't
offer any advice; however, recently, there have been some healthy threads
on both. Just don't ask Rick about LookupDispatchAction and you'll be okay :)


Now, it gets kind of tricky when you want to use DispatchAction (or some variant
there of) to perform different validation routines using the same form name and
the same action mapping. This is typical when you have a single form with multiple 
buttons, where each button invokes a different
operation on the DispatchAction and
you want to use different validation routines for each operation.

Since validation routines basically key off of the name attribute of the form
element in validation.xml, you can modify/override the getValidationKey() in
ValidatorForm or ValidatorActionForm to
return a name including the invoked operation. There are probably other ways
to do this and most likely more elegant. I think you can also use the form name
in conjunction with the page attribute as the validation key but I haven't done this
yet.


Digging around the source code always helps me to understand how things work.



robert

> -Original Message-
> From: O. Oke [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 14, 2004 8:04 PM
> To: Struts Users Mailing List
> Subject: Validator with DispatchAction...help!...newbie
>
>
>  --- Matt Bathje <[EMAIL PROTECTED]> wrote:
> > O. Oke wrote:
> >
> > > Can anyone please tell me how to use the Struts
> > > Validator with DispatchAction.
> > >
> > > This article in bugzilla does not seem to deal
> > with
> > > the issue:
> > >
> >
> http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=8633
> > >
> > > Thank you.
> > >
> > > Ola
> > >
> >
> >
> > Ola - we more information to be able to help you. I
> > can't even tell what
> > your problem is, or why you think that bugzilla
> > report is/isn't related
> > to it. (Also, there are hundreds of bugzilla reports
> > that do not apply
> > to your problem...that doesn't mean they are helpful
> > to explain what is
> > going on.)
> >
> >
> > Matt
> >
> >
>
> Matt,
>
> Please find further detail below:
>
>
> GENERAL INFORMATION
> ===
> My understanding is that the Stuts validator is not
> designed to work with classes that extend
> DispatchAction (as against Action).  However, the
> information I have found on the internet appears to
> suggest that there is a way to make them work with
> each other.  This article
> (http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=8633)
> is meant to be an explanation of howto, but on closer
> examination, it did not seem to deal with the issue.
>
> Can you please tell me how to make them work with each
> other?
>
> Thank you.
>
> Ola.
>
>
>
>
>
> ___ALL-NEW Yahoo! Messenger 
> - all new features - even more fun!
http://uk.messenger.yahoo.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: Moving from environment to environment

2004-09-10 Thread Robert Taylor
Dave, I have 3 environments:
Development, Staging, and Production.

I use Ant and have different deployment
targets.

Each target replaces tokens with the values
which correspond to its deployment environment.

Ant makes this pretty easy to do.

http://ant.apache.org/manual/CoreTypes/filterset.html

hth,

robert

> -Original Message-
> From: Dave Bender [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 10, 2004 4:59 PM
> To: 'Struts Users Mailing List'
> Subject: Moving from environment to environment
> 
> 
> How do you easily move a Struts application from one environment to another,
> e.g. from development to test to production, without having to change the
> struts-config.xml file to use a different database?
> 
> The datasources seem like they can be configured only in that file, but if
> you want to have different database configs in the different environments,
> it seems like you have to edit that file.  Am I missing something? Is there
> a way around that?
> 
> Dave
> 
> 
> 

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



RE: [OT]: Best book J2EE Design patterns

2004-09-09 Thread Robert Taylor
+1. Both Johnson books are top notch. I highly recommend them to any J2EE developer.

robert

> -Original Message-
> From: Nail, Evan Burke [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 09, 2004 7:57 AM
> To: Struts Users Mailing List
> Subject: RE: [OT]: Best book J2EE Design patterns
> 
> 
> Another good book is J2EE Design and Development by Rod Johnson
> 
> http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/qid=1094730665/sr=8-1/ref=pd_cps_1/102-7925651-9470545?v=glance&s
> =books&n=507846
> 
> It references the core patterns book and gives some real world examples of a few of 
> the most common patterns in the 
> context of showing how to solve design issues. 
> 
> I think a new addition is out called .."Design without EJB" or something like that. 
> It has a download version from Amazon 
> I believe. 
> 
> 
> 
> Burke
> 
> -Original Message-
> From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 09, 2004 3:22 AM
> To: Struts Users Mailing List
> Subject: Offtopic: Best book J2EE Design patterns
> 
> 
> Hi,
> 
>  
> 
> Can any one suggest a good book for Design patterns in J2EE?
> 
>  
> 
> Regards,
> 
> Janarthan S
> 
> 
> 
> **
> This e-mail is the property of Enron Corp. and/or its relevant affiliate and may 
> contain confidential and privileged 
> material for the sole use of the intended recipient (s). Any review, use, 
> distribution or disclosure by others is 
> strictly prohibited. If you are not the intended recipient (or authorized to receive 
> for the recipient), please contact 
> the sender or reply to Enron Corp. at [EMAIL PROTECTED] and delete all copies of the 
> message. This 
> e-mail (and any attachments hereto) are not intended to be an offer (or an 
> acceptance) and do not create or evidence a 
> binding and enforceable contract between Enron Corp. (or any of its affiliates) and 
> the intended recipient or any other 
> party, and may not be relied on by anyone as the basis of a contract by estoppel or 
> otherwise. Thank you. 
> **
> 
> 
> -
> 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: [ANN] Bridgetown IoC Framework

2004-09-08 Thread Robert Taylor
Peter, this sounds interesting, but what would Bridgetown offer
over a more mature IoC container like Spring?

robert

> -Original Message-
> From: Pilgrim, Peter [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 08, 2004 3:52 AM
> To: Struts User Apache (E-mail)
> Subject: FW: [ANN] Bridgetown IoC Framework
> 
> 
> FYI
> 
> > -Original Message-
> > From: Peter A. Pilgrim [mailto:[EMAIL PROTECTED]
> > Sent: 08 September 2004 07:12
> > To: Struts Developers List
> > Subject: [ANN] Bridgetown IoC Framework
> > 
> > 
> > 
> > Hi
> > 
> > I have been quietly working on my own Inversion of Control lightweight
> > framework over the last couple of months.
> > 
> > My itch was scratched when I suddenly realised that ``Commons 
> > BeanUtils''
> > and ``Common Digester'' could be simply combined together into a
> > bean assembly factory. An assembly factory could manage service beans
> > in a lightweight container. Services could then be retrieved
> > by name, and one doesn't have to worry about connecting
> > different services together. Experiments showed that this idea
> > was pretty cool and have implemented property and method dependency
> > injection (aka ``BeanUtils'' and ``MethodUtils''). [Constructor
> > injection is on the todo list. ]
> > 
> > I am at the point where the current codebase is stable enough 
> > for development,
> > but if I want the container to be more useful, then I need to open-
> > source the project. It would allow others to write Dynamic proxy
> > service beans, integrate with Struts 1.2/2+, or extend with 
> > AOP library,
> > or whatever persistence layer EJB 3.0 decides to become. It 
> > cannot be down
> > by just one man writing software. As an independent 
> > consultant I simply
> > have not got the time to build everything.
> > 
> > Moreover, I intend to follow the Struts style ``open integration''
> > philosophy that should allow Bridgetown IoC container to be added
> > any other framework. (I intend add support to the Expresso 
> > Framework in
> > the near term, since I am a core committer there)
> > 
> > So my simple IoC Test Container became ``Bridgetown IoC''. I 
> > uploaded the
> > source code to ``Sourceforge'' and slapped on it an Apache License 2.0
> > badge. The software is ALPHA quality but it compiles and run
> > with Eclipse SDK 3, and there are junit test and a couple of examples.
> > 
> > 
> > `` http://bridgetown.sf.net ''  is the hook.
> > 
> > 
> > I'd like publicly thank the man, Craig McClanahan, for his 
> > two inventions
> > `BeanUtils' and `Digester'. Without those two components it 
> > just wouldn't
> > have happened.
> > 
> > 
> > Enjoy baby bop#
> > 
> > -- 
> > Peter Pilgrim
> > __ _ _ _
> >/ //__  // ___// ___/   +  Serverside Java
> >   / /___/ // /__ / /__ +  Struts
> >  / // ___// ___// ___/ +  Expresso Committer
> >   __/ // /__ / /__ / /__   +  Independent Contractor
> >  /___///////   +  Intrinsic Motivation
> > On Line Resume  http://jroller.com/page/peter_pilgrim
> > ||
> > \\===>  `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> [ Not subscribed to the users list at home ;-( ]
> 
> --
> Peter Pilgrim
> Operations/IT - Credit Suisse First Boston, 
> 10 South Colonnade, London E14 4QJ, United Kingdom
> Tel: +44 (0)207 883 4447
> 
> ==
> This message is for the sole use of the intended recipient. If you received
> this message in error please delete it and notify us. If this message was
> misdirected, CSFB does not waive any confidentiality or privilege. CSFB
> retains and monitors electronic communications sent through its network.
> Instructions transmitted over this system are not binding on CSFB until they
> are confirmed by us. Message transmission is not guaranteed to be secure.
> ==
> 
> 
> -
> 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: Proper place for validation

2004-09-07 Thread Robert Taylor
I would avoid putting any business logic in the action 
class. Place this type of logic in the business class as it
most likely is validation that is valid across all application
logic and not for just one use case.

robert

> -Original Message-
> From: Janne Mattila [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 07, 2004 8:15 AM
> To: [EMAIL PROTECTED]
> Subject: Proper place for validation
> 
> 
> I am wondering what would be the propert place for some validation code. 
> Let's say I have a registration page where user inputs his/her information 
> for a new user account. There's a field for e-mail address. On one level 
> that information is validated on the ActionForm, for things such as
> 
> - field is not left empty, if it is required
> - field is a valid e-mail address
> 
> That much seems quite clear. But where should I put a check that ensures 
> that same e-mail address is not already used by an existing account?
> 
> On the other hand, I could put it in the registration action, because 
> checking that is (kind of) user-input validation, and action is a natural 
> place to do this.
> 
> On the other hand, I could put it in my business class. The pros for this 
> would be smaller and simpler action code, and reuse if same check is needed 
> with different actions.
> 
> Any suggestions? Intuitively, I think I would put that check in the Action, 
> but I am happy to hear any arguments in favor or opposing that.
> 
> _
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
> http://join.msn.com/?page=features/junkmail
> 
> 
> -
> 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: Height and width missing from

2004-09-02 Thread Robert Taylor
If you are using it to render an  then use
 which should have the appropriate attributes.
The  is for rendering 
which does not have the height and width attributes.

robert

> -Original Message-
> From: Janne Mattila [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 02, 2004 7:23 AM
> To: [EMAIL PROTECTED]
> Subject: Height and width missing from 
> 
> 
> Damn, why no width and height attributes for html:image? Disappointing.
> 
> _
> MSN 8 with e-mail virus protection service: 2 months FREE* 
> http://join.msn.com/?page=features/virus
> 
> 
> -
> 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: SecurityFilter Question?

2004-08-31 Thread Robert Taylor
I haven't been following this thread too closely but 
I know its been some what long so if this solution has
already been proposed, I apologize in advance.

We use SecurityFilter and an additional filter which
checks for the Principal in the request. If the Principal exists,
then we can be assured that the user has successfully logged in; at 
which point we check to see if the required information is in the
session. If not, then we persist the required information into the session.
If so, then we do nothing. In either case we allow the filter chain to proceed. 
It has worked quite nicely so far.


Principal principal = req.getUserPrincipal();

if (principal != null) {

  
   if (req.getSession().getAttribute("requiredInformation") == null) {

   // do other login stuff here

   }

}

chain.doFilter(req, res);

hth,

robert

> -Original Message-
> From: struts Dude [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 30, 2004 8:19 PM
> To: Struts Users Mailing List
> Subject: Re: SecurityFilter Question?
> 
> 
> 
> - Original Message - 
> From: "Jason Lea" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, August 30, 2004 6:07 PM
> Subject: Re: SecurityFilter Question?
> 
> > >
> > >Can't u do this using an Action? Say, accessing /admin/LogAction.do
> > >invokes SecurityFilter, after authentication by SecurityFilter is passed,
> > >go directly to LogAction as below
> > >
> > >
> >
> > The problem comes if the user bookmarks a url like /user/abc.do, starts
> > up their browser and goes directly to the protected URL.  The security
> > filter will take them to the login form, they submit username/password
> > and seucirty filter authenticates them.  Once they are authenticated
> > they are redirected back to /users/abc.do - they don't pass through
> > LogAction at all.  So I normally have a filter that makes sure the bean
> > is in session from where ever they are called.
> >
> 
> 
> > You don't have to use a filter though, you could make a base action that
> > does puts the bean into session and have all your actions sub-class that
> > one.
> 
> Using action to put bean in Session after SecurityFilter, how is that
> possible when after authentication by SecurityFilter, u taken right
> back to /user/abc.do where u 1st request it and doesn't pass
> through to action attribute as specified in action-mapping of
> struts-config.xml?
> 
> I have tried to use action, after authentication, I am indeed taken
> back to the page /admin/logon.do or /user/logon.do and got
> error message in browser:
> 
> HTTP Status 400 - Invalid path /admin/Logon was requested
> 
> message Invalid path /admin/Logon was requested
> 
> description The request sent by the client was syntactically incorrect
> (Invalid path /admin/Logon was requested).
> 
> -
> 
> My action mapping is struts-conf.xml
> 
> Both
> 
>path="/admin/Logon.do"
>  type="org.apache.struts.actions.ForwardAction"
>   parameter="LogAction.do?action=logon"/>
> 
>  path="/user/Logon.do"
> type="org.apache.struts.actions.ForwardAction"
>   parameter="LogAction.do?action=logon"/>
> 
> 
> 
> or
> 
>  path="/admin/Logon.do"
> type="org.apache.struts.actions.ForwardAction"
> parameter="Welcome.do"/>
>  path="/user/Logon.do"
> type="org.apache.struts.actions.ForwardAction"
> parameter="Welcome.do"/>
> 
> won't work.
> 
> ---
> 
> BTW, how wud u use html:form to display
> login fields?
> 
> I can't get struts tag to work with login fields
> except for using things like:
> 
> 
>  Username: 
>  Password: 
>  
> 
> 
> 
> --
> 
> Ok, using filter (as u said) after SecurityFilter wud solve this simply but
> I like to stick with pure Struts approach if possible.
> 
> Thanks
> 
> 
> > Jason Lea
> >
> >
> >
> 
> 
> -
> 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: Using Struts HTML tags

2004-08-27 Thread Robert Taylor
Just a note:
You cannot embed tags within another tag's attribute; ie,

"/>

is not allowed.

You could use JSTL and do something like



I think your container has to be JSP2.0 compliant; if not
then you could use the Struts-EL library.

robert

> -Original Message-
> From: Varley, Roger [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 27, 2004 8:59 AM
> To: [EMAIL PROTECTED]
> Subject: Using Struts HTML tags
> 
> 
> Hi
> 
> I'm trying to use the  tag. What I'm trying to do is to ensure that the 
> selected radio button is returned in 
> the ActionFormBean for this page and the value that is returned is contained in a 
> session bean "user" property 
> "fromDomain". What I want to see in the generated HTML is  name="id" value="myDomain"/> where myDomain 
> is the value of bean user.getFromDomain().
> 
> I've tried  property="fromDomain"/>"/> which fails to compile, 
> whilst escaping the double quotes  
> writes the string "" into the value 
> attribute of the html.
> 
> Can I actually do what I want to do?
> 
> Regards
> Roger
> 
> 
> __
> This e-mail and the documents attached are confidential and intended 
> solely for the addressee; it may also be privileged. If you receive this 
> e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin group 
> liability cannot be triggered for the message content. Although the 
> sender endeavours to maintain a computer virus-free network, the sender 
> does not warrant that this transmission is virus-free and will not be 
> liable for any damages resulting from any virus transmitted.
> __
> 
> -
> 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: HTTP status 500 - No input attribute for mapping path /login

2004-08-22 Thread Robert Taylor
It seems that you have this action path set to validate user input.
When validation fails, Struts looks in its action mapping for the input
attribute value which tells it where to go when validation fails.
Apparently you don't have an input attribute defined for your
/login action mapping.

robert

> -Original Message-
> From: Chris [mailto:[EMAIL PROTECTED]
> Sent: Sunday, August 22, 2004 7:24 AM
> To: Struts Users Mailing List
> Subject: HTTP status 500 - No input attribute for mapping path /login
> 
> 
> 
> Howdy , 
> 
> I am using Struts 1.1 and TC5, my web app throw an exception:
> 
> HTTP status 500 - No input attribute for mapping path /login
> (No more Exception stack printed)
> 
> I couldn't find solution by googling. Would you please give me 
> a hint?
> 
> Regards.
> Chris
> 
> -
> 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: Learning the basics

2004-08-18 Thread Robert Taylor
Ken, if you are familiar with basic web programming
and the web MVC architecture, then download the Struts examples
and go through them. That should get you up and running.

After that, there are several books and a couple of 
good sites that can get you up to speed. 

The struts website contains a wealth of information 
on getting started.

A google search wouldn't hurt either.

As for your question, you may want to look at 
DispatchAction. It allows you to invoke different
logic in the same action based on what button the user
clicked. There are other ways of doing this (hidden parameter
and javascript, etc...).

hth,

robert

> -Original Message-
> From: Kenneth Litwak [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 18, 2004 2:45 PM
> To: Struts Users Mailing List
> Subject: RE: Learning the basics
> 
> 
> I didn't actually find the user guide that helpful for learning basics
> or for my specific question.  Thanks.
> 
> Ken
> 
> -Original Message-
> From: Galbreath, Mark A [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 18, 2004 11:35 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Learning the basics
> 
> http://struts.apache.org/userGuide/
> 
> Mark
> 
> -Original Message-
> From: Kenneth Litwak [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 18, 2004 2:23 PM
> To: Struts Users Mailing List
> Subject: Learning the basics
> 
> 
>If I'm an experienced developer, but new to Struts, do I need to buy
> a book to write a basic app, or is there an online tutorial or something
> like that that is sufficient?  One of the things I'd like to figure out
> is to how to have three radio buttons, and a regular button, and have a
> different action for each radio button.  I can't figure out how to wire
> that.  Thanks.
> 
> 
> Ken
> 
> -
> 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] DAO ... where to draw the line?

2004-08-16 Thread Robert Taylor
Strategy 3.

I would basically have a DAO that handles the search query
and returns a collection of value objects for the related use case.
When the user clicks on a specific employee, then render the
details using your employee DTO.

As far as patterns are concerned you may want to take a look
as the ValueObjectAssembler pattern or the TransferObjectFactory 
patterns. 

hth,

robert

> -Original Message-
> From: Matthew J. Vincent [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 16, 2004 10:09 AM
> To: Struts Users Mailing List
> Subject: Re: [OT] DAO ... where to draw the line?
> 
> 
> LAST .  I promise!
> 
> Thanks!
> 
> >> Hi all,
> >>
> >> Thanks for the info.  Here's another issue.
> >>
> >> What if I have an employee search screen that wants to show only some 
> >> of the information of an employee (not all).  What do you do then?
> >> 1. Instanatiate an Employee object and only fill in the relative 
> >> information?  Keep in mind that this could be just employee name and 
> >> location on the search results screen and then when the user chooses 
> >> which employee to view I need to get all of the employee information.
> >>
> >> 2.  Instantiate an Employee object and fill out all the information 
> >> even though you won't be needing most of it on the search results 
> >> screen?
> >>
> >> 3.  Create 2 DTOs, one called Employee and one called EmployeeSearch 
> >> DTO.  The EmployeeSearch DTO only stores what needs to be shown on 
> >> the search results screen and the EmployeeDTO holds all the 
> >> information for what needs to be shown on the detail screen?
> >>
> >> 4.  Something else... Another pattern, etc?
> >>
> >> Thanks!
> >>
> >> Matt
> >>
> >>
> >>
> >> Navjot Singh wrote:
> >>
> >>> hi matthew,
> >>>
> >>> I wont say that you go with one or other of your approaches.
> >>>
> >>> It depends upon type of assosciation that 2 entities may share. They 
> >>> may have aggregation or composition relationship. Depending on that 
> >>> your DAO implementation will decide that you need to get ONLY id or 
> >>> the composite objects.
> >>>
> >>> Let me explain.
> >>>
> >>> Say you have class named ORDER ad ORDER_DETAILS. (consists-of 
> >>> relationship) Order without order details is nothing. So you may get 
> >>> the OrderDetails object as well when you get Order.
> >>>
> >>> Now say you have EMPLOYEE and DEPARTMENT. (has-a relationship) 
> >>> EMPLOYEE *may* still exists with or without department. So you may 
> >>> get only id of department and later fetch the department.
> >>>
> >>> Think in employee table, you have relationship (reports-to). If you 
> >>> specify this relation as composition, you may go on fetching the 
> >>> objects all the way up to the organization chart ;-)
> >>>
> >>> Do i make sense?
> >>> Navjot Singh
> >>>
>  -Original Message-
>  From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: 
>  Wednesday, August 11, 2004 8:21 AM
>  To: Struts Users Mailing List
>  Subject: [OT] DAO ... where to draw the line?
> 
>  [OFF TOPIC]
> 
>  I know this is a struts forum, but as struts developers using DAOs, 
>  where do your DAO implementation draw the line?
>  For example:
> 
>  Let''s say I have three tables:
> 
>  Employee (contains employee_id, employee_name,  and dept_id)
>  Department (contains dept_id, dept_name, loc_id)
>  Location (contains loc_id, location_name)
> 
>  How deep do your classes go to replicate the data?
>  Do you do this...
> 
>  public class Employee {
> private int id;
> private String name;
> private int deptId;   // just the id
> 
> // .. implementation details
>  }
> 
>  or do you do this
> 
>  public class Employee {
> private int id;
> private String name;
> private Department dept;  // all of the data
> 
> // .. implementation details
>  }
> 
>  and so on and so on.   Class Department has the same type of 
>  problem.  Does it hold just the id for location or a variable class 
>  Location?
> 
>  Should DAOs just fill in the id (keys) so it is up to the 
>  application using the DAOs to get the Employee class, then the 
>  Department class, and the the Location class like:
> 
>  Employee emp = EmployeDAO.getEmployee(1);
>  Department dept = DepartmentDAO.getDepartment(emp.getDeptId());
>  Location loc = LocationDAO.getLocation(dept.getLocId());
>  System.out.println(emp.getEmpName() + " works in " + 
>  loc.getLocationName());
> 
>  or
> 
>  Employee emp = EmployeDAO.getEmployee(1);
>  System.out.println(emp.getEmpName() + " works in " + 
>  emp.getDept().getLoc().getLocationName());
> 
>  Now this is just a simple example, but where do you draw the line?  
>  It's possible to go on and on and on and cycle back to employee...
> 
>  Any thoughts, links, 

RE: Loosing request attributes

2004-08-13 Thread Robert Taylor
form.reset();

robert

> -Original Message-
> From: Leandro Melo [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 13, 2004 11:20 AM
> To: Struts Users Mailing List
> Subject: Re: Loosing request attributes
>
>
> I was taking a look at the HttpServeltRequest and
> ServletRequest apis and noted that theres a method
> "getParameterMap()" wich returns a map of the
> parameters, BUT there isn`t such a "setParameterMap()"
> method.
>
> So, what`s an automated way to re-set all my request
> parameters in the ActionForm??? Do i have to go one by
> one for each ActionForm :-( ???
>
>
>  --- "Ruth, Brice" <[EMAIL PROTECTED]> escreveu:
> > Ensure that the request attributes are set in the
> > ActionForm, this is
> > the only way that you can ensure that they'll still
> > be there when the
> > validate fails.
> >
> > Leandro Melo wrote:
> >
> > >Hi,
> > >when a user request hits the ActionForm's validate
> > >method and bounces back, i'm loosing some request
> > >attributes that i had set for the page. In other
> > >words, if the user inputs some data that don't pass
> > >the validate method,
> > >the page comes back with a few request scope
> > >attributes missing.
> > >
> > >Is there a way to avoid that this happens?
> > >
> > >=
> > >_
> > >Leandro Terra C. Melo
> > >Eng. de Controle e Automação - UFMG
> > >
> > >
> > >
> > >
> > >
> >
> >___
> > >Yahoo! Acesso Grátis - navegue de graça com conexão
> > de qualidade! Acesse: http://br.acesso.yahoo.com/
> > >
> >
> >-
> > >To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > >For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > --
> > Brice Ruth, Sr. IT Analyst
> > Fiskars Brands Inc
> > http://www.fiskarsbrands.com/
> >
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
> =
>
>
>
>
>
>
> ___
> Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: 
> http://br.acesso.yahoo.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: HTML question

2004-08-12 Thread Robert Taylor
Start here:
http://www.htmlhelp.org/faq/html/

BTW, I found this using Google.
http://groups.google.com/groups?q=HTML+&ie=UTF-8&hl=en&btnG=Google+Search

You may want to search Google Groups to find an answer to your HTML question.

robert

> -Original Message-
> From: Erez Efrati [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 12, 2004 1:16 PM
> To: 'Struts Users Mailing List'
> Subject: HTML question
> 
> 
> Hi,
>  
> I am looking for a good place / group to place a small HTML question.
>  
> Can someone point me to such?
>  
> Thanks,
>  
> Erez
>  
> 

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



RE: I suspect this is a bad idea...so what's a better one?

2004-08-09 Thread Robert Taylor
Joe, you could move your business logic to a service layer which
also leverages the Command pattern. You could have a base command
which did something similar as Craig has outlined.

public abstract class BaseCommand {

public void execute() throws Exception {

try {

 // set up transaction
 doExecute();

} catch (Exception e) {
 // abort transaction

} finally {

// clean up transaction
 
} 

 


  }

  // implement actual work here.
  public abstract void doExecute() throws Exception;


}


then

public class  MyCommand extends BaseCommand {


 public void doExecute() throws exception {

 // put business logic here


 }


}


in your action's execute method (be it DispatchAction, MappingDispatchAction, etc...)

public ActionForward execute(...) throws Exception {


  ActionForward forward = // get appropriate forward

  Command command = // get the appropriate command and initialize it 
  

   command.execute();



 return forward;

}



You might also check out the Spring framework. It allows you to declaratively demarcate
transaction boundries (similar to EJB). 

robert





> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 09, 2004 4:11 AM
> To: 'Struts Users Mailing List'
> Subject: RE: I suspect this is a bad idea...so what's a better one?
> 
> 
> Craig,
> 
> Thanks for the idea.
> 
> Only problem I see with this that I usually make my "real" actions some
> flavor of a DispatchAction, usually a MappingDispatchAction.
> 
> So to keep that type of functionality, it appears that I'd have to
> replicate a lot of the Struts dispatch/reflection logic inside of my
> abstract Action subclass. Calling super.execute() gets me that, but that
> is precisely what this concept seems to try to avoid. :-/
> 
> 
> 
> > -Original Message-
> 
> :snip:
> 
> > A useful design pattern for something like this is to create 
> > a common subclass for your actions that does the 
> > setup/teardown work in the
> > execute() method, and then delegates to the action-specific 
> > work in some other method.  For your scenario, it might look 
> > like this:
> > 
> > public abstract class BaseAction extends Action {
> > 
> > public ActionForward execute(...) throws Exception {
> > Persistence persistence = 
> > ActionHelper.getPersistenceObject(request);
> > try {
> > ActionForward forward = delegate(mapping, 
> > form, request, response, persistence);
> > } finally {
> > persistence.release)(;
> > }
> > }
> > 
> > protected abstract ActionForward 
> > delegate(ActionMapping mapping, ActionForm form,
> >   HttpServletRequest request, HttpServletResponse 
> > response, Persistence persistence)
> >   throws Exception;
> > 
> > }
> > 
> > Then, your real business logic is implemented in a delegate() 
> > method that is passed in for you, and you never have to 
> > remember to allocate and release the persistence object.
> > 
> > public class RealAction extends BaseAction {
> > 
> > protected ActionForward delegate(...) {
> > ... use the persistence object as needed ...
> > }
> > 
> > }
> > 
> > This is pretty close to what you've got now ... the key 
> > difference is that it uses a local variable instead of an 
> > instance variable to avoid sharing problems.  Also, because 
> > of the finally clause, it also ensures that the persistence 
> > object is cleaned up, even if the
> > delegate() method throws an exception.
> > 
> > Craig
> > 
> > -
> > 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: Problem setting nested bean properties on ActionForms

2004-08-06 Thread Robert Taylor
Ah ha! You need to change your 

What should happen is that when struts tag is passed the property name
webdav.url, it will access the webdav object and then since you
are using a nested expression, it will invoke getUrl() on the webdav object
which should return a string.


So try changing your form-property name attribute value to 'webdav' and see what 
happens.


Are you trying to prepropulate this field with some value and then allow
the user to override that value? If so, you should do this in the action
which is executed immediately prior to rendering the page. Then your 
html:text tag would look like:



robert




> -Original Message-
> From: Ricardo Gladwell [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 06, 2004 10:57 AM
> To: Struts Users Mailing List
> Subject: Re: Problem setting nested bean properties on ActionForms
> 
> 
> Hi Niall,
> 
> My form-bean definition is included below:
> 
>  name="configureForm"
> type="org.apache.struts.action.DynaActionForm">
>name="title"
>  type="java.lang.String"
>  />
>name="webdav.url"
>  type="java.lang.String"
>  />
> 
> 
> -- rg
> 
> Niall Pemberton wrote:
> > If you have
> > 
> >   
> > 
> > in your jsp, then Struts (using BeanUtils) will try and do a get("webdav")
> > on your DynaActionForm so that it can then call set("url") on the bean
> > returned from the get.
> > 
> > So when you say "I checked and the property setter method for the
> > DynaActionForm in the example I cited is being called and the 'webdav.url'
> > string is being passed as the property name" - this doesn't seem right to
> > me. If it is being called then its not the Struts form population mechanism
> > thats doing it.
> > 
> > I'm guessing that in your struts config for the DynaActionForm definition
> > you have a property called "webdav.url" - if so then maybe its the form
> > initializtion thats setting "webdav.url" to null. If this is the case then
> > its never going to work this way. You need a "webdav" property that is some
> > kind of bean and then a "url" property in that bean and you somehow need to
> > have that bean set up in your form before the population is done.
> > 
> > If I'm completely off base here then you need to post more information - how
> > about posting the form definition from your struts-config.xml.
> > 
> > Niall
> > 
> > - Original Message - 
> > From: "Ricardo Gladwell" <[EMAIL PROTECTED]>
> > To: "Jakarta Struts Users" <[EMAIL PROTECTED]>
> > Sent: Friday, August 06, 2004 2:02 PM
> > Subject: Problem setting nested bean properties on ActionForms
> > 
> > 
> > 
> >>Hi All,
> >>
> >>I'm having some problems with nested properties in Strust. Struts seems
> >>to loose property values when specifying nested bean properties in
> >>an action form. For example, the following fragment is an example of
> >>attempting to set a value in a view JSP:
> >>
> >>
> >>
> >>When Struts attempts to set the webdav.url nested bean property for,
> >>example, a DynaActionForm the value is passed as null to the action form
> >>setter method.
> >>
> >>In the documentation it clearly states that "the property attribute for
> >>the Struts-HTML tags accept simple, nested, and indexed expressions":
> >>
> >>
> > 
> > http://struts.apache.org/api/org/apache/struts/taglib/html/package-summary.html#package_description
> > 
> >>I checked and the property setter method for the DynaActionForm in the
> >>example I cited is being called and the 'webdav.url' string is being
> >>passed as the property name but the property value passed is 'null'
> >>despite the fact that I have entered a value. When I switch to using
> >>standard, non-nested property name values in the html:text tag the
> >>values are set correctly.
> >>
> >>Is this proper behaviour for Struts or is it some kind of bug?
> >>
> >>Kind regards...
> >>
> >>-- Ricardo
> >>
> >>-
> >>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: Problem setting nested bean properties on ActionForms

2004-08-06 Thread Robert Taylor
Thanks for the clarification Niall. I was under the impression that 
the tag had to be EL aware even in a container that supports EL.

robert

> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 06, 2004 10:17 AM
> To: Struts Users Mailing List
> Subject: Re: Problem setting nested bean properties on ActionForms
> 
> 
> Not if hes using a servlet container that supports el.
> 
> Niall
> 
> ----- Original Message - 
> From: "Robert Taylor" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, August 06, 2004 2:25 PM
> Subject: RE: Problem setting nested bean properties on ActionForms
> 
> 
> > Since you are using an EL construct in the value attribute
> > of the , you will need to import the
> > Struts html-el tag library so that the tag "knows" how
> > to extract information from the scoped attribute.
> >
> > robert
> >
> > > -Original Message-
> > > From: Ricardo Gladwell [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, August 06, 2004 9:03 AM
> > > To: Jakarta Struts Users
> > > Subject: Problem setting nested bean properties on ActionForms
> > >
> > >
> > > Hi All,
> > >
> > > I'm having some problems with nested properties in Strust. Struts seems
> > > to loose property values when specifying nested bean properties in
> > > an action form. For example, the following fragment is an example of
> > > attempting to set a value in a view JSP:
> > >
> > > 
> > >
> > > When Struts attempts to set the webdav.url nested bean property for,
> > > example, a DynaActionForm the value is passed as null to the action form
> > > setter method.
> > >
> > > In the documentation it clearly states that "the property attribute for
> > > the Struts-HTML tags accept simple, nested, and indexed expressions":
> > >
> > >
> http://struts.apache.org/api/org/apache/struts/taglib/html/package-summary.html#package_description
> > >
> > > I checked and the property setter method for the DynaActionForm in the
> > > example I cited is being called and the 'webdav.url' string is being
> > > passed as the property name but the property value passed is 'null'
> > > despite the fact that I have entered a value. When I switch to using
> > > standard, non-nested property name values in the html:text tag the
> > > values are set correctly.
> > >
> > > Is this proper behaviour for Struts or is it some kind of bug?
> > >
> > > Kind regards...
> > >
> > > -- Ricardo
> > >
> > > -
> > > 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: Problem setting nested bean properties on ActionForms

2004-08-06 Thread Robert Taylor
Just out of curiosity, does 
render a none null value?

robert

> -Original Message-
> From: Ricardo Gladwell [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 06, 2004 10:12 AM
> To: Struts Users Mailing List
> Subject: Re: Problem setting nested bean properties on ActionForms
> 
> 
> I'm already using the EL versions of the tag libraries and using other 
> EL expressions successfully in other parts of the application. The 
> example works successfully when I do not use a nested property in the 
> property attribute of the html:text tag so it would indicate that the EL 
> version of the taglibs are working successfully.
> 
> What is a puzzle is why is the setter method in the the DynaActionForm 
> being passed 'webdav.url' as the property name parameter, but 'null' as 
> the value name parameter?
> 
> -- 
> Ricardo Gladwell
> 
> Robert Taylor wrote:
> > Since you are using an EL construct in the value attribute
> > of the , you will need to import the
> > Struts html-el tag library so that the tag "knows" how
> > to extract information from the scoped attribute.
> > 
> > robert
> > 
> >>-Original Message-
> >>From: Ricardo Gladwell [mailto:[EMAIL PROTECTED]
> >>Sent: Friday, August 06, 2004 9:03 AM
> >>To: Jakarta Struts Users
> >>Subject: Problem setting nested bean properties on ActionForms
> >>
> >>
> >>Hi All,
> >>
> >>I'm having some problems with nested properties in Strust. Struts seems
> >>to loose property values when specifying nested bean properties in
> >>an action form. For example, the following fragment is an example of
> >>attempting to set a value in a view JSP:
> >>
> >>
> >>
> >>When Struts attempts to set the webdav.url nested bean property for,
> >>example, a DynaActionForm the value is passed as null to the action form
> >>setter method.
> >>
> >>In the documentation it clearly states that "the property attribute for
> >>the Struts-HTML tags accept simple, nested, and indexed expressions":
> >>
> >>http://struts.apache.org/api/org/apache/struts/taglib/html/package-summary.html#package_description
> >>
> >>I checked and the property setter method for the DynaActionForm in the
> >>example I cited is being called and the 'webdav.url' string is being
> >>passed as the property name but the property value passed is 'null'
> >>despite the fact that I have entered a value. When I switch to using
> >>standard, non-nested property name values in the html:text tag the
> >>values are set correctly.
> >>
> >>Is this proper behaviour for Struts or is it some kind of bug?
> >>
> >>Kind regards...
> >>
> >>-- Ricardo
> 
> -
> 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: Problem setting nested bean properties on ActionForms

2004-08-06 Thread Robert Taylor
Since you are using an EL construct in the value attribute
of the , you will need to import the
Struts html-el tag library so that the tag "knows" how
to extract information from the scoped attribute.

robert

> -Original Message-
> From: Ricardo Gladwell [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 06, 2004 9:03 AM
> To: Jakarta Struts Users
> Subject: Problem setting nested bean properties on ActionForms
> 
> 
> Hi All,
> 
> I'm having some problems with nested properties in Strust. Struts seems
> to loose property values when specifying nested bean properties in
> an action form. For example, the following fragment is an example of
> attempting to set a value in a view JSP:
> 
> 
> 
> When Struts attempts to set the webdav.url nested bean property for,
> example, a DynaActionForm the value is passed as null to the action form
> setter method.
> 
> In the documentation it clearly states that "the property attribute for
> the Struts-HTML tags accept simple, nested, and indexed expressions":
> 
> http://struts.apache.org/api/org/apache/struts/taglib/html/package-summary.html#package_description
> 
> I checked and the property setter method for the DynaActionForm in the
> example I cited is being called and the 'webdav.url' string is being
> passed as the property name but the property value passed is 'null'
> despite the fact that I have entered a value. When I switch to using
> standard, non-nested property name values in the html:text tag the
> values are set correctly.
> 
> Is this proper behaviour for Struts or is it some kind of bug?
> 
> Kind regards...
> 
> -- Ricardo
> 
> -
> 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: Display collection size with jstl

2004-07-31 Thread Robert Taylor
Linus, this question belongs on the JSTL mailing list.
The answer can also be found in the JSLT 1.1 (mr) specification
section 15.8. 



robert

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Linus Nikander
> Sent: Saturday, July 31, 2004 8:39 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: Display collection size with jstl
> 
> 
> How do I output the size of a collection whilst NOT in a loop ?
> 
> I've tried all the
> 
> 
> 
> 
> variations I can think of but it doesn't seem to work.
> 
> Do I have to use a loop-structure to get at the size ? or do I have to bind
> the collection to a page-variable before I can get the size ? Or is there a
> syntax for getting it directly ?
> 
> The variable I'm trying to access is in session-scope
> 
> /Linus Nikander
> 
> 
> 
> 
> -
> 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: DynaActionForm and ArrayList : IndexOutOfBoundsException

2004-07-27 Thread Robert Taylor
This problem has been discussed many times on this list.
I recommend you search the archives.

In the mean time, have a look at using a lazy list.

http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/ListUtils.html#lazyList(java.ut
il.List,%20org.apache.commons.collections.Factory)

You can place the lazy list invocation in the forms reset() so
that a new lazy list gets created upon each call to reset().

In short the lazy list will use a designated factory to create
an object an populate a list whose indexed location is null.


There are other solutions as well.

hth,

robert

> -Original Message-
> From: jean michel corne [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 27, 2004 4:23 AM
> To: [EMAIL PROTECTED]
> Subject: DynaActionForm and ArrayList : IndexOutOfBoundsException
>
>
> Hi Struts users,
>
> I have tried to use ArrayList in the DynaActionForm with Struts 1.1.
>
> Before the action is processed (processActionForm), I got an error:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> java.util.ArrayList.RangeCheck(ArrayList.java:507)
> java.util.ArrayList.get(ArrayList.java:324)
> org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:298)
> 
> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:474)
> 
> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)
> 
> org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:770)
> 
> org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
> org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
> org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
> 
> org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>
>
> struts-config.xml :
> 
>  Configuration 1.1//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
>
> 
> 
>   
>type="org.apache.struts.validator.DynaValidatorForm">
>  />
> 
> 
> 
>
> 
> 
>
> 
> 
> 
> 
> 
> 
>
> 
> 
> input="/calendar.jsp"
>  name="CalendarForm"
>  path="/ViewCalendar"
>  scope="request"
>  type="fr.sipe.test.actions.ViewCalendarAction" >
>  
>   
>
>  path="/generateBeanPOForm"
>   input="/purchaseOrderBean.jsp"
> type="fr.sipe.test.actions.GenerateBeanPOForm"
>   name="purchaseOrderBeanForm"
>   scope="request" >
>   
> 
>
>  path="/generateBeanPO"
> type="fr.sipe.test.actions.GenerateBeanPO"
>   name="purchaseOrderBeanForm"
>   scope="request"
>   input="/purchaseOrderBean.jsp">
>redirect="false"/>
> 
> 
>
>   
>
>  contentType="text/html"/>
> 
>
>
>
> I'ved download the source code and traced the calls. The method that returns this 
> error is located in the class
> BeanUtils.setProperty(Object bean, String name, Object value)
> At the call:target = PropertyUtils.getProperty(bean, 
> name.substring(0, delim));
>
> The bean is created but the size of the ArrayList is 0, so when calling the first 
> property at indexed 0, I got an error.
>
> Do you have any idea how to solve this problem (without using POJO array like 
> myBean[])?
>
> Thanks for your help
> Jean-Michel
>
>


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



RE: Form Bean and decions based on Business Logic calls

2004-07-24 Thread Robert Taylor
The information which exists in the query string is just string values.
The correpsonding parameter names can be defined in the form.
When invoked, Struts will populate the form and pass it on to the action
class. The action class extracts the values from the form and passes them
to the business logic. The business logic does its thing and returns some
values to the action class. The action class then uses these values to 
decide where to send the user.

robert

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Muhammad Momin Rashid
> Sent: Saturday, July 24, 2004 7:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Form Bean and decions based on Business Logic calls
> 
> 
> Ok, I guess thats fair enough to keep business logic calls limited to action
> classes only.
> 
> How do you suggest I impliemnt the case where the user is supposed to
> directly land on a URL, and some information from business logic is
> required.
> 
> e.g the case where user clicks on a forgot password email sent to him/her.
> Here the information embeded in the URL needs to be sent to the Business
> Logic for processing.  Based on information returned by the Business Logic
> the user is allowed to proceed to reset password or not.
> 
> Regards,
> Muhammad Momin Rashid
> 
> "Robert Taylor" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > As Jim already mentioned, its best to keep the form beans as simple as
> possible
> > and void of logic.
> >
> > Place calls to business logic or delegates in the action class.
> >
> > robert
> >
> > > -Original Message-
> > > From: news [mailto:[EMAIL PROTECTED] Behalf Of Muhammad Momin Rashid
> > > Sent: Thursday, July 22, 2004 12:30 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Form Bean and decions based on Business Logic calls
> > >
> > >
> > > Thank you for your quick response.
> > >
> > > I do have the appropriate action class with the desired forwards defined
> (as
> > > you have also outlined), but the problem is that the form bean itself is
> > > making the business logic calls to get its desired data.  Upon failure
> to
> > > get the desired data, how can I forward to a different page?  Keeping in
> > > mind that the decision to forward to an failure action is to be done
> within
> > > the Form Bean here.
> > >
> > > I am also interested in knowing if this is the correct approach to have
> the
> > > form bean make such calls.  If not, then kindly suggest a better
> > > implementation.
> > >
> > > Regards,
> > > Muhammad Momin Rashid.
> > >
> > > "Robert Taylor" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > Define success and failure forwards in your struts-config file for the
> > > > specified action.
> > > >
> > > > In the action class (which should delegate to a business object),
> > > > retrieve the data. Upon failure, forward to the "failure" forward,
> > > > else forward to the "success" forward.
> > > >
> > > > You could achieve the same using declarative exceptions.
> > > >
> > > > If the list of countries doesn't vary between users, you
> > > > can do this when your application starts up and place the
> > > > country list in ServletContext. In this fashion, you only
> > > > have a single database hit for getting the countries.
> > > >
> > > > robert
> > > >
> > > > > -Original Message-
> > > > > From: news [mailto:[EMAIL PROTECTED] Behalf Of Muhammad Momin
> Rashid
> > > > > Sent: Thursday, July 22, 2004 10:38 AM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: Form Bean and decions based on Business Logic calls
> > > > >
> > > > >
> > > > > Hello,
> > > > >
> > > > > I have a form bean which needs to retrieve some information from the
> > > > > business logic.  I want to know how I can redirect to different
> pages on
> > > the
> > > > > bases of data retrieved.
> > > > >
> > > > > e.g. I need to retrieve and display a list of countries for the user
> to
> > > > > select from.  In case of failure to retrieve the information I would
> > > like to
> > > > > take user to a different page to indicate error.
> > > > >
&g

RE: Form Bean and decions based on Business Logic calls

2004-07-22 Thread Robert Taylor
As Jim already mentioned, its best to keep the form beans as simple as possible
and void of logic. 

Place calls to business logic or delegates in the action class.

robert

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Muhammad Momin Rashid
> Sent: Thursday, July 22, 2004 12:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Form Bean and decions based on Business Logic calls
> 
> 
> Thank you for your quick response.
> 
> I do have the appropriate action class with the desired forwards defined (as
> you have also outlined), but the problem is that the form bean itself is
> making the business logic calls to get its desired data.  Upon failure to
> get the desired data, how can I forward to a different page?  Keeping in
> mind that the decision to forward to an failure action is to be done within
> the Form Bean here.
> 
> I am also interested in knowing if this is the correct approach to have the
> form bean make such calls.  If not, then kindly suggest a better
> implementation.
> 
> Regards,
> Muhammad Momin Rashid.
> 
> "Robert Taylor" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Define success and failure forwards in your struts-config file for the
> > specified action.
> >
> > In the action class (which should delegate to a business object),
> > retrieve the data. Upon failure, forward to the "failure" forward,
> > else forward to the "success" forward.
> >
> > You could achieve the same using declarative exceptions.
> >
> > If the list of countries doesn't vary between users, you
> > can do this when your application starts up and place the
> > country list in ServletContext. In this fashion, you only
> > have a single database hit for getting the countries.
> >
> > robert
> >
> > > -Original Message-
> > > From: news [mailto:[EMAIL PROTECTED] Behalf Of Muhammad Momin Rashid
> > > Sent: Thursday, July 22, 2004 10:38 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Form Bean and decions based on Business Logic calls
> > >
> > >
> > > Hello,
> > >
> > > I have a form bean which needs to retrieve some information from the
> > > business logic.  I want to know how I can redirect to different pages on
> the
> > > bases of data retrieved.
> > >
> > > e.g. I need to retrieve and display a list of countries for the user to
> > > select from.  In case of failure to retrieve the information I would
> like to
> > > take user to a different page to indicate error.
> > >
> > > What would be the best way to accomplish this?  I am using struts 1.1
> with
> > > Tiles.
> > >
> > > Regards,
> > > Muhammad Momin Rashid
> > >
> > >
> > >
> > >
> > > -
> > > 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: parameterizing action attribute to html:form

2004-07-22 Thread Robert Taylor
Are you including the html-el tag library in the page?

robert

> -Original Message-
> From: Sergey Livanov [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 22, 2004 12:03 PM
> To: Struts Mailing List
> Subject: parameterizing action attribute to html:form
> 
> 
> Please advise me,
> 
> I try to set html:form action= parameter.
> 
> In my action :
>   request.setAttribute( "action", MyBean )
>   
> JSP:
> 
>   
>   
>   
>   OR
> 
>   
>   
>   
> 
> After this I've got an error
> Cannot retrieve mapping for action /${formaction}'
> 
> What's wrong?
> 
> -- 
> regards
>  Sergey  mailto:[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: parameterizing action attribute to html:form

2004-07-22 Thread Robert Taylor
You have to use the Struts-EL tag library for this to work with EL.

robert

> -Original Message-
> From: Sergey Livanov [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 22, 2004 12:03 PM
> To: Struts Mailing List
> Subject: parameterizing action attribute to html:form
> 
> 
> Please advise me,
> 
> I try to set html:form action= parameter.
> 
> In my action :
>   request.setAttribute( "action", MyBean )
>   
> JSP:
> 
>   
>   
>   
>   OR
> 
>   
>   
>   
> 
> After this I've got an error
> Cannot retrieve mapping for action /${formaction}'
> 
> What's wrong?
> 
> -- 
> regards
>  Sergey  mailto:[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: Form Bean and decions based on Business Logic calls

2004-07-22 Thread Robert Taylor
Define success and failure forwards in your struts-config file for the
specified action.

In the action class (which should delegate to a business object), 
retrieve the data. Upon failure, forward to the "failure" forward,
else forward to the "success" forward.

You could achieve the same using declarative exceptions.

If the list of countries doesn't vary between users, you
can do this when your application starts up and place the
country list in ServletContext. In this fashion, you only
have a single database hit for getting the countries.

robert

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Muhammad Momin Rashid
> Sent: Thursday, July 22, 2004 10:38 AM
> To: [EMAIL PROTECTED]
> Subject: Form Bean and decions based on Business Logic calls
> 
> 
> Hello,
> 
> I have a form bean which needs to retrieve some information from the
> business logic.  I want to know how I can redirect to different pages on the
> bases of data retrieved.
> 
> e.g. I need to retrieve and display a list of countries for the user to
> select from.  In case of failure to retrieve the information I would like to
> take user to a different page to indicate error.
> 
> What would be the best way to accomplish this?  I am using struts 1.1 with
> Tiles.
> 
> Regards,
> Muhammad Momin Rashid
> 
> 
> 
> 
> -
> 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: coupla easy (I hope) beginner questions

2004-07-22 Thread Robert Taylor
I'm no guru, but


You can put the appropriate HTML stuff in, but
the basics are as follows:





Sorry, can't help you with your second question :(

robert

> -Original Message-
> From: Tim Cross [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 22, 2004 9:22 AM
> To: [EMAIL PROTECTED]
> Subject: coupla easy (I hope) beginner questions
> 
> 
> Hail gurus!
> 
> I've got a jsp page taking a session-context Collection
> of forms and displaying it, and I'm trying to add
> a delete and an edit link or form on a per-row basis.
> Seems like a pretty obvious thing, right? Based on
> a tip from this list, I tried the following, after
> considerable screwing around with other variants.
> 
> The jsp code looks (right now, formatting stripped out) like:
> 
> ### SNIPPET
> 
> 
> 
> 
> 
>  property="id"/>
>page="deleteContact.do?id=${eltId}">Delete Contact
> 
> 
> 
> ...
> ### !SNIPPET
> 
> and the generated HTML looks (right now, formatting stripped out) like:
> 
> ### SNIPPET
> 
> 
> 
> e682d6b47f0101616dd681dc2378
> Delete Contact
> 
> mr
> tim
> ...
> ### !SNIPPET
> 
> The first beginner question (I've been working in C and SQL and
> POJO Java for many years, but I'm very green at all this Web/app server
> stuff): How do I get the eltId from the bean:define into the param
> for deleteContact.do?
> 
> Obviously, with JSTL's c:set, right? Which brings us to the second
> beginner question: Has anybody been able to use JSTL in an Eclipse 3.0/
> JBoss 3.2.3/JBoss IDE environment? I locate the jars and TLD files
> correctly and include the TLDs in web.xml (via taglibs.xml) correctly,
> but on deployment of the EAR I get a error along the lines of:
> 
> Document root element "taglib", must match DOCTYPE root "null"
> 
> about the c.tld file itself (and similarly for all the other JSTL
> tag files). I read something on the web about hacking my web.xml
> file to be 2.4 instead of 2.3 (and some other stuff you have to
> do to the web.xml DOCTYPE declaration). Since web.xml is completely
> generated in this environment, that's not a real fix, but I tried it
> anyway, and the results were the same. I've tried this will all of
> c.tld, c-1_0.tld and c-1_0-rt.tld. Anyone? Anyone? Bueller?
> 
> Many thanks to anyone who can smarten up this chump.
> 
> Tim
> [EMAIL PROTECTED]
> www.cinedavis.com
> Dresden, Germany
> 
> 
> 
> 
> -
> 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: About Struts + JBoss preference issue

2004-07-22 Thread Robert Taylor
This approach sounds similar to the Spring IoC framework.
Objects are defined in an xml file and a manager loads them
into memory. Your action class looks up beans using something
like:

MyBD bd = (MyBD)applicationContext.getBean("MyBD");

So you don't have to implement the ServiceLocator or
Singleton patterns. 

It provides declarative transaction services as well.

Check it out here:
http://www.springframework.org/

robert

> -Original Message-
> From: HG [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 22, 2004 5:22 AM
> To: Struts Users Mailing List
> Subject: Re: About Struts + JBoss preference issue
> 
> 
> Hi Marco
> 
> > I have  questions coz I m interested in that approach..
> 
> I am happy that you find it interesting :-)
> 
> > I assume u have a config file for telling the PlugIn Mgr what
> > To load, correct?
> 
> The plugins, names and classed that implement the plugin interface are
> stored in a table in a database.
> When the pluginmanager initializes, it performs a query on the database,
> fetching the plugins to load.
> 
> Then the PluginManager iterates the found plugin and performs this sequence
> in each interation
> 
> - Load the class (implementing the plugin interface) and get an instance of
> it.
> - initialize the plugin (performing lookup of remote home through
> ServiceLocator and creating remote object (Facade) to associate with the
> plugin.
> 
> But it could easily be a XML file, or anything else
> 
> > U use the PlugInMgr as singleton, correct? Coz right now I m following
> > Similar 'approach' but I m storing the BD in the ServletContext, and
> > what
> > I don't like much is that every time I have to retrieve it, I have to
> > Do a cast
> 
> The plugin manager is stored in ServletContext, and I have a base class
> (PluginManagerAction) for my action, which have a method with the following
> signature
> 
> public PluginManager getPluginManager();
> 
> In my action which derives from PluginManagerAction I do this:
> 
> MyPluginInterface plugin = (MyPluginInterface)
> getPluginManager().getPlugin("myplugin");
> 
> I have to type cast the interface because getPluginManager() return the
> superclass interface Plugin
> 
> No I am ready to invoke methods of the plugin.
> 
> What is it you don't like, when doing type casts...?
> 
> Regards
> 
> Henrik
> 
> 
> 
> -
> 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: JSF vs Struts - Development Process Questions

2004-07-19 Thread Robert Taylor
>  If you'd like to see some leading edge Flash, turn up your sound and go to
> http://www.2advanced.com/
That's some pretty cool stuff!

robert

> -Original Message-
> From: Mike Duffy [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 19, 2004 12:58 PM
> To: Struts Users Mailing List
> Subject: Re: JSF vs Struts - Development Process Questions
> 
> 
> I have some questions regarding the development process when using JSF, especially 
> in realtion to
> HTML designers.  Will everyone on the team need the same advanced design tools?  
> Will the
> designers who are used to tweaking HTML/JSP be restricted to a completely visual 
> drag and drop
> environment? Or even worse, will the HTML designers be required to learn JSF mark up 
> code? 
> 
> There was another thread a few weeks ago relating to the general development 
> process.  Like many
> others, we have gotten used to the process where the HTML designers mock up a page 
> and then a
> software engineer transition the page to a JSP and wires it into our system (using 
> Struts, and
> JSTL).  What is the vision for the development process in JSF?
> 
> Also, what is the ultimate vision for JSF?  Do you invision a IDE that can create 
> interfaces on
> the same level as Flash?  A question asked earlier in this thread:  Will JSF 
> integrate with Flash
> forms?  It would be cool to have one integrated development system that could do it 
> all.
> 
> This thread was started with the question, "If you were starting a project today, 
> what would you
> use, Struts or JSF?"  My answer is, I would use Struts with JSTL and I would 
> purchase the new
> Eclipse based IDE, NitroX (http://www.m7.com/).  We purchased licenses for NitroX 
> after our CTO
> came back from JavaOne.  It looks like the creative people at M7 have done a lot of 
> things right;
> they even have planned support for JSF.  NitroX may very well evolve into the IDE 
> that can do it
> all.  The best thing about NitroX is that it will enable a transition from Struts to 
> JSF if you
> decide to go that route.  The main reason I would choose Struts/JSTL over JSF is 
> that it works
> well within the existing skill sets of most developers and designers.
> 
> I would keep an open mind regarding JSF, especially in regard to high level 
> components that are
> not easily created using JSP/JSTL.  This is the area where JSF could win the game. 
> 
> In the near term, my guess is that the really cool advanced interfaces are going to 
> require Flash.
>  If you'd like to see some leading edge Flash, turn up your sound and go to
> http://www.2advanced.com/
> 
> Mike
> 
> 
> 
> --- Michael McGrady <[EMAIL PROTECTED]> wrote:
> > At 01:01 AM 7/19/2004, you wrote:
> > >The custom tags that Struts provides (in the html and logic and bean
> > >tag libraries) were a necessary precursor to "out of the box" usage of
> > >Struts, in order to make it possible to adopt the basic MVC
> > >architectural pattenrs.  However, that was *always* a secondary
> > >feature in the original vision -- the important part was separation of
> > >the view tier logic from the business tier logic.
> > >
> > >Craig McClanahan
> > >(Original creator of the Struts framework)
> > 
> > 
> > As an original historical matter, it would be hubris of the highest variety 
> > to question you on this, Craig.  As a historical consequence, however, I 
> > for one think that this turned out to be the more revolutionary result of 
> > struts, leading coding into taglibs in a way not seen before.  The 
> > controller and MVC (of sorts) pattern in Struts existed in all sorts of 
> > forms prior to Struts.  Struts did it better than most, maybe better than 
> > all the rest, and provided a standard that people could code to.  But, 
> > those tags were just a big surprise in the way they hit the market.  I, for 
> > one, now code tags as readily as I code classes.  Not as many, of course, 
> > but they are a definite weapon in my quiver.  A big reason for that is that 
> > I could code using Struts taglib code as a learning and doing mechanism 
> > together.  Blah, blah, blah.  This is not meant to be particularly 
> > profound.  But I did want to give this boost to the tags in Struts.  I 
> > think they have been very important to Java.
> > 
> > Michael
> > 
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
>   
> __
> Do you Yahoo!?
> Vote for the stars of Yahoo!'s next ad campaign!
> http://advision.webevents.yahoo.com/yahoo/votelifeengine/
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

RE: outputting mysql (or any other database) error in jsp

2004-07-17 Thread Robert Taylor
One strategy is to wrap the SQLException thrown by mySQL
in a meaningful ApplicationException which can be caught in your action class
or declarative exception handling mechanism and "interpretted"
into the appropriate client error message which can be placed
in the appropriate scope (request or session) which can in turn
be rendered in the .jsp page.

robert

> -Original Message-
> From: Research labs [mailto:[EMAIL PROTECTED]
> Sent: Saturday, July 17, 2004 8:27 AM
> To: Struts Users Mailing List
> Subject: outputting mysql (or any other database) error in jsp
> 
> 
> Can anyone please tell me the best way to get a
> database error into my java code so that I can output
> the database error in a JSP etc.
> 
> My key problem is how to pass the database error to my
> Java code.  
> 
> Thank you.
> 
> Ola.
> 
> 
>   
>   
>   
> ___ALL-NEW Yahoo! Messenger 
> - so many all-new ways to express 
> yourself http://uk.messenger.yahoo.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: how to use dynamic values in html:radio

2004-07-14 Thread Robert Taylor
Yes, you should. Otherwise, the  doesn't 
"know" how to digest ${bean.prop} expression. 


robert

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of ron1
> Sent: Wednesday, July 14, 2004 12:04 PM
> To: [EMAIL PROTECTED]
> Subject: Re: how to use dynamic values in html:radio
> 
> 
> I'm not using EL, should I ?
> there is no raw HTML because the html:radio tag does not digest the 
> ${bean.prop} expression.
> Cheers,
> Ron
> 
> 
> Robert Taylor wrote:
> > Can you be more descriptive as to what doesn't work?
> > Are you including the Struts-EL taglib?
> > What does the raw HTML look like?
> > Is there a stack trace?
> > 
> > robert
> > 
> > 
> > 
> >>-Original Message-
> >>From: ron piterman [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, July 14, 2004 11:45 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: how to use dynamic values in html:radio 
> >>
> >>
> >>Hi -
> >>I try to use html:radio inside an iterate. The values of the radios 
> >>should be dynamically read from the iterated bean.
> >>I am using
> >>
> >>
> >>...
> >>which does not work.
> >>Can some one please :-) tell me the right way to do this?
> >>Cheers,
> >>Ron
> >>
> >>
> >>-
> >>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: how to use dynamic values in html:radio

2004-07-14 Thread Robert Taylor
Can you be more descriptive as to what doesn't work?
Are you including the Struts-EL taglib?
What does the raw HTML look like?
Is there a stack trace?

robert


> -Original Message-
> From: ron piterman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 14, 2004 11:45 AM
> To: [EMAIL PROTECTED]
> Subject: how to use dynamic values in html:radio 
> 
> 
> Hi -
> I try to use html:radio inside an iterate. The values of the radios 
> should be dynamically read from the iterated bean.
> I am using
> 
> 
> ...
> which does not work.
> Can some one please :-) tell me the right way to do this?
> Cheers,
> Ron
> 
> 
> -
> 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 extract columnNames values

2004-07-13 Thread Robert Taylor
You might want to address the Hibernate mailing list
as this is not really a Struts question...or at the 
very least prepend the subject with [OT].

robert

> -Original Message-
> From: Indra Gunawan [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 11, 2004 2:27 AM
> To: 'Struts Users Mailing List'
> Subject: How to extract columnNames values
> 
> 
> Dear Hibernate Users,
> 
> I want to write a component or hopefully find one if there is any that can
> create a Swing table model based on query results . I could achieve this
> using resultset metadata (jdbc brute force way) . And I want to use
> Hibernate to do the same . 
> 
> But the difficulty is Hibernate uses POJO classes . Then one thing came up :
> reflection ... but I tend to not using it as reflection will consume
> processing time more . How can I extract column names and all values in it ?
> ... I do really hope Hibernate provides a method that will give Map object
> that wraps column names along with its values .
> 
> Thanks
> 
> Indra
> 
> -
> 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: Why Ajp13Connector.class is not found in tomcat-jk.jar inTomca 5.x but in Tomca 4.x

2004-07-10 Thread Robert Taylor
http://jakarta.apache.org/site/mail2.html#Tomcat

> -Original Message-
> From: ganesh gadi [mailto:[EMAIL PROTECTED]
> Sent: Saturday, July 10, 2004 6:31 AM
> To: Struts Users Mailing List
> Subject: Why Ajp13Connector.class is not found in tomcat-jk.jar inTomca
> 5.x but in Tomca 4.x
> 
> 
> 
> Hi List,
> 
> i'm using Tomcat 5.0.19 server.
> I need to connect Ajp13Connector through Tomcat 5.0.19
> 
> I configured in Tomcat.
> But while i'm running ,NoClassDefFoundException is getting.i.e.,Ajp13Connector.class 
> is not available in "tomcat-jk.jar"
> But the class is available in Tomcat 4.x in the same jar file(tomcat-jk.jar).
> Why didn't I find that file in Tomcat 5.x
> I redownload tomcat 5.x again but i got the same problem.
> Please give me the solution for that.
> awaiting for u reply.
> 
> Thanks
> Ganesh
> 
> 
>   
> -
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!

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



RE: [EVIL] Modifying a request parameter

2004-07-09 Thread Robert Taylor
LOL

> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 09, 2004 1:41 PM
> To: Struts Users Mailing List
> Subject: Re: [EVIL] Modifying a request parameter
> 
> 
> Jim Barrows wrote:
> 
> > Then of course there's the attribute oriented programming stuff that I like a 
> > lot put the configuration in the java 
> classes and have them generated... that puts everything back into one place again, 
> while keeping the ease of 
> configuration the technology promises.
> 
> 
> I can't wait to be able to just do this at the top of one java file:
> 
> /*
>   * @application  name="myApp" makewhen="NOW" generate="TheEntireThing"
>   requirements="readMindOfClient"
>   *
>   */
> 
> -- 
> Rick
> 
> -
> 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] Get Servlet Mapping at Runtime

2004-07-09 Thread Robert Taylor
I think you would have to define the mapping that exists in web.xml for that 
servlet in one of that servlets init parameters. I don't believe its explicitely
available through an API call. 

robert

> -Original Message-
> From: Hookom, Jacob [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 09, 2004 11:53 AM
> To: 'Struts Users Mailing List'
> Subject: [OT] Get Servlet Mapping at Runtime
> 
> 
> Hey all, does anyone have any ideas of how to get the Servlet mapping during
> runtime?  So if I were inside of a servlet, I want the mapping for it when
> handling the request.  I can't assert suffix parsing of the request URI.
> 
> Thanks for any ideas in advance :-)
> 
> 
> Jacob Hookom
> Senior Analyst/Programmer
> McKesson Medical-Surgical, Minnesota
> 
> 
> -
> 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: LookupDispatchAction and html:image

2004-07-09 Thread Robert Taylor
This may help, although its a modification of DispatchAction not LookupDispatchAction
http://issues.apache.org/bugzilla/show_bug.cgi?id=19925

robert

> -Original Message-
> From: Darryl Smith [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 09, 2004 11:22 AM
> To: Struts Users Mailing List
> Subject: LookupDispatchAction and html:image
> 
> 
> Has anyone got the two to work together?
> 
> -
> 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: ActionForward with runtime parameter?

2004-07-08 Thread Robert Taylor
You may also want to check out ParameterActionForward:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg96372.html

robert

> -Original Message-
> From: Twan Kogels [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 08, 2004 10:21 AM
> To: Struts Users Mailing List
> Subject: RE: ActionForward with runtime parameter?
> 
> 
> Hello,
> 
> Thanks for the replies! Yes, the parameter should be passed as a real 
> parameter. I tryed the setattribute/getattribute method but that resulted 
> in strange side effects. To remove the side effects more code lines we're 
> needed. I guess i'll stick to my new ActionForward method.
> 
> Cheers,
> Twan
> 
> At 14:32 08-7-2004, you wrote:
> >yeh. If you set it as an attribute and try to get it as a parameter your in
> >for some dissapointment ;-)
> >Doing it as an attribute would be ok though so long as its a non-redirecting
> >forward and the place you forward to knows to expect it as an attribute.
> >This does however mean you will also be passing along the baggage of all the
> >submitted request parameters for this page...
> >
> >In this case I think that its definately parameters that Twan is after, so
> >the new ActionForward technique is the way to go.
> >
> >-Original Message-
> >From: Geeta Ramani [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, 8 July 2004 20:21
> >To: Struts Users Mailing List
> >Subject: RE: ActionForward with runtime parameter?
> >
> >
> >Just a couple of small notes here though, (added for the Struts beginner):
> >you will be setting and getting a "attribute" not a "parameter". Also you
> >will need to set/get it as an Integer not an int..
> >
> >Geeta
> >
> > > -Original Message-
> > > From: Kailash Vasani [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, July 08, 2004 8:29 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: ActionForward with runtime parameter?
> > >
> > >
> > > Hi,
> > >
> > > Set id and it's value in request object and just forward to
> > > mapping.findForward("success").
> > > In ur target page (where u r forwarding), get the value for
> > > parameter (id)
> > > from request object.
> > >
> > > that should do the trick
> > >
> > > Kailash
> > >
> > >
> > > -Original Message-
> > > From: Twan Kogels [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, July 08, 2004 5:50 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: ActionForward with runtime parameter?
> > >
> > >
> > > Hello people,
> > >
> > > I've started my first project with struts. It's working fine,
> > > clean and
> > > quick. But i have a question regarding actionforwards and
> > > parameters to the
> > > path.
> > >
> > > I have a form; when the user submits the form i forward the
> > > user to another
> > > page. This page requires one parameter (?id=x) to function.
> > > Now i use a
> > > code like:
> > >
> > > return new
> > > ActionForward(mapping.findForward("success").getPath()+"?id="+
> > > glform.getGroe
> > > p());
> > >
> > > to forward and add a parameter. The forward "success"
> > > contains the url to
> > > the page without parameters (/page.do). I then append the
> > > "id=" parameter
> > > and create a new ActionForward.
> > >
> > > The value of the id= parameter is only known when the user
> > > submits the
> > > form. So i cannot put the id parameter in the struts-config.xml file.
> > >
> > > Is the above code the best and cleanest way to do the thing i
> > > want to do?
> > >
> > > Cheers,
> > > Twan Kogels
> > >
> > >
> > >
> > > -
> > > 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]
> 

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



RE: RE: Spring or Tapestry Framework

2004-07-07 Thread Robert Taylor
I got it (Expert one-on-one J2EE Design and Development) used on Amazon for
$8.50 including shipping. It arrived looking brand new.
He's got a new one coming out in November, "Professional Java Development
with the Spring Framework".

http://www.amazon.com/exec/obidos/tg/detail/-/0764574833/qid=1089232097/sr=1
-1/ref=sr_1_1/102-7637990-5760152?v=glance&s=books

robert
  -Original Message-
  From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 07, 2004 4:19 PM
  To: Struts Users Mailing List
  Subject: OT: RE: Spring or Tapestry Framework



  Also, I'm sure Rod's new book includes solutions that leverage Spring:
http://www.bookpool.com/.x/h9a6d8t7p6/ss/1?qs=EJB+without+J2EE&Go.x=0&Go.y=0
&Go=Go

  BTW, BookPool has this book at 50% off, saving 7.19 over Amazons price.
That's just crazy.

  Dennis



"Ricardo Cortes" <[EMAIL PROTECTED]>
07/07/2004 04:07 PM Please respond to
  "Struts Users Mailing List" <[EMAIL PROTECTED]>


   To "Struts Users Mailing List" <[EMAIL PROTECTED]>
  cc
  Subject RE: Spring or Tapestry Framework







  I'm not sure about Tapestry's integration with Hibernate but Spring
provides a good amount of integration with Hibernate out of the box.  Plus,
it's quite easy to get going with the examples they provide.

  Check out these URLs to get your feet wet:

  http://www-106.ibm.com/developerworks/library/j-hibern/


  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 07, 2004 3:53 PM
  To: [EMAIL PROTECTED]
  Subject: Spring or Tapestry Framework


  I'd like to thank both Robert and Jim for yesterdays help with my "Request
  bean is lost".
  After a small 30 Km bike ride I decided to go with the hidden field to
  track the First time the page is accessed.
  But I digress... Espresso time!

  I decided to start another discussion...
  I am in the process of converting a project using Hiberate and 
  Spring or Tapestry?

  TIA,
  Glenn


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




RE: Session facade

2004-07-07 Thread Robert Taylor
+1

I would also add that the Facade should be an interface where the 
implementation can change without affecting the client code.

I would also recommend looking at the Spring framework. It provides
declarative transaction management without using EJB.
I also provides a declarative way to "plug-in" interface implementations.

http://www.springframework.org/

robert


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 07, 2004 3:42 PM
> To: Struts Users Mailing List
> Subject: RE: Session facade
> 
> 
> my 2 cents...
> 
> I am using the Facade in my current project.
> 
> Firstly, just in case that EJBs will be introduced in subsequent phases.
> 
> Secondly, the DAO throws exceptions of DAOException & a FatalException.
> Say that a Stored Procedure returns an application error (invalid 
> parameter in a SP); this is treated as a DAOException.
> Say that the DB is not there this is treated as a FatalException.
> 
> The Facade catches and interprets the DAOException with a Return Code.
> Say that the DB is used to authenticate a User Id and Password.
> The Facade is where the DAOException to translated into a simple Return 
> Code that the Action will check for.
> 
> This a way the Action classes are nice a clean!
> - Glenn
> 
> 
> 
> 
> 
> "Ricardo Cortes" <[EMAIL PROTECTED]>
> 07/07/2004 03:28 PM
> Please respond to "Struts Users Mailing List"
> 
> 
> 
> 
>  
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc: 
> 
> Subject:RE: Session facade
>  Classification: 
> 
> 
> I would assert you don't need the Session Facade as one of the advantages 
> of the Session Facade is it's ability to abstract the low level operations 
> of the Session EJBs from upper layers of your architecture.  You could 
> probably have your actions talking to a Business Delegate layer or your 
> DAO layer directly.  Of course, this is just one viewpoint.
> 
> -Original Message-
> From: Zhang, Larry (L.) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 07, 2004 2:59 PM
> To: Struts Users Mailing List
> Subject: Session facade
> 
> 
> 
>  It seems session facade design pattern is becoming ubiquitous. My 
> question is that 
>  if we are not going to use EJB(but we do have DAO-data access object), 
> does it still make sense to use session facade?
> 
> 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]
> 
> 
> 
> 

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



RE: Request bean is lost

2004-07-06 Thread Robert Taylor
Since Struts forwards (not redirects) to the url defined in the input attribute upon
validation failure (assuming validate is set to true), then nothing
is lost in the request; and therefore the user input is not lost.

robert

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 06, 2004 4:04 PM
> To: Struts Users Mailing List
> Subject: RE: Request bean is lost
> 
> 
> My lists are specific to each user based on security attributes obtained 
> from the database.
> Therefore, the application scope solution is not acceptable for these 
> lists.
> 
> If I go the first solution route, then I have my 3 Lists as part of the 
> Form bean.
> The user selects from the list and submits the data.
> If I set the imput to /Page.do wouldn't I lose the user's input?
> 
> - Glenn
> 
> 
> 
> 
> 
> "Robert Taylor" <[EMAIL PROTECTED]>
> 06/07/2004 02:39 PM
> Please respond to "Struts Users Mailing List"
> 
> 
> 
> 
>  
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc: 
> 
> Subject:RE: Request bean is lost
>  Classification: 
> 
> 
> One solution is to point the input attribute value of the PageSubmit.do 
> action mapping
> to the Page.do action mapping thus re-retrieving the lists before 
> displaying the page.
> 
> An alternative solution is to override the reset() of your action form so 
> that it
> retrieves the lists from the database and places them in the appropriate 
> scope.
> 
> If the lists are composed of static data, you might consider retrieving 
> them on 
> application start up and placing them in application scope 
> (ServletContext) where
> they will be available to all requests and then there would be no need to 
> retrieve
> them each time the page is displayed.
> 
> robert
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 06, 2004 1:39 PM
> > To: [EMAIL PROTECTED]
> > Subject: Request bean is lost
> > 
> > 
> > Greetings,
> > 
> > I have an action Page.do that gets 3 lists from a database.
> > It then places the lists inside a bean which is set in the request.
> > The Page.jsp iterates thru the bean to display the data.
> > 
> > The form is posted to the PageSubmit.do.
> > But before the PageForm.validate() is executed.
> > Assume that an error is found...
> > The response is returned 
> > 
> > And this is where my bean is lost.
> > Why?
> > 
> > I do not want to store thr bean in the HTTP Session.
> > 
> > TIA,
> > Glenn.
> 
> -
> 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: Request bean is lost

2004-07-06 Thread Robert Taylor
Let me clarify the last statement:

Page.do will write over any input values to which it is
programmed to write. 

...more eloquently stated by Jim

"It shouldn't... unless you are overwriting those fields in page.do explicitly."

robert

> -Original Message-----
> From: Robert Taylor [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 06, 2004 4:37 PM
> To: Struts Users Mailing List
> Subject: RE: Request bean is lost
> 
> 
> Yes, it will write over any input values...
> 
> In this case, you might want to consider populating
> the lists in the forms.reset() as mentioned earlier.
> 
> ...not my prefered approach as it puts business logic
> in the form; its more of a work around.
> 
> 
> robert
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 06, 2004 4:23 PM
> > To: Struts Users Mailing List
> > Subject: RE: Request bean is lost
> > 
> > 
> > Umh...
> > Let me try to express myself more clearly!
> > 
> > Page.do
> > -
> > My Page.do obtains 3 lists from the DB based on the user's security 
> > attributes.
> > Default values are set for 2 of the lists such as month and year.
> > All of this is done in the Form Bean.
> > 
> > 
> > PageSubmit.do
> > ---
> > The user selects a diffierent month other than the default and submits the 
> > request to PageSubmit.do
> > 
> > The input for the PageSubmit.do mapping is /Page.do
> > So this means that all of the Page.do logic is done again?
> > Won't this overwrite what the user has entered?
> > 
> > 
> > 
> > 
> > 
> > 
> > "Jim Barrows" <[EMAIL PROTECTED]>
> > 06/07/2004 04:16 PM
> > Please respond to "Struts Users Mailing List"
> > 
> > 
> > 
> > 
> >  
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > cc: 
> > 
> > Subject:RE: Request bean is lost
> >  Classification: 
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, July 06, 2004 1:04 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Request bean is lost
> > > 
> > > 
> > > My lists are specific to each user based on security 
> > > attributes obtained 
> > > from the database.
> > > Therefore, the application scope solution is not acceptable for these 
> > > lists.
> > > 
> > > If I go the first solution route, then I have my 3 Lists as 
> > > part of the 
> > > Form bean.
> > > The user selects from the list and submits the data.
> > > If I set the imput to /Page.do wouldn't I lose the user's input?
> > 
> > No, the input param in struts-config.xml is expressly used for the case 
> > where validation fails.  So you 
> > won't lose anything.
> > 
> > > 
> > > - Glenn
> > > 
> > > 
> > > 
> > > 
> > > 
> > > "Robert Taylor" <[EMAIL PROTECTED]>
> > > 06/07/2004 02:39 PM
> > > Please respond to "Struts Users Mailing List"
> > > 
> > > 
> > > 
> > > 
> > > 
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > cc: 
> > > 
> > > Subject:RE: Request bean is lost
> > >  Classification: 
> > > 
> > > 
> > > One solution is to point the input attribute value of the 
> > > PageSubmit.do 
> > > action mapping
> > > to the Page.do action mapping thus re-retrieving the lists before 
> > > displaying the page.
> > > 
> > > An alternative solution is to override the reset() of your 
> > > action form so 
> > > that it
> > > retrieves the lists from the database and places them in the 
> > > appropriate 
> > > scope.
> > > 
> > > If the lists are composed of static data, you might consider 
> > > retrieving 
> > > them on 
> > > application start up and placing them in application scope 
> > > (ServletContext) where
> > > they will be available to all requests and then there would 
> > > be no need to 
> > > retrieve
> > > them each tim

RE: Request bean is lost

2004-07-06 Thread Robert Taylor
Yes, it will write over any input values...

In this case, you might want to consider populating
the lists in the forms.reset() as mentioned earlier.

...not my prefered approach as it puts business logic
in the form; its more of a work around.


robert

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 06, 2004 4:23 PM
> To: Struts Users Mailing List
> Subject: RE: Request bean is lost
> 
> 
> Umh...
> Let me try to express myself more clearly!
> 
> Page.do
> -
> My Page.do obtains 3 lists from the DB based on the user's security 
> attributes.
> Default values are set for 2 of the lists such as month and year.
> All of this is done in the Form Bean.
> 
> 
> PageSubmit.do
> ---
> The user selects a diffierent month other than the default and submits the 
> request to PageSubmit.do
> 
> The input for the PageSubmit.do mapping is /Page.do
> So this means that all of the Page.do logic is done again?
> Won't this overwrite what the user has entered?
> 
> 
> 
> 
> 
> 
> "Jim Barrows" <[EMAIL PROTECTED]>
> 06/07/2004 04:16 PM
> Please respond to "Struts Users Mailing List"
> 
> 
> 
> 
>  
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc: 
> 
> Subject:RE: Request bean is lost
>  Classification: 
> 
> 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 06, 2004 1:04 PM
> > To: Struts Users Mailing List
> > Subject: RE: Request bean is lost
> > 
> > 
> > My lists are specific to each user based on security 
> > attributes obtained 
> > from the database.
> > Therefore, the application scope solution is not acceptable for these 
> > lists.
> > 
> > If I go the first solution route, then I have my 3 Lists as 
> > part of the 
> > Form bean.
> > The user selects from the list and submits the data.
> > If I set the imput to /Page.do wouldn't I lose the user's input?
> 
> No, the input param in struts-config.xml is expressly used for the case 
> where validation fails.  So you 
> won't lose anything.
> 
> > 
> > - Glenn
> > 
> > 
> > 
> > 
> > 
> > "Robert Taylor" <[EMAIL PROTECTED]>
> > 06/07/2004 02:39 PM
> > Please respond to "Struts Users Mailing List"
> > 
> > 
> > 
> > 
> > 
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > cc: 
> > 
> > Subject:RE: Request bean is lost
> >  Classification: 
> > 
> > 
> > One solution is to point the input attribute value of the 
> > PageSubmit.do 
> > action mapping
> > to the Page.do action mapping thus re-retrieving the lists before 
> > displaying the page.
> > 
> > An alternative solution is to override the reset() of your 
> > action form so 
> > that it
> > retrieves the lists from the database and places them in the 
> > appropriate 
> > scope.
> > 
> > If the lists are composed of static data, you might consider 
> > retrieving 
> > them on 
> > application start up and placing them in application scope 
> > (ServletContext) where
> > they will be available to all requests and then there would 
> > be no need to 
> > retrieve
> > them each time the page is displayed.
> > 
> > robert
> > 
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, July 06, 2004 1:39 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Request bean is lost
> > > 
> > > 
> > > Greetings,
> > > 
> > > I have an action Page.do that gets 3 lists from a database.
> > > It then places the lists inside a bean which is set in the request.
> > > The Page.jsp iterates thru the bean to display the data.
> > > 
> > > The form is posted to the PageSubmit.do.
> > > But before the PageForm.validate() is executed.
> > > Assume that an error is found...
> > > The response is returned 
> > > 
> > > And this is where my bean is lost.
> > > Why?
> > > 
> > > I do not want to store thr bean in the HTTP Session.
> > > 
> > > TIA,
> > > Glenn.
> > 
> > -
> > 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: Submitting Indexed Properties and List Size/Resize

2004-07-06 Thread Robert Taylor
David, take a look at lazyList here:
http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/ListUtils.html

robert

> -Original Message-
> From: Ellingson, David [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 06, 2004 3:22 PM
> To: '[EMAIL PROTECTED]'
> Subject: Submitting Indexed Properties and List Size/Resize
> 
> 
> I wanted to verify whether I am understanding the best way to submit indexed
> properties to an ActionForm.
> 
> I was originally having problems with ArrayOutOfBoundsExceptions when
> submitting the Form, and, after some research, it looks like the framework
> is expecting the List to be prepopulated before it can be populated with the
> Request parameters.  While this can be done in the constructor, it seems the
> best way is to dynamically resize the collection in both the get and set
> index methods.  For example, if a get() is called for index 10, and records
> don't exist up to the 10th record, I can add the additional records up to
> the 10th element.  This works fine, but it seems a little awkward, so I
> wasn't sure if I am missing something here.  
> 
> Is this the best way to submit indexed properties to an ActionForm?
> 
> Thanks,
> Dave
> 
> -
> 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: Request bean is lost

2004-07-06 Thread Robert Taylor
One solution is to point the input attribute value of the PageSubmit.do action mapping
to the Page.do action mapping thus re-retrieving the lists before displaying the page.

An alternative solution is to override the reset() of your action form so that it
retrieves the lists from the database and places them in the appropriate scope.

If the lists are composed of static data, you might consider retrieving them on 
application start up and placing them in application scope (ServletContext) where
they will be available to all requests and then there would be no need to retrieve
them each time the page is displayed.

robert

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 06, 2004 1:39 PM
> To: [EMAIL PROTECTED]
> Subject: Request bean is lost
> 
> 
> Greetings,
> 
> I have an action Page.do that gets 3 lists from a database.
> It then places the lists inside a bean which is set in the request.
> The Page.jsp iterates thru the bean to display the data.
> 
> The form is posted to the PageSubmit.do.
> But before the PageForm.validate() is executed.
> Assume that an error is found...
> The response is returned 
> 
> And this is where my bean is lost.
> Why?
> 
> I do not want to store thr bean in the HTTP Session.
> 
> TIA,
> Glenn.

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



RE: [OT] Speaking of "gratuitously difficult".....

2004-07-06 Thread Robert Taylor
+1

> -Original Message-
> From: Bryan Hunt [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 06, 2004 11:37 AM
> To: Struts Users Mailing List
> Subject: Re: [OT] Speaking of "gratuitously difficult".
> 
> 
> Forget about it, the only way to do it without tearing your hair out is 
> to use ANT
> and XDoclet.
> 
> J2EE is all about "wasting time on stuff that should be simple".
> 
> My 2 c, unless you need session beans it is better to use tomcat as your 
> web container
> and hibernate for persistance.
> 
> Use the spring framework for flexibility in case you need to change your 
> mind later.
> 
> --b
> 
> Mike Duffy wrote:
> 
> >Speaking of "gratuitously difficult".
> >
> >Has anyone ever messed with the "deploytool" in J2EE?
> >
> >AHHGGG
> >
> >I just want to deploy a simple war file.  I googled around and I could not even 
> >find good
> >documentation (Sun or elsewhere).
> >
> >Does anyone know of a good plugin for Eclipse that creates war files?  I guess 
> >JBuilder has a good
> >war file creation utility.
> >
> >Basically, shouldn't I be able to jar up everything in a webapp directory as long 
> >as I add the
> >correct "deployment descripter"?  I could not find an example of doing this.
> >
> >Also, is it possible to create a war file that has a "context.xml" file?
> >
> >I hate wasting time on stuff that should be simple.
> >
> >Mike
> >
> >
> >
> >--- Craig McClanahan <[EMAIL PROTECTED]> wrote:
> >  
> >
> >>Bryan Hunt wrote:
> >>
> >>
> >>
> >>>I think someone in sun just wanted to create something fancy 
> >>>regardless of
> >>>what the customers wanted just so he/she could put it on their cv.
> >>>  
> >>>
> >>Anyone who thinks this is the real reason hasn't read the technology 
> >>export restriction regulations that apply to US companies.  The 
> >>restrictions apply to the geographic location of the downloader, and 
> >>don't have anything to do with sessions or trying to make it more 
> >>gratuitously difficult to use command line tools.
> >>
> >>Craig McClanahan
> >>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> > 
> >__
> >Do you Yahoo!?
> >Yahoo! Mail is new and improved - Check it out!
> >http://promotions.yahoo.com/new_mail
> >
> >-
> >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: javax.servlet.ServletException: Cannot find bean dblist in scope request

2004-07-06 Thread Robert Taylor
Okay. As I understand it, you have an action which retrieves information from the 
database
and places it in the request scope under the name "dblist" and then forwards to  page 
which should iterate over the list and render its contents.

The problem you are having is that the iterate tag cannot find a "dblist" in the 
request scope.


To start you could remove all the database access stuff in ListAction and place a 
dummy collection in request
scope and forward (not redirect) to the page which renders the data.

I would also print to a log file so that you can more easily debug the problem. It 
appears that you log an
error message to request scope and I assume something else uses that information. Try 
using Log4J or if nothing
else catch the exception and issue a printStackTrace().

I bet an exception is occurring but the error is not being reported for some reason.

robert

> -Original Message-
> From: AKEDJO Guy-Patrick [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 02, 2004 11:22 PM
> To: [EMAIL PROTECTED]
> Subject: javax.servlet.ServletException: Cannot find bean dblist in
> scope request
> 
> 
> I've been trying to solve that issue for 3 days now I went also to the Net trying to 
> find all information related to this 
> but no way. I tried everything I know and all I found out but the error still the 
> same.
> Can you help me please.
> Here are some information you need to check my code.
>  
> = The error message=
> javax.servlet.ServletException: Cannot find bean dblist in scope request
>  
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
>  
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
>  org.apache.jsp.form.list_jsp._jspService(list_jsp.java:129)
>  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
>  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> root cause 
> javax.servlet.jsp.JspException: Cannot find bean dblist in scope request
>  org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)
>  org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
>  org.apache.jsp.form.list_jsp._jspService(list_jsp.java:85)
>  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
>  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  
> Action class XML config
> 
> 
> 
> my Action class==
>  
> package com.youcompany.struts.action;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import com.youcompany.struts.bean.*;
> import javax.sql.*;
> import org.apache.struts.action.ActionError;
> import org.apache.struts.action.ActionErrors;
> import java.util.ArrayList;
> import java.util.Collection;
>  
> public class ListAction extends Action {
> // - Instance Variables
> // - Methods
> /** 
> * Method execute
> * @param ActionMapping mapping
> * @param ActionForm form
> * @param HttpServletRequest request
> * @param HttpServletResponse response
> * @return ActionForward
> * @throws Exception
> */
> public ActionForward execute(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws Exception {
> // throw new UnsupportedOperationException("Generated method 'execute(...)' not 
> implemented.");
>  
> // Get the datasource 
> ActionErrors errors = new ActionErrors();
> DatabaseDVDManager DAOdvd = new DatabaseDVDManager();
> DataSource dataSource = 
> (DataSource)servlet.getServletContext().getAttribute("org.apache.struts.action.DATA_SOURCE");
> Collection c = new ArrayList();
> 
> try {
> // connection
> DAOdvd.setDataSource(dataSource);
> c = DAOdvd.getAll();
>  
> 
> } catch (DAOException e) {
> // Message for the user:
> errors.add("label", new ActionError("error.listfailed"));
> saveErrors(request, errors);
> 
> // Logging the error:
> String message = "DVDs could not be listed";
> 
> // Save the chained exceptions:
> request.setAttri

RE: image submit and lookupDispatchAction - drives me struts

2004-07-02 Thread Robert Taylor
Well, yes, you could say:

Look for anything in the request that matches a pattern.
Then it has to iterate through all request parameters and execute
the matching algorithm on each parameter.

By defining a list of names to expect, then I'm performing a hash key
lookup on each element in a very small list.


robert

> -Original Message-
> From: Axel Groß [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 4:40 AM
> To: Struts Users Mailing List
> Subject: Re: image submit and lookupDispatchAction - drives me struts
>
>
> hi robert!
>
> that's really nicely written code.
> I'm not completely sure, why it does what i think it does though:
>  you limit, which methods should get called in the struts-config, right?
> (by specifying a list of the allowed buttonnames in the mapping)
>  then you check if there is a [buttonname].x in the request which fits, right?
> this indicates the button [buttonname] has been pressed so you dispatch to
> lookup with [buttonname] as lookup key
>
> so what is the intention for limiting the methods to the specified set?
>
> if i change it to ignore the dynamic part of the button name it should work
> for me; i should add some regexp lookup, maybe :)
>
> thanks,
> axel
>
> On 2004-06-28 at 12:00:22 -0400, Robert Taylor wrote:
> > This may help:
> >
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=19925
> >
> > robert
> >
> > > -Original Message-
> > > From: Axel Groß [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, June 28, 2004 11:52 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: image submit and lookupDispatchAction - drives me struts
> > >
> > >
> > > Hi Wendy thanks for the reply and the link!
> > >
> > > But unfortunately i can't see how to implement those solutions to my
> > >  problem (which I didn't describe elaborate enought)
> > >
> > > My button names are of dynamic nature like
> > >  DELETE_PROPERTY 'firstname'
> > > (here firstname is the key of the property to delete)
> > > so I can't use it for populating a bean. Or would using DynaBeans
> > > help in this case? I don't know, in which class the html requests are
> > > ~transformed to beans, so I'm not sure how it is handled.
> > >
> > > I rely would like to get rid of that horrible names.
> > >
> > > Javascript isn't feasible for this project.
> > > I suppose html 4.0 buttons could solve the problem, I'll try that. But
> > > relying on html 4.0 also doesn't sound too good. :(
> > >
> > > thanks again,
> > > Axel
> > >
> > > On 2004-06-25 at 09:12:07 -0700, Wendy Smoak wrote:
> > > > > From: Axel Groß [mailto:[EMAIL PROTECTED]
> > > > > so the html:submit buttons do work, but neither of the
> > > > > html:image buttons
> > > > > pass the parameter on and i get a null reference for
> > > > >  request.getParameter(parameter);
> > > > > (with parameter.equals("action"))
> > > > > the resulting error message is:
> > > > >  Request[/action/lookupDispatch] does not contain handler
> > > > > parameter named action
> > > > > anybody knows what could help?
> > > >
> > > > http://www.google.com/search?q=struts+image+button
> > > >
> > > > First hit:
> > > > http://www.jguru.com/faq/view.jsp?EID=893423
> > > > which discusses the use of the ImageButtonBean class.
> > > >
> > > > Or, my preferred solution is a bit of onClick JavaScript to set the form 
> > > > property and submit the form.  This only works
> > > in situations where where you can require that JavaScript be enabled.
> > > >
> > > > --
> > > > Wendy Smoak
> > > > Application Systems Analyst, Sr.
> > > > ASU IA Information Resources Management
> > > >
> > > > -
> > > > 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: Urgent help needed on struts!

2004-07-02 Thread Robert Taylor
You should be able to put the 
back.

As Mark already mentioned, after the document was parsed,
the container had conflicting information on which Servlet
spec it should follow.

robert

> -Original Message-
> From: Ding Lei [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 10:49 PM
> To: Struts Users Mailing List
> Subject: Re: Urgent help needed on struts!
> 
> 
> Hi,
> thank you very much !!!
> It works, after  I did everything you guys said ...
> I'm just not clear the reason why DOCTYPE & " cause the problem. Would you please tell me?
> 
> Thanks again.
> 
> 
> 
> Ding Lei
> 
> 
> 
> 
> On Thu, Jul 01, 2004 at 01:41:15PM -0400, Robert Taylor wrote:
> > Remove the doctype declaration:
> > 
> >  "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
> > 
> > 
> > and try the following for the root element:
> > 
> > http://java.sun.com/xml/ns/j2ee"; 
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> > version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > 
> > 
> > robert
> > 
> > > -Original Message-
> > > From: Ding Lei [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, July 01, 2004 12:44 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Urgent help needed on struts!
> > > 
> > > 
> > > Hello,
> > >   I'v searched all the recent 800 messages, and found no
> > > similiar messages .. 
> > > Would any one of you kindly tell me what might causes the problem?
> > > Thank you!
> > > 
> > > 
> > > 
> > >   Ding Lei
> > > 
> > > 
> > > On Thu, Jul 01, 2004 at 12:25:50PM -0400, Robert Taylor wrote:
> > > > There was a recent thread on this behavior although
> > > > I cannot recall the resolution. 
> > > > 
> > > > Please search the mail archives.
> > > > 
> > > > Also, make sure you have the appropriate .tld and .jar files
> > > > in place. Make sure you web.xml file corresponds to the 
> > > > containers supported Servlet spec. Make sure you have
> > > > imported the appropriate taglibs into the page.
> > > > 
> > > > robert
> > > > 
> > > > > -Original Message-
> > > > > From: Ding Lei [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, July 01, 2004 12:09 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: Urgent help needed on struts!
> > > > > 
> > > > > 
> > > > > Hi all,
> > > > >   I am using JBoss 3.2.4 with Struts 1.1  
> > > > >   All the actions are able to work correctly, but JSP pages
> > > > > shows the tag itself instead of it's content, for ex:
> > > > > The browser shows:
> > > > >   ${CardControl.cardType}
> > > > > instead of the actual content. I am sure that the JSP pages
> > > > > are correct, since several ago they are fine, and the only
> > > > > possible changes are configuration file or sth. else.
> > > > >   
> > > > >   Thanks!
> > > > > 
> > > > > 
> > > > >   
> > > > > Ding Lei
> > > > > 
> > > > > -
> > > > > 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]
> > > 
> > > -- 
> > > Yours,
> > > 
> > ><<<:   D i n gL e i   ::>>
> > >  ||  ||
> > >  || Ext: 8106||
> > >  || Email:||
> > >  || Dept. Of Technology/Engineering  ||
> > >  || Embedded Internet Solutions Inc. ||
> > >  ||  ||
> > > <((= )>>>
> > >   
> > >   Your home electrical system is basically a bunch of wires that
> > > bring electricity into your home and take if back out before it has a
> > > chance to

RE: What Is Wrong With This Tag?

2004-07-01 Thread Robert Taylor
You cannot embed tags as attribute values in other tags.

Assuming you are using Struts-EL tag library AND the container you
are using supports JSTL 1.1, then you can try the following:






This code is not tested.


robert

> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 3:50 PM
> To: [EMAIL PROTECTED]
> Subject: What Is Wrong With This  Tag?
> 
> 
> It seems that I have problems to get JSTL tags
> right
> 
>  test="${attachBean.attachMimeType.startsWith('image/')}">
>  
> 
> 
> error message:
> 
> 74: tag = 'if' / attribute = 'test': An error occurred
> while parsing custom action attribute "test" with
> value
> "${attachBean.attachMimeType.startsWith('image/')}":
> Encountered "(", expected one of ["}", ".", ">", "gt",
> "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=",
> "ne", "[", "+", "-", "*", "/", "div", "%", "mod",
> "and", "&&", "or", "||"] 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
> -
> 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: Urgent help needed on struts!

2004-07-01 Thread Robert Taylor
Remove the doctype declaration:

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>


and try the following for the root element:

http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>


robert

> -Original Message-
> From: Ding Lei [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 12:44 PM
> To: Struts Users Mailing List
> Subject: Re: Urgent help needed on struts!
> 
> 
> Hello,
>   I'v searched all the recent 800 messages, and found no
> similiar messages .. 
> Would any one of you kindly tell me what might causes the problem?
> Thank you!
> 
> 
> 
>   Ding Lei
> 
> 
> On Thu, Jul 01, 2004 at 12:25:50PM -0400, Robert Taylor wrote:
> > There was a recent thread on this behavior although
> > I cannot recall the resolution. 
> > 
> > Please search the mail archives.
> > 
> > Also, make sure you have the appropriate .tld and .jar files
> > in place. Make sure you web.xml file corresponds to the 
> > containers supported Servlet spec. Make sure you have
> > imported the appropriate taglibs into the page.
> > 
> > robert
> > 
> > > -Original Message-
> > > From: Ding Lei [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, July 01, 2004 12:09 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Urgent help needed on struts!
> > > 
> > > 
> > > Hi all,
> > >   I am using JBoss 3.2.4 with Struts 1.1  
> > >   All the actions are able to work correctly, but JSP pages
> > > shows the tag itself instead of it's content, for ex:
> > > The browser shows:
> > >   ${CardControl.cardType}
> > > instead of the actual content. I am sure that the JSP pages
> > > are correct, since several ago they are fine, and the only
> > > possible changes are configuration file or sth. else.
> > >   
> > >   Thanks!
> > > 
> > > 
> > >   
> > > Ding Lei
> > > 
> > > -
> > > 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]
> 
> -- 
> Yours,
> 
><<<:   D i n gL e i   ::>>
>  ||  ||
>  || Ext: 8106||
>  || Email:||
>  || Dept. Of Technology/Engineering  ||
>  || Embedded Internet Solutions Inc. ||
>  ||  ||
> <((= )>>>
>   
>   Your home electrical system is basically a bunch of wires that
> bring electricity into your home and take if back out before it has a
> chance to kill you.  This is called a "circuit".  The most common home
> electrical problem is when the circuit is broken by a "circuit
> breaker"; this causes the electricity to back up in one of the wires
> until it bursts out of an outlet in the form of sparks, which can
> damage your carpet.  The best way to avoid broken circuits is to change
> your fuses regularly.
>   Another common problem is that the lights flicker.  This
> sometimes means that your electrical system is inadequate, but more
> often it means that your home is possessed by demons, in which case
> you'll need to get a caulking gun and some caulking.  If you're not
> sure whether your house is possessed, see "The Amityville Horror", a
> fine documentary film based on an actual book.  Or call in a licensed
> electrician, who is trained to spot the signs of demonic possession,
> such as blood coming down the stairs, enormous cats on the dinette
> table, etc.
>   -- Dave Barry, "The Taming of the Screw"
> 
> -
> 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: Urgent help needed on struts!

2004-07-01 Thread Robert Taylor
There was a recent thread on this behavior although
I cannot recall the resolution. 

Please search the mail archives.

Also, make sure you have the appropriate .tld and .jar files
in place. Make sure you web.xml file corresponds to the 
containers supported Servlet spec. Make sure you have
imported the appropriate taglibs into the page.

robert

> -Original Message-
> From: Ding Lei [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 12:09 PM
> To: [EMAIL PROTECTED]
> Subject: Urgent help needed on struts!
> 
> 
> Hi all,
>   I am using JBoss 3.2.4 with Struts 1.1  
>   All the actions are able to work correctly, but JSP pages
> shows the tag itself instead of it's content, for ex:
> The browser shows:
>   ${CardControl.cardType}
> instead of the actual content. I am sure that the JSP pages
> are correct, since several ago they are fine, and the only
> possible changes are configuration file or sth. else.
>   
>   Thanks!
> 
> 
>   
> Ding Lei
> 
> -
> 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: getSession simultaneously

2004-07-01 Thread Robert Taylor
To isolate this problem, you should remove Struts from the equation and them perform 
the tests. For example create a simple web application with a servlet and access it
concurrently and see what happens. 

robert

> -Original Message-
> From: Mathieu Grimault [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 7:33 AM
> To: Struts Users Mailing List
> Subject: getSession simultaneously
> 
> 
> Hello everyone ! 
> 
> Did someone had a problem with simultaneous action ? My webapp is working well with 
> on user or more when action are not 
> simultaneous. In this case i get request.getSession() return Null for the first or 
> the second access (not sure). I cannot 
> determine if it's a struts or java or tomcat problem... any Clues ?
> 
> Regars, mathieu.

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



RE: [OT] How to do Xalan parsing of XML file retrieved with HTTP?

2004-07-01 Thread Robert Taylor
Have you looked into using the JSTL XML core and transform tag libraries?
I haven't used them yet, but they have tags which allow you 
to parse and transform.

robert

> -Original Message-
> From: Kransen, J. [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 4:47 AM
> To: 'Struts Users Mailing List'
> Subject: [OT] How to do Xalan parsing of XML file retrieved with HTTP?
> 
> 
> Hello,
> 
> I have a .jsp that outputs a XML file. I have another .jsp in which I want
> to parse the XML file using an XSL file. So in the latter .jsp I want to do
> something like this:
> 
> <%
> 
> String xslFile = getServletContext().getRealPath("/xml/risc2cvs.xsl");
> 
> TransformerFactory tFactory = TransformerFactory.newInstance();
> Transformer transformer = tFactory.newTransformer(new
> StreamSource(xslFile));
> 
> // write the content of the parsed XML file
> transformer.transform(new
> StreamSource("http://localhost/risc/readonly.jsp";), new StreamResult(out));
> 
> %>
> 
> However, when I do this, I get the following error message:
> 
> The element type "base" must be terminated by the matching end-tag "".
> 
> With this stack trace:
> javax.xml.transform.TransformerException: The element type "base" must be
> terminated by the matching end-tag "".
>   at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java
> :744)
>   at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
> 720)
>   at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
> 1192)
>   at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
> 1170)
>   at
> org.apache.jsp.cvs_005fuittreksel_jsp._jspService(cvs_005fuittreksel_jsp.jav
> a:109)
> ...
> 
> 
> When instead I try to parse a local XML file, there are no problems:
> String xmlFile = getServletContext().getRealPath("/xml/temp.xml");
> transformer.transform(new StreamSource(xmlFile), new StreamResult(out));
> 
> But then, when I try to parse the very same file as accessed through HTTP, I
> get the very same error:
> transformer.transform(new
> StreamSource("http://localhost/risc/xml/temp.xml";), new StreamResult(out));
> 
> I was thinking that maybe the HTTP headers aren't stripped before the
> parsing. Does anybody know what to do here?
> 
> Thanks in advance!
> 
> Jeroen
> 
> 
> -
> 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] Sending multipart alternative emails (HTML and text)

2004-06-29 Thread Robert Taylor
Thanks Matthias, 

robert

> -Original Message-
> From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 29, 2004 2:07 AM
> To: 'Struts Users Mailing List'
> Subject: RE: [OT] Sending multipart alternative emails (HTML and text)
> 
> 
> Robert,
> 
> perhaps you may look at:
> http://jakarta.apache.org/commons/sandbox/email/
> 
> there is allready an implemented multipartemail.clazz
> 
> i used them successfully in my application. they are
> easy to use, you are *free* from the java-mail-api
> 
> Cheers,
> matthias
> 
> > -Original Message-
> > From: Robert Taylor [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, June 28, 2004 11:21 PM
> > To: [EMAIL PROTECTED]
> > Subject: [OT] Sending multipart alternative emails (HTML and text)
> > 
> > 
> > I've been tasked with sending out emails which contain both 
> > HTML and text. I have successfully implemented this and 
> > tested it in Outlook 2000, 2002, 2003, 
> > Outlook Express and various web email clients (Yahoo, 
> > Hotmail, etc...).
> > 
> > The problem I have is that some users, get the emails 
> > with a message like the following:
> > 
> > "This message uses a character set that is not supported by 
> > the Internet Service.  To view the original message content,  
> > open the attached message. If the text doesn't display 
> > correctly, save the attachment to disk, and then open it 
> > using a viewer that can display the original character set."
> > 
> > Googling produced the following semi-helpful result:
> > 
> http://www.jguru.com/faq/view.jsp?EID=132654
> 
> 
> Now, when I create the email message using the JavaMail API, I use
> something similar to the following:
> 
> String text = // get text portion of email body
> String html = // get html portion of email body
> 
> /*
> * Create a multipart mime message where
> * the client setting will determine which
> * message is rendered.
> */
>   
> MimeMultipart multipart = new MimeMultipart("alternative");
> 
> // add text body part
> MimeBodyPart textBodyPart = new MimeBodyPart();
> textBodyPart.setText(text, "US-ASCII"); //char-set for encoding
>   
> // add HTML body part
> MimeBodyPart htmlBodyPart = new MimeBodyPart();
> htmlBodyPart.setContent(html, "text/html");
>   
> multipart.addBodyPart(text);
> multipart.addBodyPart(html);
>   
> msg.setContent(multipart);
> 
> 
> Has anyone run into a simliar issue? It seems to only happen with
> Outlook 2003 users, but since I cannot reproduce the problem, it's hard
> for me to solve it.
> 
> 
> robert
> 
> 
> 
> -
> 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]



[OT] Sending multipart alternative emails (HTML and text)

2004-06-28 Thread Robert Taylor
I've been tasked with sending out emails which contain both HTML and text.
I have successfully implemented this and tested it in Outlook 2000, 2002, 2003, 
Outlook Express and various web email clients (Yahoo, Hotmail, etc...).

The problem I have is that some users, get the emails 
with a message like the following:

"This message uses a character set that is not supported by the Internet
Service.  To view the original message content,  open the attached message.
If the text doesn't display correctly, save the attachment to disk, and then
open it using a viewer that can display the original character set."

Googling produced the following semi-helpful result:

http://www.jguru.com/faq/view.jsp?EID=132654


Now, when I create the email message using the JavaMail API, I use something
similar to the following:

String text = // get text portion of email body
String html = // get html portion of email body

/*
* Create a multipart mime message where
* the client setting will determine which
* message is rendered.
*/

MimeMultipart multipart = new MimeMultipart("alternative");

// add text body part
MimeBodyPart textBodyPart = new MimeBodyPart();
textBodyPart.setText(text, "US-ASCII"); //char-set for encoding

// add HTML body part
MimeBodyPart htmlBodyPart = new MimeBodyPart();
htmlBodyPart.setContent(html, "text/html");

multipart.addBodyPart(text);
multipart.addBodyPart(html);

msg.setContent(multipart);


Has anyone run into a simliar issue? It seems to only happen with Outlook 2003
users, but since I cannot reproduce the problem, it's hard for me to solve it.


robert



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



RE: image submit and lookupDispatchAction - drives me struts

2004-06-28 Thread Robert Taylor
This may help:

http://issues.apache.org/bugzilla/show_bug.cgi?id=19925

robert

> -Original Message-
> From: Axel Groß [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 28, 2004 11:52 AM
> To: Struts Users Mailing List
> Subject: Re: image submit and lookupDispatchAction - drives me struts
>
>
> Hi Wendy thanks for the reply and the link!
>
> But unfortunately i can't see how to implement those solutions to my
>  problem (which I didn't describe elaborate enought)
>
> My button names are of dynamic nature like
>  DELETE_PROPERTY 'firstname'
> (here firstname is the key of the property to delete)
> so I can't use it for populating a bean. Or would using DynaBeans
> help in this case? I don't know, in which class the html requests are
> ~transformed to beans, so I'm not sure how it is handled.
>
> I rely would like to get rid of that horrible names.
>
> Javascript isn't feasible for this project.
> I suppose html 4.0 buttons could solve the problem, I'll try that. But
> relying on html 4.0 also doesn't sound too good. :(
>
> thanks again,
> Axel
>
> On 2004-06-25 at 09:12:07 -0700, Wendy Smoak wrote:
> > > From: Axel Groß [mailto:[EMAIL PROTECTED]
> > > so the html:submit buttons do work, but neither of the
> > > html:image buttons
> > > pass the parameter on and i get a null reference for
> > >  request.getParameter(parameter);
> > > (with parameter.equals("action"))
> > > the resulting error message is:
> > >  Request[/action/lookupDispatch] does not contain handler
> > > parameter named action
> > > anybody knows what could help?
> >
> > http://www.google.com/search?q=struts+image+button
> >
> > First hit:
> > http://www.jguru.com/faq/view.jsp?EID=893423
> > which discusses the use of the ImageButtonBean class.
> >
> > Or, my preferred solution is a bit of onClick JavaScript to set the form property 
> > and submit the form.  This only works
> in situations where where you can require that JavaScript be enabled.
> >
> > --
> > Wendy Smoak
> > Application Systems Analyst, Sr.
> > ASU IA Information Resources Management
> >
> > -
> > 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] Anatomy of a long URL

2004-06-28 Thread Robert Taylor
Daniel, thanks for the reply. 

You pretty much confirmed my own assumptions.

robert


> -Original Message-
> From: Daniel Perry [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 28, 2004 10:58 AM
> To: Struts Users Mailing List
> Subject: RE: [OT] Anatomy of a long URL
> 
> 
> I dont think there is any information out there of the type you're
> requesting (it's not really a 'pattern').
> 
> Long URLs are long because there is a lot of information to transfer.
> 
> The big long codes given in urls are often are often hashes (eg session
> id!).  These are made long so that it's hard to randomly enter a code and
> guess a correct one.
> 
> There's no reason to use long urls unless you have a reason! There are often
> security reasons (eg hashes/tokens), where you dont want people to be able
> to fiddle with the link.  take a bank for example - you dont want to
> encourace hacking by putting:
> viewtransaction.do?transactionId=18374
> (of course i'm assuming that any actions such as these would check that you
> own the transaction using session info!!!)
> instead do somthing like viewtransaction.do?massive_code_here
> and it instantly puts people off changing stuff.
> 
> As for suns example, i think sun counts you downloading stuff like J2EE SDK
> as 'purchasing' it.  I think part of the reason for that link is to try and
> stop anyone from downloading the file and "stealing" it!
> 
> Also bear in mind that places such as sun, amazon, etc have massive sites,
> with many servers and an immense amount of information.  They need to be
> able to track you, accross the site.  Some sites try and do this using big
> codes that only the server understands, others tend to use nested
> directories, eg:
> http://news.bbc.co.uk/1/hi/world/middle_east/3845517.stm
> 
> Daniel.
> 
> > -Original Message-
> > From: Robert Taylor [mailto:[EMAIL PROTECTED]
> > Sent: 28 June 2004 14:51
> > To: [EMAIL PROTECTED]
> > Subject: [OT] Anatomy of a long URL
> >
> >
> > I'm not sure the subject of this email is indicative of my
> > question, but I have always wondered why amazon, sun, and some financial
> > institutions,
> > use long URL's for invoking actions. My only guess, since I've
> > only worked at small companies where all the applications pretty much
> > run on
> > one machine, is that the URL contains either encoded/sensitive
> > information or contains session information. I'm just wondering why
> > the heck does
> > it look so darn complex.
> >
> > For example, I just downloaded Sun's J2EE 1.4 SDK
> >
> > http://192.18.97.53/ECom/EComTicketServlet/BEGINjsecom16c.sun.com-
> 9660%3A40e01d9a%3A3099733a3e651ac9/-2147483648/428874567/1/483962/
> 483914/428874567/2ts+/westCoastFSEND/j2eesdk-1.4_01-oth-JPR/j2eesdk-1.4_01-o
> th-JPR:1/j2eesdk-1_4_01-windows.exe
> 
> 
> after the "/-" then there appears to be some random numbers delimited by
> forward slashes.
> Is this some technique for sharing sessions across different applications?
> 
> My apologies if this is one of those things that "everone" know's about
> except me.
> I really wasnn't sure how to google on this topic either, so if there is
> some general
> documentation I missed, please point me to it.
> 
> 
> robert
> 
> 
> -
> 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] Anatomy of a long URL

2004-06-28 Thread Robert Taylor
Thanks Jacob, 

are there any articles, books, use cases, etc... on when/why/how you would have to 
design
an application in this manner?


robert

> -Original Message-
> From: Hookom, Jacob [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 28, 2004 10:06 AM
> To: 'Struts Users Mailing List'
> Subject: RE: [OT] Anatomy of a long URL
> 
> 
> It all kind of depends... most of the content is pregenerated such as in
> Amazon.  Amazon uses what is called the ART1 algorithm to categorize users.
> These categories (java geek, linux guru, etc) are pre-generated web sites,
> created by some application they have in house (hence the cryptic url).
> 
> So when you click around, you are interacting with a page that was
> generated, along with all of the links.  Think of the extra garble as your
> session state that gets stored in the page you download to your computer vs.
> being stored in memory on the server.
> 
> Another example is JSF.  JSF allows you to store your state client side or
> server side.  If it's client side, your buttons, etc become POSTs instead of
> GETs in order to get around the URL length limit.  Also, hidden fields are
> written out with your objects serialized into a string that you repost next
> time you click a link on the page.
> 
> 
> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 28, 2004 8:51 AM
> To: [EMAIL PROTECTED]
> Subject: [OT] Anatomy of a long URL
> 
> I'm not sure the subject of this email is indicative of my question, but I
> have always wondered why amazon, sun, and some financial
> institutions,
> use long URL's for invoking actions. My only guess, since I've only worked
> at small companies where all the applications pretty much
> run on
> one machine, is that the URL contains either encoded/sensitive information
> or contains session information. I'm just wondering why
> the heck does
> it look so darn complex.
> 
> For example, I just downloaded Sun's J2EE 1.4 SDK
> 
> http://192.18.97.53/ECom/EComTicketServlet/BEGINjsecom16c.sun.com-9660%3A40e
> 01d9a%3A3099733a3e651ac9/-2147483648/428874567/1/483962/
> 483914/428874567/2ts+/westCoastFSEND/j2eesdk-1.4_01-oth-JPR/j2eesdk-1.4_01-o
> th-JPR:1/j2eesdk-1_4_01-windows.exe
> 
> 
> after the "/-" then there appears to be some random numbers delimited by
> forward slashes.
> Is this some technique for sharing sessions across different applications?
> 
> My apologies if this is one of those things that "everone" know's about
> except me.
> I really wasnn't sure how to google on this topic either, so if there is
> some general
> documentation I missed, please point me to it.
> 
> 
> robert
> 
> 
> -
> 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]



[OT] Anatomy of a long URL

2004-06-28 Thread Robert Taylor
I'm not sure the subject of this email is indicative of my question, but I have always 
wondered why amazon, sun, and some financial
institutions,
use long URL's for invoking actions. My only guess, since I've only worked at small 
companies where all the applications pretty much
run on
one machine, is that the URL contains either encoded/sensitive information or contains 
session information. I'm just wondering why
the heck does
it look so darn complex.

For example, I just downloaded Sun's J2EE 1.4 SDK

http://192.18.97.53/ECom/EComTicketServlet/BEGINjsecom16c.sun.com-9660%3A40e01d9a%3A3099733a3e651ac9/-2147483648/428874567/1/483962/
483914/428874567/2ts+/westCoastFSEND/j2eesdk-1.4_01-oth-JPR/j2eesdk-1.4_01-oth-JPR:1/j2eesdk-1_4_01-windows.exe


after the "/-" then there appears to be some random numbers delimited by forward 
slashes.
Is this some technique for sharing sessions across different applications?

My apologies if this is one of those things that "everone" know's about except me.
I really wasnn't sure how to google on this topic either, so if there is some general
documentation I missed, please point me to it.


robert


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



RE: Is it possible to reuse the same FormBean with different actions?

2004-06-25 Thread Robert Taylor
Use different action mappings with same form bean.
Each action mapping can have a different input attribute value
for validation.

robert

> -Original Message-
> From: Asif Rahman [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 3:52 PM
> To: Struts Users Mailing List
> Subject: Is it possible to reuse the same FormBean with different
> actions?
> Importance: High
> 
> 
> I have a few jsp pages that use almost the same information.  I am using a formbean 
> for one of them right now for 
> validation.  Of course I'd like to re-use the this same bean with the other jsp 
> pages too since the info is so similar.  
> But here's the catch, theres only one "input" field in an action mapping, meaning it 
> will always send the user back to 
> the same jsp page if validation fails, rather than different ones.  Is there some 
> other element in the action mapping I 
> can set to get around this?  I can always have 2 or 3 formbeans and copy properties 
> from one to the other, but that 
> doesnt seem like a very good solution to me. Does anyone have any ideas?
> 
> -Asif 

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



RE: Trying to learn Struts, need help understanding design process

2004-06-25 Thread Robert Taylor
A general design for this sort of thing would be to load your collection
of teams at application start up and put them into the ServletContext.

Define an action for displaying the teams page and an action for
processing the user input after they have selected a team. Define your
actions to forward to these pages and not redirect. The display action
can simply be a forward defined in your struts-config.xml since the
teams already exist in the ServletContext. You will have to subclass
one the many Action classes in order to process the user input subsequent
to their team selection.

The teams page can enlist the help of the 
to render the drop down list.
http://jakarta.apache.org/struts/userGuide/struts-html.html#optionsCollection


As Brian already mentioned, you can utilize some third party tools like
the displayTag library found here http://displaytag.sourceforge.net/ to
render the riders in tabular format.

"Hide" your pages behind WEB-INF. Something like WEB-INF/pages/teams.jsp.
Note that most (but not all) web containers disallow direct access to 
resources which are in the WEB-INF directory. This helps enforce the 
MVC aspect of your web application.

There are several ways to tackle this problem and the above is just some
high level advice.


I would review (actually install and do a code trace) the Struts example
web apps.


hth,

robert





> -Original Message-
> From: Jamison Roberts [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 2:46 PM
> To: Struts Mailing List
> Subject: Trying to learn Struts, need help understanding design process
> 
> 
> I've been a C#/.Net developer for two years.  Recently my company has
> decided to move towards Java/Struts, so i've spent the last three
> weeks familiarizing myself with Java, JDBC, Type 4 drivers, Tomcat,
> Ant, and Struts.
> 
> Struts is the last thing i've tried to tackle, and I thought I had a
> handle on it, however I don't.  I'm not sure of the best (or
> correct/standard) way of doing simple things.  I've read that if I
> ever have a *.jsp showing in the address bar outside of the entry
> page, i've done something wrong.
> 
> I'd like to give an example, and hear suggestions on the correct way
> to implement such an idea.  Simple example to follow...
> 
> Let's say I have a database that contains a two tables:  one called
> teams, and one called riders.  There is a one-to-many relationship
> between teams and riders based on a "teamid."
> 
> In the teams table, we have the following data (Primary Key in parens):
> (1) USPS
> (2) T-Mobile
> (3) Cofidis
> (4) Phonak
> ...
> 
> In the riders table, we have this data (relationship in parens):
> Lance Armstrong (teamid = 1)
> George Hincapie (teamid = 1)
> Jan Ullrich (teamid = 2)
> Alexandre Vinokourov (teamid = 2)
> David Millar (teamid = 3)
> Tyler Hamilton (teamid = 4)
> ...
> 
> >From the Index.jsp, there should be a link to another page that will
> have a single select box, and a submit button.  The select box needs
> to be populated with a list of teams/teamids from the database.
> 
> Upon submission of the form, all riders will be displayed in a table.
> 
> Pretty simple stuff, except I can't seem to figure out how to do it
> with Struts.  The closest i've gotten is to have a "static" Teams.jsp
> with an input-text box, which calls an Action to display the users. 
> In otherwords my Index.jsp links to Teams.jsp, instead of something
> like Teams.do (and I can't figure out how to populate a select box
> from a Vector or other sort of list).
> 
> I apologize for asking simple questions, but i'm at the end of my rope
> trying to figure out all these "new" technologies (new to my Microsoft
> dominated world).
> 
> -
> 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] FW: Timothy J Theis is out of the office

2004-06-24 Thread Robert Taylor
Should we call Mike, and tell him to tell Tim to unsubscribe when
he is out of the office :)

robert

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 9:55 PM
To: [EMAIL PROTECTED]
Subject: Timothy J Theis is out of the office






I will be out of the office starting  06/24/2004 and will not return until
06/28/2004.

For any urgent issues, please contact Mike Bogie (952) 402-3271 or address
the ENG IT - TCO mailing group.  Thank you.


-
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: Setting html:hidden property using JSTL

2004-06-24 Thread Robert Taylor
Assuming you are using the Struts-EL tag library:

Try:


robert

> -Original Message-
> From: Tom McCobb [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 12:05 PM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
> 
> 
> I am having the same nagging problem in JBoss3.2.3/Tomcat4.1.
> 
>  varStatus="itemIdx" >
> 
>  ---this works just fine
> 
>   
> 
> The last line always renders as '' both in
> the Form property and the request parameter.
> 
> I checked versions, etc. as detailed earlier in this thread.  I'm stumped.
> 
> Tom McC.
> 
> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 11:00 AM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
> 
> 
> What container are you using?  If this is Resin, this has been known to
> cause problems because of the fact that Resin has an integrated version
> of the JSTL which doesn't work the same as the Jakarta one.  If you're
> using Resin, make sure the integrated JSTL is not being used.
> 
> > -Original Message-
> > From: klute [mailto:[EMAIL PROTECTED]
> >
> > Robert,
> >
> > I am using servlet spec 2.3 and i did all the steps
> > you mentioned.
> >
> > Thanks,
> > James
> >
> > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > I'm sorry, I've missed parts of this thread, but
> > > this
> > > last message caught my eye when you said it's
> > > printing
> > > ${contentId} to the screen instead of the value of
> > > contentId.
> > >
> > > Which servlet spec. does your container support?
> > > I've seen this
> > > type of behavior when the container supports Servlet
> > > Spec. 2.4 but
> > > the web.xml file is referring to the 2.3 dtd.
> > >
> > > If your container does support the 2.4 spec, then
> > > make sure your
> > > web.xml file has
> > >
> > >  > > xmlns="http://java.sun.com/xml/ns/j2ee";
> > >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > >
> > > in its root element.
> > >
> > > Again, if your container does support the 2.4 spec,
> > > then you
> > > shouldn't need any .tld files or even jar files for
> > > JSTL.
> > > All you should have to do is add (or include)
> > > something like this to the
> > > top of your .jsp page.
> > >
> > > <%-- JSTL Standard Tags --%>
> > > <%@ taglib uri="http://java.sun.com/jsp/jstl/core";
> > > prefix="c" %>
> > > <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt";
> > > prefix="fmt" %>
> > >
> > > If your container does not support the 2.4 spec,
> > > then you will need
> > > to include the appropriate .tld and .jar files and
> > > update your web.xml
> > > file to reference the appropriate .tld file(s).
> > >
> > > robert
> > >
> > > > -Original Message-
> > > > From: klute [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, June 24, 2004 10:01 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Setting html:hidden property using
> > > JSTL
> > > >
> > > >
> > > > Hello All,
> > > >
> > > > I *really* appreciate your help.  Because of a
> > > > hard-pressing work deadline, i actually gave up on
> > > > getting that to work using JSTL and ended up using
> > > the
> > > >  ugly  > > > value="<%=request.getAttribute("contentId")%>"/>
> > > > instead.
> > > >
> > > > I'll definitely come back to JSTL at a later time
> > > > since i consider that to be a proper way of doing
> > > this
> > > > sort of things.
> > > >
> > > > Robert, if ${contentId} is available as an
> > > attribute
> > > > (which it was) and not as a parameter, i would
> > > expect
> > > > it to produce null or something instead of
> > > literally
> > > > printing out ${contentId} string...
> > > >
> > > > Rick, i tried creating a var in t

RE: Setting html:hidden property using JSTL

2004-06-24 Thread Robert Taylor
Right. Thanks for the clarification, Kris. 

robert

> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 10:39 AM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
> 
> 
> Small clarification that the Servlet 2.4/JSP 2.0 specs don't include/require
> JSTL. Although a given container may include a JSTL implementation (like Resin,
> I believe), it's not a requirement. For example, Tomcat 5.0 does not include a
> JSTL implementation. For JSP 1.2, use JSTL 1.0. For JSP 2.0, use JSTL 1.1. As
> Robert illustrated, the taglib URIs are not the same for the two JSTL
> versions.
> 
> Quoting Robert Taylor <[EMAIL PROTECTED]>:
> 
> > I'm sorry, I've missed parts of this thread, but this
> > last message caught my eye when you said it's printing
> > ${contentId} to the screen instead of the value of contentId.
> > 
> > Which servlet spec. does your container support? I've seen this
> > type of behavior when the container supports Servlet Spec. 2.4 but
> > the web.xml file is referring to the 2.3 dtd.
> > 
> > If your container does support the 2.4 spec, then make sure your
> > web.xml file has
> > 
> > http://java.sun.com/xml/ns/j2ee";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > 
> > in its root element.
> > 
> > Again, if your container does support the 2.4 spec, then you
> > shouldn't need any .tld files or even jar files for JSTL.
> > All you should have to do is add (or include) something like this to the
> > top of your .jsp page.
> > 
> > <%-- JSTL Standard Tags --%>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"; prefix="fmt" %>
> > 
> > If your container does not support the 2.4 spec, then you will need
> > to include the appropriate .tld and .jar files and update your web.xml
> > file to reference the appropriate .tld file(s).
> > 
> > robert
> > 
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: klute [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, June 24, 2004 10:01 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: Setting html:hidden property using JSTL
> > >
> > >
> > > Hello All,
> > >
> > > I *really* appreciate your help.  Because of a
> > > hard-pressing work deadline, i actually gave up on
> > > getting that to work using JSTL and ended up using the
> > >  ugly  > > value="<%=request.getAttribute("contentId")%>"/>
> > > instead.
> > >
> > > I'll definitely come back to JSTL at a later time
> > > since i consider that to be a proper way of doing this
> > > sort of things.
> > >
> > > Robert, if ${contentId} is available as an attribute
> > > (which it was) and not as a parameter, i would expect
> > > it to produce null or something instead of literally
> > > printing out ${contentId} string...
> > >
> > > Rick, i tried creating a var in the jsp and the result
> > > would still be the same: the value of the hidden
> > > property was printed out as {$myVar}. And, if i do
> > > c:out in the begging of the jsp, i do get an actual
> > > int value printed. weird... i definitely need to spend
> > > more time doing my homework to understand how it
> > > works...
> > >
> > > All the best,
> > > James
> > >
> > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > klute wrote:
> > > >
> > > > > Yes, the struts-el.jar is in WEB-INF/lib
> > > > >
> > > > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >>klute wrote:
> > > > >>
> > > > >>
> > > > >>> > > > >>>value="${contentId}">
> > > > >>>
> > > > >>>This are the tagligs i am importing on this page:
> > > > >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> > > > >>>prefix="bean" %>
> > > > >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> > > > >>>prefix=&quo

RE: Setting html:hidden property using JSTL

2004-06-24 Thread Robert Taylor
I'm sorry, I've missed parts of this thread, but this
last message caught my eye when you said it's printing
${contentId} to the screen instead of the value of contentId.

Which servlet spec. does your container support? I've seen this
type of behavior when the container supports Servlet Spec. 2.4 but
the web.xml file is referring to the 2.3 dtd.

If your container does support the 2.4 spec, then make sure your
web.xml file has

http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

in its root element.

Again, if your container does support the 2.4 spec, then you
shouldn't need any .tld files or even jar files for JSTL.
All you should have to do is add (or include) something like this to the
top of your .jsp page.

<%-- JSTL Standard Tags --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"; prefix="fmt" %>

If your container does not support the 2.4 spec, then you will need
to include the appropriate .tld and .jar files and update your web.xml
file to reference the appropriate .tld file(s).

robert





> -Original Message-
> From: klute [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 10:01 AM
> To: Struts Users Mailing List
> Subject: Re: Setting html:hidden property using JSTL
>
>
> Hello All,
>
> I *really* appreciate your help.  Because of a
> hard-pressing work deadline, i actually gave up on
> getting that to work using JSTL and ended up using the
>  ugly  value="<%=request.getAttribute("contentId")%>"/>
> instead.
>
> I'll definitely come back to JSTL at a later time
> since i consider that to be a proper way of doing this
> sort of things.
>
> Robert, if ${contentId} is available as an attribute
> (which it was) and not as a parameter, i would expect
> it to produce null or something instead of literally
> printing out ${contentId} string...
>
> Rick, i tried creating a var in the jsp and the result
> would still be the same: the value of the hidden
> property was printed out as {$myVar}. And, if i do
> c:out in the begging of the jsp, i do get an actual
> int value printed. weird... i definitely need to spend
> more time doing my homework to understand how it
> works...
>
> All the best,
> James
>
> --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > klute wrote:
> >
> > > Yes, the struts-el.jar is in WEB-INF/lib
> > >
> > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > >
> > >>klute wrote:
> > >>
> > >>
> > >>> > >>>value="${contentId}">
> > >>>
> > >>>This are the tagligs i am importing on this page:
> > >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> > >>>prefix="bean" %>
> > >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> > >>>prefix="html" %>
> > >>><%@ taglib uri="/WEB-INF/struts-html-el.tld"
> > >>>prefix="html-el" %>
> > >>><%@ taglib uri="http://java.sun.com/jstl/core";
> > >>>prefix="c" %>
> > >>>
> > >>>
> > >>>What am i doing wrong?
> >
> > Not sure. If you have
> > - struts-el jar included
> > - proper definition of the tld in web.xml
> > - proper declaration for the tld on top of the page
> >
> > then using it as:
> >  > value="${contentId}"/>
> > should be fine.
> >
> > The only thing I'm still concerned about and maybe
> > somehow it's related
> > is that contentId has to be a property of your
> > ActionForm or else Struts
> > would complain that it couldn't find the property
> > 'contentId' Are you
> > maybe creating the "contentId" var dynamically first
> > in the JSP page and
> > then trying to set as above? "Usually" you don't
> > need to do like you are
> > doing (setting the value) since that value can be
> > set before you get to
> > the page and thus just doing  > property="contentId" would be
> > fine.
> >
> > What does  produce on
> > the page (or in
> > source) when placed right before the html-el hidden
> > tag?
> >
> > --
> > Rick
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
>
> -
> 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: Setting html:hidden property using JSTL

2004-06-23 Thread Robert Taylor
I believe the reason it's not populated in the 
action form is because its in the request as an attribute
and not a parameter.


I just started experimenting with jstl and i'd like to
set a hidden field on MyActionForm using a value 
(contentId) available as an attribute on the request.


robert

> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 23, 2004 3:23 PM
> To: Struts Users Mailing List
> Subject: Re: Setting html:hidden property using JSTL
> 
> 
> klute wrote:
> 
> > Yes, the struts-el.jar is in WEB-INF/lib
> > 
> > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > 
> >>klute wrote:
> >>
> >>
> >>> >>>value="${contentId}">
> >>>
> >>>This are the tagligs i am importing on this page:
> >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> >>>prefix="bean" %>
> >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> >>>prefix="html" %>
> >>><%@ taglib uri="/WEB-INF/struts-html-el.tld"
> >>>prefix="html-el" %>
> >>><%@ taglib uri="http://java.sun.com/jstl/core";
> >>>prefix="c" %>
> >>>
> >>>
> >>>What am i doing wrong?
> 
> Not sure. If you have
> - struts-el jar included
> - proper definition of the tld in web.xml
> - proper declaration for the tld on top of the page
> 
> then using it as:
> 
> should be fine.
> 
> The only thing I'm still concerned about and maybe somehow it's related 
> is that contentId has to be a property of your ActionForm or else Struts 
> would complain that it couldn't find the property 'contentId' Are you 
> maybe creating the "contentId" var dynamically first in the JSP page and 
> then trying to set as above? "Usually" you don't need to do like you are 
> doing (setting the value) since that value can be set before you get to 
> the page and thus just doing  fine.
> 
> What does  produce on the page (or in 
> source) when placed right before the html-el hidden tag?
> 
> -- 
> Rick
> 
> -
> 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: Struts and PL/SQL

2004-06-23 Thread Robert Taylor
If your trying to avoid the overhead of EJB, then you may want
to look into the Spring framework. I've been wanting to find a
flexible architecture/framework which allows me to start with a
non-EJB type of approach and easily scale to using an EJB container
while minimizing the impact on the application.

This article may provide some insight:
http://www.theserverside.com/articles/printfriendly.tss?l=SpringFramework

I would still advise wrapping your dataccess code in a business delegate or
application service instead of binding your Struts Action to the business
logic implementation.

robert

> -Original Message-
> From: Lucas Gonzalez [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 23, 2004 2:07 PM
> To: Struts Users Mailing List
> Subject: Struts and PL/SQL
>
>
> Hi all!
>
> I´ve been using Struts a lot with EJB and Hibernate with no problems.
>
> But I always wondered if it´s possible to use an architecture that uses
> STRUTS and goes directly to PL/SQL for the database layer. I know it is
> possible in many way, but I would like to know if there is any special
> product or package that integrates with PL ( the only one I found is
> http://portalstudio.oracle.com/servlet/page?_pageid=473&_dad=ops&_schema=OPSTUDIO ) 
> ... any pointers?
>
> Thanks a lot
> Lucas
>
>
> -
> 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: Logic:Iterate Problem

2004-06-23 Thread Robert Taylor
Assuming you have a scoped Collection named "pageRecords":

Struts tags:

 


JSTL:




robert

> -Original Message-
> From: Eddie Yan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 23, 2004 12:06 PM
> To: [EMAIL PROTECTED]
> Subject: Logic:Iterate Problem
> 
> 
> Hi guys,
> 
> Say I have a JSP as follows:
> 
> 
> 
>  <%
>  Iterator iter = pageRecords.iterator();
>  while(iter.hasNext())
>  {
>  UserDetail detail = (UserDetail)iter.next();
>  %>
> <%= detail.getId() %> 
> <%
> }
> %>
> 
> 
> 
> pageRecords is a Collection of UserDetail object.
> UserDetail is my data transfer object.
> I can manage to get the expected result of detail.getId()
> 
> How can I represent the above code in  tags ? 
> The following code doesn't work.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I got JSP Exception: Cannot create iterator for this collection
> 
> 
> 
> 
> 
> -
> 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] Issues while developing and deploying enterprise application

2004-06-23 Thread Robert Taylor
Navjot, although I don't have an answer for you, I posted (forwarded) your
question to the [EMAIL PROTECTED] mailing list
which may be a more appropriate list for this type of question.

robert

> -Original Message-
> From: Navjot Singh [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 23, 2004 12:55 AM
> To: Struts Users Mailing List
> Subject: [OT] Issues while developing and deploying enterprise
> application
> 
> 
> hi,
> 
> I have N ejb jars packaged into a single EAR file.
> 
> 1. ProductEJB.jar ( with entities Product, Category etc..)
> 2. OrderEJB.jar (with entities OrderItem, Orders etc..)
> 
> 
> Now, i have a unidirectional cmr based relation OrderItem-Product where 
> each item refers to one of the products. But both entities are defined 
> in separate ejb-jar.xml.
> 
> According to EJB specs, the entities for which are involved in the 
> relation using cmr-field MUST be in same DD (ejb-jar.xml), which means i 
> can't have separate DDs.
> 
> Q1.
> If i generate somehow a common DD for all modules and place them in 1 
> ejb module, rest of the modules will have empty META-INF directory.
> Will it be recognized as valid EJB module by the EJB container?
> 
> Q2.
> In a large enterprise application, we have many related modules which 
> need to be developed independently by diff teams. This restriction 
> completely thwarts the possibility of independent module development as 
> still the DDs are to be generated a single large monolithic file.
> 
> Any suggestions how to develop in these scenarios.
> 
> Navjot Singh
> 
> -
> 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 do i get members of DynaActionForm inside Action Class

2004-06-22 Thread Robert Taylor
DynaActionForm theForm = (DynaActionForm) form;
String myValue = (String) theForm.get("myValueName");

robert

> -Original Message-
> From: Asim Ghosh [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 5:30 AM
> To: [EMAIL PROTECTED]
> Subject: how do i get members of DynaActionForm inside Action Class
> 
> 
> hi guys,
>  
>   if somebody can give me the solution to this problem.
>  
> i am using DynaActionForm and now i want to retrieve the value of a particular field.
>  
> in execute method i have the reference of ActionForm. 
>  
>  
> asim
> 
>   
> -
>  ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself 

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



RE: Theoretical debate

2004-06-17 Thread Robert Taylor
> In Struts, although you aren't FORCED to, what you GENERALLY do is create 
> three different Action classes like addItemAction, removeItemAction and 
> totalPriceAction, and each is called in response to a form submission.
> 
> But isn't it kind of odd that your object model isn't following what you 
> probably think in your head is the right way, i.e., one class with multiple 
> related methods?  Proper encapsulation and all that jazz, right?

Frank, you could view web application development as event programming
just like any other application. There are several layers that have 
various responsibilities. The call eventually gets to your model where
you can use the appropriate OO principles and design strategies. 

I wouldn't consider the Struts portion the object model, but more 
of an web presentation layer which utilizes the MVC design pattern
in order to communicate with the model and populate and display the 
appropriate view.

I think of an Action as a web event, which can then delegate to a 
business event which does the actual work (or more appropriately delegates
to others...typical management stuff :) ). The business event eventually
reports back to the web event which can then report back to the web controller. 

IMHO, Struts follows solid and proven design patterns. 
In fact, one could argue that it is very OO, in that it promotes loose
coupling with each component being very cohesive.

I will admit, it gives you plenty of rope to hang yourself


My 2 cents.

robert



> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 17, 2004 3:29 PM
> To: [EMAIL PROTECTED]
> Subject: Theoretical debate
> 
> 
> Last night I was Googling for something and I stumbled across the Crysalis 
> framework.  I was actualyl intrigued by the underlying premise of it and I 
> wanted to see what others thought about it.
> 
> In a nutshell and in my own words, Crysalis 
> (http://chrysalis.sourceforge.net/) has the underlying idea that when you 
> develop in most MVC frameworks, Struts chief among them, you are actually 
> doing something unnatural and in a way at odds with basic OOP design.
> 
> Think about a shopping cart example... If you were going to write that in 
> straight Java, not for the web or anything, how would you model it?  Most 
> likely you would have a ShoppingCart class with a number of methods in it, 
> things like addItem(), removeItem(), totalPrice(), etc.
> 
> In Struts, although you aren't FORCED to, what you GENERALLY do is create 
> three different Action classes like addItemAction, removeItemAction and 
> totalPriceAction, and each is called in response to a form submission.
> 
> But isn't it kind of odd that your object model isn't following what you 
> probably think in your head is the right way, i.e., one class with multiple 
> related methods?  Proper encapsulation and all that jazz, right?
> 
> Well, Crysalis does just that.  It's controller elements are regular Java 
> classes with multiple methods.  What you wind up with is something that 
> resembles Remote Procedure Calls instead of numerous servlets as 
> controllers.
> 
> In other words, you would create the ShoppingCart object just as I described 
> above, with all three methods.  Then, when you submit a form, the action is 
> something along the lines of "ShoppingCart.addItem.cmd".  ShoppingCart is 
> the class to execute, addItem the method and cmd is a suffix to direct the 
> request, just like extensions in your Struts apps map requests to 
> ActionServlet.
> 
> The elements of the submitted form are treated as the parameters of the 
> method being called, making it rather elegant.
> 
> I haven't gotten into any real detail on Crysalis, but I was interested in 
> getting other peoples' thoughts on the underlying principal (which I *THINK* 
> I've stated properly!).  It was rather interesting to me because I'd never 
> reall considered looking at it that way, and certainly it's not the way you 
> typically approach a Struts-based application.  It was also interesting to 
> me because I've for about four years now been preaching here at work that we 
> should write our applications as a collection of services that are executed 
> to form a coherent larger application, which is very much along the lines of 
> this (so I guess I actually HAVE looked at it this way in a sense, but not 
> exactly).
> 
> Any thoughts?
> 
> Frank
> 
> _
> Watch the online reality show Mixed Messages with a friend and enter to win 
> a trip to NY 
> http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

RE: how to implement && using tag in struts

2004-06-17 Thread Robert Taylor
I don't think you can. 
You can do this sort of thing with JSTL:






robert

> -Original Message-
> From: Asim Ghosh [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 17, 2004 9:35 AM
> To: [EMAIL PROTECTED]
> Subject: how to implement && using  tag in struts
> 
> 
> hello guys,
>  
>how do i implement && and ||  using  
>  
> example
> i need to convert
>  <% if( a > b && b > c) {
>  
> } 
> %>
>  
> into struts  tag 
>  
> Asim
> 
> 
> 
> 
>   
> -
>  ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself 

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



RE: [OT] Soccer portal released goal.com

2004-06-17 Thread Robert Taylor
Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, 
graphics, etc...)
or just server side development (architecture, site design/structure, functionality, 
etc...)?
How long did it take to design and implement?

robert

> -Original Message-
> From: Simone - Dev [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 17, 2004 8:25 AM
> To: 'Struts Users Mailing List'
> Subject: [OT] Soccer portal released goal.com
> 
> 
> Hello All,
> I know this is a lot off-topic, but I'm so proud of the portal I
> designed and developed that I'd like you all know that it has just been
> released a worldwide soccer portal named Goal.com (www.goal.com) and
> that now it's having a lot of news and live results and live netcasting
> on the european championship 2004.
>  
> I aplogize for the "invasion" also becuase it's not developed in Struts,
> but with ASP.NET but as I said, it took me the last 6 month of work
> to develop the engine that drives that portal (and all its netwok: all
> main italian soccer teams).
>  
> I use Struts in my spare time but in my "real" work I develop with .NET
> and C# (not my decision, of course)... but I prefer Struts.
>  
> Simone
> -
> Simone Chiaretta
>   www.piyosailing.com/S
> Any sufficiently advanced technology is indistinguishable from magic
> "Life is short, play hard"
>  
> 

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



RE: Different input formats

2004-06-14 Thread Robert Taylor
Use Strings as data memebers in your action form when ever possible.
You can "translate" the input in the action class performing what ever
logic is necessary. 

robert

> -Original Message-
> From: Renato Romano [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 14, 2004 11:29 AM
> To: 'Struts Users Mailing List'
> Subject: Different input formats
> 
> 
> I have an  input in my form, in which the user should put a
> float value. Now I would like to allow the user to enter the Italian
> decimal separator, that is comma (",") instead of dot ("."), but of
> course I got a null property value for the Float in my ActionForm!! I
> then tried to do this by myself, and it works fine, but I have to
> directly access request.getParameter("...") which is undesirable, also
> because now I have a form in which the former is nested, and so
> request.getParameter("...") should take this into account.
> 
> Is there a better and "standard" solution to this ?
> Thanks everyone
> 
> Renato
> 
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
> 
> e-mail: [EMAIL PROTECTED]
> Tel.:   010 2712603
> _
> 
> 
> -
> 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: Need Help

2004-06-11 Thread Robert Taylor
Use Struts EL library:

Submit


or use scriptlets:

<%
String onclick = "javascript:callAction('" + beanValue + "')";
%>
 Submit 



robert
  -Original Message-
  From: Bharat Bhushan [mailto:[EMAIL PROTECTED]
  Sent: Friday, June 11, 2004 12:29 PM
  To: [EMAIL PROTECTED]
  Subject: Need Help


  Hi



  I am using struts tag library. And I want help in the
following tag.



   Submit 

  In the above tag how to pass value from bean in javascript function
callAction(). And "Submit" will also be a bean variable. How to do that???



  Any help will be appreciable.



  Thanks

  Bharat






[OT] RE: wahtd does it means ? envCtx = (Context) initCtx.lookup("java:comp/env");

2004-06-08 Thread Robert Taylor
This is not really a Struts question and as such the subject should be
prepended with [OT].

That being said, that particular line of code is retrieving the /env
context.

The javadocs are pretty good at explaining what a Context is and how it is
used.


http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/Context.html


robert
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, June 08, 2004 2:38 PM
  To: [EMAIL PROTECTED]
  Subject: wahtd does it means ? envCtx = (Context)
initCtx.lookup("java:comp/env");



  can any onetell me what  does  "java:comp/env" mean in following ???

   envCtx = (Context) initCtx.lookup("java:comp/env");





  Birendar Singh Waldiya
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com


RE: Action Forward

2004-06-08 Thread Robert Taylor
Yes.

return new ActionForward(path);

robert
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, June 08, 2004 7:17 AM
  To: Struts Users Mailing List
  Cc: Struts Users Mailing List
  Subject: Action Forward



  Is it possible to forward to a page(html/jsp) from the Action Class
without declaring that forward in the struts-config.xml?

  Brati Sankar Ghosh
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com


RE: [OT] EJB/Struts Design Question

2004-06-06 Thread Robert Taylor
Navjot, 

This sounds like a good design and follows suggested best practices.

>From a pure architectural perspective, I think your existing solution is best.
However if you are concerned with performance, then you may want to look into
the FastLaneReader pattern.

http://java.sun.com/blueprints/patterns/FastLaneReader.html

My .02.

robert

> -Original Message-
> From: Navjot Singh [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 05, 2004 11:48 AM
> To: Struts Users Mailing List
> Subject: [OT] EJB/Struts Design Question
> 
> 
> Hi,
> 
> I have a typical case of Category and Product entity bean established in 1:N
> relationship.
> 
> In the client tier, I wish to display the list of products along with their
> category names.
> 
> 1. Struts Action make a call to ProductDelegate.
> 2. ProductDelgate to ProductManager (SessionBean).
> 3. ProductManager to ProductHome (to get entity refs of Product Entities)
> 
> __My kind of solution__
> 
> 1. I retreive collection of Product at ProductManager. All the product
> instances will have category as CMR.
> 2. In session bean, i will iterate over the collection of products.
> 3. For each product, i create a new ProductCategoryVO which will contain
> values from product and category entities.
> 4. Then return the collection of ProductCategoryVO to my action class.
> 5. Action class wll further pass on to JSP.
> 
> To me, it sounds like heavy work. What's the best way to handle this?
> Any help/pointers are appreciated.
> 
> ---
> regards
> Navjot Singh
> Net4India Ltd.
> 
> If there's only one answer, then this must not be a very interesting topic.
> 
> 
> -
> 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]: StatefulSessionBeans and HTTPSession

2004-05-28 Thread Robert Taylor
Why? It appears that you already have the appropriate "best practices"
solution. Are you trying to avoid using a BusinessDelegate?

robert

> -Original Message-
> From: Kunal H. Parikh [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 27, 2004 9:15 PM
> To: Struts Users Mailing List
> Subject: [OT]: StatefulSessionBeans and HTTPSession
> 
> 
> Hi All!
> 
> Just wanted to know if there is a better strategy to do this.
> 
> My current implementation:
> Struts/JSP --> BusinessDelegate --> StatefulSessionBean --> Multiple
> EntityBeans
> 
> Now, I add the BusinessDelegate to my HttpSession, effectively keeping the
> handle to my StatefulSessionBean.
> 
> Instead, I was hoping, if it were possible, to store a StatefulSessionBeanID
> in my HttpSession and recall the StatefulSessionBean using the ID from my
> EJB tier.
> 
> Let me know of your thoughts on this structure.
> 
> 
> TIA,
> 
> Kunal
> 
> 
> 
> -
> 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: tag

2004-05-25 Thread Robert Taylor
http://jakarta.apache.org/struts/userGuide/struts-html.html#link

> -Original Message-
> From: PADALA, SANDHYA (SBCSI) [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 25, 2004 4:47 PM
> To: [EMAIL PROTECTED]
> Cc: PADALA, SANDHYA (SBCSI)
> Subject:  tag
> 
> 
>   I am trying to generate  using  tag. I need to
> append a query string at the end of the URL
> 
> What I want to achieve is LINK
> Using  paramProperty="john">LINK
> 
> 
> Can someone give me an example on how to use  tag using
> paramID attribute.
> 
> Thanks for any assistance
> Sandhya
> 
> 
> -
> 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: Design Issue - Unchanged data getting submitted

2004-05-24 Thread Robert Taylor
I assume your using BMP for persistence. If so, then you
could implement a  Store Optimization (Dirty Marker) Strategy
which would control which fields get updated.
For CMP, the container should manage this.

For more on this strategy:
http://java.sun.com/blueprints/corej2eepatterns/Patterns/CompositeEntity.htm
l
(Then search for 'Store Optimization (Dirty Marker) Strategy' on the page)

robert



 -Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Monday, May 24, 2004 10:12 AM
To: Struts Users Mailing List
Cc: Dhanesh Vasandani
Subject: Design Issue - Unchanged data getting submitted


  Dear all,



  We have a application built using Struts.



  Below is the architecture in brief :



  JSP à Action Class à Business Delegate à Session Façade à Database



  We are not using Action forms. We are using Value Objects (VO) to pass
data between web tier and App tier (from action to EJB via Business
Delegate).



  Problem:



  We have a very big form with many input fields/select fields.



  There are two scenarios

1.. Insert the record
This seems fine. We take all the data entered by user on the screen in
action class, create VO and pass it to EJB which inserts into database.


2.. Update the record
Here we have a Problem.
Screen is populated with data retrieved from database. Here user can
update few/all fields. All the fields are under one form. User clicks on
save button. Only one Save button is available on page which submits the
complete page. The problem is that even if user does not update/add any
value and clicks on save button, all the field values (unchanged and
changed, both) will pass till EJB and the whole record in database will get
updated but in reality update require only for changed fields.

Screen is bit complex with all types of input fields with ADD MORE and
DELETE ROWS kind of functionality also.  Screen can not have more than one
SAVE button.

Please let us know what to use to solve such kind of performance issues.




  Thanks & Regards,

  Viral


RE: How to get length of an array(collection)

2004-05-24 Thread Robert Taylor


robert

> -Original Message-
> From: Ding Lei [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 22, 2004 1:45 AM
> To: [EMAIL PROTECTED]
> Subject: How to get length of an array(collection)
> 
> 
> Hello all,
>   There is an array(dsmccList) obtained by a self-defined tag, and I wanna to 
> send the length of the array
>   as an hidden property, as following:
>   
>   
> 
>   But this causes exception:
> javax.servlet.jsp.el.ELException: The "." operator was supplied with an index value 
> of type "java.lang.String" to be 
> applied to a List or array, but that value cannot be converted to an integer.
> 
>   Any ideas? Thanks!
> 
> 
> -- 
> Yours,
> 
><<<:   D i n gL e i   ::>>
>  ||  ||
>  || Ext: 8106||
>  || Email:||
>  || Dept. Of Technology/Engineering  ||
>  || Embedded Information Services Inc.   ||
>  ||  ||
> <((= )>>>
>   
> "Good-bye.  I am leaving because I am bored."
>   -- George Saunders' dying words
> 
> -
> 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: sending emails from a struts app

2004-05-18 Thread Robert Taylor
Daniel, we have several applications (both web and others) which send email for 
various reasons.
We queue up the email messages in a database and allow a separate process to sift 
through
the queue (every 30 seconds) and send any unsent messages. 

This way we avoid the threading issue in the applications and we have 
an audit trail for emails sent.

hth,

robert

> -Original Message-
> From: Daniel Perry [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 18, 2004 12:14 PM
> To: Struts User List
> Subject: sending emails from a struts app
> 
> 
> I need to send out emails from a struts app.
> 
> Any comments on the best way to go about this?
> 
> As sending mail can be slow, is there an easy way to do this in the
> background?
> 
> What happens if a client cancels a request part way through? is there any
> way to handle this / ignore cancels?
> 
> Daniel.
> 
> 
> -
> 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]



user@struts.apache.org

2004-05-14 Thread Robert Taylor
You can try using doSomething.do?p1=BU&p2=BR&M&p3=bu2

That is, replace '&' in your paramter value with '&' . 

robert

> -Original Message-
> From: bojke [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 14, 2004 11:51 AM
> To: Struts Users Mailing List
> Subject: The request parameter value contains & 
> 
> 
> Hi,
> 
> I have the request parameter and that one has value par example BR&M.
> par example:
> 
> doSomething.do?p1=BU&p2=BR&M&p3=bu2
> 
> I must use GET method for the as methodt. (I am launching the popup 
> using window.open(url)).
> 
> So, in the action, on the server side I am getting BR as the parameter 
> value instead of BR&M.
> 
> Does anybody has idea?
> 
> Thanks in advance,
> Bojan.
> 
> -
> 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: DispatchAction with Images

2004-05-13 Thread Robert Taylor
This may help:

http://issues.apache.org/bugzilla/show_bug.cgi?id=19925


robert

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Mittack
> Sent: Thursday, May 13, 2004 4:29 AM
> To: [EMAIL PROTECTED]
> Subject: DispatchAction with Images
> 
> 
> 
> When a Button is clicked I currently use JavaScript to set a flag in a formbean 
> which the Action Class then uses to determine which button I pressed. 
> Implementing in this fashion has caused numerous nested ifs in the Action Class.
> 
> So that we could seperate the code into seperate functions I was looking into 
> using DispatchAction. ( http://husted.com/struts/tips/002.html ) However as the 
> buttons are images I am unable to use Dispatch Action as clicking on a image 
> does not submit the form.
> 
> I have also looked at the workaround on JGuru ( 
> http://www.jguru.com/faq/view.jsp?EID=893423 ) for using Images but 
> implementing this way still results in nested if's in the Action class.
> 
> Any suggestions?
> 
> 
> 
> 
> 
> -
> 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: forwarding to action needing different request parameters

2004-05-12 Thread Robert Taylor
Buster, you will have to create a new ActionForward 
and populate it with the path you wish.

Check out ParameterActionForward:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg96372.html


robert


> -Original Message-
> From: Nimmons, Buster [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 3:28 PM
> To: 'Struts Users Mailing List'
> Subject: RE: forwarding to action needing different request parameters
> 
> 
> I tried this and got the following exception
> 
> java.lang.IllegalStateException: Configuration is frozen  
> at org.apache.struts.config.ForwardConfig.setPath(ForwardConfig.java:208)
> 
> at
> com.sbec.folderview.po.actions.UploadPoDocument.perform(UploadPoDocument.jav
> a:80)
> 
> -Original Message-
> From: Geeta Ramani [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 1:59 PM
> To: Struts Users Mailing List
> Subject: RE: forwarding to action needing different request parameters
> 
> 
> I think you can do this: get the ActionForward object as usual. Then use the
> ActionForward's getPath and setPath methods to add the rest of your params
> as query string parameters to the original path. This I am pretty sure will
> work.
> 
> But if you want to look at a nicer solution, maybe the RequestProcessor may
> have something to do this.. (I am not sure of this since I have not done
> it.)
> 
> regards,
> Geeta
> 
> > -Original Message-
> > From: Nimmons, Buster [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 12, 2004 2:56 PM
> > To: Struts2 (E-mail)
> > Subject: forwarding to action needing different request parameters
> > 
> > 
> > I have an Action which is usualy accessed from an html form page... It
> > requires 4 request parameters. I need to forward to this 
> > action from another
> > action but the action I'm forwarding from does not have all 4 
> > of the reuired
> > request parameters. I know what the value of the parameters 
> > should be but I
> > cannot put them in the request scope unless I use 
> > request.setAttribute()
> > however the action being forwarded to is not looking for the required
> > parameters from the Attributes but the requestParametes.. has 
> > anyone figured
> > out an easy way to modify the available requestParameters 
> > before forwarding
> > 
> > -
> > 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: Forward after returning content?

2004-05-11 Thread Robert Taylor
We capture and persist this information as well, but are not so
concerned about the small percentage that actually don't completely
download the file. If this is one of your requirements, then it 
appears you may have a valid solution.

robert

> -Original Message-
> From: John Moore [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 11, 2004 1:57 PM
> To: Struts Users Mailing List
> Subject: Re: Forward after returning content?
> 
> 
> John Moore wrote:
> 
> > Neat! Yes, this is the way. Thanks Niall and Robert too.
> >
> I just recalled one of the reasons why I wanted to do it the way I did. 
> In my original version, where I actually handle the file download, I 
> record in a database what has been downloaded by whom and when, which I 
> can do because I can determine whether the download has completed (and 
> not been cancelled by the user). In the version suggested by Niall and 
> Robert, this is not so simple, is it? I can only tell that a download 
> has been requested. I suppose a solution is to still handle the actual 
> download myself and pass the details of the download as parameters in 
> the  
> John
> 
> -- 
> =
> John Moore -Norwich, UK-[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: Forward after returning content?

2004-05-11 Thread Robert Taylor
John, we have a similar process where by we allow a customer to download a file.
Instead of the Struts handling the actual downloading, we direct the user to
the informational page for the file. That page contains either javascript or
a meta-refresh tag which redirects the request to the file to be downloaded. 
If found, the browser does the rest (displayes file save dialog box).
The user can then download the file while on the informational page for that file.
When they are done downloading the file, the dialog box goes away leaving them
on that file's informational page.

HTH,

robert



> -Original Message-
> From: John Moore [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 11, 2004 1:01 PM
> To: Struts Mailing List
> Subject: Forward after returning content?
> 
> 
>  I suppose what I am trying to do is impossible, but I just wanted to 
> make sure. I have a link where people can download a file, which is 
> handled by a DownloadAction. Below is the relevant code to download the 
> file, from the execute method. What I want to have happen is that, when 
> the file is downloaded, that they should be forwarded to a page 
> explaining what to do with the downloaded file. In my code here, that 
> would be dealt with by the last line. The problem is that it never 
> actually does get forwarded to the page, presumably because the request 
> is by this point deemed to have been fully dealt with (i.e., the 
> response has been returned). How should I go about doing this?
> 
>res.setStatus(res.SC_OK);
> res.setContentType("application/octet-stream");
> res.setHeader("Content-Disposition", "attachment; 
> filename=" + file.getName());
> res.setContentLength((int)file.length());
> BufferedOutputStream bos=new 
> BufferedOutputStream(res.getOutputStream());
> BufferedInputStream bis=new BufferedInputStream(new 
> FileInputStream(file));
> byte[] buf=new byte[32768];//do it in large chunks, 
> it's quicker
> int bytesRead;
> while((bytesRead=bis.read(buf,0,buf.length))!=-1) {
> bos.write(buf,0,bytesRead);
> }
> bos.close();
> bis.close();
> saveInfo(downloadForm); //save the details in the 
> database
> forward=mapping.findForward("success");
> 
> John
> 
> =
> John Moore -Norwich, UK-[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: JSP 2.0?

2004-05-10 Thread Robert Taylor
I can only speak for myself, and yes, I run ServletExec 5.0
which is compliant with Servlet 2.4 and JSP 2.0. specifications.

For more information on ServletExec:
http://www.newatlanta.com/products/servletexec/index.jsp

You can download a free development copy here. 
http://www.newatlanta.com/c/products/servletexec/download/home

They will require you to create an account before downloading, but
its free. 


robert



> -Original Message-
> From: Chaikin, Yaakov Y (US SSA)
> [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 1:21 PM
> To: [EMAIL PROTECTED]
> Subject: JSP 2.0?
> 
> 
> Hi,
> 
> I keep seeing people mention JSP EL in their posts. That's from JSP 2.0
> spec. Question is: how many servers support that? Just looked up
> Weblogic 8.1 and it doesn't support it. I know Tomcat 5.x supports it...
> 
> Are there a lot of people using JSP 2.0 out there?
> 
> Thanks.
> 
> Yaakov Chaikin
> Software Engineer
> BAE SYSTEMS
> 301-838-6899 (ph)
> 301-838-6802 (fax)
>  
> 
> 
> -
> 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: inserting delimiters

2004-05-06 Thread Robert Taylor
JSTL Spec:
http://jcp.org/aboutJava/communityprocess/final/jsr052/index2.html


The following code runs in my 2.4 Servlet container.
and produces the output:

0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9
0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9

<%@ page import="java.util.ArrayList"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

<%
ArrayList outer = new ArrayList();
for (int i = 0; i < 10; i++) {
ArrayList inner = new ArrayList();

for (int j = 0; j < 10; j++) {

inner.add(String.valueOf(j));

}

outer.add(inner);   
}
request.setAttribute("outer", outer);

%>





JSTL Nested Loop






  
/

  





robert

> -Original Message-
> From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 8:48 PM
> To: Struts Users Mailing List
> Subject: Re: inserting delimiters
> 
> 
> Thanks again. Where is the spec?
> I tried what you gave me, slightly edited, as follows:
> 
> 
> 
> 
> /
> 
> 
> 
> 
> I get the following exception:
> [ServletException in:/WEB-INF/tiles/content/misc/EditSeries.jsp] 
> /WEB-INF/tiles/content/misc/EditSeries.jsp(21,0) According to TLD or 
> attribute directive in tag file, attribute items does not accept any 
> expressions' org.apache.jasper.JasperException: 
> /WEB-INF/tiles/content/misc/EditSeries.jsp(21,0) According to TLD or 
> attribute directive in tag file, attribute items does not accept any 
> expressions at 
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83) 
> at
> 
> Know what's wrong?
> 
> Robert Taylor wrote:
> 
> >There are several good references on line for learning JSTL, 
> >but I have found the actual spec itself to be great.
> >
> >I'm assuming you want something like
> >AAA/BBB/CCCDDD/EEE/FFF
> >etc...
> >
> >
> >
> >
> >/
> >
> >
> >
> >
> >To avoid the first , use the same logic as the inner loop:
> >
> >
> >
> >
> >/
> >
> >
> >
> >
> >should produce something like:
> >
> >AAA/BBB/CCCDDD/EEE/FFF
> >etc...
> >
> >BTW, this code is untested, but it should work.
> >
> >robert
> >
> >  
> >
> >>-Original Message-
> >>From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, May 05, 2004 8:01 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: inserting delimiters
> >>
> >>
> >>Thanks Robert. It looks like I need to learn JSTL. Any
> >>suggestions? Also, the original problem I posted has changed
> >>a little. I am now stuffing a Vector of Vectors of SeriesCategory
> >>(my object). SeriesCategory has a getSafeTitle() method that gets
> >>an XML safe character string title for the category. This is a little
> >>like the problem I posted, except that the outer loop needs a
> >> delimiter and the inner loop needs the / delimiter. What
> >>might that look like?
> >>
> >>Robert Taylor wrote:
> >>
> >>
> >>
> >>>One solution would be the following:
> >>>
> >>>
> >>>/
> >>>
> >>>
> >>>
> >>>robert
> >>>
> >>> 
> >>>
> >>>  
> >>>
> >>>>-Original Message-
> >>>>From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> >>>>Sent: Wednesday, May 05, 2004 8:02 AM
> >>>>To: [EMAIL PROTECTED]
> >>>>Subject: inserting delimiters
> >>>>
> >>>>
> >>>>I have a Collection of Strings that I
> >>>>want to render with delimiters. Suppose
> >>>>The Strings are "AAA", "BBB", and "CCC".
> >>>>For example, I want to delimit the strings
> >>>>with /
> >>>>
> >>>>So the insertion would look like this:
> >>>>AAA/BBB/CCC
> >>>>
> >>>>How would you recommend I go about it?
> >>>>If I were doing this in Java

RE: inserting delimiters

2004-05-05 Thread Robert Taylor
There are several good references on line for learning JSTL, 
but I have found the actual spec itself to be great.

I'm assuming you want something like
AAA/BBB/CCCDDD/EEE/FFF
etc...




/




To avoid the first , use the same logic as the inner loop:




/




should produce something like:

AAA/BBB/CCCDDD/EEE/FFF
etc...

BTW, this code is untested, but it should work.

robert

> -Original Message-
> From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 8:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: inserting delimiters
> 
> 
> Thanks Robert. It looks like I need to learn JSTL. Any
> suggestions? Also, the original problem I posted has changed
> a little. I am now stuffing a Vector of Vectors of SeriesCategory
> (my object). SeriesCategory has a getSafeTitle() method that gets
> an XML safe character string title for the category. This is a little
> like the problem I posted, except that the outer loop needs a
>  delimiter and the inner loop needs the / delimiter. What
> might that look like?
> 
> Robert Taylor wrote:
> 
> >One solution would be the following:
> >
> >
> >/
> >
> >
> >
> >robert
> >
> >  
> >
> >>-Original Message-
> >>From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, May 05, 2004 8:02 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: inserting delimiters
> >>
> >>
> >>I have a Collection of Strings that I
> >>want to render with delimiters. Suppose
> >>The Strings are "AAA", "BBB", and "CCC".
> >>For example, I want to delimit the strings
> >>with /
> >>
> >>So the insertion would look like this:
> >>AAA/BBB/CCC
> >>
> >>How would you recommend I go about it?
> >>If I were doing this in Java instead of JSP
> >>I would treat the first pass through the loop
> >>as a special case. I'm not sure how to do this
> >>with the logic or JSTL tags.
> >>
> >>Thanks.
> >>Dean Hoover
> >>
> >>
> >>-
> >>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: inserting delimiters

2004-05-05 Thread Robert Taylor
One solution would be the following:


/



robert

> -Original Message-
> From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 8:02 AM
> To: [EMAIL PROTECTED]
> Subject: inserting delimiters
> 
> 
> I have a Collection of Strings that I
> want to render with delimiters. Suppose
> The Strings are "AAA", "BBB", and "CCC".
> For example, I want to delimit the strings
> with /
> 
> So the insertion would look like this:
> AAA/BBB/CCC
> 
> How would you recommend I go about it?
> If I were doing this in Java instead of JSP
> I would treat the first pass through the loop
> as a special case. I'm not sure how to do this
> with the logic or JSTL tags.
> 
> Thanks.
> Dean Hoover
> 
> 
> -
> 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: Clearing Input fields

2004-05-05 Thread Robert Taylor
One solution would be to make sure your form is in the request scope (not session)
and that you redirect (not forward) back to the page once you have finished
processing the user input. 

robert

> -Original Message-
> From: Brian Boyle [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 9:40 AM
> To: [EMAIL PROTECTED]
> Subject: Clearing Input fields
> 
> 
> Hi guys!
> 
> I was wonderng if anyone could help me with aporblem I have. I input data 
> into my input fields on my JSP page. If I press reset the fields are 
> cleared. I press submit and my ActoinForm reads the data in and my Action 
> processes it etc However, when I return to this page again the same data 
> is still there in hte input fields. When I press my reset button nothing 
> happens. I want to be able to return to the page again and the fields be 
> cleared. I don't want to see the same ddata in them.
> 
> Any ideas on how to do this?
> 
> Thanks for your help
> 
> Brian
> 
> _
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
> http://join.msn.com/?page=features/virus
> 
> 
> -
> 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: looping question

2004-05-04 Thread Robert Taylor
Close...





robert


> -Original Message-
> From: Frank Maritato [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 04, 2004 1:55 PM
> To: [EMAIL PROTECTED]
> Subject: looping question
> 
> 
> Is there a way to loop over a counter (not over a collection) in either 
> struts or jstl? Looked like logic:iterate and c:forEach both require a 
> collection.
> 
> Something like this:
> 
> 
> 
> 
> I really don't want to create a collection of Integer objects to get 
> around this...any ideas?
> -- 
> Frank Maritato
> 
> -
> 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: initialising user settings following login

2004-05-03 Thread Robert Taylor
One solution would be to use a filter and place some 
flag in the current session which indicates if the user
has been initialized. Map the filter so that its executed
upon each request. If the user hasn't been initialized,
then execute initialization code and update intialization flag, 
else ignore.

Another strategy would be to use lazy initialization and initialize things
as needed by the user, instead of all at once.

robert

> -Original Message-
> From: Tim Dudgeon [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 03, 2004 5:09 PM
> To: [EMAIL PROTECTED]
> Subject: initialising user settings following login
> 
> 
> I'm wanting to use container based authentication (e.g form based login) 
> with my struts app, but initialize some user settings (which will be 
> read from a database) as soon as the user succesfully logs in. Any 
> suggestions for how to best achieve this?
> 
> Thanks
> 
> Tim
> 
> -
> 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] Page Cannot Be Displayed

2004-05-03 Thread Robert Taylor
LOL !!!

> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 03, 2004 3:14 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] Page Cannot Be Displayed
> 
> 
> Joshi, Naveen wrote:
> 
> > All,
> > 
> > Just wondering if any of you get this "Page Cannot Be Displayed" error once in a 
> > while, in Internet Explorer. Is there 
> a solution to this issue.
> > 
> > Thanks
> > Naveen
> 
> I'm sorry for not replying sooner to this message. Just getting caught 
> up with struts-users messages.
> 
> Joshi, this is very serious. You might want to consider upgrading all of 
> your RAM to something like 23GB. Also make sure you raise the computer 
> so that it is not directly touching the floor (I find suspending the 
> computer from wires beneath my desk helps). Also make sure you are using 
> your foot to move the mouse when browsing in IE, using your hand could 
> cause be the cause of such errors as you are describing.
> 
> hth,
> 
> -- 
> Rick
> 
> -
> 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
> >

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

2004-04-22 Thread Robert Taylor
+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
> > >the new one...
> > >
> > >hth
> > >Alexander
> > >
> > >
> > >
> > It is actually working.  Started all over from scratch.  Can't figure
> > how exactly what went wrong except for one or two things.  Like the
> > example shows for the property file :
> >
> > hibernate.dialect net.sf.hibernate.dialect.M

<    1   2   3   >