Re: how to decide how many beans to use?

2002-02-21 Thread Patrick Refondini

Check Struts Validator MultiRegistration Example.

In short what I got out of it is that you can deal with one ActionForm 
on several page thanks to :

1. the field page="..." attribute found in validation.xml form element.
2. the validator:javasecript page="..." attribute for client side 
validation if you wish.


Some code extracts to illustrate:

1. In validation.xml


  

  


  
 
 
  
 

 
  
 
 
  
 
   datePatternStrict
   ${datePattern}
 
 
  
   


2. In a first JSP



   In a second JSP




Here I use only one ActionForm (ValidatorForm) called userForm for two JSP.


may this help you ! , Patrick




Jesse Alexander (KADA 12) wrote:

>1 actionform per page
>except for wizards: 1 actionform per suite of pages that make up the wizard
>
>There is doc around showing how to deal with Davids validation and wizards.
>
>hth
>Alexander Jesse
>
>-Original Message-
>From: Domen, Ken [mailto:[EMAIL PROTECTED]]
>Sent: Donnerstag, 21. Februar 2002 01:07
>To: '[EMAIL PROTECTED]'
>Subject: how to decide how many beans to use?
>
>
>I'm running into a problem.  
>
>I started out with one FormBean.  It's basically a flattened domain object.
>I'm using the Dave W. Validation package and in the validation.xml, you
>define
>that for a particular FormBean you validate certain fields.  Different pages
>need validation on different fields so using only 1 FormBean won't work.
>
>So do you create a new FormBean for each page that needs different
>validations?
>
>thanks.
>ken
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:submit button

2002-02-21 Thread Konstantina Stamopoulou

Thank U for your reply and for the code details!
I used this approach to see which button was pressed and the 
tag  to pass the product id.

Thank U all for your help!
Konstantina

- Original Message -
From: "Maturo, Larry" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 5:30 PM
Subject: RE: html:submit button


> Hi Konstantina,
>
> Since you haven't supplied enough details, I'll assume that
> you have a table, and each row contains info on one product,
> plus two buttons, one for displaying info and one for do
> something with the product.
>
> In this case you then make each button look like an array, in
> your form bean, declare something like:
>
> private int editIndex = -1;
> private int infoIndex = -1;
> private String editString = "";
> private String infoString = "";
>
> public String getEditString(int index) {
> return editString;
> }
>
> public final void setEditString(int index, String editString){
> this.editString = editString;
> this.editIndex = index;
> }
>
>public int getEditIndex () {
> return editIndex;
>}
>
> public String getInfoString(int index) {
> return infoString;
> }
>
>public final void setInfoString(int index, String infoString){
> this.infoString = infoString;
> this.infoIndex = index;
>}
>
>public int getInfoIndex() {
>return infoIndex;
>}
>
> In your jsp, inside your iterate, you woud use:
>
> 
> 
>
> When submitted you can use getInfoString and getEditString
> to see which button was pressed (the pressed button will have
> a value other than "") and then use the appropriate get index
> to see which item was selected.
>
> -- Larry Maturo
>[EMAIL PROTECTED]
>
>
> -Original Message-
> From: Konstantina Stamopoulou [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 4:02 AM
> To: Struts Users Mailing List
> Subject: html:submit button
>
>
> Hello,
> I have a problem and I can't fingure out the solution to it. Here is my
> case:
>
> I have a list of products (PoductBean) on my .jsp and each one of it have
> two buttons (html:submit)  :
>
> Button1 --> Display Information for this product
> Button2 --> Use the information to do something else
>
> My question is: How can I decide which product has been selected so as to
> display its information on my next page?
> From what I have seen the html:submit tag does not contain any attributes
to
> pass request parameters.
>
> Thank U in advance,
> Konstantina
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: how to decide how many beans to use?

2002-02-21 Thread Jesse Alexander (KADA 12)

1 actionform per page
except for wizards: 1 actionform per suite of pages that make up the wizard

There is doc around showing how to deal with Davids validation and wizards.

hth
Alexander Jesse

-Original Message-
From: Domen, Ken [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 21. Februar 2002 01:07
To: '[EMAIL PROTECTED]'
Subject: how to decide how many beans to use?


I'm running into a problem.  

I started out with one FormBean.  It's basically a flattened domain object.
I'm using the Dave W. Validation package and in the validation.xml, you
define
that for a particular FormBean you validate certain fields.  Different pages
need validation on different fields so using only 1 FormBean won't work.

So do you create a new FormBean for each page that needs different
validations?

thanks.
ken



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ActionForm and default values

2002-02-21 Thread Jesse Alexander (KADA 12)

1 : no
2 : no

Struts allows to forward from an action to another action!!!
(should be documented in the mailing-list-archive and the dtd,...)

This way each page is a single problem (action to init, display,
action to evaluate). Struts-config.xml will tie them together.

Whether you use 1 or 2 actions for a page (earlier posts in the thread)
does not matter. I prefer 1 action and control the "flow" using the
parameter-attribute in the action-definition in struts-config.xml
In the action I just have a 
if ("init".equals(mapping.getParameter()))...
else if ("eval".equals(mapping.getParameter()))...

hope this helps
Alexander Jesse


-Original Message-
From: Ian Beaumont [mailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 20. Februar 2002 17:52
To: 'Struts Users Mailing List'
Subject: RE: ActionForm and default values


This means that in the action for the "select item" I need to get hold of
the form bean for the next page I'm going to so I can populate it.  
Two problems with this:
1. How do I get hold of the form bean?  Do I create it myself?
2. This all relies on me knowing the mappings of what page I'm going to go
to next so I can populate the form bean.  This defeats the object of having
the struts-XML file.

Below is the text from a previous email I sent.  The only reply I got was
the example didn't show 'best practises'.  In which case, what is the best
practise.


I've been through the struts-example again.  What I want to achieve is
something similar to the 'Edit user registration details'.  This
pre-populates the form with existing details.  Now the way the example does
this is to create the RegistrationForm in the action and then populate it.

>From "EditRegistrationAction.java"
// Populate the user registration form
if (form == null) {
if (servlet.getDebug() >= 1)
servlet.log(" Creating new RegistrationForm bean under key "
+ mapping.getAttribute());
form = new RegistrationForm();
if ("request".equals(mapping.getScope()))
request.setAttribute(mapping.getAttribute(), form);
else
session.setAttribute(mapping.getAttribute(), form);
} 

This seems really nasty as you are now hard-coding the name of the form
class that will be used for validation on the next page.  Any changes in
future to the "struts-config" file may well break the system.  It doesn't
feel right to have to create these forms ourselves.

Wouldn't it be more sensible to have a pre-creation method on the action of
a form that allowed allowed a the action to populate the form fields before
the page was displayed.



-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: 20 February 2002 16:38
To: Struts Users Mailing List
Subject: Re: ActionForm and default values


Ian Beaumont <[EMAIL PROTECTED]> writes:

> Ok - I want to select an item on one page which will take me to
> another page where I can edit the selected item.

Sounds common enough.

> How do I pre-populate the form for the edit page in the action for
> the selected item as the form won't exist at this point?

As long as you have the "name" attribute set correctly for the
appropriate  element of struts-config, the formbean will
always exist!  The controller servlet creates it for you.

-- Jim

> -Original Message-
> From: Jim Crossley [mailto:[EMAIL PROTECTED]]
> Sent: 20 February 2002 16:06
> To: Struts Users Mailing List
> Subject: Re: ActionForm and default values
> 
> 
> It's pretty simple, I think.  
> 
> 1) The formbean is passed to the action's perform method by the Struts
> controller.
> 
> 2) The action populates the formbean (ReportDataForm) from the value
> object (ReportData).
> 
> 3) The action returns the appropriate ActionForm to render the view.
> 
> 4) The view (ReportData.jsp) need look no more complicated than this:
> 
> 
>   
> 
> 
> -- Jim
> 
> Ian Beaumont <[EMAIL PROTECTED]> writes:
> 
> > This question seems to be going around and around this mailing list
> and
> > no
> > one has produced an answer.
> > 
> > -Original Message-
> > From: Dua, Amit [mailto:[EMAIL PROTECTED]]
> > Sent: 20 February 2002 15:46
> > To: 'Struts Users Mailing List'
> > Cc: '[EMAIL PROTECTED]'
> > Subject: RE: ActionForm and default values
> > 
> > 
> > But then how will I set the default values
> > 
> > amit
> > 
> > -Original Message-
> > From: Keith [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 20, 2002 10:36 AM
> > To: Struts Users Mailing List
> > Subject: Re: ActionForm and default values
> > 
> > 
> > try removing the value= attribute from your  > hope that helps.
> > 
> > --- "Dua, Amit" <[EMAIL PROTECTED]> wrote:
> > > Hi 
> > > 
> > > I want to populate my page with default value 
> > > 
> > > So, in order to do that 
> > > I have a value object (ReportData), ReportDataForm (Form Bean)
> > > 
> > > I populate the Value object through one of the Action classes and

Re: Development Environment

2002-02-21 Thread CyberZombie

Trying not to cheer too much (just a satisfied user), Cygwin is a 
complete *nix environment that runs as a Windows process.  I love 
symbolic links, mounts, gcc, perl, awk and all the other tools -- 
especially the bash shell.  And I run it on every PC I use -- office and 
home.  At home I have sshd (secure shell daemon - part of OpenSSH which 
is included in Cygwin) and have no problems punching through any 
corporate firewall to not only access my home PC, but (with the help of 
TightVNC) bring up my home desktop remotely.

I like to think of Cygwin as a way of getting to me the most powerful 
open source tools on the planet while still letting me use all of the 
GUI tools I want when I have need for something more visual...

http://www.cygwin.com

[EMAIL PROTECTED] wrote:

>OK, I'll bite. I'm a Linux ignoramus. What do you do with Cygwin? Is there
>more to it than a bash shell?
>
>-Original Message-
>From: CyberZombie [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 21, 2002 9:42 PM
>To: Struts Users Mailing List
>Subject: Re: Development Environment
>
>
>Cygwin rocks!  W2K, Cygwin, Ant, Apache, Tomcat, Weblogic and Visual 
>SlickEdit (w/ vim for quick stuff) here...
>
>Jonathan James wrote:
>
>>Windows 2000, cygwin & vim
>>
>>- Original Message -
>>From: "Dave Wellman" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Thursday, February 21, 2002 11:41 AM
>>Subject: Development Environment
>>
>>
>>>Hello,
>>>
>>>Quick question, what is the preferred development environment that you are
>>>all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>
>>
>>
>>>For additional commands, e-mail:
>>>
>>
>>
>>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>
>
>>For additional commands, e-mail:
>>
>
>
>>
>
>
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: G., PF1, PF2, etc.). This configuration

2002-02-21 Thread Gaspar González Oliva

Your message are infected with
This file: "emulation.bat" was infected with: "W32.Magistr.39921@mm" virus.

The file was deleted by Norton AntiVirus. Thursday, February 21, 2002 22:05


- Original Message -
From: "Ceki G?lc?" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, February 21, 2002 3:54 PM
Subject: G., PF1, PF2, etc.). This configuration


> In character oriented connections not running a window manager, the
following
> terminals/keyboards are supported.  (1) DEC VT-100 series and higher.
This
> includes well behaved VT clones and emulators.  If you are using a VT
series
> terminal, be sure that the term environment variable is set properly
before
> invoking emacs. (2) PC AT keyboard under MS-DOS.
>
> Be sure to read the SPECIAL NOTES FOR SOME PLATFORMS sections to see if
those
> notes apply to you.
>
>
> III.






> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment

2002-02-21 Thread ltorrence

OK, I'll bite. I'm a Linux ignoramus. What do you do with Cygwin? Is there
more to it than a bash shell?

-Original Message-
From: CyberZombie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 9:42 PM
To: Struts Users Mailing List
Subject: Re: Development Environment


Cygwin rocks!  W2K, Cygwin, Ant, Apache, Tomcat, Weblogic and Visual 
SlickEdit (w/ vim for quick stuff) here...

Jonathan James wrote:

>Windows 2000, cygwin & vim
>
>- Original Message -
>From: "Dave Wellman" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, February 21, 2002 11:41 AM
>Subject: Development Environment
>
>
>>Hello,
>>
>>Quick question, what is the preferred development environment that you are
>>all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>
>
>>For additional commands, e-mail:
>>
>
>
>>
>>
>
>
>--
>To unsubscribe, e-mail:

>For additional commands, e-mail:

>
>





--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: Development Environment

2002-02-21 Thread CyberZombie

Always forgetting something (rather remembering after reading other 
follow-ups).  Add to the mix TogetherJ (analysis and design,) EJBGen 
(EJB 2.0 CMP, Session facades and Value Object creation) and some 
home-grown tools for decorating the VO's in Struts Forms...

CyberZombie wrote:

> Cygwin rocks!  W2K, Cygwin, Ant, Apache, Tomcat, Weblogic and Visual 
> SlickEdit (w/ vim for quick stuff) here...
>
> Jonathan James wrote:
>
>> Windows 2000, cygwin & vim
>>
>> - Original Message -
>> From: "Dave Wellman" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Thursday, February 21, 2002 11:41 AM
>> Subject: Development Environment
>>
>>
>>> Hello,
>>>
>>> Quick question, what is the preferred development environment that 
>>> you are
>>> all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>>>
>>>
>>> -- 
>>> To unsubscribe, e-mail:
>>>
>> 
>>
>>> For additional commands, e-mail:
>>>
>> 
>>
>>>
>>>
>>
>>
>> -- 
>> To unsubscribe, e-mail:   
>> 
>> For additional commands, e-mail: 
>> 
>>
>>
>
>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
>
>





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread CyberZombie

Cygwin rocks!  W2K, Cygwin, Ant, Apache, Tomcat, Weblogic and Visual 
SlickEdit (w/ vim for quick stuff) here...

Jonathan James wrote:

>Windows 2000, cygwin & vim
>
>- Original Message -
>From: "Dave Wellman" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, February 21, 2002 11:41 AM
>Subject: Development Environment
>
>
>>Hello,
>>
>>Quick question, what is the preferred development environment that you are
>>all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>
>
>>For additional commands, e-mail:
>>
>
>
>>
>>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: anyone using Castor with Struts?

2002-02-21 Thread John Menke

Michael,

thanks for answering, I was not able to log in.  (I will download IE 6).
Does this site have source code examples of using Castor with Struts?

-john

-Original Message-
From: Michael Mok [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 5:50 PM
To: 'Struts Users Mailing List'
Subject: RE: anyone using Castor with Struts?


John

We have implemented a couple of web applications using STRUTS and CASTOR.
Check out www.teatimej.com (framework and api include struts, castor, mysql
and itext)

Regards,

Michael Mok

 -Original Message-
From:   John Menke [mailto:[EMAIL PROTECTED]]
Sent:   Friday, 22 February 2002 9:44
To: struts-user
Subject:anyone using Castor with Struts?

I am considering using Castor as a Persistance mechanism with Struts.  Does
anyone currently use Castor?  Since Castor is desinged to work with any bean
like class, to implement castor should I use Castor QQL directly from my
ActionForm classes or should there be some kind of redirection from the
ActionForm to a more Castor specific class?

-john


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Regexp problems

2002-02-21 Thread Dave J Dandeneau

Has anyone had any troubles with the regular expressions package (jakarta-regexp-1.2) 
that is packaged with the validator? We are having trouble getting our regular 
expressions to work. We are testing them against a different regexp package and they 
work, but they don't work in the jakarta package.

Thanks,
dave dandeneau

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: anyone using Castor with Struts?

2002-02-21 Thread Michael Mok

John

We have implemented a couple of web applications using STRUTS and CASTOR.
Check out www.teatimej.com (framework and api include struts, castor, mysql
and itext)

Regards,

Michael Mok

 -Original Message-
From:   John Menke [mailto:[EMAIL PROTECTED]]
Sent:   Friday, 22 February 2002 9:44
To: struts-user
Subject:anyone using Castor with Struts?

I am considering using Castor as a Persistance mechanism with Struts.  Does
anyone currently use Castor?  Since Castor is desinged to work with any bean
like class, to implement castor should I use Castor QQL directly from my
ActionForm classes or should there be some kind of redirection from the
ActionForm to a more Castor specific class?

-john


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




anyone using Castor with Struts?

2002-02-21 Thread John Menke

I am considering using Castor as a Persistance mechanism with Struts.  Does
anyone currently use Castor?  Since Castor is desinged to work with any bean
like class, to implement castor should I use Castor QQL directly from my
ActionForm classes or should there be some kind of redirection from the
ActionForm to a more Castor specific class?

-john


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 





RE: dynamic input fields

2002-02-21 Thread Press, Michael


I just did this.  I based my solution on the Dynamic Properties solution by
Kevin Wang
(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01374.html),
but I needed to do it without modifying/extending Struts itself.

I created a BaseActionForm that my ActionForms extend.  The Base class has a
method that takes the HTTP request, and for each parameter in the request
that doesn't have a setter method in the form (determined via reflection),
it adds it to a hashtable.  It also provides methods to retrieve the
hashtable or one named dynamic property.

Then, my Action classes first call form.setDynamicMethods(request), and then
they can retrieve the parameters from the known getter methods or from
getDynamicProperty() or getDynamicProperties().

There's a slight performance penalty in that the request parameters are
traversed twice (once by Struts and once by me), but it's important to me
(and my customers ;-)to be able to upgrade Struts without re-integrating my
customizations.

Michael


> Hi 
> I have a view(a jsp) which gets its Input fields Dynamically. 
> The number of input field is not constant.
> how can I create Action form in this scenerio.
> 
> Thanks
> Amit
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread Max Cooper

IntelliJ IDEA is the coolest thing since sliced bread!

Despite having a JBuilder license, I used to spend most of my code editing
time in TextPad because it was quick. I recently tried IntelliJ and have
completely switched over. It has some really cool features like Refactorings
(try them and see), CVS and Ant integration, remote debugging, and lots
more. IntelliJ is pure Java and high quality (doesn't crash), but it can get
a little slow on occasion. Very highly recommended.

-Max

- Original Message -
From: "Witbeck, Shane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 9:48 AM
Subject: RE: Development Environment


> Im using Idea from http://www.intellij.com on Win2k.
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




does anyone just read the source code? (WAS Re: tag)

2002-02-21 Thread Andre Beskrowni

it is free after all...  another good way to try to solve a problem is to
step through the source code in a debugger.  

i realize this list exists to help other and get help from others, but the
amount of time people spend going back and forth saying "nope that doesn't
solve my problem.  i need more help."  is mind boggling when could spend an
hour or two working on the problem on their own and have it solved.  (note:
you'd be amazed how self-sufficient you can become when you dare to look at
the source code.)

as for henry, i don't mean to pick on you, i'm just feeling impatient today.
try using string attributes in your form bean.

ab

> -Original Message-
> From: Henry Lu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 3:31 PM
> To: Struts Users Mailing List
> Subject: Re:  tag
> 
> 
> Thanks Eddie. But it is not detail enough to make it work. 
> Here is my code
> and I got the errors:
> 
> javax.servlet.ServletException: BeanUtils.populate
> 
> Root Cause:
> java.lang.IllegalArgumentException: argument type mismatch
> 
> 
> int the form:
> 
> private FormFile myfile;
> 
> public void setMyfile(FormFile f)
>myfile = f;
> }
> 
> public FormFile getMyfile()
>return myfile;
> }
> 
> ///
> in the jsp file:
> 
> 
> 
> ///
> Why it doesn't work? How to fix?
> 
> 
> --
> -
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
> 
> On Thu, 21 Feb 2002, Eddie Bush wrote:
> 
> > I'm sorry you comment in validate indicated to me that you 
> were asking about
> > validate.  Try this:
> >
> > 
> http://jakarta.apache.org/struts/userGuide/building_view.html#
> form_input
> >
> > ... scroll up just a tad and you should have what you're 
> looking for.
> >
> >
> > - Original Message -
> > From: "Henry Lu" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, February 21, 2002 1:23 PM
> > Subject: Re:  tag
> >
> >
> > > Eddie, you are not answering my question at all. My 
> question is how to use
> > >  tag and retrieve the content of file.
> > >
> > >
> > > 
> --
> 
> > -
> > > Henry Lu
> > > MCITphone: 
> (734) 936-2063
> > > University of Michigan Medical Center   fax:   
> (734) 763-4372
> > >
> > > On Thu, 21 Feb 2002, Eddie Bush wrote:
> > >
> > > > The validate function can be implemented to validate 
> your form input.
> > If
> > > > you find erros, you can put those errors into an 
> ActionErrors object and
> > > > then return them.  The 'best practice' approach would 
> probably be to
> > have
> > > > your validation encapsulated in a 'utility bean' that you could
> > instantiate
> > > > to make calls against (that's how I am doing mine 
> anyway).  However, for
> > a
> > > > small project you could easily include all of you login right in
> > validate.
> > > > There is a good example of doing this in the struts 
> documentation, and I
> > > > believe the users guide covers the topic quite well 
> too.  If you haven't
> > > > already looked them over, you really should.
> > > >
> > > > How to best use the validation mechanisms provided by 
> struts is quite a
> > > > debated issue =)
> > > >
> > > > No matter where/how you implement your logic to 
> validate your form,
> > you'll
> > > > want to create an ActionErrors instance and add 
> ActionError instances to
> > it,
> > > > and finally return the ActionErrors object.  Very simply:
> > > >
> > > > ActionErrors actionErrors = new ActionErrors();
> > > >
> > > > ... then, assuming they don't specify a file - and 
> assuming it is a
> > required
> > > > field.
> > > >
> > > > actionErrors.add("File", new 
> ActionError("error.file.required"));
> > > >
> > > > and then at the end of your perform, don't forget to:
> > > >
> > > > return actionErrors;
> > > >
> > > > The text passed to the ActionError constructor 
> ("error.file.required")
> > needs
> > > > to be specified in your application resources file.
> > > >
> > > > HTH,
> > > >
> > > > Eddie
> > > >
> > > > - Original Message -
> > > > From: "Henry Lu" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Sent: Thursday, February 21, 2002 12:58 PM
> > > > Subject: Re:  tag
> > > >
> > > >
> > > > > Thanks for your info! But I need a little bit more details:
> > > > >
> > > > > //int my FileForm.java file
> > > > > /
> > > > > public class FileForm extends ActionForm
> > > > > {
> > > > >private String theFile;
> > > > >
> > > > >public

G., PF1, PF2, etc.). This configuration

2002-02-21 Thread Ceki Gülcü

In character oriented connections not running a window manager, the following
terminals/keyboards are supported.  (1) DEC VT-100 series and higher.  This
includes well behaved VT clones and emulators.  If you are using a VT series
terminal, be sure that the term environment variable is set properly before
invoking emacs. (2) PC AT keyboard under MS-DOS.

Be sure to read the SPECIAL NOTES FOR SOME PLATFORMS sections to see if those
notes apply to you.


III.
<>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Development Environment

2002-02-21 Thread Patrick Refondini

JBuilder 5 Professional, Linux RedHat 7.2

Dave Wellman wrote:

>Hello,
>
>Quick question, what is the preferred development environment that you are
>all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: dynamic input fields

2002-02-21 Thread SHURTLEFF,ROBERT (HP-FtCollins,ex1)

You have to do it all yourself.

I have several of these.

In my Action, I manually extract what comes in and put them in a Map.

Struts by itself does not handle this situation nor table data very well.

However, I believe that there are some other addons that do the table piece.
Not sure about the dynamic piece. 

Robert


-Original Message-
From: Dua, Amit [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 16:50
To: 'Struts Users Mailing List'
Subject: dynamic input fields



Hi 
I have a view(a jsp) which gets its Input fields Dynamically. 
The number of input field is not constant.
how can I create Action form in this scenerio.

Thanks
Amit


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




dynamic input fields

2002-02-21 Thread Dua, Amit


Hi 
I have a view(a jsp) which gets its Input fields Dynamically. 
The number of input field is not constant.
how can I create Action form in this scenerio.

Thanks
Amit


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: EJB = bad = MS.net

2002-02-21 Thread Thinh Doan

I vote to keep this discussion going on here since 1) I don't want to
subscribe to another mailing list, and 2) it's a "natural" progression for
me to follow the MVC (Struts) framework/mindset.  There are topics related
to Struts here that I can't afford to read them all, perhaps EJBs could be
one topic for those who are not interested in this subject.

About Ghoot's point that we need to pick the right technology for the right
application/requirements, I'd totally agree.  And I'm relying on this type
of discussions to help me make that initial decision, provided it's factual
and objective.  If everyone says technology XYZ should be avoided because
1)... 2)..., don't go there, why would I waste time considering or
evaluating it?

So many thanks to those who have contributed to this thread.

Thinh

-Original Message-
From: Cakalic, James [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 1:51 PM
To: 'Struts Users Mailing List'
Subject: RE: EJB = bad = MS.net - worrisome flow of ignorant off-topic
"a dvice" on this board


I'm not sure it is entirely off-topic, Alex. Many people are concerned, and
rightly so, about application of technologies and design patterns in the
development of systems which are also utilizing Struts. Sometimes the use of
a framework like Struts can result in confusion by less enlightened ones
than yourself about how to 'hook-up' the rest of the system. I've seen
several posts now by Ted Husted that talk about the proper allocation of
responsibilities to Action classes v. "business delegates" which interact
with the model. Meaningful advice about patterns and technologies can help
people who are searching for proven solutions. Unfortunately, the thread
went a bit astray even as it started because of the character of the
comments.

BTW, as for mapping "500 data tables to 500 entity beans" being an "idiotic
architecture", I went to an IBM WebSphere Commerce Suite course last month
and learned that the product has 300 tables, nearly all of which are mapped
by CMP entity beans. There are almost no session beans in the design. And
they don't use container managed transactions. Every unit of work started by
a web hit is wrapped in a JTA user transaction by the web app front
controller and the transaction includes the response generation. Not quite
the architecture I would have expected. Can't speak to any of the -ilities
of this design. But just goes to show, I think, that there are plenty of
ways to tackle the problem.

As for off-topic discussions, I would have expected you to flame the "Which
development environment" thread a little more vigorously than this one. But
maybe what is irrelevant, frivolous, ignorant, or off-topic is a matter of
personal opinion?

Jim

> -Original Message-
> From: Esterkin, Alex [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 12:56 PM
> To: 'Struts Users Mailing List'
> Cc: [EMAIL PROTECTED]
> Subject: RE: EJB = bad = MS.net - worrisome flow of ignorant off-topic
> "a dvice" on this board
> Importance: High
>
>
> I hope not many enterprise applications are built using this ignorant
> 'advice'.  IBM argued against EJBs up until recently because
> of countless
> deficiencies in EJB container implementation in WebSphere
> 3.5.*.  Since
> WebSphere 4.0 introduction, they have clearly warmed up to
> using EJBs in
> their "best practices" white papers.
>
> As any other technology, EJBs can be abused. If one mapped a fully
> normalized DB schema consisting of 500 data tables to 500
> entity beans, this
> would be an idiotic architecture. In any case, this has
> nothing to do with
> MVC or Struts.
>
> I suggest members of this list stick to the main topic of discussion -
> Struts.  Struts has nothing to do with EJBs.  In a properly designed
> application, EJBs, DAOs or any other persistence related components
> shouldn't be accessed directly from presentation elements and
> components,
> such as JSP tags.
>
> Sticking closer to the topic of this list will allow to
> reduce the flow of
> postings to more reasonable levels.
>
> Best regards,
> 
>Alex Esterkin
> =
>
>
>
> -Original Message-
> From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 20, 2002 12:42
> To: Struts Users Mailing List
> Cc: [EMAIL PROTECTED]
> Subject: EJB = bad = MS.net
>
>
> Home page of Jakarta has this
> http://jakarta.apache.org/site/news.html#0130.2
> on this:
> http://www.mail-archive.com/general%40jakarta.apache.org/msg03376.html
>
> I agree. Doing EJBs is bad on many levels and creates more problems.
> Avoid EJB if you want to stay in Java.
>
> Alternative is to just use Struts + TomCat + RowSet (or DAO
> if you are
> doing something simple or small) and done. This is the sweet
> spot. MVC
> is all you need.
>
> Alternative, do EJBs and your organization WILL switch to MS
> .NET on the
> next project, leave J2EE, and you have to learn VB.ne

Re: Struts tag for label

2002-02-21 Thread Jay sissom

http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean/package-summary.html#doc.Output



Jay

On Thu, 21 Feb 2002, Maris Orbidans wrote:

> 
> hello
> 
> What if I want to just display some property of form bean (without any
> input field) ?
> Is there a tag for it ?
> 
> 
> thanx in advance
> 
> Maris Orbidans
> Data Pro
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




struts with div tag

2002-02-21 Thread Yu, Yanhui

Hi,

I have an interesting problem in the past two days and have not been able to
solve it, I am seeking help from you:
I have a form with three tables stacked vertically on top of each other.
The table in the middle would hold dynamically many rows of data.  I am
thinking using div tag to enclose this middle table so the user can still
see the first and last table on the same page without scrolling the page up
and down.  Since the middle table has the div tag so the user can scroll up
and down on that table.  But as soon as I add the  tag, the middle
table would show many blank lines on top of the real data-rows.  Any ideas?

Thanks,
Yanhui Yu

-Original Message-
From: John Ng [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 7:47 PM
To: Struts Users Mailing List
Subject: nocache in the web.xml


Hi, I encountered a rather interesting problem over
the past few days.  When I have nocache set in the
web.xml, I am not able to generate PDF from the
servlet in the IE browser.  I believe that this is due
to the specifics of IE.

As soon as I take the nocache out from the web.xml,
the streaming of PDF to the IE works fine.  

Now, the question is can I somehow disable the nocache
features for a specific page?  (ie the page that is
used to generate the dynamic PDF)

Thanks,
John 


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: EJB = bad = MS.net

2002-02-21 Thread Yu, Yanhui

Hi,

I am involved in a pretty large project (we have not really started coding
yet).  As far as I can tell, we seem to go with Struts + WSAD + EJBs & Java
+ JSP.  Am I right to interpret that you mean the combination of Struts and
EJBs are problem prone?  Please help me to clarify on this.  Thank you very
much,

Yanhui




-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 11:42 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: EJB = bad = MS.net


Home page of Jakarta has this
http://jakarta.apache.org/site/news.html#0130.2
on this:
http://www.mail-archive.com/general%40jakarta.apache.org/msg03376.html

I agree. Doing EJBs is bad on many levels and creates more problems. 
Avoid EJB if you want to stay in Java.

Alternative is to just use Struts + TomCat + RowSet (or DAO if you are 
doing something simple or small) and done. This is the sweet spot. MVC 
is all you need.

Alternative, do EJBs and your organization WILL switch to MS .NET on the 
next project, leave J2EE, and you have to learn VB.net.

EJBs are for newbies. (If you need middleware (very rare) use SOAP)

lol,
Vic



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: action and form contract

2002-02-21 Thread Yu, Yanhui

Hi I have been reading all the emails from this mailing list, and found it
quite time consuming opening one, read, closing one then opening another...

I wonder if I can view these messages through a web?  like something for
JavaRanch and any other web sites where posting/answering questions are all
through the web.  If so, what is the site address?  Thanks very much for an
answer.

Yanhui Yu
===
Pioneer HiBred International, Inc.
515-253-2122




-Original Message-
From: Carter, Steve [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 11:09 AM
To: Struts-User (E-mail)
Subject: action and form contract


On husted.com, Ted Husted wrote:
Do not check for null ActionForm beans in your Actions
If an Action expects an ActionForm bean, then its API contact with the
ActionMappings should require that this bean, or a subclass, be named in the
ActionMapping. The Actions contact wit the controller is that it will always
instantiate the bean before the Action is called. If either contact is
broken, the application should expose a null pointer exception so that the
problem is fixed and the misunderstanding resolved. Whether an Action
expects an ActionForm bean should be specified in its Javadoc.

Now I'm wondering if 'contact' was a type and what he meant was 'contract',
that is, in the sense of an API contract or implied constrain,
pre-condition.

(You out there Ted?)

Anyway, this seems like a good idea. I'm always complaining that exceptions
are often overused or misused in Java, and this seems like a good use: let
the exception raise havoc, in order to inform you of a really exceptional
condition, and one that should be exposed if it exists.



Steve Carter
Sr. Software Engineer
Swift Rivers
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to set attribute via submit

2002-02-21 Thread Low, Liang

I don't think there is a way to set different value for the submit's value
and its label. The syntax for an HTML submit is . Looks like it's impossible to
differentiate them. At first I thought struts's  will have some
magical way of doing it but no. 

You migth have to find a different way to handle multiple submits in one
form.

Liang

-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 12:55 PM
To: Struts
Subject: How to set attribute via submit


Hi,

I have a form with a couple of buttons. The form is submitted to a
navigation action class that just looks at an action parameters and forwards
the request. I want created a series of submit buttons with the same
property but different values. If I set the value property of the tag then
that is displayed as the text of the button. What I need to do is set the
property and value of the button with a different String for the text
displayed on the button.

Any ideas?

Thanks

Alex


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tag and FormFile

2002-02-21 Thread Eddie Bush

Actually I'm getting 'odd' output - sometimes it's entirely blank.  That's
annoying.

Is anyone aware if this has been an issue?  Would updating to the nightly
build be a possible solution?  I'm using 1.0.2 I believe - that's what was
the current 'stable' release when I chose to adopt Struts.

Thanks!

Eddie

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 4:00 PM
Subject: Re:  tag and FormFile


> What does your html:form tag look like, Henry?  Be sure you specify
> encType="multipart/form-data" as an attribute to the html:form tag.  ex:
>
> 
> 
> 
>
> I'm having an odd problem with mine hanging for some odd reason though -
it
> just sits there now.  It DOES make it to the action however.  I just threw
> together a simple action that prints the file's contents.  I didn't think
it
> was doing anything but it apprantly flushed the buffer when I killed the
> built-in tomcat server.  I got the entire file contents printed in my
output
> window.
>
> HTH Henry!
>
> Eddie
>
>
> - Original Message -
> From: "Henry Lu" <[EMAIL PROTECTED]>
> To: "struts users" <[EMAIL PROTECTED]>
> Sent: Thursday, February 21, 2002 2:53 PM
> Subject:  tag and FormFile
>
>
> > Is there any one who may help me to figure out how to use 
rag
> > and FormFile in a ActionForm? I got errors where I tried to use both.
> > errors are:
> >
> > javax.servlet.ServletException: BeanUtils.populate
> > 
> > Root Cause:
> > java.lang.IllegalArgumentException: argument type mismatch
> >
> > my JSP file has:
> >
> > 
> >
> > and my ActionForm has:
> >
> > private FormFile myfile;
> >
> > // getter and setter
> >
> >
> >
>
> --
> -
> > Henry Lu
> > MCITphone: (734) 936-2063
> > University of Michigan Medical Center   fax:   (734) 763-4372
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tag and FormFile

2002-02-21 Thread Eddie Bush

I set method="post" too ... sorry I didn't mention that.

- Original Message -
From: "Henry Lu" <[EMAIL PROTECTED]>
To: "struts users" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 2:53 PM
Subject:  tag and FormFile


> Is there any one who may help me to figure out how to use  rag
> and FormFile in a ActionForm? I got errors where I tried to use both.
> errors are:
>
> javax.servlet.ServletException: BeanUtils.populate
> 
> Root Cause:
> java.lang.IllegalArgumentException: argument type mismatch
>
> my JSP file has:
>
> 
>
> and my ActionForm has:
>
> private FormFile myfile;
>
> // getter and setter
>
>
>
> --
-
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tag and FormFile

2002-02-21 Thread Eddie Bush

What does your html:form tag look like, Henry?  Be sure you specify
encType="multipart/form-data" as an attribute to the html:form tag.  ex:





I'm having an odd problem with mine hanging for some odd reason though - it
just sits there now.  It DOES make it to the action however.  I just threw
together a simple action that prints the file's contents.  I didn't think it
was doing anything but it apprantly flushed the buffer when I killed the
built-in tomcat server.  I got the entire file contents printed in my output
window.

HTH Henry!

Eddie


- Original Message -
From: "Henry Lu" <[EMAIL PROTECTED]>
To: "struts users" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 2:53 PM
Subject:  tag and FormFile


> Is there any one who may help me to figure out how to use  rag
> and FormFile in a ActionForm? I got errors where I tried to use both.
> errors are:
>
> javax.servlet.ServletException: BeanUtils.populate
> 
> Root Cause:
> java.lang.IllegalArgumentException: argument type mismatch
>
> my JSP file has:
>
> 
>
> and my ActionForm has:
>
> private FormFile myfile;
>
> // getter and setter
>
>
>
> --
-
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment - JSP's

2002-02-21 Thread Keith Chew


Yes, the ultradev plugin supports taglibs (look at Strut's Resources page).

Macromedia has some annoying bugs with formatting, but tolerable at the
moment.

Keith


-Original Message-
From: Molitor, Stephen [mailto:[EMAIL PROTECTED]]
Sent: Friday, 22 February 2002 10:42 a.m.
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: Development Environment - JSP's


You said you use Macromedia for JSP development.  Are there plug-ins that
recognize Struts custom tags?  We've been using ordinary editors (JBuilder,
Emacs, TextPad) for JSP development, but there's got to be a better way.
(We do use Macromedia for the initial HTML prototype.)

Steve Molitor
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




dynamic input fields

2002-02-21 Thread Dua, Amit

Hi 
I have a view(a jsp) which gets its Input fields Dynamically. 
The number of input field is not constant.
how can I create Action form in this scenerio.

Thanks
Amit

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment - JSP's

2002-02-21 Thread Molitor, Stephen

You said you use Macromedia for JSP development.  Are there plug-ins that
recognize Struts custom tags?  We've been using ordinary editors (JBuilder,
Emacs, TextPad) for JSP development, but there's got to be a better way.
(We do use Macromedia for the initial HTML prototype.)

Steve Molitor
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Error 500 using property of type FormFile

2002-02-21 Thread Eddie Bush

Hey gang

I was trying to implement an upload to help Henry Lu get his going, since
I'll need the same functionalty later anyway.  I believe I have everything
hooked up correctly, but I get an error 500 when I submit the form.  Any
help regarding this would be most appreciated by myself, and I'm sure Henry
too.  Here is the resulting error:

Error: 500
Location: /upload.do
Internal Servlet Error:

javax.servlet.ServletException: BeanUtils.populate
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774)
 at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.IllegalArgumentException: argument type mismatch
 at java.lang.reflect.Method.invoke(Native Method)
 at
org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:98
8)
 at
org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:90
4)
 at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932)
 at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509)
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:772)
 at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

Thanks so much!

Eddie



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: EJB = bad = MS.net

2002-02-21 Thread Robert Claeson

Thompson, Darryl wrote:

> Tomcat is much better at serving
> webpages the WLS or Websphere,

Not surprising, as Websphere doesn't serve web pages. It works in tandem 
with Apache (or MS IIS, or iPlanet, or...).



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to name, package Actions

2002-02-21 Thread Molitor, Stephen

I have two best-practices questions:

FIRST QUESTION:  How best to name Action classes?  Do you name an action
after the button that initiates it, the place it comes from?  Or, do you
name the action for what it goes to?  Or, for what the action does -- but
sometimes it's not so simple.  For example, imagine this scenario:

1.  From the 'Show Widget' page, user selects the 'Delete Widget' button.
2.  action1 is performed, which forwards to the 'Are You Sure?' page.
4.  User selects 'yes'
5.  action2 is performed, which physically deletes the record.

What are good names for action1 and action2?  If you name your actions for
the user gestures that trigger them, you might have this:

action1:  DeleteWidgetAction
action2:  YesReallyDeleteTheWidgetAction

Naming the first action 'DeleteWidgetAction' seems to make sense, since its
triggered by clicking on the 'Delete Widget' button.  But, then it's hard to
come up with a name for action2.  Plus, action1's name is misleading,
because it doesn't actually perform the delete.  OK, lets try naming the
actions after what they really do:

action1:  ConfirmDeleteWidgetAction
action2:  DeleteWidgetAction

This seems a bit better, but action1's name is a bit awkward.  

In one way, Actions are like events triggered by clicking on something.  In
another sense, Actions represent the transition between two states, the
previous and next pages.  Or, they're just reusable commands.  This last
view is probably the most accurate, but I find it hard to come up with names
for commands.  Any heuristices or guidelines for naming actions would be
appreciated.


SECOND QUESTION:
How best to package Actions and ActionForms?  It's no problem for small
apps, but becomes a problem for larger ones.  Do you have lots of small
packages?  Do you put ActionForms and Actions in the same package?   Or,
separate sub-packages for Actions and ActionForms?  

Lets say I working for an application called 'MyApp', for a company called
'Acme', and that there's a set of pages in the app dealing with user
registration.  Here are some packaging options:

OPTION 1 - By app --> sub-app
com.acme.myapp.registration.Form1
com.acme.myapp.registration.Form2
com.acme.myapp.registration.Action1
com.acme.myapp.registration.Action2

OPTION 2 - By app --> sub-app --> object type
com.acme.myapp.registration.forms.Form1
com.acme.myapp.registration.forms.Form2
com.acme.myapp.registration.actions.Action1
com.acme.myapp.registration.actions.Action2

OPTION 3 - By app --> object type --> sub-app
com.acme.myapp.forms.registration.Form1
com.acme.myapp.forms.registration.Form2
com.acme.myapp.actions.registration.Action1
com.acme.myapp.actions.registration.Action2

(I don't care for option 3.)

Any thoughts, other schemes?  I presume one would a matching sub-directory
structure for the JSP's.


Thanks!

Steve Molitor
[EMAIL PROTECTED]














--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts JAR and TLDs are out of sync.

2002-02-21 Thread @Basebeans.com

Subject: Struts JAR and TLDs are out of sync.
From: "Nav Sandhu" <[EMAIL PROTECTED]>
 ===
I just upgraded to a nightly build (2/15) of Struts.  I have noticed that
the Struts.Jar and the TLDs are out of sync.  There are many attributes in
the TLDs that are not present in the Struts Jar code.  Some are:

struts-html.tld
(all of the following are invalid)
alt
altKey
titleKey

struts-bean.tld
WriteTag
bundle
format
formatKey
locale

Any idea why this is occurring?

Nav





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tag and FormFile

2002-02-21 Thread Henry Lu

Is there any one who may help me to figure out how to use  rag
and FormFile in a ActionForm? I got errors where I tried to use both.
errors are:

javax.servlet.ServletException: BeanUtils.populate

Root Cause:
java.lang.IllegalArgumentException: argument type mismatch

my JSP file has:



and my ActionForm has:

private FormFile myfile;

// getter and setter



---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts design question about maintenance screens

2002-02-21 Thread Jakkampudi, ChandraseKhar

Another drawback of Option 1 is that if your jsp's change frequently (adding
fields in the form, different formatting etc.) having two jsp's requires you
to update two files. This is not a problem in itself but it might make for
more difficult maintenance because you might make changes on one jsp but
forget the other.
Just another thing to consider when you make your design choice.

Option 3 sounds attractive. Thanks for the idea, Emaho.

JC

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:09 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: Struts design question about maintenance screens



Wow!
Great reply.   I am saving this one.

thanks,
Theron



 

"Emaho, Ghoot"

  
ICS.co.uk>   cc:

 Subject: RE: Struts design
question about maintenance screens   
02/21/02 09:51 AM

Please respond to

Struts Users

Mailing List

 

 




There are a number of ways to achieve this, and again (!) it's about
choice, although I must say this can be confusing for newbie  (and
experienced!) struts users.

1. 2 Actions, 1 for 'pre' and 1 for 'post' processing
2. An 'action' parameter, with switch behaviour in the action class
3. 'isVirgin()' extension to the Action Form.

Option 3 is basically an added method to the ActionForm class that allows
the Action to determine if 'pre' or 'post' processing the form, without the
need for an 'action' parameter. Consider the following in the Action class,
where 'sf' refers to the instance of the form:

// determine if pre-processing, and if so continue on to the View
if (sf.isVirgin())
return
mapping.findForward(ChikiConstants.ACTION_FORWARD_SUCCESS);

// getting this far indicates post-processing...

/**
 * Determines if pre or post processing the form.
 * Criteria being null indicates pre-processing.
 *
 * @return true if pre-processing the form
 */
public boolean isVirgin () {
return ( (criteria == null) );
}

The 'isVirgin' method returns true if 'pre' processing the form, and false
if 'post' processing.

Option 1 gives good seperation, but can lead to an unneccesary
proliferation of Action classes in large apps
Option 2 achieves the same, but can lead to 'messy' Actions
Option 3 needs additional logic in the form, but allows pre and post
processing in the one Action - however, this doesn't extend as far as
seperate actions and action parameters when you need to do more than just
pre and post processing.

In our applications we have used all 3 at various times. We tend to use
option 3 when we just need the split between pre and post processing, eg a
Search or Login action. In more complex sceanrio's we tend to use option 1
or 2.

Try to determine which best fits your scenario. Depending on your context,
one solution may be better than the other, but this will not be true across
the board for all scenarios. Think through your real needs before choosing
the solution.

With regards to your exact scenario, we developed option 3 as a solution to
this very situation, so I would suggest option 3 might be best suited,
although you will ultimately have to decide ! Having developed option 3 and
implemented it, we have found it to be the most effective way of getting
around this. As I previously stated, option 1 and 2 come into their own in
other situations.

Hope this helps - if you need any more detail let me know,

Ghoot


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2002 17:10
> To: Struts Users Mailing List
> Subject: Struts design question about maintenance screens
>
>
>
> Hi Folks:
>
> thanks to your help, you indicated that the Action should preload form
> values on a maintenance form.   This works great.
>
> I have an Action object that allows maintenance on a table
> (call it table
> A).   This action object handles "preloading of data"
> as well as the actual "updating of data" (Add/Edit/View).
>
> Another question I have:
> - The action object gets kind of "kludgey" in how I have to
> keep track of
> "whether I am preloading data (called from a html:link)" or
> whether I am
> "Applying" the data (called from the form Submit).
> Is it "overkill" if I create 2 different actions (1 action to
> preload the
> data and another to "update" the data)?I think by doing
> it this way, it
> may be easier for me to incorporate the "sensitive form resubmit"
> prevention by using tokens.
>
> Any suggestions are much appreciated.
>
> thanks,
> Theron
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>

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

RE: Struts vs Template Engine or Both

2002-02-21 Thread Phase Communcations

If find it interesting that the argument of placing scriptlets into a jsp
page is reason enough not to use them. Has anyone heard of custom tags. If
you want to avoid placing scriptlets in your page then develop a tag that
handles the data. I have been developing in jsp for a year and a half and
have NEVER put a scriptlet in a page. I have found struts/jsp to be a great
platform for separating view and control. The other thing is let's not get
religious about MVC. There may, rarely (if ever), be an instance where
someone needs to grab some data form a view (hisss). But I have seen SQL
tags and other such tag-libs that might do someone some good who is working
on a project and wants to get a portion of it done and working. Then we can
go back and put things the way they should be (MVC). I have worked in
production enivronments where you need to get it done yesterday and you have
to write sloppy code to get it done. That's life. It's nice to have options.
I see that JSP provides that. Struts allows for the flexibility. This is a
good thing.

I am not getting in to a holy war over struts/jsp versus struts/velocity. I
am just saying. Stop with the scriptlet argument its not that major of a
point and your designers don't have to see a stitch of it and they shouldn't
have to use it if you understand what you are developing with and how best
to use it.

Thanks for allowing the soundoff,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws

-Original Message-
From: Gabriel Sidler [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 6:13 AM
To: Struts Users Mailing List
Subject: Re: Struts vs Template Engine or Both


Dave,
a Struts user posted the following message yesterday. I think
it pretty nicely summarizes what makes Velocity templates attractive
to some developers.


> From: "Matt Ho" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Subject: RE: Velocity-Tools / Struts
> Date: Tue, 19 Feb 2002 18:57:02 -0800
>
> We've been using Struts/Velocity for some time now and we find it to be
> an extremely well matched combination.  One of the main advantages of
> Velocity is that the syntax is incredibly easy.  I can explain it to a
> designer who has never seen it before and expect them to be useful
> within an hour.
>
> One of the nicest things it enforces is the separation of presentation
> layer and business logic.  It removes the desire to "fix" problems by
> just putting a small change into the JSP via scriptlets.  It also makes
> the code a _lot_ more readable which also reduces the development time.


We are working on integrating Velocity tightly with Struts. A prototype
with several simple application examples is available here:

http://husted.com/struts/resources/velstruts.zip

This contains a *.war file. Put the *.war into the webapps directory of
a Tomcat installation and restart. Then point your browser at
http://server:port/velstruts/ to see and try the examples. We are
currently in the process of redesigning the API and putting together
documentation. I hope for a first release version in the comming weeks.
I will announce major changes on this list.

Regarding your questions:

- As you can see in the examples, JSPs and Velocity templates can be
used in the same application. No restrictions.

- Regarding the learning curve of Velocity. The language is
really simple. Less than 10 directives. Velocity templates don't
allow Java scriptlet. If you have been relying on that feature
a lot, existing applications might need some redesign to be able
to use Velocity. Velocity really enforces a clear separation between
view and control.

- Regarding performance: Many users have reported that they
obtain about the same performance with JSP and Velocity (it really
depends on the types of templates). So, performance it not an
argument for or against one of the two technologies. We plan to do
some more performance tests with a first release version.


Gabe


Crazy Dave wrote:
>
> Hi,
>
> I'm a new JSP developer (previously been working with
> SilverStream pages).
>
> I've been working with Tomcat 4 & Struts and find
> JSP's to be a little clumsy with the mixing of script
> code and html but I am persevering because developing
> my JSP skills is the best way to remain employable.
>
> I read a little about templete engines
> (velocity/turbine) but don't wish to change to them
> just yet as most potential employers are sold on JSP.
>
> I was wondering is it easy to use a combination of
> JSP/Struts with a template engine and if so are there
> benifits or should I really only pick one or the
> other.
>
> Is there any performance issues JSP vs Templates.
>
> Any constructive comments on these points or related
> would be appreciated.
>
> Cheers David Cruwys ([EMAIL PROTECTED])
>
> __
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.

Re: struts-example won't run

2002-02-21 Thread NTL

> --- Subhadra Vemuri <[EMAIL PROTECTED]> wrote:
> > I had the same problem too - and I didn't have to
> > change any source code. I just reinstalled
> > tomcat and all my troubles were gone. It just
> > worked without any changes. I downloaded
> > tomcat version 3.3a.

Yes, I got around the same problem by upgrading from Tomcat 3.2 to 4.0.  The
release notes for Struts said that it should work with 3.2, but it didn't.
I was a little alarmed that the example did not work. I think I saw a
pending bug report somewhere.

Guy Roberts
Sun Certified Web Component Developer

Looking for Struts/JSP/Java work in the UK 0115 9820709




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: pre-compiling JSPs w/ Struts

2002-02-21 Thread Chris Mason

If you are using Web Logic as your servlet container, you can add the
following to your weblogic.xml file:


  precompile
  true


I don't know if Tomcat has a similar feature.

hth

Chris

-Original Message-
From: Joseph Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 2:22 PM
To: [EMAIL PROTECTED]
Subject: pre-compiling JSPs w/ Struts


I'd like to go ahead and voice some thanks to anyone who can help me out on
this...

Ok, I know that this has hit the list a few times before, and I've peered
into the mail-list archive (as well as my crystal ball) to figure this one
out, but I was wondering if someone could give me a little validation:

We already have an existing application built on the Struts framework (works
great, woo-hoo!), but now we'd like to precompile the JSPs for production
purposes (current production uses non-precompiled JSPs).  However, we'd like
to retain the ability to use non-precompiled JSPs for development purposes,
QA, etc.  I understand how to precompile the JSPs, and they should reside (I
think) in the WEB-INF/classes folder.

As I understand it, to enable precompilation with struts, one has to define
a servlet-mapping (for each JSP class) in the web.xml file, and then refer
to these mappings'  values in your  tags within the
struts-config.xml.

To switch between precompiled and non-precompiled JSPs, one would swap out
web.xml files (one w/ servlet mappings, another without), and switch your
build target to package either JSP pages or their corresponding compiled
classes.

So, here's an example (as I see it) of using a precompiled JSP servlet
mapping w/ a Struts forward (let me know if this is wrong):


RE: html:submit button

2002-02-21 Thread Maturo, Larry

Hi Konstantina,

Since you haven't supplied enough details, I'll assume that
you have a table, and each row contains info on one product,
plus two buttons, one for displaying info and one for do
something with the product.

In this case you then make each button look like an array, in 
your form bean, declare something like:

private int editIndex = -1;
private int infoIndex = -1;
private String editString = "";
private String infoString = "";

public String getEditString(int index) {
return editString;
}

public final void setEditString(int index, String editString){
this.editString = editString;
this.editIndex = index;
}

   public int getEditIndex () {
return editIndex;
   }

public String getInfoString(int index) {
return infoString;
}

   public final void setInfoString(int index, String infoString){
this.infoString = infoString;
this.infoIndex = index;
   }

   public int getInfoIndex() {
   return infoIndex;
   }

In your jsp, inside your iterate, you woud use:

 
 

When submitted you can use getInfoString and getEditString
to see which button was pressed (the pressed button will have
a value other than "") and then use the appropriate get index
to see which item was selected.

-- Larry Maturo
   [EMAIL PROTECTED]


-Original Message-
From: Konstantina Stamopoulou [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:02 AM
To: Struts Users Mailing List
Subject: html:submit button


Hello,
I have a problem and I can't fingure out the solution to it. Here is my
case:

I have a list of products (PoductBean) on my .jsp and each one of it have
two buttons (html:submit)  :

Button1 --> Display Information for this product
Button2 --> Use the information to do something else

My question is: How can I decide which product has been selected so as to
display its information on my next page? 
>From what I have seen the html:submit tag does not contain any attributes to
pass request parameters.

Thank U in advance,
Konstantina






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tag

2002-02-21 Thread Eddie Bush

Unfortunately, I haven't gotten to the piece of my application that requires
this functionalty yet.  I haven't really messed with it - just remember
seeing that in the docs.  I will see if I can make it work and let you know.

Eddie

- Original Message -
From: "Henry Lu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 2:30 PM
Subject: Re:  tag


> Thanks Eddie. But it is not detail enough to make it work. Here is my code
> and I got the errors:
>
> javax.servlet.ServletException: BeanUtils.populate
> 
> Root Cause:
> java.lang.IllegalArgumentException: argument type mismatch
>
> 
> int the form:
>
> private FormFile myfile;
>
> public void setMyfile(FormFile f)
>myfile = f;
> }
>
> public FormFile getMyfile()
>return myfile;
> }
>
> ///
> in the jsp file:
>
> 
>
> ///
> Why it doesn't work? How to fix?
>
>
> --
-
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
> On Thu, 21 Feb 2002, Eddie Bush wrote:
>
> > I'm sorry you comment in validate indicated to me that you were asking
about
> > validate.  Try this:
> >
> > http://jakarta.apache.org/struts/userGuide/building_view.html#form_input
> >
> > ... scroll up just a tad and you should have what you're looking for.
> >
> >
> > - Original Message -
> > From: "Henry Lu" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, February 21, 2002 1:23 PM
> > Subject: Re:  tag
> >
> >
> > > Eddie, you are not answering my question at all. My question is how to
use
> > >  tag and retrieve the content of file.
> > >
> > >
> >
> --
> > -
> > > Henry Lu
> > > MCITphone: (734) 936-2063
> > > University of Michigan Medical Center   fax:   (734) 763-4372
> > >
> > > On Thu, 21 Feb 2002, Eddie Bush wrote:
> > >
> > > > The validate function can be implemented to validate your form
input.
> > If
> > > > you find erros, you can put those errors into an ActionErrors object
and
> > > > then return them.  The 'best practice' approach would probably be to
> > have
> > > > your validation encapsulated in a 'utility bean' that you could
> > instantiate
> > > > to make calls against (that's how I am doing mine anyway).  However,
for
> > a
> > > > small project you could easily include all of you login right in
> > validate.
> > > > There is a good example of doing this in the struts documentation,
and I
> > > > believe the users guide covers the topic quite well too.  If you
haven't
> > > > already looked them over, you really should.
> > > >
> > > > How to best use the validation mechanisms provided by struts is
quite a
> > > > debated issue =)
> > > >
> > > > No matter where/how you implement your logic to validate your form,
> > you'll
> > > > want to create an ActionErrors instance and add ActionError
instances to
> > it,
> > > > and finally return the ActionErrors object.  Very simply:
> > > >
> > > > ActionErrors actionErrors = new ActionErrors();
> > > >
> > > > ... then, assuming they don't specify a file - and assuming it is a
> > required
> > > > field.
> > > >
> > > > actionErrors.add("File", new ActionError("error.file.required"));
> > > >
> > > > and then at the end of your perform, don't forget to:
> > > >
> > > > return actionErrors;
> > > >
> > > > The text passed to the ActionError constructor
("error.file.required")
> > needs
> > > > to be specified in your application resources file.
> > > >
> > > > HTH,
> > > >
> > > > Eddie
> > > >
> > > > - Original Message -
> > > > From: "Henry Lu" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Sent: Thursday, February 21, 2002 12:58 PM
> > > > Subject: Re:  tag
> > > >
> > > >
> > > > > Thanks for your info! But I need a little bit more details:
> > > > >
> > > > > //int my FileForm.java file
> > > > > /
> > > > > public class FileForm extends ActionForm
> > > > > {
> > > > >private String theFile;
> > > > >
> > > > >public FileForm() {}
> > > > >
> > > > >public void setTheFile(String file)
> > > > >{
> > > > >   this.theFile = file;
> > > > >}
> > > > >
> > > > >public String getTheFile()
> > > > >{
> > > > >   return this.theFile;
> > > > >}
> > > > >
> > > > >...
> > > > >
> > > > >public ActionErrors validate(...)
> > > > >{
> > > > >   
> > > > >   // what should i do here?
> > > > >}
> > > > > }
> > > > >

Re: tag

2002-02-21 Thread Henry Lu

Thanks Eddie. But it is not detail enough to make it work. Here is my code
and I got the errors:

javax.servlet.ServletException: BeanUtils.populate

Root Cause:
java.lang.IllegalArgumentException: argument type mismatch


int the form:

private FormFile myfile;

public void setMyfile(FormFile f)
   myfile = f;
}

public FormFile getMyfile()
   return myfile;
}

///
in the jsp file:



///
Why it doesn't work? How to fix?


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Thu, 21 Feb 2002, Eddie Bush wrote:

> I'm sorry you comment in validate indicated to me that you were asking about
> validate.  Try this:
>
> http://jakarta.apache.org/struts/userGuide/building_view.html#form_input
>
> ... scroll up just a tad and you should have what you're looking for.
>
>
> - Original Message -
> From: "Henry Lu" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, February 21, 2002 1:23 PM
> Subject: Re:  tag
>
>
> > Eddie, you are not answering my question at all. My question is how to use
> >  tag and retrieve the content of file.
> >
> >
> > --
> -
> > Henry Lu
> > MCITphone: (734) 936-2063
> > University of Michigan Medical Center   fax:   (734) 763-4372
> >
> > On Thu, 21 Feb 2002, Eddie Bush wrote:
> >
> > > The validate function can be implemented to validate your form input.
> If
> > > you find erros, you can put those errors into an ActionErrors object and
> > > then return them.  The 'best practice' approach would probably be to
> have
> > > your validation encapsulated in a 'utility bean' that you could
> instantiate
> > > to make calls against (that's how I am doing mine anyway).  However, for
> a
> > > small project you could easily include all of you login right in
> validate.
> > > There is a good example of doing this in the struts documentation, and I
> > > believe the users guide covers the topic quite well too.  If you haven't
> > > already looked them over, you really should.
> > >
> > > How to best use the validation mechanisms provided by struts is quite a
> > > debated issue =)
> > >
> > > No matter where/how you implement your logic to validate your form,
> you'll
> > > want to create an ActionErrors instance and add ActionError instances to
> it,
> > > and finally return the ActionErrors object.  Very simply:
> > >
> > > ActionErrors actionErrors = new ActionErrors();
> > >
> > > ... then, assuming they don't specify a file - and assuming it is a
> required
> > > field.
> > >
> > > actionErrors.add("File", new ActionError("error.file.required"));
> > >
> > > and then at the end of your perform, don't forget to:
> > >
> > > return actionErrors;
> > >
> > > The text passed to the ActionError constructor ("error.file.required")
> needs
> > > to be specified in your application resources file.
> > >
> > > HTH,
> > >
> > > Eddie
> > >
> > > - Original Message -
> > > From: "Henry Lu" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Thursday, February 21, 2002 12:58 PM
> > > Subject: Re:  tag
> > >
> > >
> > > > Thanks for your info! But I need a little bit more details:
> > > >
> > > > //int my FileForm.java file
> > > > /
> > > > public class FileForm extends ActionForm
> > > > {
> > > >private String theFile;
> > > >
> > > >public FileForm() {}
> > > >
> > > >public void setTheFile(String file)
> > > >{
> > > >   this.theFile = file;
> > > >}
> > > >
> > > >public String getTheFile()
> > > >{
> > > >   return this.theFile;
> > > >}
> > > >
> > > >...
> > > >
> > > >public ActionErrors validate(...)
> > > >{
> > > >   
> > > >   // what should i do here?
> > > >}
> > > > }
> > > >
> > > > //
> > > > //int the jsp page:
> > > > 
> > > > 
> > > >
> > > > Could you tell me what exactly to do and where to add code?
> > > >
> > > > Thank you very much!
> > > >
> > > >
> > >
> > --
> > > -
> > > > Henry Lu
> > > > MCITphone: (734) 936-2063
> > > > University of Michigan Medical Center   fax:   (734) 763-4372
> > > >
> > > > On Thu, 21 Feb 2002, SUPRIYA MISRA wrote:
> > > >
> > > > > In your validation function first store it.
> > > > > 

Implement HTTP and HTTPS in a safe, flexible, and easily maintainable manner

2002-02-21 Thread Niall Pemberton

This gives an example of how to integrate SSL into a Web App, using Struts
as an example.


http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html



winmail.dat
Description: application/ms-tnef

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: EJB = bad = MS.net

2002-02-21 Thread dIon Gillard

Edward Q. Bridges wrote:

>i like EJBs (note that i said "like" and not "love").  i think they have 
>some applicability.
>
>however, a peeve of mine about EJBs and the spec is this claim of "location 
>independence."  furthermore, the claim to location independence is eroding:  
>note that in the 1.1 spec it claims: 
>   "The client view of an entity bean is location independent."  (8.1)
>and in the corresponding section of the 2.0 spec, this has evolved to the 
>more mealy-mouthed:
>   "The client of an entity bean may be a remote client or the client may 
>be a local client."
>
>the point of location independence is that a client should not be concerned 
>about where the method call is taking place.  but, this has been built into 
>the spec from day one. ("RemoteException", "RemoteHome", . . . ).
>
The method call can take place anywhere, but always appears to be 
remote. That could be many remote machines though. Location independence 
is not about local vs remote, it's more about box1 vs box12.

>
>
>perhaps this is a trivial point, but it is misleading, misrepresentative, 
>and is an example (IMHO) of how EJBs are successful at making things more 
>complicated than they need to be.
>
>regards
>--e--
>
>
>On Fri, 22 Feb 2002 08:55:52 +1100, dIon Gillard wrote:
>
>>- location independence
>>


-- 
dIon Gillard, Multitask Consulting
http://www.multitask.com.au/developers




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment

2002-02-21 Thread Keith Chew


UML modeling: TogetherSoft
CMP data modeling: TogetherSoft
Cutting-code: IntelliJ
Debugging: IntelliJ
JSP Presentation: Macromedia Ultradev
Build: Ant
Deployment descriptors: XDoclet
Test: Ant + JUnit
Deploy: Ant

Regards
Keith




-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: Friday, 22 February 2002 6:41 a.m.
To: [EMAIL PROTECTED]
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




pre-compiling JSPs w/ Struts

2002-02-21 Thread Joseph Barefoot

I'd like to go ahead and voice some thanks to anyone who can help me out on
this...

Ok, I know that this has hit the list a few times before, and I've peered
into the mail-list archive (as well as my crystal ball) to figure this one
out, but I was wondering if someone could give me a little validation:

We already have an existing application built on the Struts framework (works
great, woo-hoo!), but now we'd like to precompile the JSPs for production
purposes (current production uses non-precompiled JSPs).  However, we'd like
to retain the ability to use non-precompiled JSPs for development purposes,
QA, etc.  I understand how to precompile the JSPs, and they should reside (I
think) in the WEB-INF/classes folder.

As I understand it, to enable precompilation with struts, one has to define
a servlet-mapping (for each JSP class) in the web.xml file, and then refer
to these mappings'  values in your  tags within the
struts-config.xml.

To switch between precompiled and non-precompiled JSPs, one would swap out
web.xml files (one w/ servlet mappings, another without), and switch your
build target to package either JSP pages or their corresponding compiled
classes.

So, here's an example (as I see it) of using a precompiled JSP servlet
mapping w/ a Struts forward (let me know if this is wrong):


RE: EJB = bad = MS.net - worrisome flow of ignorant off-topic "a dvice" on this board

2002-02-21 Thread Cakalic, James

I'm not sure it is entirely off-topic, Alex. Many people are concerned, and
rightly so, about application of technologies and design patterns in the
development of systems which are also utilizing Struts. Sometimes the use of
a framework like Struts can result in confusion by less enlightened ones
than yourself about how to 'hook-up' the rest of the system. I've seen
several posts now by Ted Husted that talk about the proper allocation of
responsibilities to Action classes v. "business delegates" which interact
with the model. Meaningful advice about patterns and technologies can help
people who are searching for proven solutions. Unfortunately, the thread
went a bit astray even as it started because of the character of the
comments.

BTW, as for mapping "500 data tables to 500 entity beans" being an "idiotic
architecture", I went to an IBM WebSphere Commerce Suite course last month
and learned that the product has 300 tables, nearly all of which are mapped
by CMP entity beans. There are almost no session beans in the design. And
they don't use container managed transactions. Every unit of work started by
a web hit is wrapped in a JTA user transaction by the web app front
controller and the transaction includes the response generation. Not quite
the architecture I would have expected. Can't speak to any of the -ilities
of this design. But just goes to show, I think, that there are plenty of
ways to tackle the problem.

As for off-topic discussions, I would have expected you to flame the "Which
development environment" thread a little more vigorously than this one. But
maybe what is irrelevant, frivolous, ignorant, or off-topic is a matter of
personal opinion?

Jim

> -Original Message-
> From: Esterkin, Alex [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 12:56 PM
> To: 'Struts Users Mailing List'
> Cc: [EMAIL PROTECTED]
> Subject: RE: EJB = bad = MS.net - worrisome flow of ignorant off-topic
> "a dvice" on this board
> Importance: High
> 
> 
> I hope not many enterprise applications are built using this ignorant
> 'advice'.  IBM argued against EJBs up until recently because 
> of countless
> deficiencies in EJB container implementation in WebSphere 
> 3.5.*.  Since
> WebSphere 4.0 introduction, they have clearly warmed up to 
> using EJBs in
> their "best practices" white papers. 
> 
> As any other technology, EJBs can be abused. If one mapped a fully
> normalized DB schema consisting of 500 data tables to 500 
> entity beans, this
> would be an idiotic architecture. In any case, this has 
> nothing to do with
> MVC or Struts.
> 
> I suggest members of this list stick to the main topic of discussion -
> Struts.  Struts has nothing to do with EJBs.  In a properly designed
> application, EJBs, DAOs or any other persistence related components
> shouldn't be accessed directly from presentation elements and 
> components,
> such as JSP tags.  
> 
> Sticking closer to the topic of this list will allow to 
> reduce the flow of
> postings to more reasonable levels.
> 
> Best regards,
> 
>Alex Esterkin 
> =
>   
> 
> 
> -Original Message-
> From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 20, 2002 12:42
> To: Struts Users Mailing List
> Cc: [EMAIL PROTECTED]
> Subject: EJB = bad = MS.net
> 
> 
> Home page of Jakarta has this
> http://jakarta.apache.org/site/news.html#0130.2
> on this:
> http://www.mail-archive.com/general%40jakarta.apache.org/msg03376.html
> 
> I agree. Doing EJBs is bad on many levels and creates more problems. 
> Avoid EJB if you want to stay in Java.
> 
> Alternative is to just use Struts + TomCat + RowSet (or DAO 
> if you are 
> doing something simple or small) and done. This is the sweet 
> spot. MVC 
> is all you need.
> 
> Alternative, do EJBs and your organization WILL switch to MS 
> .NET on the 
> next project, leave J2EE, and you have to learn VB.net.
> 
> EJBs are for newbies. (If you need middleware (very rare) use SOAP)
> 
> lol,
> Vic
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:




RE: Development Environment

2002-02-21 Thread Andrew B Forman

Jbuilder 5 (moving to 6 soon)
Win2000
TextPad

started with struts on VisualAge for Java -
hated the Websphere junk - like Jbuilder
much better for web work & VAJ better
for deep-down backend work (data-access beans, etc.)

Andrew

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:41 AM
To: [EMAIL PROTECTED]
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Error in tag library "tiles.tld"??

2002-02-21 Thread @Basebeans.com

Subject: Error in tag library "tiles.tld"??
From: "Nav Sandhu" <[EMAIL PROTECTED]>
 ===
I upgraded to a recent (2/15) nightly build and I get the following
exception:

Error in using tag library uri='/tag/tiles.tld' prefix='tiles': The Tag
class 'org.apache.struts.taglib.tiles.InsertTag' has no setter method
corresponding to TLD declared attribute 'controllerUrl', (JSP 1.1 spec,
5.4.1)
probably occurred due to an error in
/integral/dealing/monitor/CurrentMonitorTemplate.jsp line 11:
<%@ taglib uri="/tag/tiles.tld" prefix="tiles" %>

I have checked the 'InsertTag.java' and it doesn't contain the setter for
the
attribute 'controllerUrl'.  Any idea why this would occur?

Nav




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tag

2002-02-21 Thread Eddie Bush

I'm sorry you comment in validate indicated to me that you were asking about
validate.  Try this:

http://jakarta.apache.org/struts/userGuide/building_view.html#form_input

... scroll up just a tad and you should have what you're looking for.


- Original Message -
From: "Henry Lu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 1:23 PM
Subject: Re:  tag


> Eddie, you are not answering my question at all. My question is how to use
>  tag and retrieve the content of file.
>
>
> --
-
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
> On Thu, 21 Feb 2002, Eddie Bush wrote:
>
> > The validate function can be implemented to validate your form input.
If
> > you find erros, you can put those errors into an ActionErrors object and
> > then return them.  The 'best practice' approach would probably be to
have
> > your validation encapsulated in a 'utility bean' that you could
instantiate
> > to make calls against (that's how I am doing mine anyway).  However, for
a
> > small project you could easily include all of you login right in
validate.
> > There is a good example of doing this in the struts documentation, and I
> > believe the users guide covers the topic quite well too.  If you haven't
> > already looked them over, you really should.
> >
> > How to best use the validation mechanisms provided by struts is quite a
> > debated issue =)
> >
> > No matter where/how you implement your logic to validate your form,
you'll
> > want to create an ActionErrors instance and add ActionError instances to
it,
> > and finally return the ActionErrors object.  Very simply:
> >
> > ActionErrors actionErrors = new ActionErrors();
> >
> > ... then, assuming they don't specify a file - and assuming it is a
required
> > field.
> >
> > actionErrors.add("File", new ActionError("error.file.required"));
> >
> > and then at the end of your perform, don't forget to:
> >
> > return actionErrors;
> >
> > The text passed to the ActionError constructor ("error.file.required")
needs
> > to be specified in your application resources file.
> >
> > HTH,
> >
> > Eddie
> >
> > - Original Message -
> > From: "Henry Lu" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, February 21, 2002 12:58 PM
> > Subject: Re:  tag
> >
> >
> > > Thanks for your info! But I need a little bit more details:
> > >
> > > //int my FileForm.java file
> > > /
> > > public class FileForm extends ActionForm
> > > {
> > >private String theFile;
> > >
> > >public FileForm() {}
> > >
> > >public void setTheFile(String file)
> > >{
> > >   this.theFile = file;
> > >}
> > >
> > >public String getTheFile()
> > >{
> > >   return this.theFile;
> > >}
> > >
> > >...
> > >
> > >public ActionErrors validate(...)
> > >{
> > >   
> > >   // what should i do here?
> > >}
> > > }
> > >
> > > //
> > > //int the jsp page:
> > > 
> > > 
> > >
> > > Could you tell me what exactly to do and where to add code?
> > >
> > > Thank you very much!
> > >
> > >
> >
> --
> > -
> > > Henry Lu
> > > MCITphone: (734) 936-2063
> > > University of Michigan Medical Center   fax:   (734) 763-4372
> > >
> > > On Thu, 21 Feb 2002, SUPRIYA MISRA wrote:
> > >
> > > > In your validation function first store it.
> > > > Stringbuffer filecontent= file content.
> > > > request.setAttribute("file",filecontent);
> > > > On Jsp use equal tag to see if you have the content--take it else
ask
> > for a
> > > > new one.
> > > >
> > > >
> > > > >From: Henry Lu <[EMAIL PROTECTED]>
> > > > >Reply-To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
> > > > >To: struts users <[EMAIL PROTECTED]>
> > > > >Subject:  tag
> > > > >Date: Thu, 21 Feb 2002 10:48:05 -0500 (EST)
> > > > >
> > > > >How do i retrieve the content of file in the formAction program?
The
> > only
> > > > >thing I get from the tag is the file name (exa: 1.txt). How do I
get
> > the
> > > > >content of the file?
> > > > >
> > > > >
> > > >
> >
>---
> > > > >Henry Lu
> > > > >MCITphone: (734)
936-2063
> > > > >University of Michigan Medical Center   fax:   (734)
763-4372
> > > > >
> > > > >
> > > > >--
> > > > >To unsubscribe, e-mail:
> > > > >
> > > > >For additional commands, e-mail:
> > > > >
> > > > >
> > > >
> > >

Re: tag

2002-02-21 Thread Henry Lu

Eddie, you are not answering my question at all. My question is how to use
 tag and retrieve the content of file.


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Thu, 21 Feb 2002, Eddie Bush wrote:

> The validate function can be implemented to validate your form input.  If
> you find erros, you can put those errors into an ActionErrors object and
> then return them.  The 'best practice' approach would probably be to have
> your validation encapsulated in a 'utility bean' that you could instantiate
> to make calls against (that's how I am doing mine anyway).  However, for a
> small project you could easily include all of you login right in validate.
> There is a good example of doing this in the struts documentation, and I
> believe the users guide covers the topic quite well too.  If you haven't
> already looked them over, you really should.
>
> How to best use the validation mechanisms provided by struts is quite a
> debated issue =)
>
> No matter where/how you implement your logic to validate your form, you'll
> want to create an ActionErrors instance and add ActionError instances to it,
> and finally return the ActionErrors object.  Very simply:
>
> ActionErrors actionErrors = new ActionErrors();
>
> ... then, assuming they don't specify a file - and assuming it is a required
> field.
>
> actionErrors.add("File", new ActionError("error.file.required"));
>
> and then at the end of your perform, don't forget to:
>
> return actionErrors;
>
> The text passed to the ActionError constructor ("error.file.required") needs
> to be specified in your application resources file.
>
> HTH,
>
> Eddie
>
> - Original Message -
> From: "Henry Lu" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, February 21, 2002 12:58 PM
> Subject: Re:  tag
>
>
> > Thanks for your info! But I need a little bit more details:
> >
> > //int my FileForm.java file
> > /
> > public class FileForm extends ActionForm
> > {
> >private String theFile;
> >
> >public FileForm() {}
> >
> >public void setTheFile(String file)
> >{
> >   this.theFile = file;
> >}
> >
> >public String getTheFile()
> >{
> >   return this.theFile;
> >}
> >
> >...
> >
> >public ActionErrors validate(...)
> >{
> >   
> >   // what should i do here?
> >}
> > }
> >
> > //
> > //int the jsp page:
> > 
> > 
> >
> > Could you tell me what exactly to do and where to add code?
> >
> > Thank you very much!
> >
> >
> > --
> -
> > Henry Lu
> > MCITphone: (734) 936-2063
> > University of Michigan Medical Center   fax:   (734) 763-4372
> >
> > On Thu, 21 Feb 2002, SUPRIYA MISRA wrote:
> >
> > > In your validation function first store it.
> > > Stringbuffer filecontent= file content.
> > > request.setAttribute("file",filecontent);
> > > On Jsp use equal tag to see if you have the content--take it else ask
> for a
> > > new one.
> > >
> > >
> > > >From: Henry Lu <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >To: struts users <[EMAIL PROTECTED]>
> > > >Subject:  tag
> > > >Date: Thu, 21 Feb 2002 10:48:05 -0500 (EST)
> > > >
> > > >How do i retrieve the content of file in the formAction program? The
> only
> > > >thing I get from the tag is the file name (exa: 1.txt). How do I get
> the
> > > >content of the file?
> > > >
> > > >
> > >
> >---
> > > >Henry Lu
> > > >MCITphone: (734) 936-2063
> > > >University of Michigan Medical Center   fax:   (734) 763-4372
> > > >
> > > >
> > > >--
> > > >To unsubscribe, e-mail:
> > > >
> > > >For additional commands, e-mail:
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > _
> > > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> 
> > > For additional commands, e-mail:
> 
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

Re: tag

2002-02-21 Thread Eddie Bush

The validate function can be implemented to validate your form input.  If
you find erros, you can put those errors into an ActionErrors object and
then return them.  The 'best practice' approach would probably be to have
your validation encapsulated in a 'utility bean' that you could instantiate
to make calls against (that's how I am doing mine anyway).  However, for a
small project you could easily include all of you login right in validate.
There is a good example of doing this in the struts documentation, and I
believe the users guide covers the topic quite well too.  If you haven't
already looked them over, you really should.

How to best use the validation mechanisms provided by struts is quite a
debated issue =)

No matter where/how you implement your logic to validate your form, you'll
want to create an ActionErrors instance and add ActionError instances to it,
and finally return the ActionErrors object.  Very simply:

ActionErrors actionErrors = new ActionErrors();

... then, assuming they don't specify a file - and assuming it is a required
field.

actionErrors.add("File", new ActionError("error.file.required"));

and then at the end of your perform, don't forget to:

return actionErrors;

The text passed to the ActionError constructor ("error.file.required") needs
to be specified in your application resources file.

HTH,

Eddie

- Original Message -
From: "Henry Lu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 12:58 PM
Subject: Re:  tag


> Thanks for your info! But I need a little bit more details:
>
> //int my FileForm.java file
> /
> public class FileForm extends ActionForm
> {
>private String theFile;
>
>public FileForm() {}
>
>public void setTheFile(String file)
>{
>   this.theFile = file;
>}
>
>public String getTheFile()
>{
>   return this.theFile;
>}
>
>...
>
>public ActionErrors validate(...)
>{
>   
>   // what should i do here?
>}
> }
>
> //
> //int the jsp page:
> 
> 
>
> Could you tell me what exactly to do and where to add code?
>
> Thank you very much!
>
>
> --
-
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
> On Thu, 21 Feb 2002, SUPRIYA MISRA wrote:
>
> > In your validation function first store it.
> > Stringbuffer filecontent= file content.
> > request.setAttribute("file",filecontent);
> > On Jsp use equal tag to see if you have the content--take it else ask
for a
> > new one.
> >
> >
> > >From: Henry Lu <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: struts users <[EMAIL PROTECTED]>
> > >Subject:  tag
> > >Date: Thu, 21 Feb 2002 10:48:05 -0500 (EST)
> > >
> > >How do i retrieve the content of file in the formAction program? The
only
> > >thing I get from the tag is the file name (exa: 1.txt). How do I get
the
> > >content of the file?
> > >
> > >
> >
>---
> > >Henry Lu
> > >MCITphone: (734) 936-2063
> > >University of Michigan Medical Center   fax:   (734) 763-4372
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
> > >
> > >For additional commands, e-mail:
> > >
> > >
> >
> >
> >
> >
> > _
> > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread John M. Corro

Glad to see someone else using JEdit.  Thought I was the lone sole.

- Original Message -
From: "Chris Birch" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 1:07 PM
Subject: RE: Development Environment


> Jedit and make on Solaris at work.
> Apple ProjectBuilder at home with Ant (great for C and Apple only Java, OK
> ish for straight forward java).
>
> Best team IDE I've ever used is Visual Age for Java, drop the visual bits
> and its outstanding.  Can easily view class in their package hierarchy or
> class hierarchy, or a list of classes that reference your current class.
> Incremental compiler, excellent debugger, command lookup and completion...
> the list goes on...
>
> Eclispe is open source and free (eclipse.org) and smells like Visual Age
for
> Java, even looks like it... so it must be...
>
> Regards,
> Chris.
>
> -Original Message-
> From: Dave Wellman [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2002 17:41
> To: [EMAIL PROTECTED]
> Subject: Development Environment
>
>
> Hello,
>
> Quick question, what is the preferred development environment that you are
> all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Code To Update DB With Transactions (was RE: EJB = bad = MS.net)

2002-02-21 Thread Cakalic, James

In short, I think the catch is that this style of dealing with transactions
distributes knowledge and responsibility throughout the application, relying
on a coding convention to implement a system policy. Better to encapsulate
that policy so that it can be globally enforced.

An EJB container brings three benefits that immediately come to mind. First
is that it provides that global implementation of transaction management.
All calls to enterprise beans can be performed in the context of a
transaction which the container ensures is either committed or rolledback as
appropriate. Regardless of how convoluted the path might get through code
contributed by any number of developers, the transaction management is
applied globally and consistently. Second, the transaction management is
declarative. I could write all day about it but it's one of those things
that, until you've experienced it, you really don't appreciate it. Sort of
like the first time you use a configurable logging package instead of
System.out. Third, the container can bring resources beyond simply database
connections into the scope of the transaction. For example, JMS-compliant
messaging systems like MQSeries and SwiftMQ can now be incorporated in a
transaction along with database activities.

Even if you don't use EJBs, I would think that you would want to seriously
consider the encapsulation of your transaction management. For example,
suppose you had something like this:

abstract public class TransactionalCommand implements Serializable {
protected Connection _conn;
public void setConnection(Connection conn) {
_conn = conn;
}
protected Connection getConnection() {
return _conn;
}

abstract void performExecute() throws Exception;
abstract public boolean isReadyToExecute();

public void execute() throws Exception {
if (isReadyToExecute() == false) {
// subclass determined not ready to execute
throw new Exception("Not ready to execute!");
}
new TransactionExecutive().executeCommand(this);
}
}

public class TransactionExecutive {
public void executeCommand(TransactionalCommand cmd) throws Exception {
Connection conn = null;
try {
conn = DbUtils.getConnectionWithTransaction(...);
cmd.setConnection(conn);
cmd.execute();
DBUtils.commit(conn);
} catch (Exception e) {
// some command failure
DBUtils.backout(conn);
// maybe provide some global logging?
throw e;
} finally {
DBUtils.releaseConnection(conn);
}
}
}

Then you could encapsulate your update logic like this:

public class AddUserCmd extends TransactionalCommand {
// could have setters for input properties
// could have getters for output properties

public void performExecute() throws Exception {
DBUserValidator.saveToDb(getConnection());
DBAuthorisationValidator.saveToDb(getConnection());
}
}

And you'd invoke it, perhaps even from your Action like this:

AddUserCmd cmd = new AddUserCmd();
// some input parameters?
try {
cmd.execute();
} catch (Exception e) {
// something went wrong so handle it
}

Note that the "simpler" part is really the implementation of the AddUserCmd
class and the usage pattern for executing the business logic. Now that
you've encapsulated the transaction management within the
TransactionExecutive and provided an infrastructure for wrapping your
transaction business logic so that it can be handed in to the executive, you
don't have to think about getting connections, commit and rollback, or
disposing of connections. That code exists in one place providing a global
policy implementation. You are now free to think about how to implement the
business logic of what you are trying to accomplish without being distracted
by the mechanics of low level details like transaction handling.

By the way, did you notice that TransactionalCommand implements
Serializable? Now, if you wanted, you could serialize your commands, maybe
queueing them for asynchronous or batched execution. Maybe you find that you
_would_ like to distribute your system physically. Perhaps putting the web
server on one system and the database on another. Perhaps, not saying
definitely so, but perhaps there might be benefit then, performance,
administrative, or otherwise, to having a separate process running on the
database system that is the target for your commands. You could change the
TransactionalCommand.execute method to say, open a socket to your server
process and serialize the command to it. The server process could
deserialize it and use the TransactionExecutive to execute the command. All
without changing any of the rest of the implementation of your application.

This design is really quite similar to what my team is currently doing. But
instead of our own command framework, we'r

RE: Development Environment

2002-02-21 Thread Chris Birch

Jedit and make on Solaris at work.
Apple ProjectBuilder at home with Ant (great for C and Apple only Java, OK
ish for straight forward java).

Best team IDE I've ever used is Visual Age for Java, drop the visual bits
and its outstanding.  Can easily view class in their package hierarchy or
class hierarchy, or a list of classes that reference your current class.
Incremental compiler, excellent debugger, command lookup and completion...
the list goes on...

Eclispe is open source and free (eclipse.org) and smells like Visual Age for
Java, even looks like it... so it must be...

Regards,
Chris.

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: 21 February 2002 17:41
To: [EMAIL PROTECTED]
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment

2002-02-21 Thread Tim Sawyer

Netbeans/Ant/Windows NT

Tim.

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 5:41 PM
To: [EMAIL PROTECTED]
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tag

2002-02-21 Thread Henry Lu

Thanks for your info! But I need a little bit more details:

//int my FileForm.java file
/
public class FileForm extends ActionForm
{
   private String theFile;

   public FileForm() {}

   public void setTheFile(String file)
   {
  this.theFile = file;
   }

   public String getTheFile()
   {
  return this.theFile;
   }

   ...

   public ActionErrors validate(...)
   {
  
  // what should i do here?
   }
}

//
//int the jsp page:



Could you tell me what exactly to do and where to add code?

Thank you very much!


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Thu, 21 Feb 2002, SUPRIYA MISRA wrote:

> In your validation function first store it.
> Stringbuffer filecontent= file content.
> request.setAttribute("file",filecontent);
> On Jsp use equal tag to see if you have the content--take it else ask for a
> new one.
>
>
> >From: Henry Lu <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: struts users <[EMAIL PROTECTED]>
> >Subject:  tag
> >Date: Thu, 21 Feb 2002 10:48:05 -0500 (EST)
> >
> >How do i retrieve the content of file in the formAction program? The only
> >thing I get from the tag is the file name (exa: 1.txt). How do I get the
> >content of the file?
> >
> >
> >---
> >Henry Lu
> >MCITphone: (734) 936-2063
> >University of Michigan Medical Center   fax:   (734) 763-4372
> >
> >
> >--
> >To unsubscribe, e-mail:
> >
> >For additional commands, e-mail:
> >
> >
>
>
>
>
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: EJB = bad = MS.net - worrisome flow of ignorant off-topic "advice" on this board

2002-02-21 Thread Esterkin, Alex

I hope not many enterprise applications are built using this ignorant
'advice'.  IBM argued against EJBs up until recently because of countless
deficiencies in EJB container implementation in WebSphere 3.5.*.  Since
WebSphere 4.0 introduction, they have clearly warmed up to using EJBs in
their "best practices" white papers. 

As any other technology, EJBs can be abused. If one mapped a fully
normalized DB schema consisting of 500 data tables to 500 entity beans, this
would be an idiotic architecture. In any case, this has nothing to do with
MVC or Struts.

I suggest members of this list stick to the main topic of discussion -
Struts.  Struts has nothing to do with EJBs.  In a properly designed
application, EJBs, DAOs or any other persistence related components
shouldn't be accessed directly from presentation elements and components,
such as JSP tags.  

Sticking closer to the topic of this list will allow to reduce the flow of
postings to more reasonable levels.

Best regards,

   Alex Esterkin 
=



-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 12:42
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: EJB = bad = MS.net


Home page of Jakarta has this
http://jakarta.apache.org/site/news.html#0130.2
on this:
http://www.mail-archive.com/general%40jakarta.apache.org/msg03376.html

I agree. Doing EJBs is bad on many levels and creates more problems. 
Avoid EJB if you want to stay in Java.

Alternative is to just use Struts + TomCat + RowSet (or DAO if you are 
doing something simple or small) and done. This is the sweet spot. MVC 
is all you need.

Alternative, do EJBs and your organization WILL switch to MS .NET on the 
next project, leave J2EE, and you have to learn VB.net.

EJBs are for newbies. (If you need middleware (very rare) use SOAP)

lol,
Vic



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread MARK NICHOLS

WebSphere Studio Application Developer 4.0. Windows NT 4.0 for development, AIX for 
deployment.

It's big, it's slow, it's from IBM.

/\/\ark


___
- mark h. nichols
- dhsv022 at dhs dot state dot il dot us 

"Ooo. They've got the Internet on computers now." - Homer Simpson 


___
- mark h. nichols
- dhsv022 at dhs dot state dot il dot us 

"Ooo. They've got the Internet on computers now." - Homer Simpson 

>>> [EMAIL PROTECTED] 02/21/02 11:41AM >>>
Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread James Holmes

All of the following IDEs can have the Struts Console
plugged into them which can aid in Struts development:

Borland JBuilder
Netbeans
Oracle JDeveloper
Sun Forte for Java

Struts Console:
http://www.jamesholmes.com/struts/

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- Dave Wellman <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Quick question, what is the preferred development
> environment that you are
> all using, Linux - Emacs, VIM,  Windows - JBuilder,
> VisualAge?
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tag

2002-02-21 Thread SUPRIYA MISRA

In your validation function first store it.
Stringbuffer filecontent= file content.
request.setAttribute("file",filecontent);
On Jsp use equal tag to see if you have the content--take it else ask for a 
new one.


>From: Henry Lu <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: struts users <[EMAIL PROTECTED]>
>Subject:  tag
>Date: Thu, 21 Feb 2002 10:48:05 -0500 (EST)
>
>How do i retrieve the content of file in the formAction program? The only
>thing I get from the tag is the file name (exa: 1.txt). How do I get the
>content of the file?
>
>
>---
>Henry Lu
>MCITphone: (734) 936-2063
>University of Michigan Medical Center   fax:   (734) 763-4372
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: (StrutsNewUser) - Accessing datasource in an initialisation servlet.

2002-02-21 Thread Christopher . Falling

Dave, which version of struts are you using?

Here is how I access my datasource with a nightly build from ~ Jan 20.

  

  
  
  
  
  
  
  
  

  

This is how I access it

Subclass of org.apache.struts.action.ActionServlet

java.sql.Connection conn = null;
javax.sql.DataSource dataSource = 
(javax.sql.DataSource)
this.getServletContext().getAttribute(org.apache.struts.action.Action.DATA_S
OURCE_KEY);
try {
  conn = dataSource.getConnection();
} catch (Exception e) {
...
}


In my action classes I pull the database from the servlet

try {
  dataSource = (javax.sql.DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
  myConnection = dataSource.getConnection();
  ...
} catch ...

Notice that the key is the org.apache.struts.action.Action.DATA_SOURCE_KEY
which
is the default key assigned to the datasource if you don't set the key
property.
The default is fine for my app which is only using one datasource.  If you
need
multiple you need to define the key in the data-source node of the XML.

Hope this helps

Chris


-Original Message-
From: Crazy Dave [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 7:12 AM
To: Struts Users Mailing List
Subject: (StrutsNewUser) - Accessing datasource in an initialisation
servlet.


Web.xml extract


applicationInitialisation
Blah.ApplicationInitServlet
3


I wish to load information into an arraylist of beans
for use in , the data comes from
database.

I need to know how to get access to the datasource in
a standard servlet.

I've tried extending my class from ActionServlet, but
the datasource keeps returning null.

see below:

ServletContext sc = getServletContext( );
DataSource ds = findDataSource( null );

try {
SecurityModuleSql sql = new SecurityModuleSql( ds );
sc.setAttribute(key, sql.getDropDown( ) );
} 

Cheers Dave

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:




msg24248/bin0.bin
Description: application/ms-tnef

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: Development Environment

2002-02-21 Thread Robert Nocera

JBuilder 6 on Windows NT
And 
NetBeans on Windows 2000

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 12:41 PM
To: [EMAIL PROTECTED]
Subject: Development Environment

Hello,

Quick question, what is the preferred development environment that you
are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread Jim Crossley

"Dave Wellman" <[EMAIL PROTECTED]> writes:

> Quick question, what is the preferred development environment that
> you are all using, Linux - Emacs, VIM, Windows - JBuilder,
> VisualAge?

Xemacs (using JDEE & ECB) on both Linux and Windows.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts tag for label

2002-02-21 Thread Jeff_Mychasiw



Greetings:
 I remember this discussion a while back.   I am interested in this as well.

I thought that the opinion was that readonly and disabled would be not reliable
on different browsers.

can anyone confirm this?






"Jakkampudi, ChandraseKhar" <[EMAIL PROTECTED]> on 02/21/2002 12:07:14 PM

Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]>

To:   'Struts Users Mailing List' <[EMAIL PROTECTED]>
cc:

Subject:  RE: Struts tag for label


Thanks Martin,

That works very well too. The only difference I find between

and
 
 
is that the first method shows the data in a text field whereas the other
second one shows it as a label(No text field) while achieving the same
functionality. (Not an html expert. Dont know why)

JC

-Original Message-
From: Martin Fekete [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:59 AM
To: Struts Users Mailing List
Subject: Re: Struts tag for label


try 

Feky

- Original Message -
From: "Jakkampudi, ChandraseKhar" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 6:38 PM
Subject: RE: Struts tag for label


> Is there a way to have display only properties on a form? For example, I
> want to display UserID as non-editable field and address as editable. I
> cannot use the "disabled" attribute on text tag because these values are
not
> passed to the server and I need the userID to edit proper values.
>
> I am doing something weird like using both
> 
> 
>
> The text tag is used to display the data and the hidden variable passes
the
> data to the action form. Seems kludey but it works. Is there a better way.
> Maybe a tag that can store additional information about a form that is not
> an "input" field.
>
> Maris: Try my suggetion and see if that works for you.
>
> JC
>
> -Original Message-
> From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 11:35 AM
> To: Struts Users Mailing List
> Subject: Struts tag for label
>
>
>
> hello
>
> What if I want to just display some property of form bean (without any
> input field) ?
> Is there a tag for it ?
>
>
> thanx in advance
>
> Maris Orbidans
> Data Pro
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread Eddie Bush

Linux - Forte for Java Community Edition

Forte is built on Netbeans.  I'm not sure what additional functionalty there
is.  I like it ok, but sometimes the completion doesn't seem to work for me
100%.  Other than being annoyed by that I quite like it =)

Anyone used both?  Opinions on which is better and why?

Thanks!

Eddie

- Original Message -
From: "Dave Wellman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 11:41 AM
Subject: Development Environment


> Hello,
>
> Quick question, what is the preferred development environment that you are
> all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts design question about maintenance screens

2002-02-21 Thread theron . kousek


Wow!
Great reply.   I am saving this one.

thanks,
Theron



   
  
"Emaho, Ghoot" 
  
  
ICS.co.uk>   cc:   
  
 Subject: RE: Struts design question 
about maintenance screens   
02/21/02 09:51 AM  
  
Please respond to  
  
Struts Users   
  
Mailing List   
  
   
  
   
  



There are a number of ways to achieve this, and again (!) it's about
choice, although I must say this can be confusing for newbie  (and
experienced!) struts users.

1. 2 Actions, 1 for 'pre' and 1 for 'post' processing
2. An 'action' parameter, with switch behaviour in the action class
3. 'isVirgin()' extension to the Action Form.

Option 3 is basically an added method to the ActionForm class that allows
the Action to determine if 'pre' or 'post' processing the form, without the
need for an 'action' parameter. Consider the following in the Action class,
where 'sf' refers to the instance of the form:

// determine if pre-processing, and if so continue on to the View
if (sf.isVirgin())
return
mapping.findForward(ChikiConstants.ACTION_FORWARD_SUCCESS);

// getting this far indicates post-processing...

/**
 * Determines if pre or post processing the form.
 * Criteria being null indicates pre-processing.
 *
 * @return true if pre-processing the form
 */
public boolean isVirgin () {
return ( (criteria == null) );
}

The 'isVirgin' method returns true if 'pre' processing the form, and false
if 'post' processing.

Option 1 gives good seperation, but can lead to an unneccesary
proliferation of Action classes in large apps
Option 2 achieves the same, but can lead to 'messy' Actions
Option 3 needs additional logic in the form, but allows pre and post
processing in the one Action - however, this doesn't extend as far as
seperate actions and action parameters when you need to do more than just
pre and post processing.

In our applications we have used all 3 at various times. We tend to use
option 3 when we just need the split between pre and post processing, eg a
Search or Login action. In more complex sceanrio's we tend to use option 1
or 2.

Try to determine which best fits your scenario. Depending on your context,
one solution may be better than the other, but this will not be true across
the board for all scenarios. Think through your real needs before choosing
the solution.

With regards to your exact scenario, we developed option 3 as a solution to
this very situation, so I would suggest option 3 might be best suited,
although you will ultimately have to decide ! Having developed option 3 and
implemented it, we have found it to be the most effective way of getting
around this. As I previously stated, option 1 and 2 come into their own in
other situations.

Hope this helps - if you need any more detail let me know,

Ghoot


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2002 17:10
> To: Struts Users Mailing List
> Subject: Struts design question about maintenance screens
>
>
>
> Hi Folks:
>
> thanks to your help, you indicated that the Action should preload form
> values on a maintenance form.   This works great.
>
> I have an Action object that allows maintenance on a table
> (call it table
> A).   This action object handles "preloading of data"
> as well as the actual "updating of data" (Add/Edit/View).
>
> Another question I have:
> - The action object gets kind of "kludgey" in how I have to
> keep track of
> "whether I am preloading data (called from a html:link)" or
> whether I am
> "Applying" the data (called from the form Submit).
> Is it "overkill" if I create 2 different actions (1 action to
> preload the
> data and another to "update" the data)?I think by doing
> it this way, it
> may be easier for me to incorporate the "sensitive form resubmit"
> prevention by using tokens.
>
> Any suggestions are much appreciated.
>
> thanks,
> Theron
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

RE: Struts tag for label

2002-02-21 Thread Jakkampudi, ChandraseKhar

Thanks Martin,

That works very well too. The only difference I find between 

and
 
 
is that the first method shows the data in a text field whereas the other
second one shows it as a label(No text field) while achieving the same
functionality. (Not an html expert. Dont know why)

JC

-Original Message-
From: Martin Fekete [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:59 AM
To: Struts Users Mailing List
Subject: Re: Struts tag for label


try 

Feky

- Original Message -
From: "Jakkampudi, ChandraseKhar" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 6:38 PM
Subject: RE: Struts tag for label


> Is there a way to have display only properties on a form? For example, I
> want to display UserID as non-editable field and address as editable. I
> cannot use the "disabled" attribute on text tag because these values are
not
> passed to the server and I need the userID to edit proper values.
>
> I am doing something weird like using both
> 
> 
>
> The text tag is used to display the data and the hidden variable passes
the
> data to the action form. Seems kludey but it works. Is there a better way.
> Maybe a tag that can store additional information about a form that is not
> an "input" field.
>
> Maris: Try my suggetion and see if that works for you.
>
> JC
>
> -Original Message-
> From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 11:35 AM
> To: Struts Users Mailing List
> Subject: Struts tag for label
>
>
>
> hello
>
> What if I want to just display some property of form bean (without any
> input field) ?
> Is there a tag for it ?
>
>
> thanx in advance
>
> Maris Orbidans
> Data Pro
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread Oleg V Alexeev

Hello Dave,

Far editor with colorer plugin & Ant.

Thursday, February 21, 2002, 8:41:17 PM, you wrote:

DW> Hello,

DW> Quick question, what is the preferred development environment that you are
DW> all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


DW> --
DW> To unsubscribe, e-mail:   
DW> For additional commands, e-mail: 



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment

2002-02-21 Thread Galbreath, Mark

JDeveloper 9i

Mark

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:41 PM

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment

2002-02-21 Thread Cakalic, James

I'm using WebSphere Studio Application Developer.
Jim

> -Original Message-
> From: Dave Wellman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 11:41 AM
> To: [EMAIL PROTECTED]
> Subject: Development Environment
> 
> 
> Hello,
> 
> Quick question, what is the preferred development environment 
> that you are
> all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 



Re: Struts tag for label

2002-02-21 Thread Martin Fekete

try 

Feky

- Original Message -
From: "Jakkampudi, ChandraseKhar" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 6:38 PM
Subject: RE: Struts tag for label


> Is there a way to have display only properties on a form? For example, I
> want to display UserID as non-editable field and address as editable. I
> cannot use the "disabled" attribute on text tag because these values are
not
> passed to the server and I need the userID to edit proper values.
>
> I am doing something weird like using both
> 
> 
>
> The text tag is used to display the data and the hidden variable passes
the
> data to the action form. Seems kludey but it works. Is there a better way.
> Maybe a tag that can store additional information about a form that is not
> an "input" field.
>
> Maris: Try my suggetion and see if that works for you.
>
> JC
>
> -Original Message-
> From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 11:35 AM
> To: Struts Users Mailing List
> Subject: Struts tag for label
>
>
>
> hello
>
> What if I want to just display some property of form bean (without any
> input field) ?
> Is there a tag for it ?
>
>
> thanx in advance
>
> Maris Orbidans
> Data Pro
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts tag for label

2002-02-21 Thread Martin Fekete




work's fine for me ...

Feky

PS: don't forget bean taglib directive ...

- Original Message -
From: "Maris Orbidans" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 6:35 PM
Subject: Struts tag for label


>
> hello
>
> What if I want to just display some property of form bean (without any
> input field) ?
> Is there a tag for it ?
>
>
> thanx in advance
>
> Maris Orbidans
> Data Pro
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread Ryan

windows, jext, ant

- Original Message -
From: Dave Wellman <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 1:41 PM
Subject: Development Environment


> Hello,
>
> Quick question, what is the preferred development environment that you
are
> all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment

2002-02-21 Thread Kanoza, Douglas (NCI)

Visual SlickEdit (http://www.slickedit.com/home.php).  In my experience,
every IDE I've ever worked with (JBuilder, JDeveloper, Visual Café) forces
you to do things their way, which is usually not the way I want to do it.
Plus, they're expensive, take up a lot of disk space, and are usually memory
hogs.

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 12:41 PM
To: [EMAIL PROTECTED]
Subject: Development Environment

Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts design question about maintenance screens

2002-02-21 Thread Emaho, Ghoot

There are a number of ways to achieve this, and again (!) it's about choice, although 
I must say this can be confusing for newbie  (and experienced!) struts users.

1. 2 Actions, 1 for 'pre' and 1 for 'post' processing
2. An 'action' parameter, with switch behaviour in the action class
3. 'isVirgin()' extension to the Action Form.

Option 3 is basically an added method to the ActionForm class that allows the Action 
to determine if 'pre' or 'post' processing the form, without the need for an 'action' 
parameter. Consider the following in the Action class, where 'sf' refers to the 
instance of the form:

// determine if pre-processing, and if so continue on to the View
if (sf.isVirgin())
return mapping.findForward(ChikiConstants.ACTION_FORWARD_SUCCESS);

// getting this far indicates post-processing...

/**
 * Determines if pre or post processing the form.
 * Criteria being null indicates pre-processing.
 *
 * @return true if pre-processing the form  
 */
public boolean isVirgin () {
return ( (criteria == null) );
}

The 'isVirgin' method returns true if 'pre' processing the form, and false if 'post' 
processing.

Option 1 gives good seperation, but can lead to an unneccesary proliferation of Action 
classes in large apps
Option 2 achieves the same, but can lead to 'messy' Actions
Option 3 needs additional logic in the form, but allows pre and post processing in the 
one Action - however, this doesn't extend as far as seperate actions and action 
parameters when you need to do more than just pre and post processing.

In our applications we have used all 3 at various times. We tend to use option 3 when 
we just need the split between pre and post processing, eg a Search or Login action. 
In more complex sceanrio's we tend to use option 1 or 2.

Try to determine which best fits your scenario. Depending on your context, one 
solution may be better than the other, but this will not be true across the board for 
all scenarios. Think through your real needs before choosing the solution.

With regards to your exact scenario, we developed option 3 as a solution to this very 
situation, so I would suggest option 3 might be best suited, although you will 
ultimately have to decide ! Having developed option 3 and implemented it, we have 
found it to be the most effective way of getting around this. As I previously stated, 
option 1 and 2 come into their own in other situations.

Hope this helps - if you need any more detail let me know,

Ghoot


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2002 17:10
> To: Struts Users Mailing List
> Subject: Struts design question about maintenance screens
> 
> 
> 
> Hi Folks:
> 
> thanks to your help, you indicated that the Action should preload form
> values on a maintenance form.   This works great.
> 
> I have an Action object that allows maintenance on a table 
> (call it table
> A).   This action object handles "preloading of data"
> as well as the actual "updating of data" (Add/Edit/View).
> 
> Another question I have:
> - The action object gets kind of "kludgey" in how I have to 
> keep track of
> "whether I am preloading data (called from a html:link)" or 
> whether I am
> "Applying" the data (called from the form Submit).
> Is it "overkill" if I create 2 different actions (1 action to 
> preload the
> data and another to "update" the data)?I think by doing 
> it this way, it
> may be easier for me to incorporate the "sensitive form resubmit"
> prevention by using tokens.
> 
> Any suggestions are much appreciated.
> 
> thanks,
> Theron
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment

2002-02-21 Thread Mattos, John

I'm using Visual Age For Java and Websphere Studio (for JSPs) on Win2k.

We're moving to Websphere Studio App Dev 4.0

I'd rather be using JBuilder 6

but that's me.

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014



-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:41 PM
To: [EMAIL PROTECTED]
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts design question about maintenance screens

2002-02-21 Thread theron . kousek


thanks Simon:

With all do respect to the other method (ie, parameters), I tend to favor
your approach.I have just completed a maintenance screen by having a
combined action and I don't like the if-else's and the action file is huge.
By splitting it, I can re-use the LoadFormAction in other areas as well as
the SaveAction and not have both operations (load and save) tightly coupled
as I don't feel they should be tightly coupled.The only drawback I see
with this favorable approach is more source files but these source files
will be smaller and more maintanable/straight-forward I believe.

Before I went with this approach, I just wanted to hear how others felt
about this approach.

thanks for your input.

Theron




   

"Chappell, Simon P"

  
dsend.com> cc: 

   Subject: RE: Struts design question 
about maintenance screens   
02/21/02 09:38 AM  

Please respond to  

Struts Users   

Mailing List   

   

   




In reference to having two actions (create and update) instead of one
combined action, this is exactly what I have done. While the struts-example
uses a parameter, I personally prefer not to take that route.

I have simplified my code/JSPs by having each do only one thing (good OO)
at the slight expense of increasing the number of Java classes and JSPs.

Using 2 JSP instead of 1 might seem like duplication, but there isn't that
much and each JSP is much easier to read/maintain than the single JSP that
is trying to pretend it's two. The extra action classes are also not a big
deal as I move more and more logic out of the action classes themselves.

Just my thoughts.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 21, 2002 11:10 AM
>To: Struts Users Mailing List
>Subject: Struts design question about maintenance screens
>
>
>
>Hi Folks:
>
>thanks to your help, you indicated that the Action should preload form
>values on a maintenance form.   This works great.
>
>I have an Action object that allows maintenance on a table
>(call it table
>A).   This action object handles "preloading of data"
>as well as the actual "updating of data" (Add/Edit/View).
>
>Another question I have:
>- The action object gets kind of "kludgey" in how I have to
>keep track of
>"whether I am preloading data (called from a html:link)" or
>whether I am
>"Applying" the data (called from the form Submit).
>Is it "overkill" if I create 2 different actions (1 action to
>preload the
>data and another to "update" the data)?I think by doing it
>this way, it
>may be easier for me to incorporate the "sensitive form resubmit"
>prevention by using tokens.
>
>Any suggestions are much appreciated.
>
>thanks,
>Theron
>
>
>--
>To unsubscribe, e-mail:

For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>


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




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: form validation

2002-02-21 Thread Emaho, Ghoot

There are a number of ways to achieve this, and again (!) it's about choice, although 
I must say this can be confusing for newbie  (and experienced!) struts users.

1. 2 Actions, 1 for 'pre' and 1 for 'post' processing
2. An 'action' parameter, with switch behaviour in the action class
3. 'isVirgin()' extension to the Action Form.

Option 3 is basically an added method to the ActionForm class that allows the Action 
to determine if 'pre' or 'post' processing the form, without the need for an 'action' 
parameter. Consider the following in the Action class, where 'sf' refers to the 
instance of the form:

// determine if pre-processing, and if so continue on to the View
if (sf.isVirgin())
return mapping.findForward(ChikiConstants.ACTION_FORWARD_SUCCESS);

// getting this far indicates post-processing...

/**
 * Determines if pre or post processing the form.
 * Criteria being null indicates pre-processing.
 *
 * @return true if pre-processing the form  
 */
public boolean isVirgin () {
return ( (criteria == null) );
}

The 'isVirgin' method returns true if 'pre' processing the form, and false if 'post' 
processing.

Option 1 gives good seperation, but can lead to an unneccesary proliferation of Action 
classes in large apps
Option 2 achieves the same, but can lead to 'messy' Actions
Option 3 needs additional logic in the form, but allows pre and post processing in the 
one Action - however, this doesn't extend as far as seperate actions and action 
parameters when you need to do more than just pre and post processing.

In our applications we have used all 3 at various times. We tend to use option 3 when 
we just need the split between pre and post processing, eg a Search or Login action. 
In more complex sceanrio's we tend to use option 1 or 2.

Try to determine which best fits your scenario. Depending on your context, one 
solution may be better than the other, but this will not be true across the board for 
all scenarios. Think through your real needs before choosing the solution.

With regards to your exact scenario, we developed option 3 as a solution to this very 
situation, so I would suggest option 3 might be best suited, although you will 
ultimately have to decide ! Having developed option 3 and implemented it, we have 
found it to be the most effective way of getting around this. As I previously stated, 
option 1 and 2 come into their own in other situations.

Hope this helps - if you need any more detail let me know,

Ghoot

> -Original Message-
> From: keithBacon [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2002 17:32
> To: Struts Users Mailing List
> Subject: Re: form validation
> 
> 
> There are various solutions.
> I put a hidden variable on my form (& in the formBean) with 
> the form name in
> it.
> If it's not there I know not to validate the form data.
> Some people have 2 Actions & Action classes for this but I 
> fear that would lead
> to too much code duplication.
> However some of my Action classes are getting a bit big & unwieldy.
> 
> --- "Pritchard, Sean" <[EMAIL PROTECTED]> wrote:
> > I've run into a bit of a sticking point on form validation 
> and I'm wondering
> > whether anyone else has encountered this.  I have an Action 
> EditUserAction
> > that works with a UserForm to edit a user's data (e.g. 
> first name, last
> > name. email, etc.).  In my Action, I check the request for 
> a valid token.
> > If the token is not valid, I get the user's data from the 
> database (via the
> > model layer) and populate the form with it.  I then forward 
> control to a jsp
> > that displays the form.  If the token is valid, I update 
> the user's data in
> > the database (again via the model layer) with the data in 
> the form.  So I
> > use the same Action to initially populate the form and then 
> to process the
> > submitted form.
> > 
> > The problem I'm running into, is that I want to begin using 
> form validation.
> > So I created a validate method that ensures the email 
> address is not null or
> > zero-length.  The problem is, that the error message is 
> displayed the first
> > time the form is displayed (i.e. before the form is 
> submitted).  It seems I
> > should only validate the form when it is submitted rather 
> than the first
> > time it is displayed.  It is currently being validated 
> before the user
> > submits it, so if the user has not previously submitted an 
> email address,
> > when they first see the form, the error message "Email 
> address is required"
> > appears.  
> > 
> > My current design would call for the form validation to be 
> invoked only when
> > the token is valid.  But Struts doesn't seem to lend itself 
> to validating a
> > token within a form (because the token validation methods 
> are protected
> > instance methods of Action).  It feels a bit like I'm 
> fighting the direction
> > the framework wants to go, which makes me think my design 
> is flawed.  Any

RE: Development Environment

2002-02-21 Thread Witbeck, Shane

Im using Idea from http://www.intellij.com on Win2k.

Sincerely,

Shane Witbeck
Web Application Developer
904.987.1688

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:41 PM
To: [EMAIL PROTECTED]
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Development Environment

2002-02-21 Thread Jonathan James

Windows 2000, cygwin & vim

- Original Message -
From: "Dave Wellman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 11:41 AM
Subject: Development Environment


> Hello,
>
> Quick question, what is the preferred development environment that you are
> all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Development Environment

2002-02-21 Thread Ian Beaumont

Windows - Netbeans

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: 21 February 2002 17:41
To: [EMAIL PROTECTED]
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

For additional commands, e-mail:




Development Environment

2002-02-21 Thread Dave Wellman

Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts tag for label

2002-02-21 Thread Jakkampudi, ChandraseKhar

Is there a way to have display only properties on a form? For example, I
want to display UserID as non-editable field and address as editable. I
cannot use the "disabled" attribute on text tag because these values are not
passed to the server and I need the userID to edit proper values.

I am doing something weird like using both 



The text tag is used to display the data and the hidden variable passes the
data to the action form. Seems kludey but it works. Is there a better way.
Maybe a tag that can store additional information about a form that is not
an "input" field.

Maris: Try my suggetion and see if that works for you.

JC

-Original Message-
From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:35 AM
To: Struts Users Mailing List
Subject: Struts tag for label



hello

What if I want to just display some property of form bean (without any
input field) ?
Is there a tag for it ?


thanx in advance

Maris Orbidans
Data Pro


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts design question about maintenance screens

2002-02-21 Thread Chappell, Simon P

In reference to having two actions (create and update) instead of one combined action, 
this is exactly what I have done. While the struts-example uses a parameter, I 
personally prefer not to take that route.

I have simplified my code/JSPs by having each do only one thing (good OO) at the 
slight expense of increasing the number of Java classes and JSPs.

Using 2 JSP instead of 1 might seem like duplication, but there isn't that much and 
each JSP is much easier to read/maintain than the single JSP that is trying to pretend 
it's two. The extra action classes are also not a big deal as I move more and more 
logic out of the action classes themselves.

Just my thoughts.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 21, 2002 11:10 AM
>To: Struts Users Mailing List
>Subject: Struts design question about maintenance screens
>
>
>
>Hi Folks:
>
>thanks to your help, you indicated that the Action should preload form
>values on a maintenance form.   This works great.
>
>I have an Action object that allows maintenance on a table 
>(call it table
>A).   This action object handles "preloading of data"
>as well as the actual "updating of data" (Add/Edit/View).
>
>Another question I have:
>- The action object gets kind of "kludgey" in how I have to 
>keep track of
>"whether I am preloading data (called from a html:link)" or 
>whether I am
>"Applying" the data (called from the form Submit).
>Is it "overkill" if I create 2 different actions (1 action to 
>preload the
>data and another to "update" the data)?I think by doing it 
>this way, it
>may be easier for me to incorporate the "sensitive form resubmit"
>prevention by using tokens.
>
>Any suggestions are much appreciated.
>
>thanks,
>Theron
>
>
>--
>To unsubscribe, e-mail:   

For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts tag for label

2002-02-21 Thread Maris Orbidans


hello

What if I want to just display some property of form bean (without any
input field) ?
Is there a tag for it ?


thanx in advance

Maris Orbidans
Data Pro


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: form validation

2002-02-21 Thread keithBacon

There are various solutions.
I put a hidden variable on my form (& in the formBean) with the form name in
it.
If it's not there I know not to validate the form data.
Some people have 2 Actions & Action classes for this but I fear that would lead
to too much code duplication.
However some of my Action classes are getting a bit big & unwieldy.

--- "Pritchard, Sean" <[EMAIL PROTECTED]> wrote:
> I've run into a bit of a sticking point on form validation and I'm wondering
> whether anyone else has encountered this.  I have an Action EditUserAction
> that works with a UserForm to edit a user's data (e.g. first name, last
> name. email, etc.).  In my Action, I check the request for a valid token.
> If the token is not valid, I get the user's data from the database (via the
> model layer) and populate the form with it.  I then forward control to a jsp
> that displays the form.  If the token is valid, I update the user's data in
> the database (again via the model layer) with the data in the form.  So I
> use the same Action to initially populate the form and then to process the
> submitted form.
> 
> The problem I'm running into, is that I want to begin using form validation.
> So I created a validate method that ensures the email address is not null or
> zero-length.  The problem is, that the error message is displayed the first
> time the form is displayed (i.e. before the form is submitted).  It seems I
> should only validate the form when it is submitted rather than the first
> time it is displayed.  It is currently being validated before the user
> submits it, so if the user has not previously submitted an email address,
> when they first see the form, the error message "Email address is required"
> appears.  
> 
> My current design would call for the form validation to be invoked only when
> the token is valid.  But Struts doesn't seem to lend itself to validating a
> token within a form (because the token validation methods are protected
> instance methods of Action).  It feels a bit like I'm fighting the direction
> the framework wants to go, which makes me think my design is flawed.  Any
> suggestions?  Should I use two separate actions, one to populate the form
> and one to process the submit?  That would allow me to set validation on one
> and not the other.  Should I check for a valid token inside my validate()
> method and only look for errors if the token is valid?  
> 
> Thanks in advance for your suggestions.
> Sean
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts design question about maintenance screens

2002-02-21 Thread Jakkampudi, ChandraseKhar

You dont need two actions. You can use an 'action' parameter to decide which
action you are performing. 
On your html:link add a parameter action="view" 
and on the submit action="add" or action="edit" depending on  what you are
doing.
In your action, you can have if statements that perform different functions
base on what you are doing.

There is an example in the struts docs that explains this. (Cant find it
now. you have to search for it)

-JC

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:10 AM
To: Struts Users Mailing List
Subject: Struts design question about maintenance screens



Hi Folks:

thanks to your help, you indicated that the Action should preload form
values on a maintenance form.   This works great.

I have an Action object that allows maintenance on a table (call it table
A).   This action object handles "preloading of data"
as well as the actual "updating of data" (Add/Edit/View).

Another question I have:
- The action object gets kind of "kludgey" in how I have to keep track of
"whether I am preloading data (called from a html:link)" or whether I am
"Applying" the data (called from the form Submit).
Is it "overkill" if I create 2 different actions (1 action to preload the
data and another to "update" the data)?I think by doing it this way, it
may be easier for me to incorporate the "sensitive form resubmit"
prevention by using tokens.

Any suggestions are much appreciated.

thanks,
Theron


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts design question about maintenance screens

2002-02-21 Thread theron . kousek


Hi Folks:

thanks to your help, you indicated that the Action should preload form
values on a maintenance form.   This works great.

I have an Action object that allows maintenance on a table (call it table
A).   This action object handles "preloading of data"
as well as the actual "updating of data" (Add/Edit/View).

Another question I have:
- The action object gets kind of "kludgey" in how I have to keep track of
"whether I am preloading data (called from a html:link)" or whether I am
"Applying" the data (called from the form Submit).
Is it "overkill" if I create 2 different actions (1 action to preload the
data and another to "update" the data)?I think by doing it this way, it
may be easier for me to incorporate the "sensitive form resubmit"
prevention by using tokens.

Any suggestions are much appreciated.

thanks,
Theron


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: EJB = bad = MS.net

2002-02-21 Thread Edward Q. Bridges

yes, i guess you're right.  it never existed in the first place.


On Thu, 21 Feb 2002 18:52:43 +0200, Maris Orbidans wrote:
>
>It's simply because EJB 2.0 has local interfaces (1.1 doesnt) , not that
>"claim to location independence is eroding".
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: EJB = bad = MS.net

2002-02-21 Thread keithBacon

It's all a bunch of tree huggin' hippy wisdom!
Good to hear from people with years of experience in these things, so thanks.

--- "Emaho, Ghoot" <[EMAIL PROTECTED]> wrote:
> This has been an interesting discussion on many levels, but there doesnt seem
> to be much 'real world' substance there.
> 
> We have been developing enterprise software (some utilising EJB, some not)
> since EJB were way back at 0.7 (ish) (1997). Systems with 1000's or 10,000's
> concurrent users. We did it for real - NOT abstract theory.
> 
> What this discussion has highlighted is that age old thing inthe software
> industry - bandwagon. You have the media/hype bandwagon, but you also have
> the 'developer opinion' bandwagon, where certain opinions become flavour of
> the month. Now it's EJB's are bad, it has been JSP's are bad and so on.
> 
> Let's get one thing straight - NO technology is perfect. So why do some
> developers engage in 'my technology is better than yours' type holy wars ?
> Because they are human and they dont know any better. Thats all. All of the
> really good developers I've ever known have never subscribed to 'fixed
> viewpoints' ie EJB = BAD, Microsoft = Evil, Java = whatever. Because they
> really understand what technology is about.
> 
> Those who do dig their heels in on any particular standpoint, show only one
> thing - their ignorance.
> 
> All technologies have their place and their uses. It's up to a competent
> Architect to decide what's right for their problem domain. What's right for
> mine, might not be right for yours. I mean this is elementary stuff ! But
> many so called developers behave as if they are really engaged in a holy war
> ! This just makes me laugh :) Leave them too it is all I say...
> 
> Ultimately you have to make an INFORMED choice - there is no absolute right
> or wrong way. This should be the number one lesson any developer ever learns,
> but sadly many never learn it.
> 
> The beauty of becoming a good developer is to be able to make these informed
> choices as you create your masterpiece, and not get stuck in the
> narrow-minded arguments of 'my toy is better than yours' - wether it's an OS,
> developer tool , language, technology choice or whatever. Because then you
> resign yourself to reproducing copies of other peoples art. And you make
> yourself look foolish in the process.
> 
> This email is not an attack on anyone, and especially not Vic. He has his
> opinions. Maybe the way he expresses them doesn't appeal to some, and maybe
> he did it with tongue in cheek to provoke a response. Who knows ? It
> certainly reveals a lot about the kind of developer he is and thats enough
> for me.
> 
> If more developers could have a more altruistic attitude towards the tools
> they use, then more quality software would be built. I have built software
> teams for many years, and I have never employed a developer who demonstrates
> this 'small-minded' mentality. Why ? Because in this industry things (tools,
> technolgies etc) change quicker than peoples attitudes ! So you have to
> remain open-minded to succeed. 
> 
> Ultimately, why argue over the tools you are using ? When it's the artwork
> that really matters.
> 
> It's time for more developers to take responsibility in these matters. It's
> easy to play the name calling game - children can do that. But it takes real
> skill to develop good software, all the more if you are using 'less than
> perfect' technologies. But that is also part of the challenge.
> 
> Finally, non-EJB solutions dont always outperfrom EJB solutions - AND VICE
> VERSA ! We have software in production which operates with large-scale load,
> using EJB's and the performance is excellent. But this doesnt mean I'm saying
> EJB's are great. You can make them work for you, but it doesnt come for free.
> And to say the are outright bad as a solution is simply misinformed.
> 
> Like anything else, it's not a black and white situation.
> 
> Ghoot Emaho (ok, yes I'm a tree huggin hippy)
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Powered By Struts List

2002-02-21 Thread keithBacon

Ted husted should notice & put it there. It certainly should be,
it looks excellent. Top use of Purple & it works as well!
Congratulations.

--- "Flannery, George" <[EMAIL PROTECTED]> wrote:
> This has probably been asked many times, but I can't seem to find the answer
> on the web site or in the mail archives.
> 
> How do I get listed in the "Powered By Struts" list in the "Resources"
> section of the Jakarta/Struts web site?
> 
> In particular, I want to add the following link:
> 
> http://www.citlocate.com/cit-framework/
> 
> This is the demo site for a Struts based Web Application Framework written
> by ObjectFX Corporation. It uses Struts and JSPs to demonstrate location
> based services such as mapping, routing, and geocoding.
> 
> Thank you for your assistance.
> 
> George F. Flannery
> ObjectFX Corp. - www.objectfx.com
> [EMAIL PROTECTED]
> 651.251.4428
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: EJB = bad = MS.net

2002-02-21 Thread Maris Orbidans


> however, a peeve of mine about EJBs and the spec is this claim of
"location 
> independence."  furthermore, the claim to location independence is
eroding:  
> note that in the 1.1 spec it claims: 
>"The client view of an entity bean is location independent."  (8.1)
> and in the corresponding section of the 2.0 spec, this has evolved to
the 
> more mealy-mouthed:
>"The client of an entity bean may be a remote client or the client
may 
> be a local client."

It's simply because EJB 2.0 has local interfaces (1.1 doesnt) , not that
"claim to location independence is eroding".

regards,
Maris Orbidans
DataPro


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Code To Update DB With Transactions (was RE: EJB = bad = MS.net)

2002-02-21 Thread keithBacon

Ah ha - I thought you'd imply that you only do it this way
if you are doing updates! Catch me out some other way!
There's got to be some other catch...
Keith.
PS. No being frivolous on the list tomorrow
 - I'm not around to appreciate it!
 
--- "Galbreath, Mark" <[EMAIL PROTECTED]> wrote:
> Yes.  If the query is a simple read, you don't need the transactions checks.
> 
> :-)
> 
> Mark
> 
> -Original Message-
> From: keithBacon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 9:54 AM
> 
> Is there anything wrong with the design below?
> Is there anything simpler? (Are EJB's simpler?).
> I typed this from memory from my last job. it was never really
> seriously tested but worked in practice with low volumes.
> 
> try {
>// gets connection - ensures AutoCommit off & starts transaction.
>Connection cnct DbUtils.getConnectionWithTransaction(..)
>DBUserValidator.saveToDb(cnct);
>DBAuthorisationValidator.saveToDb(cnct);
>DbUtils.commit(cnct);
> } catch (Exception e) {
>DbUtils.backout(cnct);
>throw e;
> } finally {
>DbUtils.releaseConnection(cnct);
> }  
> ===
> cheers - Keith.
> 
> --- "Cakalic, James" <[EMAIL PROTECTED]> wrote:
> > Even if all the data is in a single physical RDBMS instance, your design
> has
> > to take one of several paths to deal with transactional issues.


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: List 'Hiccups'?

2002-02-21 Thread Eddie Bush

I wish.  Unfortunately I now believe it's somehow my ISP, as I'm receiving
duplicates from other sources as well.  Sorry to have bothered you all.

Thanks for you input!

Eddie

- Original Message -
From: "Galbreath, Mark" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 10:08 AM
Subject: RE: List 'Hiccups'?


> You've subscribed twice.  Unsubscribe and then resubscribe.
>
> Mark
>
> -Original Message-
> From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 10:51 AM
> To: Struts Users Mailing List
> Subject: List 'Hiccups'?
>
>
> Is anyone other than myself receiving duplicate mails from this list?
I've
> been on the list for a while now and haven't noticed this behaviour
before.
>
> ... just thought I'd toss it out.
>
> Thanks =)
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: List 'Hiccups'?

2002-02-21 Thread Robert

I do on occasion.

- Robert McIntosh

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 9:51 AM
To: Struts Users Mailing List
Subject: List 'Hiccups'?

Is anyone other than myself receiving duplicate mails from this list?
I've been on the list for a while now and haven't noticed this behaviour
before.

... just thought I'd toss it out.

Thanks =)



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: List 'Hiccups'?

2002-02-21 Thread Galbreath, Mark

You've subscribed twice.  Unsubscribe and then resubscribe.

Mark

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 10:51 AM
To: Struts Users Mailing List
Subject: List 'Hiccups'?


Is anyone other than myself receiving duplicate mails from this list?  I've
been on the list for a while now and haven't noticed this behaviour before.

... just thought I'd toss it out.

Thanks =)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tag

2002-02-21 Thread Eddie Bush

While I haven't used this yet, I do recall seeing something about it in the
User's Guide on the main Struts page.  Try looking at
http://jakarta.apache.org/struts/userGuide/building_view.html and see if
that helps.  You may also wish to examine the javadocs.  The information in
one of those two areas should help.

HTH

Eddie

- Original Message -
From: "Henry Lu" <[EMAIL PROTECTED]>
To: "struts users" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 8:35 AM
Subject:  tag


> How do i retrieve the content of file in the formAction program? The only
> thing I get from the tag is the file name (exa: 1.txt). How do I get the
> content of the file?
>
>
> --
-
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >