RE: checkbox and iterate problem

2003-02-26 Thread Neal
I got it working..Thank you for your assistance.

I completely rewrote my code, and instead of using indexed=true, I
constructed the property inline using <%= blah %>
I'm not sure why I couldn;t get it working the first way, but now it works.

Neal


> Mine is Collection, so I iterate thru the collection and set "false"
> (String) to each checked.
>
> Regards,
>
>
> PQ
>
> "This Guy Thinks He Knows Everything"
> "This Guy Thinks He Knows What He Is Doing"
>
> -Original Message-
> From: Neal [mailto:[EMAIL PROTECTED]
> Sent: February 26, 2003 5:20 PM
> To: [EMAIL PROTECTED]
> Subject: RE: checkbox and iterate problem
>
> I changed everything from boolean (primative) to Boolean (Object type),
> no difference
> I still see the same behavior.
> After submit my setter function is not called.
> but for a non-indexed checkbox it is called.
>
> However the getter() is always called.
>
> Neal
>
>> try Boolean.FALSE (Object) instead of false (which is a primitive
>> type).
>>
>> Regards,
>>
>>
>> PQ
>>
>> "This Guy Thinks He Knows Everything"
>> "This Guy Thinks He Knows What He Is Doing"
>>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: February 26, 2003 2:04 PM
>> To: [EMAIL PROTECTED]
>> Subject: RE: checkbox and iterate problem
>>
>> I have a Reset method, and I am calling  mFolders[i].setChecked(false)
>> for each item in my array. Is that what you mean by setting the
>> default value ?
>> If so, it hasn't fixed my problem.
>>
>> Thanx
>>
>>> Have to set default value in reset method.
>>>
>>> Regards,
>>>
>>>
>>> PQ
>>>
>>> "This Guy Thinks He Knows Everything"
>>> "This Guy Thinks He Knows What He Is Doing"
>>>
>>> -Original Message-
>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>> Sent: February 26, 2003 1:18 PM
>>> To: [EMAIL PROTECTED]
>>> Subject: checkbox and iterate problem
>>>
>>> Hi,
>>>  I'm having a problem with checkboxes and I was hoping someone could
>>> help.
>>>
>>>  The short version is:
>>>when using  over an array of checkboxes, the
>>> setter
>>> method is not called after submit
>>>
>>>  Long version
>>>I have class   CheckableString { String str; boolean checked =
>>> false;
>>> // etc.. };
>>>I have a Form
>>>HostForm extends ActionForm {
>>>  CheckableString[] mFolders = new CheckableString[100];
>>> public CheckableString getFolder(int n) {
>>> System.err.println("HostForm getFolder a " + mFolders[n]);
>>> return mFolders[n];
>>> }
>>> public CheckableString[] getFolder() {
>>> System.err.println("HostForm getFolder b " + this);
>>> for (int i = 0; i != mFolders.length; i++) {
>>> System.err.println("HostForm getFolder b " +
>>> mFolders[i]);
>>> }
>>> return mFolders;
>>> }
>>> public void setFolder(int n, CheckableString folders) {
>>> System.err.println("HostForm setFolder a " + folders + " " +
>>> this);
>>> mFolders[n] = folders;
>>> }
>>> public void setFolder(CheckableString[] folders) {
>>> System.err.println("HostForm setFolder b " + this);
>>> mFolders = folders;
>>> }
>>> public void reset(ActionMapping a, HttpServletRequest b) {
>>> System.err.println("HostForm reset " + this);
>>> flag = false;
>>> for (int i = 0; i != mFolders.length; i++) {
>>> System.err.println("HostForm reset "
>>> + mFolders[i]);
>>> if (mFolders[i] != null)
>>>
>>> mFolders[i].setChecked(false);
>>> }
>>> }
>>> }
>>>
>>> I have an Action class setup the form, populating values from a
>>> database,
>>> it then forwards to a jsp page
>>> 
>>> ..
>>> >> indexId="index">
>>> 
>>>   
>>> 
>&g

RE: checkbox and iterate problem

2003-02-26 Thread Neal
I'm afraid you've lost me, I thought the propery HAD to be boolean for a
checkbox.
Can you please send me a code snippet of what you have working (even if
its different then what I am trying to do).

High level: I just want to read a list a of strings items from a DB, and
then populate a form with the items and let the user select them or not.

Thanx


> Mine is Collection, so I iterate thru the collection and set "false"
> (String) to each checked.
>
> Regards,
>
>
> PQ
>
> "This Guy Thinks He Knows Everything"
> "This Guy Thinks He Knows What He Is Doing"
>
> -Original Message-
> From: Neal [mailto:[EMAIL PROTECTED]
> Sent: February 26, 2003 5:20 PM
> To: [EMAIL PROTECTED]
> Subject: RE: checkbox and iterate problem
>
> I changed everything from boolean (primative) to Boolean (Object type),
> no difference
> I still see the same behavior.
> After submit my setter function is not called.
> but for a non-indexed checkbox it is called.
>
> However the getter() is always called.
>
> Neal
>
>> try Boolean.FALSE (Object) instead of false (which is a primitive
>> type).
>>
>> Regards,
>>
>>
>> PQ
>>
>> "This Guy Thinks He Knows Everything"
>> "This Guy Thinks He Knows What He Is Doing"
>>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: February 26, 2003 2:04 PM
>> To: [EMAIL PROTECTED]
>> Subject: RE: checkbox and iterate problem
>>
>> I have a Reset method, and I am calling  mFolders[i].setChecked(false)
>> for each item in my array. Is that what you mean by setting the
>> default value ?
>> If so, it hasn't fixed my problem.
>>
>> Thanx
>>
>>> Have to set default value in reset method.
>>>
>>> Regards,
>>>
>>>
>>> PQ
>>>
>>> "This Guy Thinks He Knows Everything"
>>> "This Guy Thinks He Knows What He Is Doing"
>>>
>>> -Original Message-
>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>> Sent: February 26, 2003 1:18 PM
>>> To: [EMAIL PROTECTED]
>>> Subject: checkbox and iterate problem
>>>
>>> Hi,
>>>  I'm having a problem with checkboxes and I was hoping someone could
>>> help.
>>>
>>>  The short version is:
>>>when using  over an array of checkboxes, the
>>> setter
>>> method is not called after submit
>>>
>>>  Long version
>>>I have class   CheckableString { String str; boolean checked =
>>> false;
>>> // etc.. };
>>>I have a Form
>>>HostForm extends ActionForm {
>>>  CheckableString[] mFolders = new CheckableString[100];
>>> public CheckableString getFolder(int n) {
>>> System.err.println("HostForm getFolder a " + mFolders[n]);
>>> return mFolders[n];
>>> }
>>> public CheckableString[] getFolder() {
>>> System.err.println("HostForm getFolder b " + this);
>>> for (int i = 0; i != mFolders.length; i++) {
>>> System.err.println("HostForm getFolder b " +
>>> mFolders[i]);
>>> }
>>> return mFolders;
>>> }
>>> public void setFolder(int n, CheckableString folders) {
>>> System.err.println("HostForm setFolder a " + folders + " " +
>>> this);
>>> mFolders[n] = folders;
>>> }
>>> public void setFolder(CheckableString[] folders) {
>>> System.err.println("HostForm setFolder b " + this);
>>> mFolders = folders;
>>> }
>>> public void reset(ActionMapping a, HttpServletRequest b) {
>>> System.err.println("HostForm reset " + this);
>>> flag = false;
>>> for (int i = 0; i != mFolders.length; i++) {
>>> System.err.println("HostForm reset "
>>> + mFolders[i]);
>>> if (mFolders[i] != null)
>>>
>>> mFolders[i].setChecked(false);
>>> }
>>> }
>>> }
>>>
>>> I have an Action class setup the form, populating values from a
>>> database,
>>

RE: checkbox and iterate problem

2003-02-26 Thread Neal
I changed everything from boolean (primative) to Boolean (Object type), no
difference
I still see the same behavior.
After submit my setter function is not called.
but for a non-indexed checkbox it is called.

However the getter() is always called.

Neal

> try Boolean.FALSE (Object) instead of false (which is a primitive type).
>
> Regards,
>
>
> PQ
>
> "This Guy Thinks He Knows Everything"
> "This Guy Thinks He Knows What He Is Doing"
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: February 26, 2003 2:04 PM
> To: [EMAIL PROTECTED]
> Subject: RE: checkbox and iterate problem
>
> I have a Reset method, and I am calling  mFolders[i].setChecked(false)
> for each item in my array. Is that what you mean by setting the default
> value ?
> If so, it hasn't fixed my problem.
>
> Thanx
>
>> Have to set default value in reset method.
>>
>> Regards,
>>
>>
>> PQ
>>
>> "This Guy Thinks He Knows Everything"
>> "This Guy Thinks He Knows What He Is Doing"
>>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: February 26, 2003 1:18 PM
>> To: [EMAIL PROTECTED]
>> Subject: checkbox and iterate problem
>>
>> Hi,
>>  I'm having a problem with checkboxes and I was hoping someone could
>> help.
>>
>>  The short version is:
>>when using  over an array of checkboxes, the
>> setter
>> method is not called after submit
>>
>>  Long version
>>I have class   CheckableString { String str; boolean checked =
>> false;
>> // etc.. };
>>I have a Form
>>HostForm extends ActionForm {
>>  CheckableString[] mFolders = new CheckableString[100];
>>  public CheckableString getFolder(int n) {
>>  System.err.println("HostForm getFolder a " + mFolders[n]);
>>  return mFolders[n];
>>  }
>>  public CheckableString[] getFolder() {
>>  System.err.println("HostForm getFolder b " + this);
>>  for (int i = 0; i != mFolders.length; i++) {
>>  System.err.println("HostForm getFolder b " +
>> mFolders[i]);
>>  }
>>  return mFolders;
>>  }
>>  public void setFolder(int n, CheckableString folders) {
>>  System.err.println("HostForm setFolder a " + folders + " " +
>> this);
>>  mFolders[n] = folders;
>>  }
>>  public void setFolder(CheckableString[] folders) {
>>  System.err.println("HostForm setFolder b " + this);
>>  mFolders = folders;
>>  }
>>  public void reset(ActionMapping a, HttpServletRequest b) {
>>  System.err.println("HostForm reset " + this);
>>  flag = false;
>>  for (int i = 0; i != mFolders.length; i++) {
>>  System.err.println("HostForm reset "
>> + mFolders[i]);
>>  if (mFolders[i] != null)
>>
>> mFolders[i].setChecked(false);
>>  }
>>  }
>>  }
>>
>>  I have an Action class setup the form, populating values from a
>> database,
>> it then forwards to a jsp page
>> 
>> ..
>> > indexId="index">
>> 
>>   
>> 
>>> name='quack' />
>>   
>> 
>>   
>> 
>> 
>> 
>>
>>
>> The form is populated correctly, items marked as true are selected.
>> And looking at the logs the getter function is called
>> The problem is when I submit, the setter function is NEVER called, and
>> the Form is not populated.
>> note: If I have a simple non-indexed checkbox, then that works as
>> expected and the setter is called
>>
>> I am using struts 1.1RC1
>>
>> Anyone got any ideas ??, I'm stumped
>>
>> Thanks
>>
>> Neal
>>
>>
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED] For
>> additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> - To
> unsubscribe, e-mail: [EMAIL PROTECTED] For
> additional commands, e-mail: [EMAIL PROTECTED]




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



RE: Jakarta Commons Lib ... and Struts

2002-09-04 Thread neal

Sorry ... didn't mean to send this to the list.

And perhaps this was a little overkill ... but I am still on edge from a few
remarks earlier in the day.

N


-Original Message-
From: micael [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 11:23 PM
To: Struts Users Mailing List
Subject: Re: Jakarta Commons Lib ... and Struts


Are you sure, neal, that you understand what is going on here?  What
"Commons/Jakarta taglibs" might you be talking about?As I understand
it, you started this conversation not knowing how the web.xml was related
to initializing servlets.  Just trying to see how your various statements
fit together to form some coherent whole.

At 10:34 AM 9/4/2002 -0700, you wrote:
>I am new and still pondering whether to use Struts or not.
>
>I am aware of the MVC pattern as a reason to use Struts but am curious to
>know how it's funcitonality libraries and wrappers compare.  Does Struts
>provide similar functionality to those libraries found in the Jakarta
>commons libs?  Commons offers some pretty sweet stuff.
>
>Does anyone use Commons/Jakarta taglibs along side of Struts .. or does
>Struts intend to be a one-stop-shop sort of solution?
>
>http://jakarta.apache.org/commons/index.html
>
>Thanks.
>Neal
>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Jakarta Commons Lib ... and Struts

2002-09-04 Thread neal

Micael,

Do me a favor and DO NOT RESPOND TO ANY MORE OF MY POSTS.

You know, other people seem quite capable of contributing to conversations
without starting with an insult but I sware I think this is something you
are incapable of.  Every freaking email you write to me have some flippant,
arrogant remark.

Thanks you very much but I can do without your remarks.

Neal


-Original Message-
From: micael [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 11:23 PM
To: Struts Users Mailing List
Subject: Re: Jakarta Commons Lib ... and Struts


Are you sure, neal, that you understand what is going on here?  What
"Commons/Jakarta taglibs" might you be talking about?As I understand
it, you started this conversation not knowing how the web.xml was related
to initializing servlets.  Just trying to see how your various statements
fit together to form some coherent whole.

At 10:34 AM 9/4/2002 -0700, you wrote:
>I am new and still pondering whether to use Struts or not.
>
>I am aware of the MVC pattern as a reason to use Struts but am curious to
>know how it's funcitonality libraries and wrappers compare.  Does Struts
>provide similar functionality to those libraries found in the Jakarta
>commons libs?  Commons offers some pretty sweet stuff.
>
>Does anyone use Commons/Jakarta taglibs along side of Struts .. or does
>Struts intend to be a one-stop-shop sort of solution?
>
>http://jakarta.apache.org/commons/index.html
>
>Thanks.
>Neal
>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Struts - vs XSLT (ASP.NET v. Struts)

2002-09-04 Thread neal

Yeah I think youre right on one levelthat JSP is more directly
comparable to XSLT than Struts...except I was also referring to Struts'
declarative tag syntax for logic. Earlier in the thread we were talking
about how it is beneficial to make the presentation template declarative
syntax only. That is something where Strut's tag libs are more comparable to
XSLTbut ultimately I suppose tagLibs are a part of the JSP spec though
so ... alright fineyou are right.  ;-)

Nonetheless, it is interesting to know that Struts does not explicitly
dictate use of JSP.  So the controller is maliable enough (without having to
pick through the open source code to change stuff) to do a transformation
rather than a forward?  That's interesting to note.

Neal


-Original Message-
From: John Yu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 6:47 PM
To: Struts Users Mailing List
Subject: Re: Struts - vs XSLT (ASP.NET v. Struts)



As Joe said, Struts doesn't mandate JSP.
A more appropriate comparison will be

JSP vs XSLT

In this regard, both are scripting-oriented languages.
Performance aside, I believe the selection is a matter of preference.


At 07:28 am 05-09-2002, you wrote:
>Alright, so if the purpose of Struts and ASP.NET is:
>
>1. To seperate code from content
>2. Make the presentation layer completely declarative
>
>The why not just write a servlet that instead for forward to display JSPs,
>looks up a different XSLT for display based upon the action class being
>requested ... and instead of having to pass all your data to the
>presentation servlet in beans ... you just transform your XML data using
>that XSLT.  Seems to achieve the same goals and architecturally removes a
>layer if you're going to use XML at all.  (Just servlet and XSL instead of
>Servlet, JSP, and XSL).
>
>??
>
>Any thoughts??
>Neal
>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
John Yu   Scioworks Technologies
e: [EMAIL PROTECTED] w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - "Don't develop Struts Apps without it!"


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


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




RE: Struts - vs XSLT (ASP.NET v. Struts)

2002-09-04 Thread neal

Actually,

There's nothing to know in XsLT. I mean, the logic is extremely stright
forward basic iterative logic and the tags used to write that logic are the
same as custom tags:

Examples:



And these are just embedded within well-formed HTML and JavaScript so really
... the only limitation I would think is if the person didn't know a little
bit of xpath ... but anyone with any clue of XML knows at least a little bit
of xPath.  :)

I hear ya about the slow XML parsers but they're getting a lot better, very
fast.  The ASP.NET XML parser in particular is suppose to scream.

Well interesting.  Its good to know that others are think along similar
lines and not just me.  Thanks for the thoughts (Jacob too)!

Neal



-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 4:36 PM
To: Struts Users Mailing List
Subject: RE: Struts - vs XSLT (ASP.NET v. Struts)


There are a couple of frameworks out there that endorse this idea, and
there's certainly nothing in Struts that mandates the use of JSP.  I think a
person on this list has implemented something exactly as you describe with
Struts.

My .02:

1.  XSLT is slower than JSP, varying upon the complexity of the
transformation.
2.  Anyone working on your presentation layer must understand XSL.  This
eliminates web developers who know HTML/JavaScript and are savvy of custom
tag usage (who *can* work on ASP/JSP pages).


I actually think the idea is aesthetically pleasing, but practically not so
pretty. :)


peace,
Joe


> -Original Message-
> From: neal [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 4:29 PM
> To: Struts Users Mailing List
> Subject: Struts - vs XSLT (ASP.NET v. Struts)
>
>
> Alright, so if the purpose of Struts and ASP.NET is:
>
> 1. To seperate code from content
> 2. Make the presentation layer completely declarative
>
> The why not just write a servlet that instead for forward to
> display JSPs,
> looks up a different XSLT for display based upon the action
> class being
> requested ... and instead of having to pass all your data to the
> presentation servlet in beans ... you just transform your XML
> data using
> that XSLT.  Seems to achieve the same goals and
> architecturally removes a
> layer if you're going to use XML at all.  (Just servlet and
> XSL instead of
> Servlet, JSP, and XSL).
>
> ??
>
> Any thoughts??
> Neal
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Struts - vs XSLT (ASP.NET v. Struts)

2002-09-04 Thread neal

Alright, so if the purpose of Struts and ASP.NET is:

1. To seperate code from content
2. Make the presentation layer completely declarative

The why not just write a servlet that instead for forward to display JSPs,
looks up a different XSLT for display based upon the action class being
requested ... and instead of having to pass all your data to the
presentation servlet in beans ... you just transform your XML data using
that XSLT.  Seems to achieve the same goals and architecturally removes a
layer if you're going to use XML at all.  (Just servlet and XSL instead of
Servlet, JSP, and XSL).

??

Any thoughts??
Neal


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




RE: FW: ASP.NET - similar to Struts?

2002-09-04 Thread neal

Hey cool!  :)

-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 2:24 PM
To: Struts Users Mailing List
Subject: RE: FW: ASP.NET - similar to Struts?


ted

have you looked at http://www.waferproject.org/index.html

a project to do exactly what you are saying.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 3:16 PM
To: Struts Users Mailing List
Subject: Re: FW: ASP.NET - similar to Struts?


If I understand the question properly, we also consider it good practice
to have the control layer set the values before forwarding to the
presentation page. In Struts, the control layer is most often
represented by the Action. We encourage people to always link to an
Action first before forwarding out to a JSP.

Struts uses ActionForm JavaBeans to carry the values that will populate
the JSP form.

I think it would be interesting to boil down what Struts, ASP.NET, and
the other framework do to generic case studies. I put some preliminary
notes here:

http://husted.com/struts/usecases.html

-Ted.

neal wrote:

> Oops .. in paragraph 3 (QUESTION) ... the last sentence should actually
> read:
>
> Rather, in the ASPX file you would have (a custom tag - aspx:field
name="x"
> />) and then in the *ASPX.CS* file you would set the value of the field:
> form.field(x) = 'xyz'.
>
> -Original Message-
> From: neal [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 1:23 PM
> To: Struts Users Mailing List
> Subject: ASP.NET - similar to Struts?
>
>
> I noticed a few similarities to ASP.NET in Struts (from a 30,000 foot
> level).  This gave way to a few questions.  I am also curious to know what
> anyone else thinks of this comparison:
>
> BACKGROUND
> In ASP.NET (for those not familiar) there is now seperation of code form
> content, similar to thatr achieved in JSP model 2.  They do it via
> "CodeBehind".  Effectively, every .ASPX file (new ASP extension) comes can
> have a .ASPX.CS compliment file.  This CS (C-sharp) file is effectively
then
> the same thing as the classes written to facilitate the controller for
> various JSPs in an MVC model.
>
> QUESTION
> This got me to thinkingbeing new to Struts I don't yet know the answer
> to this question, but in ASP.NET it is considered 'good practice' to set
the
> values of the ASP you will forward to, in its compliment ASPX.CS file.
Ok,
> so say that you are editing someone's registration info, the info is
> populated in the form.  You wouldn't use tags to grab the data and set it
> into the form field.  Rather, in the ASPX file you would have (a custom
> tag - aspx:field name="x" />) and then in teh aspx file you would set the
> value of the field: form.field(x) = 'xyz'.
>
> What I am wondering is ... is there a similar mechanism in Struts?  
or
> must you pull the values via tag (sort of a pull vs push approach it
> seems)...
>
> Thanks.
> Neal
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
Ted Husted, Husted dot Com, Fairport NY US
co-author, Java Web Development with Struts
Order it today:
<http://husted.com/struts/book.html>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




HTML bean - class and style attrbutes????

2002-09-04 Thread neal

I was looking at some documentation for the HTML beans and the class and
style attributes seemed conspicuously missing.  Are these not available? Can
you not set CSS styles or classes on form fields being controlled by Struts?


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




RE: ASP.NET - similar to Struts?

2002-09-04 Thread neal

Really???

Very interesting.  :)

Neal

-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 1:48 PM
To: Struts Users Mailing List
Subject: RE: ASP.NET - similar to Struts?



Comments inline below:


> -Original Message-
> From: neal [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 1:32 PM.
> To: Struts
> Subject: FW: ASP.NET - similar to Struts?
>
>
> Oops .. in paragraph 3 (QUESTION) ... the last sentence
> should actually
> read:
>
> Rather, in the ASPX file you would have (a custom tag -
> aspx:field name="x"
> />) and then in the *ASPX.CS* file you would set the value of
> the field:
> form.field(x) = 'xyz'.


Gotcha, looks exactly like Struts way of doing it.

>
> -Original Message-
> From: neal [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 1:23 PM
> To: Struts Users Mailing List
> Subject: ASP.NET - similar to Struts?
>
>
> I noticed a few similarities to ASP.NET in Struts (from a 30,000 foot
> level).  This gave way to a few questions.  I am also curious
> to know what
> anyone else thinks of this comparison:
>
> BACKGROUND
> In ASP.NET (for those not familiar) there is now seperation
> of code form
> content, similar to thatr achieved in JSP model 2.  They do it via
> "CodeBehind".  Effectively, every .ASPX file (new ASP
> extension) comes can
> have a .ASPX.CS compliment file.  This CS (C-sharp) file is
> effectively then
> the same thing as the classes written to facilitate the controller for
> various JSPs in an MVC model.
>
> QUESTION
> This got me to thinkingbeing new to Struts I don't yet
> know the answer
> to this question, but in ASP.NET it is considered 'good
> practice' to set the
> values of the ASP you will forward to, in its compliment
> ASPX.CS file.  Ok,
> so say that you are editing someone's registration info, the info is
> populated in the form.  You wouldn't use tags to grab the
> data and set it
> into the form field.  Rather, in the ASPX file you would have
> (a custom
> tag - aspx:field name="x" />) and then in teh aspx file you
> would set the
> value of the field: form.field(x) = 'xyz'.

Perhaps I'm a bit daft, but how is this *not* using tags--you just said
"custom tag"??

>
> What I am wondering is ... is there a similar mechanism in
> Struts?  .... or
> must you pull the values via tag (sort of a pull vs push approach it
> seems)...

The mechanism looks damn near identical to me.  I think the pull vs. push
difference is more behind-the-scenes, the actual developer usage looks the
same as Struts.


>
> Thanks.
> Neal
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




FW: ASP.NET - similar to Struts?

2002-09-04 Thread neal

Oops .. in paragraph 3 (QUESTION) ... the last sentence should actually
read:

Rather, in the ASPX file you would have (a custom tag - aspx:field name="x"
/>) and then in the *ASPX.CS* file you would set the value of the field:
form.field(x) = 'xyz'.

-Original Message-
From: neal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 1:23 PM
To: Struts Users Mailing List
Subject: ASP.NET - similar to Struts?


I noticed a few similarities to ASP.NET in Struts (from a 30,000 foot
level).  This gave way to a few questions.  I am also curious to know what
anyone else thinks of this comparison:

BACKGROUND
In ASP.NET (for those not familiar) there is now seperation of code form
content, similar to thatr achieved in JSP model 2.  They do it via
"CodeBehind".  Effectively, every .ASPX file (new ASP extension) comes can
have a .ASPX.CS compliment file.  This CS (C-sharp) file is effectively then
the same thing as the classes written to facilitate the controller for
various JSPs in an MVC model.

QUESTION
This got me to thinkingbeing new to Struts I don't yet know the answer
to this question, but in ASP.NET it is considered 'good practice' to set the
values of the ASP you will forward to, in its compliment ASPX.CS file.  Ok,
so say that you are editing someone's registration info, the info is
populated in the form.  You wouldn't use tags to grab the data and set it
into the form field.  Rather, in the ASPX file you would have (a custom
tag - aspx:field name="x" />) and then in teh aspx file you would set the
value of the field: form.field(x) = 'xyz'.

What I am wondering is ... is there a similar mechanism in Struts?   or
must you pull the values via tag (sort of a pull vs push approach it
seems)...

Thanks.
Neal


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




ASP.NET - similar to Struts?

2002-09-04 Thread neal

I noticed a few similarities to ASP.NET in Struts (from a 30,000 foot
level).  This gave way to a few questions.  I am also curious to know what
anyone else thinks of this comparison:

BACKGROUND
In ASP.NET (for those not familiar) there is now seperation of code form
content, similar to thatr achieved in JSP model 2.  They do it via
"CodeBehind".  Effectively, every .ASPX file (new ASP extension) comes can
have a .ASPX.CS compliment file.  This CS (C-sharp) file is effectively then
the same thing as the classes written to facilitate the controller for
various JSPs in an MVC model.

QUESTION
This got me to thinkingbeing new to Struts I don't yet know the answer
to this question, but in ASP.NET it is considered 'good practice' to set the
values of the ASP you will forward to, in its compliment ASPX.CS file.  Ok,
so say that you are editing someone's registration info, the info is
populated in the form.  You wouldn't use tags to grab the data and set it
into the form field.  Rather, in the ASPX file you would have (a custom
tag - aspx:field name="x" />) and then in teh aspx file you would set the
value of the field: form.field(x) = 'xyz'.

What I am wondering is ... is there a similar mechanism in Struts?   or
must you pull the values via tag (sort of a pull vs push approach it
seems)...

Thanks.
Neal


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




Jakarta Commons Lib ... and Struts

2002-09-04 Thread neal

I am new and still pondering whether to use Struts or not.

I am aware of the MVC pattern as a reason to use Struts but am curious to
know how it's funcitonality libraries and wrappers compare.  Does Struts
provide similar functionality to those libraries found in the Jakarta
commons libs?  Commons offers some pretty sweet stuff.

Does anyone use Commons/Jakarta taglibs along side of Struts .. or does
Struts intend to be a one-stop-shop sort of solution?

http://jakarta.apache.org/commons/index.html

Thanks.
Neal


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




RE: Tomcat/Struts - DB Conn Pooling

2002-08-21 Thread neal

Thanks!

That is a great article on setting up connection pooling directly in Tomcat.

So, I see that some people are using Struts, some PoolMan, and some their
application server (in this case Tomcat) to achieve conn pooling.  I am
curious to know (a) which is the most popular of these three mechanisms? (b)
why?, and (c) which one is generally regarded as the "best-practice"
implementation?

Thanks!

Neal


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 2:46 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: Tomcat/Struts - DB Conn Pooling



This may help you

http://www.midrangeserver.com/mgo/mgo062602-story01.html

Confidencialidade do Correio do Eletrônico***
Informações confidenciais podem estar contidas nesta mensagem. Se você não
se encontra na lista de destinatários ou não é o remetente da mesma, você
não deve copiar ou enviar esta mensagem para ninguém. Neste caso, você deve
destruir e notificar o remetente da mesma. A empresa considera opiniões,
conclusões e outras informações que não se relacionam com o negócio oficial
da corporação de responsabilidade do usuário do serviço.


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


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




RE: Tomcat/Struts - DB Conn Pooling

2002-08-21 Thread neal

So, you find the Struts connection pooling to be a little limited?  What
would you say is the limitation on Struts conn pool?  Is caching the only
significant limitation or are there others?

It sounds like you're saying you prefer Poolman, when possible.  Would you
say your sentiment is pretty typical of most other users out there?

Thanks!
Neal


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 12:12 PM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat/Struts - DB Conn Pooling


I've used both the basic connection pooling through struts and have also
implemented poolman lately for some projects.  I liked poolman because I
can do caching with it...



-Original Message-
From: nealcabage [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 3:01 PM
To: struts-user
Subject: Tomcat/Struts - DB Conn Pooling


For those of you out there who have written web apps using Tomcat and
Struts, with JDBC connectivity, what did you use for dB connection
pooling?
I understand that Struts provides some conn pooling? I read somewhere
that
Tomcat might also provide this functionality, though I wonder if they
were
referring to HTTP connection pooling, rather than dB.  Also, I suppose
there
is the possibility of using PoolMan ... or perhaps if a driver (I think
I'll
be using Connect/J for MySQL) offers it.

Could someone please provide a suggestion or some advice?

Thanks in advice.

:)

Neal


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Tomcat/Struts - DB Conn Pooling

2002-08-21 Thread neal

For those of you out there who have written web apps using Tomcat and
Struts, with JDBC connectivity, what did you use for dB connection pooling?
I understand that Struts provides some conn pooling? I read somewhere that
Tomcat might also provide this functionality, though I wonder if they were
referring to HTTP connection pooling, rather than dB.  Also, I suppose there
is the possibility of using PoolMan ... or perhaps if a driver (I think I'll
be using Connect/J for MySQL) offers it.

Could someone please provide a suggestion or some advice?

Thanks in advice.

:)

Neal


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




RE: Non-Struts related : input one text field then show description in another field

2002-08-20 Thread neal

So, you just want to determine the city and state, based upon the user's
input zip code? I think the best thing to do would just break that form up
into steps (first get the zip code, submit the page, and come back with that
data from the servlet).  Sucks to have to do that but if there's that much
data you might not have a choise unless you want to employ some sort of fat
client that can make socket callbacks ... or you could use the iFrame as Joe
suggested.  This would also give you the feeling of doing it dynamically as
the whole page wouldn't have to redraw.

Good luck.
N


-Original Message-
From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 12:40 AM
To: Struts Users Mailing List
Subject: RE: Non-Struts related : input one text field then show
description in another field



That's Right! : D
but worse that the zipcode associates not only state but associate city
also.
huh... seems I gotta download a list of possible zipcode to the page and
call javascript to handle it.

Are there any better ways?


Really thanx,

Sutiwan W.



    "neal"

hoo.com> cc:
 Subject: RE: Non-Struts related
: input one text field then show
08/20/2002description in another field
02:21 PM
Please respond
to "Struts
Users Mailing
List"






Aah - I see what you're saying.

Well, I don't know if this is for Intranet or internet purposes but either
way I'm presumign you don't want to make the user download a  list of all
possible postal codesthat would be one large page.  :)

How about if you defined a multideminsional array, wherein there are three
deminsions: state, minimum postal code, and maximum postal.  You could then
compare whatever the user enters against the postal code range, per state,
to determine which state is applicable. In which case you would again just
define a method for the onBlur event.  In this case it would be a
user-defined method that would do an integer comparison of the input value,
against the 2nd and 3rd dimensions of the array, in order to the correct
index ... to get you the correct state contained in the first dimension.
>From there of course its just a matter of assigning that value to your
state
input field.

I hope this time I answered the question you were asking.  :)

N

-Original Message-
From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 12:14 AM
To: Struts Users Mailing List
Subject: RE: Non-Struts related : input one text field then show
description in another field



Really Sorry if my question confused you...
I would like to perform it on client side but not know how to do it yet.. :
(

Are there any way able to generate javascript function to populate  the
zipcode and the state in Map or something like that (cannot not use array
cuz I want to use the zipcode as key and state as value).
when user finish fill in the zipcode field , call that javascript function
to show the associated state on another text field.


Sutiwan W.




"neal"

hoo.com> cc:
 Subject: RE: Non-Struts
related
: input one text field then show
08/20/2002description in another field
01:59 PM
Please respond
to "Struts
Users Mailing
List"






Sounds like you're saying that you want to cause the page to submit on the
onBlur event, correct?

Try something like this:

   


And then course you would do the lookup server-side and return the page
with
the revised list of zipcodes, per the chosen state.  This is a similar sort
of thing to what ASP.NET does with postback.  Note though that onBlur
probably won't work with NN4 and possibly not NN6...last I checked it was
an
event only listened to by MSIE.  Also note that this implies making a lot
of
round trips to the server, which might decrease performance of you app in
high-traffic scenarios.

Cheers.
Neal



-Original Message-
From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 11:25 PM
To: [EMAIL PROTECTED]
Subject: Non-Struts related : input one text field then show description
in another field


Need somebody help!
I have one jsp page with one zip code text field and one state text field.
 I want when user input the zipcode text , onblur that zip code field then
the state text field shows the state related to that zipcode.

what kind of bean or tag lib do I need to perform this task? I want it to
perform on client side(javascript) .

Note

RE: Non-Struts related : input one text field then show description in another field

2002-08-20 Thread neal

Aah - I see what you're saying.

Well, I don't know if this is for Intranet or internet purposes but either
way I'm presumign you don't want to make the user download a  list of all
possible postal codesthat would be one large page.  :)

How about if you defined a multideminsional array, wherein there are three
deminsions: state, minimum postal code, and maximum postal.  You could then
compare whatever the user enters against the postal code range, per state,
to determine which state is applicable. In which case you would again just
define a method for the onBlur event.  In this case it would be a
user-defined method that would do an integer comparison of the input value,
against the 2nd and 3rd dimensions of the array, in order to the correct
index ... to get you the correct state contained in the first dimension.
>From there of course its just a matter of assigning that value to your state
input field.

I hope this time I answered the question you were asking.  :)

N

-Original Message-
From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 12:14 AM
To: Struts Users Mailing List
Subject: RE: Non-Struts related : input one text field then show
description in another field



Really Sorry if my question confused you...
I would like to perform it on client side but not know how to do it yet.. :
(

Are there any way able to generate javascript function to populate  the
zipcode and the state in Map or something like that (cannot not use array
cuz I want to use the zipcode as key and state as value).
when user finish fill in the zipcode field , call that javascript function
to show the associated state on another text field.


Sutiwan W.




    "neal"

hoo.com> cc:
 Subject: RE: Non-Struts related
: input one text field then show
08/20/2002description in another field
01:59 PM
Please respond
to "Struts
Users Mailing
List"






Sounds like you're saying that you want to cause the page to submit on the
onBlur event, correct?

Try something like this:

   


And then course you would do the lookup server-side and return the page
with
the revised list of zipcodes, per the chosen state.  This is a similar sort
of thing to what ASP.NET does with postback.  Note though that onBlur
probably won't work with NN4 and possibly not NN6...last I checked it was
an
event only listened to by MSIE.  Also note that this implies making a lot
of
round trips to the server, which might decrease performance of you app in
high-traffic scenarios.

Cheers.
Neal



-Original Message-
From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 11:25 PM
To: [EMAIL PROTECTED]
Subject: Non-Struts related : input one text field then show description
in another field


Need somebody help!
I have one jsp page with one zip code text field and one state text field.
 I want when user input the zipcode text , onblur that zip code field then
the state text field shows the state related to that zipcode.

what kind of bean or tag lib do I need to perform this task? I want it to
perform on client side(javascript) .

Note:Zipcode and State are stored in the database


Look forward to hearing the solution

Sutiwan W.






This E-mail and any files transmitted with it are confidential
and intended for the sole use of the individual or entity
to whom they are addressed. If you have received this
E-mail in error please notify the system manager.  This E-mail
message has been swept for the presence of computer
viruses.



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


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








This E-mail and any files transmitted with it are confidential
and intended for the sole use of the individual or entity
to whom they are addressed. If you have received this
E-mail in error please notify the system manager.  This E-mail
message has been swept for the presence of computer
viruses.



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


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




RE: Non-Struts related : input one text field then show description in another field

2002-08-19 Thread neal

Sounds like you're saying that you want to cause the page to submit on the
onBlur event, correct?

Try something like this:




And then course you would do the lookup server-side and return the page with
the revised list of zipcodes, per the chosen state.  This is a similar sort
of thing to what ASP.NET does with postback.  Note though that onBlur
probably won't work with NN4 and possibly not NN6...last I checked it was an
event only listened to by MSIE.  Also note that this implies making a lot of
round trips to the server, which might decrease performance of you app in
high-traffic scenarios.

Cheers.
Neal



-Original Message-
From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 11:25 PM
To: [EMAIL PROTECTED]
Subject: Non-Struts related : input one text field then show description
in another field


Need somebody help!
I have one jsp page with one zip code text field and one state text field.
 I want when user input the zipcode text , onblur that zip code field then
the state text field shows the state related to that zipcode.

what kind of bean or tag lib do I need to perform this task? I want it to
perform on client side(javascript) .

Note:Zipcode and State are stored in the database


Look forward to hearing the solution

Sutiwan W.






This E-mail and any files transmitted with it are confidential
and intended for the sole use of the individual or entity
to whom they are addressed. If you have received this
E-mail in error please notify the system manager.  This E-mail
message has been swept for the presence of computer
viruses.



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


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




Struts Connection Pooling

2002-08-19 Thread neal

Anyone have experience with Struts Connection pooling? If so, was it a
positive experience? Easy to use?  Stable?  Fast? How does it compare to
something such as Poolman?  And, does any MySQL driver out their provide
comparable connection pooling?

Thanks.
Neal




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




RE: when to use Struts

2002-08-18 Thread neal

Yeah, I know what I am saying would be like reinventing the wheel, and thus
the point of using a framework (to not reinvent the wheel).  However, my
main concern is that learning to use this 'wheel' might take longer than
building one myself.

I'm sure the guys who wrote Struts are masters of the field and I have heard
great things about Struts.  I guess I am simply posting the question to try
to get more information about it.  On the surface it just sounds like one
more thing to learn, and I'm just trying to gauge the value.

What about Struts do you find to be the most valuable features?

Thanks!  :)

Neal



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




RE: when to use Struts

2002-08-18 Thread neal

True.  But MVC programming can be achieved without Struts.  Writing an
action servlet similar to that provided by Struts does not appear to be
difficult.

N



-Original Message-
From: V. Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 18, 2002 2:48 PM
To: Struts Users Mailing List
Subject: Re: when to use Struts


The bigger the project the more productivity you get with modular (MVC)
programming.
v.

neal wrote:
> I am new to struts and am attempting to get my around how valuable it
would
> be me.
>
>>From what I gather, it's primary asset is the action servlet which makes
for
> a nice seperation between the view and the control. I also understand that
> if provides some useful tools such as a connectionPool for JDBC, and some
> XML parsing tools.
>
> Aside from these things, what makes Struts useful? I guess what I am
> ultimatley wondering is if the time saved by using Struts will be eaten up
> by the time it takes me to learn Struts, enough to use it?
>
> Any thoughts/comments would be appreciated.
>
> Thanks.
> Neal
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> 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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




when to use Struts

2002-08-18 Thread neal


I am new to struts and am attempting to get my around how valuable it would
be me.

>From what I gather, it's primary asset is the action servlet which makes for
a nice seperation between the view and the control. I also understand that
if provides some useful tools such as a connectionPool for JDBC, and some
XML parsing tools.

Aside from these things, what makes Struts useful? I guess what I am
ultimatley wondering is if the time saved by using Struts will be eaten up
by the time it takes me to learn Struts, enough to use it?

Any thoughts/comments would be appreciated.

Thanks.
Neal


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




Getting Locale from a non-struts servlet

2001-03-13 Thread Neal Kaiser

Does Struts store the client's Locale in their session somewhere? If so, how
would
I access it?

I have a non-struts servlet which I want to try to pull the Locale object
from.

Thanks,

Neal




logic-equal for locale

2001-02-25 Thread Neal Kaiser

When I do this:


You are English locale


I get an exception telling me that I am trying to compare a null variable to
"en".
What is the correct way to compare the locale with the logic:equal tag?

Thanks.




RE: perform() called twice

2001-02-24 Thread Neal Kaiser

This is a little out-there, but, by any chance are you using Netscape 6
and Frontpage for your JSP editor?

I found a bug in Netscape 6 that causes a page to be submitted twice (when
actually pressing it once) if there are certain Frontpage META tags in your
page.

The solution for us was to remove the frontpage meta tags it auto-generates.

One way to tell would be by doing a tail on your access_log file. If you see
two
requests, then that might be the problem.

Neal

> -Original Message-
> From: Anand Raman [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 24, 2001 6:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: perform() called twice
>
>
> Hi Vic
> The action perform method is called once for every submission..
>
> When u hit the submit button the ActionFromBean is populated and then
> the controller passes on the control to the Action class perform
> method.
>
> U then return any appropriate action forward method from the same
> perform method .
>
> I am not sure why u get 2 calls to the perform method.. Maybe posting
> sections of code can help..
>
> Anand
>
> On Fri, Feb 23, 2001 at 01:38:18PM -0500, Fickes, Vic wrote:
> >Hi,
> >I am trying to understand the sequence of events that take
> place using a
> >simple test .  When the form's action is
> submitted, it causes the
> >Action.perform() method to be called twice in the same
> request.  I thought
> >it might have something to do with the forward that is returned from
> >perform() so I returned null, and it still does it.  Is this
> the expected
> >behavior?  I don't think this is happening in the example
> application, so it
> >must be something I am doing, but I can't figure out what.
> Any ideas would
> >be appreciated.
> >Thanks,
> >Vic
>




ActionError Substitution Problem

2001-02-23 Thread Neal Kaiser

All my substitutions are showing up like this:

Sorry, the username [Ljava.lang.Object;@7268de is already in use.

My code is like this:

String user_username="test";

errors.add("username",
new ActionError("error.user_username.unique",user_username));

I've also tried:

new ActionError("error.user_username.unique",new
String(user_username)));

And my properties file has: 

error.user_username.unique = Sorry, the username {0} is already in use.


I am using Orion and Struts build from 2 nights ago.

What am I doing wrong?

Thanks, Neal

 winmail.dat


RE: Strange Error with

2001-02-19 Thread Neal Kaiser

Rather than going custom taglib route, is it possible to use  ?
The problem with that is that the file must inherit from the calling file's
struts
elements.

For example, something like this:





The only include that works is the <%@ include> directive, but that doesn't
solve this
method size limit problem.

Is this a container thing? Or is this a spec thing?



> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 4:34 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Strange Error with 
>
>
> In our case, increasing the JVM's heap size didn't fix the
> problem. The only
> thing that fixed it was reducing the number of tags on the
> page, so I'm
> leaning towards believing that a method size limit in a class
> file (someone
> mentioned 64KB) is the most likely cause. Nasty. Now I'm
> having to write
> custom tags just to reduce the total number of tags on a page!
>
> --
> Martin Cooper
> Tumbleweed Communications
>
>
> - Original Message -
> From: "Dan Connelly" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, February 19, 2001 8:26 AM
> Subject: Re: Strange Error with 
>
>
> This one came up earlier this month.   Nothing to do with
> 
> per se.  A large number of tags on a page can cause this.
>
> Check the archive at http://marc.theaimsgroup.com/
> <http://marc.theaimsgroup.com/>
>
> Search struts-user for the topic "Illegal target of branch or jump"
>
> The last post on that topic says that the cure is to give
> yourself more
> heap in the JVM with -mx and -ms
>
> (I wonder if its really more stack space per thread that on
> needs for a
> large number of tags on a JSP (??).  I haven't looked into it, but
> stack(s) are usually more fragile than heap in multi-threaded system.)
>
> - Original Message -
> From: "Neal Kaiser" <  <mailto:[EMAIL PROTECTED]>
> [EMAIL PROTECTED]>
> To: <  <mailto:[EMAIL PROTECTED]>
> [EMAIL PROTECTED]>
> Sent: Monday, February 19, 2001 9:45 AM
> Subject: Strange Error with 
>
>
> > I am using Orion 1.4.7. I don't know if this is an Orion bug, or
> possibly
> > Struts?  I have a jsp which uses the include directive to read in a
> list of
> > countries:
> >
> >
> > The jsp looks like this:
> >
> > 
> > <%@ include file="../util/countries.jsp" %>
> > 
> >
> >
> > And the countries.jsp is something like this:
> > ..
> > Tuvalu
> > U.S. Virgin Islands 
> > Uganda
> >
> > If I have 223 lines in my countries.jsp file, it works, no problem.
> However,
> > if I go over 223 lines (no matter what line it is) I get this error:
> >
> > Error parsing JSP page /galacy/register/layout.jsp
> >
> > Error creating jsp-page instance: java.lang.VerifyError: (class:
> > __jspPage28_register_regstep2_jsp, method: _jspService signature:
> >
> (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/Ht
> tpServletR
> espo
> > nse;)V) Illegal target of jump or branch
> >
> > I just tried putting the select list in the .jsp rather
> than using an
> > include -- same error.
> >
> > I am leaning towards this being a container bug, not a
> Struts one. But
> I
> > just wanted to verify and make sure this wasn't know with Struts
> first...
> >
> > Thanks, Neal
> >
>
>
>




RE: Strange Error with

2001-02-19 Thread Neal Kaiser

Yep, same here. Increasing the heap didn't do it.  I wish there was a better
solution to this!

> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 4:34 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Strange Error with 
> 
> 
> In our case, increasing the JVM's heap size didn't fix the 
> problem. The only
> thing that fixed it was reducing the number of tags on the 
> page, so I'm
> leaning towards believing that a method size limit in a class 
> file (someone
> mentioned 64KB) is the most likely cause. Nasty. Now I'm 
> having to write
> custom tags just to reduce the total number of tags on a page!
> 
> --
> Martin Cooper
> Tumbleweed Communications
> 
> 
> - Original Message -
> From: "Dan Connelly" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, February 19, 2001 8:26 AM
> Subject: Re: Strange Error with 
> 
> 
> This one came up earlier this month.   Nothing to do with 
> 
> per se.  A large number of tags on a page can cause this.
> 
> Check the archive at http://marc.theaimsgroup.com/
> <http://marc.theaimsgroup.com/>
> 
> Search struts-user for the topic "Illegal target of branch or jump"
> 
> The last post on that topic says that the cure is to give 
> yourself more
> heap in the JVM with -mx and -ms
> 
> (I wonder if its really more stack space per thread that on 
> needs for a
> large number of tags on a JSP (??).  I haven't looked into it, but
> stack(s) are usually more fragile than heap in multi-threaded system.)
> 
> - Original Message -
> From: "Neal Kaiser" <  <mailto:[EMAIL PROTECTED]> 
> [EMAIL PROTECTED]>
> To: <  <mailto:[EMAIL PROTECTED]>
> [EMAIL PROTECTED]>
> Sent: Monday, February 19, 2001 9:45 AM
> Subject: Strange Error with 
> 
> 
> > I am using Orion 1.4.7. I don't know if this is an Orion bug, or
> possibly
> > Struts?  I have a jsp which uses the include directive to read in a
> list of
> > countries:
> >
> >
> > The jsp looks like this:
> >
> > 
> > <%@ include file="../util/countries.jsp" %>
> > 
> >
> >
> > And the countries.jsp is something like this:
> > ..
> > Tuvalu
> > U.S. Virgin Islands 
> > Uganda
> >
> > If I have 223 lines in my countries.jsp file, it works, no problem.
> However,
> > if I go over 223 lines (no matter what line it is) I get this error:
> >
> > Error parsing JSP page /galacy/register/layout.jsp
> >
> > Error creating jsp-page instance: java.lang.VerifyError: (class:
> > __jspPage28_register_regstep2_jsp, method: _jspService signature:
> >
> (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/Ht
> tpServletR
> espo
> > nse;)V) Illegal target of jump or branch
> >
> > I just tried putting the select list in the .jsp rather 
> than using an
> > include -- same error.
> >
> > I am leaning towards this being a container bug, not a 
> Struts one. But
> I
> > just wanted to verify and make sure this wasn't know with Struts
> first...
> >
> > Thanks, Neal
> >
> 
> 
> 



Strange Error with

2001-02-19 Thread Neal Kaiser

I am using Orion 1.4.7. I don't know if this is an Orion bug, or possibly
Struts?  I have a jsp which uses the include directive to read in a list of
countries:


The jsp looks like this:


<%@ include file="../util/countries.jsp" %>



And the countries.jsp is something like this:
..
Tuvalu
U.S. Virgin Islands 
Uganda

If I have 223 lines in my countries.jsp file, it works, no problem. However,
if I go over 223 lines (no matter what line it is) I get this error:

Error parsing JSP page /galacy/register/layout.jsp

Error creating jsp-page instance: java.lang.VerifyError: (class:
__jspPage28_register_regstep2_jsp, method: _jspService signature:
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo
nse;)V) Illegal target of jump or branch

I just tried putting the select list in the .jsp rather than using an
include -- same error.

I am leaning towards this being a container bug, not a Struts one. But I
just wanted to verify and make sure this wasn't know with Struts first...

Thanks, Neal




RE: Client-side validation (Old questions that die hard)

2001-02-15 Thread Neal Kaiser

Dave,

One functionality that might be nice for the validation you are working on:

The ability to say that a field is required IF a certain form parameter
exists.

Something like:



 



So, the property "addr" is validated ONLY if the
registrationForm.role="Admin"

That's probably not the best syntax, but I think you get what I mean.

Thanks, Neal


> -Original Message-
> From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 15, 2001 12:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Client-side validation (Old questions that die hard)
>
>
> I actually had some built-in expressions for testing,
> but then I pulled it out for simplicity.  I had some
> basic things like phone numbers and such hard coded in
> and checking for a date (leap year, etc.), but I
> thought it might be better to wait and think about it
> a little more so someone could plug in their own date
> validation function if they wanted to.
>
> Although I assume you're talking about primitives,
> String, and Date which would cover a lot forms.  I
> hadn't really thought about that, but it is a good
> idea.  I could add a type attribute to the field
> element (ex: type="int").  I was hoping that before I
> did too much more on it that if it looked like a good
> start it could be used and/or modified for the struts
> validation in 1.1.  I would be interested in being
> involved in working on the validation framework.  So I
> thought it would be a good idea to hear about ideas
> and what the validation framework should do before I
> did more work.  As the validation starts expanding, it
> may be a lot of work to keep the client side
> javascript in sync with it.  Although if everything is
> kept clean enough that you call a method to do
> something there could be an equivalent Javascript
> method (as long as it doesn't hit a database or server
> side resource).
>
> It would also be nice to have basic expressions like
> this value should be an int and when that is confirmed
> be able to check if it is in a range.
>
> Ted, do you have an opinion on how locale should be
> handled if validation rules are kept in an xml file?
> Should there be a separate file for each locale like
> resource files or an attribute in the xml file.  I
> could make a 'form set' element and it could have a
> locale attribute.  You could then group forms in a
> locale and even set one group as a default.  I was
> also thinking about making validation resource class
> like MessageResource and putting that in application
> scope instead of a Hashtable.  To keep the validation
> in line with struts, it would be important to be able
> to specify different validation rules for different
> countries.
>
>
> David
>
> --- Ted Husted <[EMAIL PROTECTED]> wrote:
> > David Winterfeldt wrote:
> > > I posted the code and a example war at.  Ted, if
> > you
> > > want to, you can add this to the list of struts
> > > sites/resources you have.
> >
> > I've added this to my list at <
> > http://husted.com/about/struts >, along
> > with Craig T's very kewl presentation.
> >
> > If this keeps up, we're going to need an
> > announcement list just to keep
> > up with the new Struts resources!
> >
> > I'm hip deep (down from neck deep) in the
> > Dreamweaver UltraDev tutorials
> > right now, but as soon that's done, I'm back to
> > refining validation
> > for my working application -- which would now mean
> > taking your Validator
> > for a spin!
> >
> > What I really like about this at first glance is the
> > XML configuration.
> > This plays well into integrating this both with
> > Struts and with visual
> > environments, like UltraDev.
> >
> > Have you thought about offering built-in expressions
> > for standard Java
> > and SQL types?
> >
> > -- Ted Husted, Husted dot Com, Fairport NY USA.
> > -- Custom Software ~ Technical Services.
> > -- Tel 716 425-0252; Fax 716 223-2506.
> > -- http://www.husted.com/about/struts/
>
>
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>




Getting Form Names

2001-02-13 Thread Neal Kaiser

I am using the struts validation framework
(http://home.earthlink.net/~dwinterfeldt/) but I have a problem because most
of my forms are multiple-page forms.

There is a syntax where you can say if a field is required or not in the
framework.  However, even though a field is required, it might be on the
second page of the form.

So I am wondering if it is possible to get a String array (or something)
from the Struts framework that will list all of the form names (i.e
).  That way I can extend the validation
framework to make sure the field is present before checking if it is
required.

Thanks,

Neal




RE: [Q] TRANSACTION_TOKEN_KEY - Multiple Page Forms

2001-02-10 Thread Neal Kaiser

Thanks, that makes sense. I'm using that design pattern now. Do you have any
prefered
design patterns for multiple page forms.  For example, if your Registration
example was spanned
over 3 different JSPs, where would you put the logic that knows what page to
validate, and what page to  forward to?  Would you use hidden tags? Would
you use different action paths? (ie saveRegistration.do would be
saveRegistration1.do, saveRegistration2.do, etc)  Just wondering the best
way...

Thanks.

> -Original Message-
> From: Dan Malks [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 10, 2001 3:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Q] TRANSACTION_TOKEN_KEY
>
>
>
>
> "Craig R. McClanahan" wrote:
>
> > Dan Malks wrote:
> >
> > > Craig,
> > >
> > > "Craig R. McClanahan" wrote:
> > >
> > > > Neal Kaiser wrote:
> > > >
> > > > > How does this work when they are registering for the
> first time, not
> > > > > editing. I can
> > > > > see that in EditRegistrationAction the token is
> set... but if they are
> > > > > registering
> > > > > for the first time where is the token set? It seems
> that it would fail when
> > > > > it hits
> > > > > the token check in SaveRegistrationAction, but I know
> it doesn't, so it must
> > > > > be set
> > > > > somewhere, right?
> > > > >
> > > >
> > > > You will note that the "Register with the MailReader
> Demonstration Application"
> > > > link (on index.jsp) goes through "EditRegistration.do"
> as well, so that the
> > > > token gets saved even in this case.  The
> "?action=Create" request parameter is
> > > > used to distinguish this from the editing case ("?action=Edit").
> > >
> > > Would 'ModifyRegistration.do' or 'ProcessRegistration.do'
> be more clear, then?
> > >
> >
> > Or even something more generic like "StartRegistration.do"?
>  Can you tell that I wrote
> > the "edit" use case first?  :-)
> >
> > I had a Comp Sci prof that said the most critical design
> decision you will ever make
> > is naming things.
>
> And often, surprisingly, one of the harder ones.
>
>
> > And, even when you get the initial name correct, it is important to
> > review your names after the program has evolved a bit.
>
> Amen ;-)
>
> Thanks,
> -dm
>
>
> >  Sounds like it is time to do
> > that exercise on the example app.
> >
> > >
> > > -dm
> > >
> >
> > Craig
>
> --
> Dan Malks Sun Java Center
> Enterprise Java Architect703.208.5794
>
>




RE: [Q] TRANSACTION_TOKEN_KEY

2001-02-10 Thread Neal Kaiser

How does this work when they are registering for the first time, not
editing. I can
see that in EditRegistrationAction the token is set... but if they are
registering
for the first time where is the token set? It seems that it would fail when
it hits
the token check in SaveRegistrationAction, but I know it doesn't, so it must
be set
somewhere, right?



> -Original Message-
> From: Rob Leland [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 09, 2001 9:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Q] TRANSACTION_TOKEN_KEY
>
>
> EditRegistrationAction.java  SaveRegistrationAction.java
> provide examples.
>
> You would probably never use generateToken().
>
> It is used whenever you want to prevent the user
> from bookmarking a page, or from using the browser
> back arrow and then posting a second time.
>
> In the EditRegistrationAction, once the data is loaded
> from a database a call to saveToken() is made. It should
> probably be named 'setToken()' to be consistent with
> 'resetToken()'. This sets a variable in both the session
> and request scope of the app. Control is then forwarded
> to the edit jsp. When the user 'posts' the page the
> Token is validated in SaveRegistrationPage, then it is
> destroyed by the 'resetToken call. Then the next page is
> 'forwarded' to. If at this time the user hits the 'back'
> button and hits 'post' again, when SaveRegistrationAction
> checks to see if the token is valids it finds can find
> one of two things:
>   1) Either the 'Token' variable didn't exist in the session scope.
>  This happen if 'resetToken' was the last method called
>   2) Or it will find that the "request" and "session" scope
> Token do not
> match.
>  This happen if 'saveToken' was the last method called.
>
>
> Alexander Staff wrote:
> >
> > Hello,
> > does anyone here have any examples/explanations about using the
> > TRANSACTION_TOKEN_KEY feature in struts ?
> > I am not sure using the generateToken(), isTokenValid(),
> resetToken() and
> > saveToken() functions properly and in the right place.
> >
> > Thanks in advance
> > Ciao
> > Alexander
> >
> > --
> > Sent through GMX FreeMail - http://www.gmx.net




JspException: Must specify type attribute if name is specified

2001-02-09 Thread Neal Kaiser

I just upgraded to last nights build and get the following error:

javax.servlet.jsp.JspException: Must specify type attribute if name is
specified   at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:669)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)   at
/getstarted/regstep1.jsp._jspService(/getstarted/regstep1.jsp.java:84) (JSP
page line 47)

This is the line in the .jsp it is complaining about:



And this is what I have in struts-config.xml:

   

and


 

  
  



I do seem to be passing the type, so I'm not sure why I get an error?

Any pointers for places for me to look?

When I upgraded, I updated the struts.jar and copied in the latest .tlds.

Thanks, Neal




Data Validation

2001-02-04 Thread Neal Kaiser

Has anyone thought about adding data validation tags to the Struts taglibs?

For example, what if we could do:



or something like that.

Could it not generate the necessary javascript, as well as provide an easy
to use
interface for detecting and reporting errors in the Action.perform()?

Just wondering...  Where do people typically do their validation? In the
ActionServlet
or ActionForm? Are there any pros/cons?

Thanks,
Neal




RE: Help Debug Form Error? - Can ActionForms be Serialized ?

2001-01-15 Thread Neal Kaiser

Thanks, I already did that. I just got it working, FYI. It was an Orion
abnormality.
I had to move the struts.jar to orion/lib instead of WEB-INF/lib and move my
classes
to orion/lib as well.



> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 15, 2001 10:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Help Debug Form Error? - Can ActionForms be Serialized ?
>
>
>
> Neal Kaiser wrote:
>
> > This is a long shot, but one difference between my
> ActionForm and the
> > one from the struts example is that my ActionForm implements
> > java.io.Serializable
> > (and of course extends ActionForm).  I do this because my
> Action Form is
> > eventually
> > passed to an EJB.  Could that somehow break struts?
> >
>
> ActionForm is already defined to be Serializable in the
> current 1.0 code, so
> that will not make any difference.
>
> There have been various reports of problems on various
> versions of Orion in the
> past.  In the most recent versions, my understanding is that
> you have to extract
> the properties files out of struts.jar and place them (unpacked) under
> WEB-INF/classes due to bugs in the Orion classloader.
>
>
> >
> > Thanks.
> >
>
> Craig McClanahan
>
>
> >
> > > -Original Message-
> > > From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, January 15, 2001 8:54 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: Help Debug Form Error?
> > >
> > >
> > > Also, FYI, I updated to last night's struts nightly build and
> > > I still have
> > > the
> > > same problem.  For what it's worth, here's the genereated
> > > registration.jsp
> > > servlet
> > > snippet that's causing the error:
> > >
> > >  //  > > property="addressBook_company"/>
> > > start
> > > __tag5.setParent(__tag4);
> > > __tag5.setProperty("addressBook_company");
> > >     __tag5.setMaxlength("30");
> > > __tag5.setSize("25");
> > > __tempInt = __tag5.doStartTag();
> > >
> > >   IT DIES RIGHT HERE in the
> > > doStartTag()
> > >
> > > My container is Orion 1.4.4.
> > >
> > > Thanks,
> > >
> > > Neal
> > >
> > >
> > > > -Original Message-
> > > > From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
> > > > Sent: Sunday, January 14, 2001 10:43 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Help Debug Form Error?
> > > >
> > > >
> > > > I have a strange problem. I have a simple form that is making
> > > > use of some
> > > >  > > >
> > > >  maxlength="30" size="25"/>
> > > >
> > > > The page stops loading and the following exception is thrown:
> > > >
> > > > 1/14/01 10:29 PM galacyWeb: Servlet error
> > > > java.lang.NoClassDefFoundError:
> > > > org/apache/struts/upload/MultipartRequestHandler
> > > > at java.lang.Class.getMethods0(Native Method)
> > > > at java.lang.Class.getDeclaredMethods(Class.java:1039)
> > > > at java.beans.Introspector$1.run(Introspector.java:852)
> > > > at
> > > java.security.AccessController.doPrivileged(Native Method)
> > > > at
> > > > java.beans.Introspector.getPublicDeclaredMethods(Introspector.
> > > > java:850)
> > > > at
> > > >
> java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
> > > > at
> > > java.beans.Introspector.getBeanInfo(Introspector.java:294)
> > > > at java.beans.Introspector.(Introspector.java:271)
> > > > at
> java.beans.Introspector.getBeanInfo(Introspector.java:81)
> > > > at
> > > > org.apache.struts.util.PropertyUtils.getPropertyDescriptors(Pr
> > > > opertyUtils.ja
> > > > va:452)
> > > > at
> > > > org.apache.struts.util.PropertyUtils.getPropertyDescriptor(Pro
> > > > pertyUtils.jav
> > > > a:419)
> > > > at
> > > > org.apache.struts.util.PropertyUtils.getSimpleProperty(Propert
> > > >

RE: Help Debug Form Error? - Can ActionForms be Serialized ?

2001-01-15 Thread Neal Kaiser

This is a long shot, but one difference between my ActionForm and the
one from the struts example is that my ActionForm implements
java.io.Serializable
(and of course extends ActionForm).  I do this because my Action Form is
eventually
passed to an EJB.  Could that somehow break struts?

Thanks.

> -Original Message-
> From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 15, 2001 8:54 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Help Debug Form Error?
>
>
> Also, FYI, I updated to last night's struts nightly build and
> I still have
> the
> same problem.  For what it's worth, here's the genereated
> registration.jsp
> servlet
> snippet that's causing the error:
>
>  //  property="addressBook_company"/>
> start
> __tag5.setParent(__tag4);
> __tag5.setProperty("addressBook_company");
> __tag5.setMaxlength("30");
> __tag5.setSize("25");
> __tempInt = __tag5.doStartTag();
>
>   IT DIES RIGHT HERE in the
> doStartTag()
>
> My container is Orion 1.4.4.
>
> Thanks,
>
> Neal
>
>
> > -Original Message-
> > From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, January 14, 2001 10:43 PM
> > To: [EMAIL PROTECTED]
> > Subject: Help Debug Form Error?
> >
> >
> > I have a strange problem. I have a simple form that is making
> > use of some
> >  >
> > 
> >
> > The page stops loading and the following exception is thrown:
> >
> > 1/14/01 10:29 PM galacyWeb: Servlet error
> > java.lang.NoClassDefFoundError:
> > org/apache/struts/upload/MultipartRequestHandler
> > at java.lang.Class.getMethods0(Native Method)
> > at java.lang.Class.getDeclaredMethods(Class.java:1039)
> > at java.beans.Introspector$1.run(Introspector.java:852)
> > at
> java.security.AccessController.doPrivileged(Native Method)
> > at
> > java.beans.Introspector.getPublicDeclaredMethods(Introspector.
> > java:850)
> > at
> > java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
> > at
> java.beans.Introspector.getBeanInfo(Introspector.java:294)
> > at java.beans.Introspector.(Introspector.java:271)
> > at java.beans.Introspector.getBeanInfo(Introspector.java:81)
> > at
> > org.apache.struts.util.PropertyUtils.getPropertyDescriptors(Pr
> > opertyUtils.ja
> > va:452)
> > at
> > org.apache.struts.util.PropertyUtils.getPropertyDescriptor(Pro
> > pertyUtils.jav
> > a:419)
> > at
> > org.apache.struts.util.PropertyUtils.getSimpleProperty(Propert
> > yUtils.java:56
> > 3)
> > at
> > org.apache.struts.util.PropertyUtils.getNestedProperty(Propert
> > yUtils.java:33
> > 8)
> > at
> > org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils
> > .java:363)
> > at
> >
> org.apache.struts.util.BeanUtils.getScalarProperty(BeanUtils.java:524)
> > at
> > org.apache.struts.taglib.form.BaseFieldTag.doStartTag(BaseFiel
> > dTag.java:177)
> > at /register.jsp._jspService(/register.jsp.java:83)
> > (JSP page line
> > 107)
> > at com.orionserver.http.OrionHttpJspPage.service(JAX)
> > at com.evermind.server.http.HttpApplication.xi(JAX)
> > at com.evermind.server.http.JSPServlet.service(JAX)
> > at com.evermind.server.http.d5.sv(JAX)
> > at com.evermind.server.http.d5.st(JAX)
> > at com.evermind.server.http.eh.s0(JAX)
> > at com.evermind.server.http.eh.do(JAX)
> > at com.evermind.util.f.run(JAX)
> >
> >
> > I've checked my RegistrationForm.java and it looks OK. There
> > is a get/set
> > method for AddressBook_company.
> > Could it be the "_" throwing it off?
> >
> > Any help is appreciated...
> >
> > Thanks.
> >
>




RE: Help Debug Form Error?

2001-01-15 Thread Neal Kaiser

Also, FYI, I updated to last night's struts nightly build and I still have
the
same problem.  For what it's worth, here's the genereated registration.jsp
servlet
snippet that's causing the error:

 // 
start
__tag5.setParent(__tag4);
__tag5.setProperty("addressBook_company");
__tag5.setMaxlength("30");
__tag5.setSize("25");
__tempInt = __tag5.doStartTag();

IT DIES RIGHT HERE in the doStartTag()

My container is Orion 1.4.4.

Thanks,

Neal


> -Original Message-
> From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 14, 2001 10:43 PM
> To: [EMAIL PROTECTED]
> Subject: Help Debug Form Error?
>
>
> I have a strange problem. I have a simple form that is making
> use of some
> 
> 
>
> The page stops loading and the following exception is thrown:
>
> 1/14/01 10:29 PM galacyWeb: Servlet error
> java.lang.NoClassDefFoundError:
> org/apache/struts/upload/MultipartRequestHandler
> at java.lang.Class.getMethods0(Native Method)
> at java.lang.Class.getDeclaredMethods(Class.java:1039)
> at java.beans.Introspector$1.run(Introspector.java:852)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> java.beans.Introspector.getPublicDeclaredMethods(Introspector.
> java:850)
> at
> java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
> at java.beans.Introspector.getBeanInfo(Introspector.java:294)
> at java.beans.Introspector.(Introspector.java:271)
> at java.beans.Introspector.getBeanInfo(Introspector.java:81)
> at
> org.apache.struts.util.PropertyUtils.getPropertyDescriptors(Pr
> opertyUtils.ja
> va:452)
> at
> org.apache.struts.util.PropertyUtils.getPropertyDescriptor(Pro
> pertyUtils.jav
> a:419)
> at
> org.apache.struts.util.PropertyUtils.getSimpleProperty(Propert
> yUtils.java:56
> 3)
> at
> org.apache.struts.util.PropertyUtils.getNestedProperty(Propert
> yUtils.java:33
> 8)
> at
> org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils
> .java:363)
> at
> org.apache.struts.util.BeanUtils.getScalarProperty(BeanUtils.java:524)
> at
> org.apache.struts.taglib.form.BaseFieldTag.doStartTag(BaseFiel
> dTag.java:177)
> at /register.jsp._jspService(/register.jsp.java:83)
> (JSP page line
> 107)
> at com.orionserver.http.OrionHttpJspPage.service(JAX)
> at com.evermind.server.http.HttpApplication.xi(JAX)
> at com.evermind.server.http.JSPServlet.service(JAX)
> at com.evermind.server.http.d5.sv(JAX)
> at com.evermind.server.http.d5.st(JAX)
> at com.evermind.server.http.eh.s0(JAX)
> at com.evermind.server.http.eh.do(JAX)
> at com.evermind.util.f.run(JAX)
>
>
> I've checked my RegistrationForm.java and it looks OK. There
> is a get/set
> method for AddressBook_company.
> Could it be the "_" throwing it off?
>
> Any help is appreciated...
>
> Thanks.
>




Help Debug Form Error?

2001-01-14 Thread Neal Kaiser

I have a strange problem. I have a simple form that is making use of some


The page stops loading and the following exception is thrown:

1/14/01 10:29 PM galacyWeb: Servlet error
java.lang.NoClassDefFoundError:
org/apache/struts/upload/MultipartRequestHandler
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:1039)
at java.beans.Introspector$1.run(Introspector.java:852)
at java.security.AccessController.doPrivileged(Native Method)
at
java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:850)
at java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
at java.beans.Introspector.getBeanInfo(Introspector.java:294)
at java.beans.Introspector.(Introspector.java:271)
at java.beans.Introspector.getBeanInfo(Introspector.java:81)
at
org.apache.struts.util.PropertyUtils.getPropertyDescriptors(PropertyUtils.ja
va:452)
at
org.apache.struts.util.PropertyUtils.getPropertyDescriptor(PropertyUtils.jav
a:419)
at
org.apache.struts.util.PropertyUtils.getSimpleProperty(PropertyUtils.java:56
3)
at
org.apache.struts.util.PropertyUtils.getNestedProperty(PropertyUtils.java:33
8)
at
org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils.java:363)
at
org.apache.struts.util.BeanUtils.getScalarProperty(BeanUtils.java:524)
at
org.apache.struts.taglib.form.BaseFieldTag.doStartTag(BaseFieldTag.java:177)
at /register.jsp._jspService(/register.jsp.java:83) (JSP page line
107)
at com.orionserver.http.OrionHttpJspPage.service(JAX)
at com.evermind.server.http.HttpApplication.xi(JAX)
at com.evermind.server.http.JSPServlet.service(JAX)
at com.evermind.server.http.d5.sv(JAX)
at com.evermind.server.http.d5.st(JAX)
at com.evermind.server.http.eh.s0(JAX)
at com.evermind.server.http.eh.do(JAX)
at com.evermind.util.f.run(JAX)


I've checked my RegistrationForm.java and it looks OK. There is a get/set
method for AddressBook_company.
Could it be the "_" throwing it off?

Any help is appreciated...

Thanks.




Form errors

2001-01-02 Thread Neal Kaiser

I probably missed this in the documentation, but if I want to pull out the
error message for a specific field, how would I do it?  Let's say I have a
username which was left blank and I create a new ActionError :

errors.add("username",new ActionError("error.username.required"));

Now, in my .jsp, rather than having all the errors displayed with
, I want to put the
error.username.required error right next to the username field:

  


I don't want it to use errors.header or errors.footer either in this case.

Is that possible?
Thanks.




Reloading Message Resources w/o Restarting Container

2000-12-30 Thread Neal Kaiser

Is it possible to do this?




Saving HTTP Request Info

2000-12-28 Thread Neal Kaiser

I'm brand new to struts, so forgive me if this has been covered heavily.

Let's say I am POSTing a bunch of information from a form to an
ActionServlet.  This ActionServlet will
detect I'm not logged in and ask me to log in (by redirecting me to
logon.jsp for example).  Now, after I successfully log in to the Logon
ActionServlet, I want to submit all that POSTed form stuff just as if I was
logged in the first time.

Does struts have a mechanism for this, or should I just write my request
info to my session before logging in and read it in after?

Thanks.




Request for Nightly Build Orion App Server Compatibility

2000-12-28 Thread Neal Kaiser

Would it be possible to copy struts-config_1_0.dtd  out of the struts.jar
and into the \WEB-INF\classes\ directory so the nightly builds will work
out-of-the-box with Orion Application Server?

Another odd problem which I'm facing is I can't get the example Data Source
Configuration to work on Orion App Server.  I have:



  

I have
  
database
org.apache.struts.example.DatabaseServlet

  debug
  2

1
  

in my web.xml file, but it doesn't look like the DatabaseServlet ever gets
instantiated because I don't see any debug traces at all.

Have any Orion users successfully done this?


Thanks,

Neal




Can't Connect to PostgreSQL with struts-example on Orion App Server

2000-12-27 Thread Neal Kaiser

Can someone tell me what I'm missing?

In web.xml I have:


database
org.apache.struts.example.DatabaseServlet

  debug
  2

1
  


In struts-config.xml I have:




I know that my postgresql.jar is OK and have tried a connection successfully
with the jdbc URL above.

When I go to localhost/struts-example I get:

ERROR: User database not loaded -- check servlet container logs for error
messages

What's weird is that since I have debug=2 I should see some log() statements
about connecting to PostgreSQL. I get nothing in my log. The only thing I
see on my console is:

New org.apache.struts.util.GenericDataSource
Set org.apache.struts.util.GenericDataSource properties
Call
org.apache.struts.action.ActionServlet.setDataSource(GenericDataSource[activ
eCount=0, autoCommit=false, closed=false, description=Example Data Source
Configuration, driverClass=org.postgresql.Driver, loginTimeout=0,
maxCount=4, minCount=2, password=password, readOnly=false,
url=jdbc:postgresql://localhost/galacy, useCount=0, user=galacy])
Pop org.apache.struts.util.GenericDataSource


Any ideas?

Thanks.




RE: Missing message for key index.title

2000-12-20 Thread Neal Kaiser

Thanks. I actually have both of those already. I think it might have to do
with
the Orion Server.  I did take the steps that have been posted in the past to
get it to work with Orion, but still no luck.  Could this be related? In my
orion console I see:

[root@www orion]# Orion/1.4.4 initialized
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier
Parse Error at line 37 column -1: Element "struts-config" does not allow
"form-beans" here.
org.xml.sax.SAXParseException: Element "struts-config" does not allow
"form-beans" here.

and a bunch more errors.

Neal

> -Original Message-
> From: Jason Haase [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 20, 2000 9:22 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Missing message for key index.title
>
>
>
> It sounds like your ApplicationResources.properties file is not there.
> Check to make sure it is in
> ...\struts-example\WEB-INF\classes\org\apache\struts\example.
> Orion should
> have unpacked the struts-example.war file for you.  Otherwise,
> look in your
> web.xml file to make sure your "Action Servlet Configuration"
> specifies the
> right properties file.  Like this:
>
> 
>   application
>
> org.apache.struts.example.ApplicationResources
> 
>
>
> Jason Haase
>
>
>
> -Original Message-
> From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 20, 2000 6:09 PM
> To: [EMAIL PROTECTED]
> Subject: Missing message for key index.title
>
>
> Can someone tell me what this error means:
>
> javax.servlet.jsp.JspException: Missing message for key index.title   at
> org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:261)
>
> I get it when trying to run the  struts-example on Orion Server.
>
> THanks
>




Missing message for key index.title

2000-12-20 Thread Neal Kaiser

Can someone tell me what this error means:

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

I get it when trying to run the  struts-example on Orion Server.

THanks



RE: struts 1.0 pre-release example web application deployment on Orion

2000-12-19 Thread Neal Kaiser

I did exactly what you specified below, and can get the .ear to deploy, but
now get a different error:

javax.servlet.jsp.JspException: Missing message for key index.title at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:261)at
/index.jsp._jspService(/index.jsp.java:51) (JSP page line 8)at
com.orionserver.http.OrionHttpJspPage.service(JAX)  at
com.evermind.server.http.HttpApplication.xi(JAX)at
com.evermind.server.http.JSPServlet.service(JAX)at
com.evermind.server.http.d5.sv(JAX) at com.evermind.server.http.d5.st(JAX)
at com.evermind.server.http.eh.s0(JAX)  at
com.evermind.server.http.eh.do(JAX) at com.evermind.util.f.run(JAX)


Any ideas what I am missing now? Thank you.

> -Original Message-
> From: Ate Douma [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 15, 2000 2:23 PM
> To: [EMAIL PROTECTED]
> Subject: FYI: struts 1.0 pre-release example web application deployment
> on Orion
>
>
> - Original Message -
> From: "Ate Douma" <[EMAIL PROTECTED]>
> To: "Orion-Interest" <[EMAIL PROTECTED]>
> Sent: Friday, December 15, 2000 20:19
> Subject: Re: Struts 1.0 - Anyone Do It?
>
>
> > Ok, once more: Deploying the stuts 1.0 pre-release example web
> application
> > on Orion in (more or less) five steps
> > (based on Orion 1.3.8 and jakarta-struts-src-20001209.zip on
> W2k, jdk1.3):
> >
> > 1. build the struts example web application (or retrieve it from the
> nightly
> > build distribution)
> > 1.1. extract the struts src distribution in a temporary directory
> > ([struts])
> > 1.2. build struts distribution by executing
> "[struts]\jakarta-struts\ant
> > dist" (using [struts]\jakata-struts\build.xml)
> > 2. modify the web application archive
> > [struts]\dist\struts\webapps\struts-example.war:
> > 2.1. extract struts-example.war in a clean temporary directory
> ([temp])
> > 2.2. open [temp]\WEB-INF\lib\struts.jar and extract
> > org\apache\struts\resources\struts-config_1_0.dtd to
> [temp]\WEB-INF\classes\
> > creating file
> > [temp]\WEB-INF\classes\org\apache\struts\resources\struts-config_1_0.dtd
> > 2.3 delete the above file from struts.jar and save struts.jar in
> > [temp]\WEB-INF\lib\
> > 2.4 jar (or zip) the contents of [temp]\ in a new web application
> > archive [temp]\struts-example.war (don't forget keeping the
> folder names)
> > 3. create a struts.ear file by:
> > 3.1. create file [temp]\META-INF\application.xml containing the
> > following:
> > 
> >  > J2EE Application 1.2//EN"
> > "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
> > 
> >   struts
> >   
> > 
> >   struts-example.war
> >   /struts-example
> > 
> >   
> > 
> > 3.2 jar (or zip) [temp]\META-INF\application.xml and
> > [temp]\struts-examples.war into a new enterprise application archive
> > [temp]\struts.ear (using folder names)
> > 4. deploy the example web application on orion
> > 4.1. extract orion1.3.8.zip in some directory ([orion])
> > 4.2. copy the struts.ear file into [orion]/application
> > 4.3. modify [orion]\config\server.xml by adding the
> following element
> > under (nested within) the  element:
> >path="../applications/struts.ear" />
> > 4.4. modify [orion]\config\default-web-site.xml by adding the
> following
> > element under (nested within) the  element:
> >> root="/struts-example" />
> > 5. run the example web application
> > 5.1. startup orion by executing "java -jar orion.jar" within the
> > [orion]\ directory
> > 5.2. access the example web application from a browser using url:
> > http://localhost/struts-example
> >
> > Ate Douma
> >
> > - Original Message -
> > From: "Neal Kaiser" <[EMAIL PROTECTED]>
> > To: "Orion-Interest" <[EMAIL PROTECTED]>
> > Sent: Friday, December 15, 2000 16:18
> > Subject: Struts 1.0 - Anyone Do It?
> >
> >
> > > I get the common "Missing resources attribute
> > > org.apache.struts.action.MESSAGE" error. I've read a lot of threads on
> > this,
> > > but didn't find a solution yet.
> > >
> > > If anyone has successfully deployed the struts-examples could
> you please
> > > post the steps? I'm sure there are many people that would benefit from
> > this.
> > >
> > > Thank you.
> > >
> > >
> > >
> >
>




Struts and Orion?

2000-12-15 Thread Neal Kaiser

Sorry if this has been covered before, I just joined (and don't know how to
get to the archives).

Has anyone successfully deployed the struts-examples for version 1.0 with
Orion 1.4.4?
I get the "Missing resources attribute org.apache.struts.action.MESSAGE"
error when
accessing it.

THank you.