Re: I18N Problem with Chinese Character

2002-03-15 Thread Gordon Luk

Hi Liu Yan,

have you meet the input chinese problem? if yes, how to solve it ? could
you share your experiense? Thanks.

Gordon

Struts Newsgroup (@Basebeans.com) wrote:

>Subject: Re: I18N Problem with Chinese Character
>From: "Liu Yan" <[EMAIL PROTECTED]>
> ===
>hi,
>
>Thanks. Yes, it helps. And now the Chinese character is displayed OK.
>
>I used the native2ascii command with -encoding UTF-8 parameter and with no
>exception. I believe that the your exception is caused by non-UTF-8 format
>of your original properties file.
>
>Good day!
>Liu Yan
>
>"nsg" <[EMAIL PROTECTED]> $BCB)?7(B
>?:[EMAIL PROTECTED]
>
>>you should turn your resource file to UTF-8 encoding using native2ascii
>>command.
>>that command locates in your-jdk-home\bin directory.
>>detail command line is listed below:
>>
>>native2ascii ApplicationResources_zh.properties
>>ApplicationResources_zh.propertiesX
>>
>>the first parameter is source file,second is destination file. Use the
>>destination file as your resource file.
>>
>>Many articles introduce that the encodeing parameter should be specified
>>like following:
>>
>>native2ascii -encoding UTF-8 ApplicationResources_zh.properties
>>ApplicationResources_zh.propertiesX
>>.
>>but if so, an exception would be thrown.I dont know what reason causes the
>>exception?
>>
>>of course,you use first command and should be OK.
>>
>>
>>hope helps for you.
>>
>>
>>Laker
>>
>>
>>
>>
>>- Original Message -
>>From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Friday, March 15, 2002 9:40 PM
>>Subject: I18N Problem with Chinese Character
>>
>>
>>>Subject: I18N Problem with Chinese Character
>>>From: "Liu Yan" <[EMAIL PROTECTED]>
>>> ===
>>>hi List,
>>>
>>>I am using struts-1.0.2 with WebLogic 6.1-sp2. For an I18N project, I
>>>followed the steps:
>>>
>>>1) I created ApplicationResources.properties and
>>>ApplicationResources_zh.properties files to store strings.
>>>2) The whole project is using UTF-8 encoding.
>>>3) On the beginning of each JSP page, add:
>>>   <%@ page contentType="text/html; charset=UTF-8" %>
>>>
>>>For static Chinese character in JSP page, this setting goes well. But
>>>
>when
>
>>I
>>
>>>tried to use:
>>>
>>>
>>>
>>>to get some strings from ApplicationResources_zh.properties file, the
>>>
>>output
>>
>>>is corrupted.
>>>
>>>I am suspecting this is the  taglib's problem, but decided
>>>
>>to
>>
>>>drop a letter here for a quick answer. Am I doing something wrong or I
>>>
>>have
>>
>>>to wait for the upcoming 1.1 beta release?
>>>
>>>Regards!
>>>Liu Yan
>>>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>
>>
>>
>>>For additional commands, e-mail:
>>>
>>
>>
>>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>
>
>>For additional commands, e-mail:
>>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>




Action: how can i Forward with parameter at perform method.

2002-03-15 Thread Gordon Luk

Hi all,

I would like to know, how can i forward a page with parameter... my
problem detail like that:

A action class...
---

public ActionForward perform(.) {
...
... do what i have to do.. like update/delete/insert operation...
...
if ( every ok ) {
return (mapping.findForward("success");
// problem here... success is map to a jsp "ListDetailwith_ID.jsp"...
}
}

---
The ListDetailwith_ID.jsp accord the parameter (?ID=11) to list out
the detail ... but i don't how can i pass the parameter at my Action class.

Please help.

Gordon


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




RE: How to Pre-fill a formbean - correction

2002-03-15 Thread Jay sissom

Without seeing the source code to mainForm, we can't help much.  It looks
like you don't have a method in mainForm with a signature like this:

public void setProperty1(String value) {
   ...
}

On Fri, 15 Mar 2002, HERSHKOWITZ,PHIL (A-Sonoma,ex1) wrote:

> I mistyped the compiler output. It should read:
> 
>  [javac] Found 2 syntax errors in ...:
>  [javac]
>  [javac] 36.  mainForm.setProperty1("Dog");
>  [javac] <>
>  [javac]
>  [javac] *** Syntax: misplaced construct(s)
>  [javac]
>  [javac]
>  [javac]
>  [javac] 36.  mainForm.setProperty1("Dog");
>  [javac]<--->
>  [javac]
>  [javac] *** Syntax: Unexpected symbol ignored
> 
> Phil
> 
> 
> > -Original Message-
> > From: HERSHKOWITZ,PHIL (A-Sonoma,ex1)
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 15, 2002 4:10 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: How to Pre-fill a formbean
> > 
> > 
> > Hi,
> > 
> > In mainAction, where form is passed in by the method header, the code
> > 
> > form.setProperty1("Dog");
> > 
> > compiles.
> > 
> > In loginAction, the code:
> > 
> >MainForm mainForm = new MainForm();
> >mainForm.setProperty1("Dog");
> > 
> > as suggested by Viplava, fails to compile with:
> > 
> > [javac] Found 2 syntax errors in ...:
> > [javac]
> > [javac] 36.  mainForm.Property1("Dog");
> > [javac] <>
> > [javac]
> > [javac] *** Syntax: misplaced construct(s)
> > [javac]
> > [javac]
> > [javac]
> > [javac] 36.  mainForm.setProperty1("Dog");
> > [javac]<--->
> > [javac]
> > [javac] *** Syntax: Unexpected symbol ignored
> > 
> > 
> > Am I missing something obvious in struts or am I missing 
> > something obvious
> > about java (or more likely both :) What code do I have to include to
> > "trigger" struts to give me a reference to the formbean?
> > 
> > Phil
> > 
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: Nekkalapudi, Viplava [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 15, 2002 12:14 PM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: How to Pre-fill a formbean
> > > 
> > > 
> > > 
> > >   // Create a form with the name given in struts-config.xml  
> > >   MainForm mainForm = new MainForm();
> > >   mainForm.setProperty1(..);
> > >   ...
> > >  
> > >   request.setAtribute("mainForm", mainForm);
> > > 
> > >   // **//
> > >  
> > > Struts Action Servlet creates mainForm just before displaying 
> > > the main.jsp,
> > > if it is not in the request/session.
> > > 
> > > 
> > > 
> > > -Original Message-
> > > From: [EMAIL PROTECTED] 
> > > [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 15, 2002 1:56 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: How to Pre-fill a formbean
> > > 
> > > 
> > > Hi All,
> > > 
> > > And Thanks. So in my loginAction, I can create a reference to 
> > > mainForm and
> > > pre-populate it with defaults from the database.
> > > 
> > > Would someone be able to provide a snippet of code that I can use in
> > > loginAction to create a reference to mainForm?
> > > 
> > > Thanks,
> > > Phil
> > > 
> > > 
> > > > -Original Message-
> > > > From: Jay sissom [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, March 15, 2002 6:01 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: How to Pre-fill a formbean
> > > > 
> > > > 
> > > > You can do it this way, but I would use a Struts tag instead 
> > > > of a jsp tag.  
> > > > Instead of using jsp:useBean and jsp:getProperty, all you 
> > > > need to do is
> > > > 
> > > > 
> > > > 
> > > > and that will write out the mfProperty to the JSP.
> > > > 
> > > > Jay
> > > > 
> > > > 
> > > > On Thu, 14 Mar 2002, Joe Lee wrote:
> > > > 
> > > > > Phil,
> > > > > 
> > > > > Your loginAction should create and populate a mainForm
> > > > > bean and then saves it in the request scope. In the
> > > > > main.jsp, get a reference to this form by:
> > > > >  > > > > class="com.MainForm">
> > > > > and the input fields on that jsp get the defaults from
> > > > > this form bean. You have to use class (not type) so
> > > > > that if you come from a differene route to main.jsp
> > > > > rather than Login and the mainform bean may not be
> > > > > there already, a new one will be created for u. Then
> > > > > your jsp won't bombs and the input fields still get
> > > > > blank defaults.
> > > > > 
> > > > > - Joe
> > > > > 
> > > > > RE: How to Pre-fill a formbean
> > > > > 
> > > > > 
> > > > --
> > > > --
> > > > > 
> > > > > From: HERSHKOWITZ,PHIL (A-Sonoma,ex1) 
> > > > > Subject: RE: How to Pre-fill a formbean 
> > > > > Date: Thu, 14 Mar 2002 18:14:30 -0800 
> > > > > 
> > > > > 
> > > > --

Link Tag w/ improved javascript/ecma support

2002-03-15 Thread Phase Web and Multimedia

Greetings,

I don't know if a similar solution has been provided, but, I tweaked the
Link Tag to support the writing of
'javascript:[function_name]([param1,param2,param3...])' to the href
attribute of the final output. Here is a summarization of it's
functionality:

I added the following attributes:

function - This is the name of the javascript function that will be called;

functionName - This is the name of the bean that will provide parameter
values from one of it's properties.

functionProperty - This is a property of a bean that will either provide a
String or an ArrayList to populate the parameters of the function

urlIndex - This allows you to include the url generated by href,forward or
page to be included at a specific place in the funcion's parameters.

There is another class that I wrote that does the actual processing and
preparation of the url. I named it EcmaUtil.  I modeled the computeURL and
computerParam methods of the RequestUtils class when I built the methods for
the EcmaUtil.

The LinkTag class that I wrote extends the BaseHandlerTag under the
org.apache.struts.taglib.html package of struts jar.

I know the code needs a bit of reworking to fit back in to the struts
framework. I stripped out the MessageReources for the most part and removed
some exception handling that will need to be included again.

Anyways, if nobody has done this in the nightly or if it sounds like it
might be of use. Let me know and I will post the code,the tld and an example
of it's usage.

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


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




RE: problem with bean having session scope

2002-03-15 Thread Slimane

okay, thanx a lot for your help :)

I'll try the second method tomorrow (now it's 2am and I'm feeling sleepy :)

Friendly Regards,
Slimane

At 17:02 15/03/2002 -0800, Someone poor demented soul by the name of 
"Joseph Barefoot" presented us with the following text which may contain 
useless information.
>Yep, that's what I meant, mis-type on my part there.  hmmm...so you want 3
>ActionForm beans to be instantiated when a single Action is delegated to,
>but don't want to use nested forms?
>
>Okay, you can do this two (maybe more) ways:
>
>1.  You could chain your actionforwards such that the Action called forwards
>to a second Action, the second Action forwards to a 3rd, etc., and thus your
>ActionForms get instantiated.  The final Action in the chain then forwards
>to whatever page you wanted the user to see.
>
>2.  The Action (call it Action A) that is called when it's associated URI is
>requested explicitly creates whatever ActionForms you want and initializes
>them with setXXX methods.  Then Action A places these form beans into the
>HTTPRequest object as attributes with the SAME NAME that struts would use
>for the attribute, i.e. the logical name specified in the action-mapping for
>the form bean.  Then, when subsequent URI's are requested associated with
>other Actions, if Struts finds that an attribute with the associated (with
>the particular Action) form bean's logical name already exists, it will use
>that object rather than instantiating a new one (I'm pretty sure that's how
>it works).  The only drawback is that you would have to make sure that
>Action A's URI is requested BEFORE the other Actions' URIs, so that your
>logic will initialize and store the ActionForm beans rather than the Struts
>framework.
>
>whew.  I don't know if that helps, but it's the best I could come up with
>based on what I know about Struts.  :)
>
>A final consideration:  Is is possible that 2 of the 3 beans don't need to
>be ActionForm beans at all, but just value objects that are created and
>stored in the session?
>
>
>-Original Message-
>From: Slimane [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 15, 2002 3:49 PM
>To: Struts Users Mailing List
>Subject: RE: problem with bean having session scope
>
>
>Hi,
>
>Thanx again for your answer :)
>
>The problem is that I don't want to nest my ActionForm, I want them all
>treated as a unique session bean. Without them being into (dependant of)
>another ActionForm.
>
> >so you can retrieve them from other Actions/JSPs by
> >using request.getAttribute(  ).
>
>I suppose you meant request.getSession().getAttribute( name> ), didn't you ? :)
>
>Friendly Regards,
>Slimane
>
>At 15:12 15/03/2002 -0800, Someone poor demented soul by the name of
>"Joseph Barefoot" presented us with the following text which may contain
>useless information.
> >Valid questions, all. :)  I have to admit I'm not 100% sure when the
> >ActionForm bean is first instantiated/initialized, but this is what I
>think:
> >The ActionForm bean is created and initialized when the URI specified by
>the
> >action-mapping for this particular Action/ActionForm pair is requested.
> >(if this is incorrect, please someone correct me)
> >
> >If you want to share beans, just declare the scope to be "session" for the
> >bean in question in the action-mapping for this action inside
> >struts-config.xml.  Struts stores these beans as attributes in the
> >HTTPSession object, so you can retrieve them from other Actions/JSPs by
> >using request.getAttribute(  ).
> >
> >As for the last question, ActionForm beans can appear as fields inside
>other
> >ActionForms, so you can nest your form beans such that when one gets
> >instantiated, all of the nested form fields get instantiated too.  Then you
> >can reference them as nested attributes of the parent ActionForm inside any
> >of your Struts JSP tags.  You can also retrieve them from the session in a
> >similar manner:
> >
> >request.getAttribute(  ).getMyNestedForm()
> >
> >happy coding,
> >
> >Joe
> >
> >-Original Message-
> >From: Slimane [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, March 15, 2002 1:58 PM
> >To: Struts Users Mailing List
> >Subject: RE: problem with bean having session scope
> >
> >
> >Hi,
> >
> >Thanks for your answer, I'll try to remove the  tag.
> >
> >But I still do have a question :) You say that:
> > >Struts takes care of instantiating,
> > >read/writes, and scope management for these beans
> >
> >well, then when does he do that ? The first time I call the Action Class ?
> >If so, what if I want to share 3 beans ? The first time I'll call one
> >Action Class, only one ActionForm will be instanciated, no ?
> >
> >Friendly Regards,
> >Slimane
> >
> >At 10:03 15/03/2002 -0800, Someone poor demented soul by the name of
> >"Joseph Barefoot" presented us with the following text which may contain
> >useless information.
> > > > > I suppose the form bean is created the first time I use a
>jsp:useBean
> > >tag
> > > > > in my jsp file, isn't it ?
> > > 

Iterate problem

2002-03-15 Thread Sanjay Choudhary

Dear Friends,

I have a jsp in where we have columns as follows

Add no. of rows you wish to add - go

AB   CD  E


save

1. Using java scripts we allow user to add rows
dynamically on the page. 

2. How may I achieve this functionality of dynamically
adding rows using struts? how will it map it back to
an collection attribute in java bean.

Everybody's comments are highly appreciated.

Thanks,
Sanjay

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

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




RE: problem with bean having session scope

2002-03-15 Thread Joseph Barefoot

Yep, that's what I meant, mis-type on my part there.  hmmm...so you want 3
ActionForm beans to be instantiated when a single Action is delegated to,
but don't want to use nested forms?

Okay, you can do this two (maybe more) ways:

1.  You could chain your actionforwards such that the Action called forwards
to a second Action, the second Action forwards to a 3rd, etc., and thus your
ActionForms get instantiated.  The final Action in the chain then forwards
to whatever page you wanted the user to see.

2.  The Action (call it Action A) that is called when it's associated URI is
requested explicitly creates whatever ActionForms you want and initializes
them with setXXX methods.  Then Action A places these form beans into the
HTTPRequest object as attributes with the SAME NAME that struts would use
for the attribute, i.e. the logical name specified in the action-mapping for
the form bean.  Then, when subsequent URI's are requested associated with
other Actions, if Struts finds that an attribute with the associated (with
the particular Action) form bean's logical name already exists, it will use
that object rather than instantiating a new one (I'm pretty sure that's how
it works).  The only drawback is that you would have to make sure that
Action A's URI is requested BEFORE the other Actions' URIs, so that your
logic will initialize and store the ActionForm beans rather than the Struts
framework.

whew.  I don't know if that helps, but it's the best I could come up with
based on what I know about Struts.  :)

A final consideration:  Is is possible that 2 of the 3 beans don't need to
be ActionForm beans at all, but just value objects that are created and
stored in the session?


-Original Message-
From: Slimane [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 3:49 PM
To: Struts Users Mailing List
Subject: RE: problem with bean having session scope


Hi,

Thanx again for your answer :)

The problem is that I don't want to nest my ActionForm, I want them all
treated as a unique session bean. Without them being into (dependant of)
another ActionForm.

>so you can retrieve them from other Actions/JSPs by
>using request.getAttribute(  ).

I suppose you meant request.getSession().getAttribute(  ), didn't you ? :)

Friendly Regards,
Slimane

At 15:12 15/03/2002 -0800, Someone poor demented soul by the name of
"Joseph Barefoot" presented us with the following text which may contain
useless information.
>Valid questions, all. :)  I have to admit I'm not 100% sure when the
>ActionForm bean is first instantiated/initialized, but this is what I
think:
>The ActionForm bean is created and initialized when the URI specified by
the
>action-mapping for this particular Action/ActionForm pair is requested.
>(if this is incorrect, please someone correct me)
>
>If you want to share beans, just declare the scope to be "session" for the
>bean in question in the action-mapping for this action inside
>struts-config.xml.  Struts stores these beans as attributes in the
>HTTPSession object, so you can retrieve them from other Actions/JSPs by
>using request.getAttribute(  ).
>
>As for the last question, ActionForm beans can appear as fields inside
other
>ActionForms, so you can nest your form beans such that when one gets
>instantiated, all of the nested form fields get instantiated too.  Then you
>can reference them as nested attributes of the parent ActionForm inside any
>of your Struts JSP tags.  You can also retrieve them from the session in a
>similar manner:
>
>request.getAttribute(  ).getMyNestedForm()
>
>happy coding,
>
>Joe
>
>-Original Message-
>From: Slimane [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 15, 2002 1:58 PM
>To: Struts Users Mailing List
>Subject: RE: problem with bean having session scope
>
>
>Hi,
>
>Thanks for your answer, I'll try to remove the  tag.
>
>But I still do have a question :) You say that:
> >Struts takes care of instantiating,
> >read/writes, and scope management for these beans
>
>well, then when does he do that ? The first time I call the Action Class ?
>If so, what if I want to share 3 beans ? The first time I'll call one
>Action Class, only one ActionForm will be instanciated, no ?
>
>Friendly Regards,
>Slimane
>
>At 10:03 15/03/2002 -0800, Someone poor demented soul by the name of
>"Joseph Barefoot" presented us with the following text which may contain
>useless information.
> > > > I suppose the form bean is created the first time I use a
jsp:useBean
> >tag
> > > > in my jsp file, isn't it ?
> > > >
> > > > (for example:  > > > class="be.stluc.info.struts.SearchByDateForm"/>)
> >
> >Actually, the creation of the ActionForm bean is handled by the Struts
> >framework itself (I guess by the controller servlet?).  That's how forms
>can
> >be populated "automatically" via the Struts taglibs and then passed to
the
> >Action class associated with this particular ActionForm class.
> >
> >This is just a shot in the dark...but perhaps the explicit creation you
are
> >specifying b

RE: How to Pre-fill a formbean - correction

2002-03-15 Thread HERSHKOWITZ,PHIL (A-Sonoma,ex1)

I mistyped the compiler output. It should read:

 [javac] Found 2 syntax errors in ...:
 [javac]
 [javac] 36.  mainForm.setProperty1("Dog");
 [javac] <>
 [javac]
 [javac] *** Syntax: misplaced construct(s)
 [javac]
 [javac]
 [javac]
 [javac] 36.  mainForm.setProperty1("Dog");
 [javac]<--->
 [javac]
 [javac] *** Syntax: Unexpected symbol ignored

Phil


> -Original Message-
> From: HERSHKOWITZ,PHIL (A-Sonoma,ex1)
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 4:10 PM
> To: 'Struts Users Mailing List'
> Subject: RE: How to Pre-fill a formbean
> 
> 
> Hi,
> 
> In mainAction, where form is passed in by the method header, the code
> 
>   form.setProperty1("Dog");
> 
> compiles.
> 
> In loginAction, the code:
> 
>MainForm mainForm = new MainForm();
>mainForm.setProperty1("Dog");
> 
> as suggested by Viplava, fails to compile with:
> 
> [javac] Found 2 syntax errors in ...:
> [javac]
> [javac] 36.  mainForm.Property1("Dog");
> [javac] <>
> [javac]
> [javac] *** Syntax: misplaced construct(s)
> [javac]
> [javac]
> [javac]
> [javac] 36.  mainForm.setProperty1("Dog");
> [javac]<--->
> [javac]
> [javac] *** Syntax: Unexpected symbol ignored
> 
> 
> Am I missing something obvious in struts or am I missing 
> something obvious
> about java (or more likely both :) What code do I have to include to
> "trigger" struts to give me a reference to the formbean?
> 
> Phil
> 
> 
> 
> 
> 
> > -Original Message-
> > From: Nekkalapudi, Viplava [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 15, 2002 12:14 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: How to Pre-fill a formbean
> > 
> > 
> > 
> >   // Create a form with the name given in struts-config.xml  
> >   MainForm mainForm = new MainForm();
> >   mainForm.setProperty1(..);
> >   ...
> >  
> >   request.setAtribute("mainForm", mainForm);
> > 
> >   // **//
> >  
> > Struts Action Servlet creates mainForm just before displaying 
> > the main.jsp,
> > if it is not in the request/session.
> > 
> > 
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 15, 2002 1:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: How to Pre-fill a formbean
> > 
> > 
> > Hi All,
> > 
> > And Thanks. So in my loginAction, I can create a reference to 
> > mainForm and
> > pre-populate it with defaults from the database.
> > 
> > Would someone be able to provide a snippet of code that I can use in
> > loginAction to create a reference to mainForm?
> > 
> > Thanks,
> > Phil
> > 
> > 
> > > -Original Message-
> > > From: Jay sissom [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 15, 2002 6:01 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: How to Pre-fill a formbean
> > > 
> > > 
> > > You can do it this way, but I would use a Struts tag instead 
> > > of a jsp tag.  
> > > Instead of using jsp:useBean and jsp:getProperty, all you 
> > > need to do is
> > > 
> > > 
> > > 
> > > and that will write out the mfProperty to the JSP.
> > > 
> > > Jay
> > > 
> > > 
> > > On Thu, 14 Mar 2002, Joe Lee wrote:
> > > 
> > > > Phil,
> > > > 
> > > > Your loginAction should create and populate a mainForm
> > > > bean and then saves it in the request scope. In the
> > > > main.jsp, get a reference to this form by:
> > > >  > > > class="com.MainForm">
> > > > and the input fields on that jsp get the defaults from
> > > > this form bean. You have to use class (not type) so
> > > > that if you come from a differene route to main.jsp
> > > > rather than Login and the mainform bean may not be
> > > > there already, a new one will be created for u. Then
> > > > your jsp won't bombs and the input fields still get
> > > > blank defaults.
> > > > 
> > > > - Joe
> > > > 
> > > > RE: How to Pre-fill a formbean
> > > > 
> > > > 
> > > --
> > > --
> > > > 
> > > > From: HERSHKOWITZ,PHIL (A-Sonoma,ex1) 
> > > > Subject: RE: How to Pre-fill a formbean 
> > > > Date: Thu, 14 Mar 2002 18:14:30 -0800 
> > > > 
> > > > 
> > > --
> > > --
> > > > 
> > > > Hi,
> > > > 
> > > > >From the loginAction, I am calling the database to
> > > > retrieve default values
> > > > for some of the fields the use must fill out on
> > > > mainAction.jsp. The default
> > > > values depend on the user ID.
> > > > 
> > > > Phil
> > > > 
> > > > 
> > > > 
> > > > __
> > > > Do You Yahoo!?
> > > > Yahoo! Sports - live college hoops coverage
> > > > http://sports.yahoo.com/
> > > > 
> > > > --
> > > > To unsubscribe, e-mail:   
> > 

Re: I18N Problem with Chinese Character

2002-03-15 Thread @Basebeans.com

Subject: Re: I18N Problem with Chinese Character
From: "Liu Yan" <[EMAIL PROTECTED]>
 ===
hi,

Thanks. Yes, it helps. And now the Chinese character is displayed OK.

I used the native2ascii command with -encoding UTF-8 parameter and with no
exception. I believe that the your exception is caused by non-UTF-8 format
of your original properties file.

Good day!
Liu Yan

"nsg" <[EMAIL PROTECTED]> $BCB)?7(B
?:[EMAIL PROTECTED]
> you should turn your resource file to UTF-8 encoding using native2ascii
> command.
> that command locates in your-jdk-home\bin directory.
> detail command line is listed below:
>
> native2ascii ApplicationResources_zh.properties
> ApplicationResources_zh.propertiesX
>
> the first parameter is source file,second is destination file. Use the
> destination file as your resource file.
>
> Many articles introduce that the encodeing parameter should be specified
> like following:
>
> native2ascii -encoding UTF-8 ApplicationResources_zh.properties
> ApplicationResources_zh.propertiesX
> .
> but if so, an exception would be thrown.I dont know what reason causes the
> exception?
>
> of course,you use first command and should be OK.
>
>
> hope helps for you.
>
>
> Laker
>
>
>
>
> - Original Message -
> From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 15, 2002 9:40 PM
> Subject: I18N Problem with Chinese Character
>
>
> > Subject: I18N Problem with Chinese Character
> > From: "Liu Yan" <[EMAIL PROTECTED]>
> >  ===
> > hi List,
> >
> > I am using struts-1.0.2 with WebLogic 6.1-sp2. For an I18N project, I
> > followed the steps:
> >
> > 1) I created ApplicationResources.properties and
> > ApplicationResources_zh.properties files to store strings.
> > 2) The whole project is using UTF-8 encoding.
> > 3) On the beginning of each JSP page, add:
> ><%@ page contentType="text/html; charset=UTF-8" %>
> >
> > For static Chinese character in JSP page, this setting goes well. But
when
> I
> > tried to use:
> >
> > 
> >
> > to get some strings from ApplicationResources_zh.properties file, the
> output
> > is corrupted.
> >
> > I am suspecting this is the  taglib's problem, but decided
> to
> > drop a letter here for a quick answer. Am I doing something wrong or I
> have
> > to wait for the upcoming 1.1 beta release?
> >
> > Regards!
> > Liu Yan
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




RE: How to Pre-fill a formbean

2002-03-15 Thread HERSHKOWITZ,PHIL (A-Sonoma,ex1)

Hi,

In mainAction, where form is passed in by the method header, the code

form.setProperty1("Dog");

compiles.

In loginAction, the code:

   MainForm mainForm = new MainForm();
   mainForm.setProperty1("Dog");

as suggested by Viplava, fails to compile with:

[javac] Found 2 syntax errors in ...:
[javac]
[javac] 36.  mainForm.Property1("Dog");
[javac] <>
[javac]
[javac] *** Syntax: misplaced construct(s)
[javac]
[javac]
[javac]
[javac] 36.  mainForm.setProperty1("Dog");
[javac]<--->
[javac]
[javac] *** Syntax: Unexpected symbol ignored


Am I missing something obvious in struts or am I missing something obvious
about java (or more likely both :) What code do I have to include to
"trigger" struts to give me a reference to the formbean?

Phil





> -Original Message-
> From: Nekkalapudi, Viplava [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 12:14 PM
> To: 'Struts Users Mailing List'
> Subject: RE: How to Pre-fill a formbean
> 
> 
> 
>   // Create a form with the name given in struts-config.xml  
>   MainForm mainForm = new MainForm();
>   mainForm.setProperty1(..);
>   ...
>  
>   request.setAtribute("mainForm", mainForm);
> 
>   // **//
>  
> Struts Action Servlet creates mainForm just before displaying 
> the main.jsp,
> if it is not in the request/session.
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 1:56 PM
> To: [EMAIL PROTECTED]
> Subject: RE: How to Pre-fill a formbean
> 
> 
> Hi All,
> 
> And Thanks. So in my loginAction, I can create a reference to 
> mainForm and
> pre-populate it with defaults from the database.
> 
> Would someone be able to provide a snippet of code that I can use in
> loginAction to create a reference to mainForm?
> 
> Thanks,
> Phil
> 
> 
> > -Original Message-
> > From: Jay sissom [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 15, 2002 6:01 AM
> > To: Struts Users Mailing List
> > Subject: Re: How to Pre-fill a formbean
> > 
> > 
> > You can do it this way, but I would use a Struts tag instead 
> > of a jsp tag.  
> > Instead of using jsp:useBean and jsp:getProperty, all you 
> > need to do is
> > 
> > 
> > 
> > and that will write out the mfProperty to the JSP.
> > 
> > Jay
> > 
> > 
> > On Thu, 14 Mar 2002, Joe Lee wrote:
> > 
> > > Phil,
> > > 
> > > Your loginAction should create and populate a mainForm
> > > bean and then saves it in the request scope. In the
> > > main.jsp, get a reference to this form by:
> > >  > > class="com.MainForm">
> > > and the input fields on that jsp get the defaults from
> > > this form bean. You have to use class (not type) so
> > > that if you come from a differene route to main.jsp
> > > rather than Login and the mainform bean may not be
> > > there already, a new one will be created for u. Then
> > > your jsp won't bombs and the input fields still get
> > > blank defaults.
> > > 
> > > - Joe
> > > 
> > > RE: How to Pre-fill a formbean
> > > 
> > > 
> > --
> > --
> > > 
> > > From: HERSHKOWITZ,PHIL (A-Sonoma,ex1) 
> > > Subject: RE: How to Pre-fill a formbean 
> > > Date: Thu, 14 Mar 2002 18:14:30 -0800 
> > > 
> > > 
> > --
> > --
> > > 
> > > Hi,
> > > 
> > > >From the loginAction, I am calling the database to
> > > retrieve default values
> > > for some of the fields the use must fill out on
> > > mainAction.jsp. The default
> > > values depend on the user ID.
> > > 
> > > Phil
> > > 
> > > 
> > > 
> > > __
> > > Do You Yahoo!?
> > > Yahoo! Sports - live college hoops coverage
> > > http://sports.yahoo.com/
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> 
> > For additional commands, e-mail:
> 
> > 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


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




RE: problem with bean having session scope

2002-03-15 Thread Slimane

Hi,

Thanx again for your answer :)

The problem is that I don't want to nest my ActionForm, I want them all 
treated as a unique session bean. Without them being into (dependant of) 
another ActionForm.

>so you can retrieve them from other Actions/JSPs by
>using request.getAttribute(  ).

I suppose you meant request.getSession().getAttribute(  ), didn't you ? :)

Friendly Regards,
Slimane

At 15:12 15/03/2002 -0800, Someone poor demented soul by the name of 
"Joseph Barefoot" presented us with the following text which may contain 
useless information.
>Valid questions, all. :)  I have to admit I'm not 100% sure when the
>ActionForm bean is first instantiated/initialized, but this is what I think:
>The ActionForm bean is created and initialized when the URI specified by the
>action-mapping for this particular Action/ActionForm pair is requested.
>(if this is incorrect, please someone correct me)
>
>If you want to share beans, just declare the scope to be "session" for the
>bean in question in the action-mapping for this action inside
>struts-config.xml.  Struts stores these beans as attributes in the
>HTTPSession object, so you can retrieve them from other Actions/JSPs by
>using request.getAttribute(  ).
>
>As for the last question, ActionForm beans can appear as fields inside other
>ActionForms, so you can nest your form beans such that when one gets
>instantiated, all of the nested form fields get instantiated too.  Then you
>can reference them as nested attributes of the parent ActionForm inside any
>of your Struts JSP tags.  You can also retrieve them from the session in a
>similar manner:
>
>request.getAttribute(  ).getMyNestedForm()
>
>happy coding,
>
>Joe
>
>-Original Message-
>From: Slimane [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 15, 2002 1:58 PM
>To: Struts Users Mailing List
>Subject: RE: problem with bean having session scope
>
>
>Hi,
>
>Thanks for your answer, I'll try to remove the  tag.
>
>But I still do have a question :) You say that:
> >Struts takes care of instantiating,
> >read/writes, and scope management for these beans
>
>well, then when does he do that ? The first time I call the Action Class ?
>If so, what if I want to share 3 beans ? The first time I'll call one
>Action Class, only one ActionForm will be instanciated, no ?
>
>Friendly Regards,
>Slimane
>
>At 10:03 15/03/2002 -0800, Someone poor demented soul by the name of
>"Joseph Barefoot" presented us with the following text which may contain
>useless information.
> > > > I suppose the form bean is created the first time I use a jsp:useBean
> >tag
> > > > in my jsp file, isn't it ?
> > > >
> > > > (for example:  > > > class="be.stluc.info.struts.SearchByDateForm"/>)
> >
> >Actually, the creation of the ActionForm bean is handled by the Struts
> >framework itself (I guess by the controller servlet?).  That's how forms
>can
> >be populated "automatically" via the Struts taglibs and then passed to the
> >Action class associated with this particular ActionForm class.
> >
> >This is just a shot in the dark...but perhaps the explicit creation you are
> >specifying by the  tag is screwing up Strut's management of
>the
> >ActionForm bean?  In any case, you don't need to use the  tag
> >at all for ActionForm beans, as Struts takes care of instantiating,
> >read/writes, and scope management for these beans.
> >
> >
> >--joe
> >
> >-Original Message-
> >From: Slimane Zouggari [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, March 15, 2002 9:15 AM
> >To: Struts Users Mailing List
> >Subject: Re: problem with bean having session scope
> >
> >
> >Thanx, I supposed it was something like that :)
> >The thing is, I still don't understand why my beans aren't shared among all
> >of my action classes :(
> >
> >Friendly Regards,
> >Slimane
> >
> >At 12:05 15/03/2002 -0500, you wrote:
> > >AFAIK, a session bean is destroyed when the session expires (30 min by
> > >default).
> > >
> > >Otavio
> > >
> > >- Original Message -
> > >From: "Slimane Zouggari" <[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Sent: Friday, March 15, 2002 12:02 PM
> > >Subject: Re: problem with bean having session scope
> > >
> > >
> > > > well as nobody seems to have a clue about my problem. I'll ask my
> >question
> > > > differently :)
> > > >
> > > > When is a session bean destroyed ?
> > > > If I specify, a form bean to have a session scope (as I did in the
> > > > struts-config.xml), when will it be destroyed ?
> > > >
> > > > I suppose the form bean is created the first time I use a jsp:useBean
> >tag
> > > > in my jsp file, isn't it ?
> > > >
> > > > (for example:  > > > class="be.stluc.info.struts.SearchByDateForm"/>)
> > > >
> > > > Finally, what could be the reasons, that some of my Action classes see
> > >(can
> > > > use their values) some session beans, while others don't ?
> > > >
> > > > Thanx for having taken the time to read me :)
> > > >
> > > > Friendly Regards,
> > > > Slimane
> > > >
> > > > At

RE: problem with bean having session scope

2002-03-15 Thread Joseph Barefoot

Valid questions, all. :)  I have to admit I'm not 100% sure when the
ActionForm bean is first instantiated/initialized, but this is what I think:
The ActionForm bean is created and initialized when the URI specified by the
action-mapping for this particular Action/ActionForm pair is requested.
(if this is incorrect, please someone correct me)

If you want to share beans, just declare the scope to be "session" for the
bean in question in the action-mapping for this action inside
struts-config.xml.  Struts stores these beans as attributes in the
HTTPSession object, so you can retrieve them from other Actions/JSPs by
using request.getAttribute(  ).

As for the last question, ActionForm beans can appear as fields inside other
ActionForms, so you can nest your form beans such that when one gets
instantiated, all of the nested form fields get instantiated too.  Then you
can reference them as nested attributes of the parent ActionForm inside any
of your Struts JSP tags.  You can also retrieve them from the session in a
similar manner:

request.getAttribute(  ).getMyNestedForm()

happy coding,

Joe

-Original Message-
From: Slimane [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 1:58 PM
To: Struts Users Mailing List
Subject: RE: problem with bean having session scope


Hi,

Thanks for your answer, I'll try to remove the  tag.

But I still do have a question :) You say that:
>Struts takes care of instantiating,
>read/writes, and scope management for these beans

well, then when does he do that ? The first time I call the Action Class ?
If so, what if I want to share 3 beans ? The first time I'll call one
Action Class, only one ActionForm will be instanciated, no ?

Friendly Regards,
Slimane

At 10:03 15/03/2002 -0800, Someone poor demented soul by the name of
"Joseph Barefoot" presented us with the following text which may contain
useless information.
> > > I suppose the form bean is created the first time I use a jsp:useBean
>tag
> > > in my jsp file, isn't it ?
> > >
> > > (for example:  > > class="be.stluc.info.struts.SearchByDateForm"/>)
>
>Actually, the creation of the ActionForm bean is handled by the Struts
>framework itself (I guess by the controller servlet?).  That's how forms
can
>be populated "automatically" via the Struts taglibs and then passed to the
>Action class associated with this particular ActionForm class.
>
>This is just a shot in the dark...but perhaps the explicit creation you are
>specifying by the  tag is screwing up Strut's management of
the
>ActionForm bean?  In any case, you don't need to use the  tag
>at all for ActionForm beans, as Struts takes care of instantiating,
>read/writes, and scope management for these beans.
>
>
>--joe
>
>-Original Message-
>From: Slimane Zouggari [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 15, 2002 9:15 AM
>To: Struts Users Mailing List
>Subject: Re: problem with bean having session scope
>
>
>Thanx, I supposed it was something like that :)
>The thing is, I still don't understand why my beans aren't shared among all
>of my action classes :(
>
>Friendly Regards,
>Slimane
>
>At 12:05 15/03/2002 -0500, you wrote:
> >AFAIK, a session bean is destroyed when the session expires (30 min by
> >default).
> >
> >Otavio
> >
> >- Original Message -
> >From: "Slimane Zouggari" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, March 15, 2002 12:02 PM
> >Subject: Re: problem with bean having session scope
> >
> >
> > > well as nobody seems to have a clue about my problem. I'll ask my
>question
> > > differently :)
> > >
> > > When is a session bean destroyed ?
> > > If I specify, a form bean to have a session scope (as I did in the
> > > struts-config.xml), when will it be destroyed ?
> > >
> > > I suppose the form bean is created the first time I use a jsp:useBean
>tag
> > > in my jsp file, isn't it ?
> > >
> > > (for example:  > > class="be.stluc.info.struts.SearchByDateForm"/>)
> > >
> > > Finally, what could be the reasons, that some of my Action classes see
> >(can
> > > use their values) some session beans, while others don't ?
> > >
> > > Thanx for having taken the time to read me :)
> > >
> > > Friendly Regards,
> > > Slimane
> > >
> > > At 12:11 15/03/2002 +0100, you wrote:
> > > >Hi,
> > > >
> > > >I have 3 form beans. Each of them have a session scope defined in the
> > > >struts-config.xml.
> > > >
> > > >Here's the config for one of them:
> > > >>  > > >> type="be.stluc.info.struts.PieChartAction"
> > > >> name="piechartform"
> > > >> scope="session">
> > > >
> > > >When I try to access them in one of my Action class, I don't have any
> >problem.
> > > >But when I try to access them, from one other Action class, then
> >suddenly,
> > > >they don't exist anymore.
> > > >
> > > >I used the piece of code, Mr Keith Bacon posted in reply of one of my
> > > >previous mail (
> > >
> >
>
>http://www.mail-archive.com/struts-user@jakarta.apache.org/ms

RE: problem with bean having session scope

2002-03-15 Thread Galbreath, Mark

Depends on whether it is a stateless or stateful session bean.  There is no
way of knowing (outside of a server crash) when a stateless bean will be
destroyed.

Mark

-Original Message-
From: Otavio C. Decio [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 12:05 PM
To: Struts Users Mailing List
Subject: Re: problem with bean having session scope


AFAIK, a session bean is destroyed when the session expires (30 min by
default).

Otavio

- Original Message -
From: "Slimane Zouggari" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 12:02 PM
Subject: Re: problem with bean having session scope


> well as nobody seems to have a clue about my problem. I'll ask my question
> differently :)
>
> When is a session bean destroyed ?
> If I specify, a form bean to have a session scope (as I did in the
> struts-config.xml), when will it be destroyed ?
>
> I suppose the form bean is created the first time I use a jsp:useBean tag
> in my jsp file, isn't it ?
>
> (for example:  class="be.stluc.info.struts.SearchByDateForm"/>)
>
> Finally, what could be the reasons, that some of my Action classes see
(can
> use their values) some session beans, while others don't ?
>
> Thanx for having taken the time to read me :)
>
> Friendly Regards,
> Slimane
>
> At 12:11 15/03/2002 +0100, you wrote:
> >Hi,
> >
> >I have 3 form beans. Each of them have a session scope defined in the
> >struts-config.xml.
> >
> >Here's the config for one of them:
> >>  >> type="be.stluc.info.struts.PieChartAction"
> >> name="piechartform"
> >> scope="session">
> >
> >When I try to access them in one of my Action class, I don't have any
problem.
> >But when I try to access them, from one other Action class, then
suddenly,
> >they don't exist anymore.
> >
> >I used the piece of code, Mr Keith Bacon posted in reply of one of my
> >previous mail (
>
>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html )
> >
> >And that so, I saw that one time, my session contains all three form
beans
> >and another time my session contains only one form bean.
> >
> >Here's the code I use in my Action classes:
> >
> >> ParticipantDetailsForm partDetForm =
> >>   (ParticipantDetailsForm)
> >> request.getSession().getAttribute("participantdetailsform");
> >
> >(participantdetailsform is one of the 3 form beans I share in the
session)
> >
> >Could anyone give me pointers where I should look for ? Because, I'm sure
> >it's a stupid mistake but I can't find it :(
> >
> >Thanx in advance.
> >
> >Friendly Regards,
> >Slimane
> >
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

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

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: Re[2]: Bean Form's Vector not updated!

2002-03-15 Thread dhay



Can you post more info.  Did you set your beans to session scope?  There have
been lots of people in the archive with similar problems, so it's still worth
checking there too.

Cheers,

David





Juan Pablo Villaverde <[EMAIL PROTECTED]> on 03/15/2002
04:05:25 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>; Please respond to
  Juan Pablo Villaverde <[EMAIL PROTECTED]>

To:   "Struts Users Mailing List"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re[2]: Bean Form's Vector not updated!




I use indexed property in all tags where applicable.. but the
collection objects are not updated..

dlc> Search the mail archives for indexed.

dlc> Dave




dlc> Juan Pablo Villaverde <[EMAIL PROTECTED]> on
03/15/2002
dlc> 08:47:25 AM

dlc> Please respond to "Struts Users Mailing List"
dlc>   <[EMAIL PROTECTED]>; Please
respond to
dlc>   Juan Pablo Villaverde <[EMAIL PROTECTED]>

dlc> To:   "Struts Users Mailing List"
dlc>   <[EMAIL PROTECTED]>
dlc> cc:(bcc: David Hay/Lex/Lexmark)
dlc> Subject:  Bean Form's  Vector  not updated!




dlc>  I have bean form with some String fields and a Vector Field. This
dlc> vector contains a collection of Customer objects. Each Customer object
dlc> have some String and int fields.
dlc>  My .jsp renders  for the bean form's String fields and
dlc> uses iterate to render  representing Customer's fields.
dlc> When I post the jsp's form, my action class receives the String fields
dlc> of my bean form updated, acordingly the changes I made in my page. BUT,
dlc> the changes made to the Customer's fields are NOT reflected in the
dlc> objects contained in the Vector! Is it normal? What can I do to get
dlc> all the bean forms contents updated on post? I need to update each
dlc> object in a Vector manually after each post using
dlc> request.getParameter()? Thanks in advance.


dlc> --
dlc> Juan Pablo Villaverde
dlc> Tec. en Infraestructura de Redes
dlc> Soluciones Punto Com S.A.
dlc> http://www.spcom.com.ar



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








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




--
Juan Pablo Villaverde
Tec. en Infraestructura de Redes
Soluciones Punto Com S.A.
http://www.spcom.com.ar



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








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




RE: UML for Struts sample

2002-03-15 Thread John Menke

Check out these resources they helped me:


http://husted.com/struts/resources/uml-jps.pdf


Business Delegate Pattern Sequence Diagrams:
http://www.cayambe.org/docs/design/AddToCart.html 
http://www.cayambe.org/docs/design/BrowserCatalog.html 
http://www.cayambe.org/docs/design/ManageCart.html 
http://www.cayambe.org/docs/design/ViewReceipt.html 

Here's the use case for the above sequence diagrams:
http://www.cayambe.org/docs/requirements/Use_Case.html 

Also there is some UML stuff for struts here
http://www.ifrance.fr/rollerjm/pro/Struts.html 

> -Original Message-
> From: K J [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 4:45 PM
> To: [EMAIL PROTECTED]
> Subject: UML for Struts sample
> 
> 
> Does anyone have a UML diagram or a sample description
> of the main Struts classes that need to be used,
> extened, etc. for a very simple web application?
> 
> What's the "fastest" way to understand the framework?
> I have the sample app running, but it's not very east
> to follow if you're looking for a quick reference app.
> 
> Thanks!
> 
> __
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

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




RE: problem with bean having session scope

2002-03-15 Thread Slimane

Hi,

Thanks for your answer, I'll try to remove the  tag.

But I still do have a question :) You say that:
>Struts takes care of instantiating,
>read/writes, and scope management for these beans

well, then when does he do that ? The first time I call the Action Class ?
If so, what if I want to share 3 beans ? The first time I'll call one 
Action Class, only one ActionForm will be instanciated, no ?

Friendly Regards,
Slimane

At 10:03 15/03/2002 -0800, Someone poor demented soul by the name of 
"Joseph Barefoot" presented us with the following text which may contain 
useless information.
> > > I suppose the form bean is created the first time I use a jsp:useBean
>tag
> > > in my jsp file, isn't it ?
> > >
> > > (for example:  > > class="be.stluc.info.struts.SearchByDateForm"/>)
>
>Actually, the creation of the ActionForm bean is handled by the Struts
>framework itself (I guess by the controller servlet?).  That's how forms can
>be populated "automatically" via the Struts taglibs and then passed to the
>Action class associated with this particular ActionForm class.
>
>This is just a shot in the dark...but perhaps the explicit creation you are
>specifying by the  tag is screwing up Strut's management of the
>ActionForm bean?  In any case, you don't need to use the  tag
>at all for ActionForm beans, as Struts takes care of instantiating,
>read/writes, and scope management for these beans.
>
>
>--joe
>
>-Original Message-
>From: Slimane Zouggari [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 15, 2002 9:15 AM
>To: Struts Users Mailing List
>Subject: Re: problem with bean having session scope
>
>
>Thanx, I supposed it was something like that :)
>The thing is, I still don't understand why my beans aren't shared among all
>of my action classes :(
>
>Friendly Regards,
>Slimane
>
>At 12:05 15/03/2002 -0500, you wrote:
> >AFAIK, a session bean is destroyed when the session expires (30 min by
> >default).
> >
> >Otavio
> >
> >- Original Message -
> >From: "Slimane Zouggari" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, March 15, 2002 12:02 PM
> >Subject: Re: problem with bean having session scope
> >
> >
> > > well as nobody seems to have a clue about my problem. I'll ask my
>question
> > > differently :)
> > >
> > > When is a session bean destroyed ?
> > > If I specify, a form bean to have a session scope (as I did in the
> > > struts-config.xml), when will it be destroyed ?
> > >
> > > I suppose the form bean is created the first time I use a jsp:useBean
>tag
> > > in my jsp file, isn't it ?
> > >
> > > (for example:  > > class="be.stluc.info.struts.SearchByDateForm"/>)
> > >
> > > Finally, what could be the reasons, that some of my Action classes see
> >(can
> > > use their values) some session beans, while others don't ?
> > >
> > > Thanx for having taken the time to read me :)
> > >
> > > Friendly Regards,
> > > Slimane
> > >
> > > At 12:11 15/03/2002 +0100, you wrote:
> > > >Hi,
> > > >
> > > >I have 3 form beans. Each of them have a session scope defined in the
> > > >struts-config.xml.
> > > >
> > > >Here's the config for one of them:
> > > >>  > > >> type="be.stluc.info.struts.PieChartAction"
> > > >> name="piechartform"
> > > >> scope="session">
> > > >
> > > >When I try to access them in one of my Action class, I don't have any
> >problem.
> > > >But when I try to access them, from one other Action class, then
> >suddenly,
> > > >they don't exist anymore.
> > > >
> > > >I used the piece of code, Mr Keith Bacon posted in reply of one of my
> > > >previous mail (
> > >
> >
> >http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html )
> > > >
> > > >And that so, I saw that one time, my session contains all three form
> >beans
> > > >and another time my session contains only one form bean.
> > > >
> > > >Here's the code I use in my Action classes:
> > > >
> > > >> ParticipantDetailsForm partDetForm =
> > > >>   (ParticipantDetailsForm)
> > > >> request.getSession().getAttribute("participantdetailsform");
> > > >
> > > >(participantdetailsform is one of the 3 form beans I share in the
> >session)
> > > >
> > > >Could anyone give me pointers where I should look for ? Because, I'm
>sure
> > > >it's a stupid mistake but I can't find it :(
> > > >
> > > >Thanx in advance.
> > > >
> > > >Friendly Regards,
> > > >Slimane
> > > >
> > > >
> > > >--
> > > >To unsubscribe, e-mail:
> >
> > > >For additional commands, e-mail:
> >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> > > For additional commands, e-mail:
> >
> > >
> >
> >
> >--
> >To unsubscribe, e-mail:
>
> >For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>

Re[2]: Bean Form's Vector not updated!

2002-03-15 Thread Juan Pablo Villaverde


I use indexed property in all tags where applicable.. but the
collection objects are not updated..

dlc> Search the mail archives for indexed.

dlc> Dave




dlc> Juan Pablo Villaverde <[EMAIL PROTECTED]> on 03/15/2002
dlc> 08:47:25 AM

dlc> Please respond to "Struts Users Mailing List"
dlc>   <[EMAIL PROTECTED]>; Please respond to
dlc>   Juan Pablo Villaverde <[EMAIL PROTECTED]>

dlc> To:   "Struts Users Mailing List"
dlc>   <[EMAIL PROTECTED]>
dlc> cc:(bcc: David Hay/Lex/Lexmark)
dlc> Subject:  Bean Form's  Vector  not updated!




dlc>  I have bean form with some String fields and a Vector Field. This
dlc> vector contains a collection of Customer objects. Each Customer object
dlc> have some String and int fields.
dlc>  My .jsp renders  for the bean form's String fields and
dlc> uses iterate to render  representing Customer's fields.
dlc> When I post the jsp's form, my action class receives the String fields
dlc> of my bean form updated, acordingly the changes I made in my page. BUT,
dlc> the changes made to the Customer's fields are NOT reflected in the
dlc> objects contained in the Vector! Is it normal? What can I do to get
dlc> all the bean forms contents updated on post? I need to update each
dlc> object in a Vector manually after each post using
dlc> request.getParameter()? Thanks in advance.


dlc> --
dlc> Juan Pablo Villaverde
dlc> Tec. en Infraestructura de Redes
dlc> Soluciones Punto Com S.A.
dlc> http://www.spcom.com.ar



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








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




--
Juan Pablo Villaverde
Tec. en Infraestructura de Redes
Soluciones Punto Com S.A. 
http://www.spcom.com.ar



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




UML for Struts sample

2002-03-15 Thread K J

Does anyone have a UML diagram or a sample description
of the main Struts classes that need to be used,
extened, etc. for a very simple web application?

What's the "fastest" way to understand the framework?
I have the sample app running, but it's not very east
to follow if you're looking for a quick reference app.

Thanks!

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

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




RE: How do I change images (mouseover, mouseout) using the struts API

2002-03-15 Thread Witbeck, Shane

How about just including the link message with the image and just do the
rollover on the image?

Sincerely,

Shane Witbeck
Web Application Developer, Bank of America
904.987.1688

-Original Message-
From: Paul Idusogie [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 2:23 PM
To: [EMAIL PROTECTED]
Subject: How do I change images (mouseover, mouseout) using the struts
API
Importance: High


Can someone kindly provide guidance on how to implement this using the
taglibs available with struts?
 
I have the following code snippet
 




  
   
   


   

 

 
What I would like to do, is have the mouse over the logon text and have
the image change.
 
 
Thanks,
 
 
Paul Idusogie
[EMAIL PROTECTED]

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




RE: How to Pre-fill a formbean

2002-03-15 Thread Nekkalapudi, Viplava


  // Create a form with the name given in struts-config.xml  
  MainForm mainForm = new MainForm();
  mainForm.setProperty1(..);
  ...
 
  request.setAtribute("mainForm", mainForm);

  // **//
 
Struts Action Servlet creates mainForm just before displaying the main.jsp,
if it is not in the request/session.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 1:56 PM
To: [EMAIL PROTECTED]
Subject: RE: How to Pre-fill a formbean


Hi All,

And Thanks. So in my loginAction, I can create a reference to mainForm and
pre-populate it with defaults from the database.

Would someone be able to provide a snippet of code that I can use in
loginAction to create a reference to mainForm?

Thanks,
Phil


> -Original Message-
> From: Jay sissom [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 6:01 AM
> To: Struts Users Mailing List
> Subject: Re: How to Pre-fill a formbean
> 
> 
> You can do it this way, but I would use a Struts tag instead 
> of a jsp tag.  
> Instead of using jsp:useBean and jsp:getProperty, all you 
> need to do is
> 
> 
> 
> and that will write out the mfProperty to the JSP.
> 
> Jay
> 
> 
> On Thu, 14 Mar 2002, Joe Lee wrote:
> 
> > Phil,
> > 
> > Your loginAction should create and populate a mainForm
> > bean and then saves it in the request scope. In the
> > main.jsp, get a reference to this form by:
> >  > class="com.MainForm">
> > and the input fields on that jsp get the defaults from
> > this form bean. You have to use class (not type) so
> > that if you come from a differene route to main.jsp
> > rather than Login and the mainform bean may not be
> > there already, a new one will be created for u. Then
> > your jsp won't bombs and the input fields still get
> > blank defaults.
> > 
> > - Joe
> > 
> > RE: How to Pre-fill a formbean
> > 
> > 
> --
> --
> > 
> > From: HERSHKOWITZ,PHIL (A-Sonoma,ex1) 
> > Subject: RE: How to Pre-fill a formbean 
> > Date: Thu, 14 Mar 2002 18:14:30 -0800 
> > 
> > 
> --
> --
> > 
> > Hi,
> > 
> > >From the loginAction, I am calling the database to
> > retrieve default values
> > for some of the fields the use must fill out on
> > mainAction.jsp. The default
> > values depend on the user ID.
> > 
> > Phil
> > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Sports - live college hoops coverage
> > http://sports.yahoo.com/
> > 
> > --
> > To unsubscribe, e-mail:   

> For additional commands, e-mail:

> 


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Nested Tags and Validator...

2002-03-15 Thread Marcelo Caldas

Ok, First step solved (or almost)...

now I have a bunch of radio buttons and checkboxes indexed on my page...
My question is, can I use the Validator xml to validate required fields on my page? 
all my radio grouping should be selected before submiting the form... Does 
Validator.xml already understands the  tags?

Below is a snipet of my code, where there should be javascript to validate all my 
radio. I don't know how many items, tests or answers I'll end up with for a specific 
page...

Thanks again
Marcelo.





...






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




RE: How to Pre-fill a formbean

2002-03-15 Thread phil_hershkowitz

Hi All,

And Thanks. So in my loginAction, I can create a reference to mainForm and
pre-populate it with defaults from the database.

Would someone be able to provide a snippet of code that I can use in
loginAction to create a reference to mainForm?

Thanks,
Phil


> -Original Message-
> From: Jay sissom [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 6:01 AM
> To: Struts Users Mailing List
> Subject: Re: How to Pre-fill a formbean
> 
> 
> You can do it this way, but I would use a Struts tag instead 
> of a jsp tag.  
> Instead of using jsp:useBean and jsp:getProperty, all you 
> need to do is
> 
> 
> 
> and that will write out the mfProperty to the JSP.
> 
> Jay
> 
> 
> On Thu, 14 Mar 2002, Joe Lee wrote:
> 
> > Phil,
> > 
> > Your loginAction should create and populate a mainForm
> > bean and then saves it in the request scope. In the
> > main.jsp, get a reference to this form by:
> >  > class="com.MainForm">
> > and the input fields on that jsp get the defaults from
> > this form bean. You have to use class (not type) so
> > that if you come from a differene route to main.jsp
> > rather than Login and the mainform bean may not be
> > there already, a new one will be created for u. Then
> > your jsp won't bombs and the input fields still get
> > blank defaults.
> > 
> > - Joe
> > 
> > RE: How to Pre-fill a formbean
> > 
> > 
> --
> --
> > 
> > From: HERSHKOWITZ,PHIL (A-Sonoma,ex1) 
> > Subject: RE: How to Pre-fill a formbean 
> > Date: Thu, 14 Mar 2002 18:14:30 -0800 
> > 
> > 
> --
> --
> > 
> > Hi,
> > 
> > >From the loginAction, I am calling the database to
> > retrieve default values
> > for some of the fields the use must fill out on
> > mainAction.jsp. The default
> > values depend on the user ID.
> > 
> > Phil
> > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Sports - live college hoops coverage
> > http://sports.yahoo.com/
> > 
> > --
> > To unsubscribe, e-mail:   

> For additional commands, e-mail:

> 


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: How do I change images (mouseover, mouseout) using the struts API

2002-03-15 Thread Joseph Barefoot

Since this is client-side UI behavior, you will need a Javascript handler function to 
swap out the images...once you have it (the function), use the "onmouseover" attribute 
of the  tag to specify the function that should be called.  This is a 
pretty common piece of Javascript functionality, and you should have no problem 
finding an example on the web that can be tailored to your needs. 

The only way to do this without JavaScript is to refresh the whole page, and I'm 
pretty sure that's not what you want. :)

-Original Message-
From: Paul Idusogie [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 11:23 AM
To: [EMAIL PROTECTED]
Subject: How do I change images (mouseover, mouseout) using the struts
API
Importance: High


Can someone kindly provide guidance on how to implement this using the taglibs 
available with struts?
 
I have the following code snippet
 




  
   
   


   

 

 
What I would like to do, is have the mouse over the logon text and have the image 
change.
 
 
Thanks,
 
 
Paul Idusogie
[EMAIL PROTECTED]


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




Re: form bean roperties and ArrayLists

2002-03-15 Thread Kevin J. Turner

On Fri, 15 Mar 2002 13:35:03 -0600, Robert Williams wrote:

>Data coming from a browser that is used to populate a form bean is
>basically
>of type String or String[].  I think if you change the ArrayList to
>a string
>array you will have better luck.  I haven't tried this yet but it
>has a
>better chance of working than the ArrayList declaration.
>

Oddly enough, I was originally using String arrays but I decided to
change to ArrayList instead!  Anyways, I found the solution to my
troubles, from the www.keyboardmonkey.com/struts sample application
(StrutMonkey.war, specifically in MonkeyTeamBean.java).

Here's what I did, in case anyone is interested. Quite a simple
solution actually.. I only had to change the getter and setter
methods:

-- snip--

public void setRecipients(Object[] newRecipients) {
recipients = new ArrayList();
for(int x=0; x < newRecipients.length; x++) {
recipients.add(newRecipients[x]);
}
}

public Object[] getRecipients() {
return this.recipients.toArray();
}

-- snip--




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




Re: Help about iterate tag using

2002-03-15 Thread dhay



user the options (note the S) tag

Dave





Struts Newsgroup (@Basebeans.com) 

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Help about iterate tag using



Subject: Help about iterate tag using
From: "PitBull" <[EMAIL PROTECTED]>
 ===
Hi,

i'ld like to do something like: for(j=1; j<=31; j++) in the HTML
select/option
tags using the struts tag. In the options tag I have to put value from 1 to
31.

E.s.: 
<% for(j=1; j<=31; j++){%>
<%= j %>
<%}%>


Can anyone help me giving to me some suggestion?
Thanx

PitB




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








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




Re: form bean roperties and ArrayLists

2002-03-15 Thread Robert Williams

Data coming from a browser that is used to populate a form bean is basically
of type String or String[].  I think if you change the ArrayList to a string
array you will have better luck.  I haven't tried this yet but it has a
better chance of working than the ArrayList declaration.

- Original Message -
From: "Kevin J. Turner" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 12:16 PM
Subject: form bean roperties and ArrayLists


Can form bean properties be of type ArrayList?

And if yes, are there any special considerations when doing so, with
regards to the getter and setter methods?

I am using an ArrayList in a form bean as follows:

--- snip ---
...
private ArrayList recipients;
...
(in the constructor)
recipients = new ArrayList();
...

public void setRecipients(ArrayList recipients) {
  this.recipients = recipients;
}

public ArrayList getRecipients() {
  return this.recipients;
}

--- snip ---

I am getting the following error:

exception
javax.servlet.ServletException: BeanUtils.populate
...
root cause
java.lang.IllegalArgumentException: argument type mismatch

. and I suspect it has something to do with the ArrayList usage.


--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




Holding on to request data

2002-03-15 Thread Bryan P. Glennon

Hi -

I need to keep a request around during a page display. What I am doing
goes like this:

- User clicks on a button
- Request gets passed to various struts Action classes where
various things happen
- Request then gets passed to a jsp page. This jsp page is a
frameset containing two frames. The 
second frame needs to refresh itself (I do this with a meta tag). This
is basically an "action in progress" 
stage, where a status message is displayed in the lower frame. Once the
action is done, the message 
gets replaced with actual data, and the auto refreshes stop.

Problem is, once control goes back to the browser to display the jsp,
the request is lost. Unfortunately,
it contains data that needs to be passed  back for the refresh action.
Right now I am pulling out the 
individual parameters and attributes and building the URL for the
refresh with them. This is ugly, 
since every time info is added to the request, it has to be manually
added to the refresh URL. Is 
there an easy way to have the jsp page just pass the original request on
to the refresh URL?

I don't want to put the request info in session scope, since it is not
really session information. 

One limitation - I can't use JavaScript here. One of the project
requirements is no client-side code.

Thanks,
Bryan

--
Bryan Glennon (mailto:[EMAIL PROTECTED])
BPG Consulting, Inc. (http://www.bpgc.com)
Tech Question? (mailto:[EMAIL PROTECTED])

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




Re: Bean Form's Vector not updated!

2002-03-15 Thread dhay



Search the mail archives for indexed.

Dave




Juan Pablo Villaverde <[EMAIL PROTECTED]> on 03/15/2002
08:47:25 AM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>; Please respond to
  Juan Pablo Villaverde <[EMAIL PROTECTED]>

To:   "Struts Users Mailing List"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Bean Form's  Vector  not updated!




 I have bean form with some String fields and a Vector Field. This
vector contains a collection of Customer objects. Each Customer object
have some String and int fields.
 My .jsp renders  for the bean form's String fields and
uses iterate to render  representing Customer's fields.
When I post the jsp's form, my action class receives the String fields
of my bean form updated, acordingly the changes I made in my page. BUT,
the changes made to the Customer's fields are NOT reflected in the
objects contained in the Vector! Is it normal? What can I do to get
all the bean forms contents updated on post? I need to update each
object in a Vector manually after each post using
request.getParameter()? Thanks in advance.


--
Juan Pablo Villaverde
Tec. en Infraestructura de Redes
Soluciones Punto Com S.A.
http://www.spcom.com.ar



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








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




RE: Is there a quick resource for learning nested tags?

2002-03-15 Thread Jin, Ying

Check out http://www.keyboardmonkey.com/struts/index.html. 

Thanks.
Ying

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 12:27 PM
To: Struts Users Mailing List
Subject: Is there a quick resource for learning nested tags?



I'm starting to get burned by using  more than once in my
same JSP page.It's screwing up the results and I am getting some
bizzare server-side JSP exceptions.I think only nested tags will solve
this...I have downloaded/installed the new nightly build for struts and
modified my web.xml to know about the nested taglibary. The
documentation for nested tags on the struts web-site does not help me much.
Is there a web-site/web-application that has an example of how to setup
nested tags for iteration and beans?

thanks,
Theron


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Is there a quick resource for learning nested tags?

2002-03-15 Thread theron . kousek


I'm starting to get burned by using  more than once in my
same JSP page.It's screwing up the results and I am getting some
bizzare server-side JSP exceptions.I think only nested tags will solve
this...I have downloaded/installed the new nightly build for struts and
modified my web.xml to know about the nested taglibary. The
documentation for nested tags on the struts web-site does not help me much.
Is there a web-site/web-application that has an example of how to setup
nested tags for iteration and beans?

thanks,
Theron


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




form bean roperties and ArrayLists

2002-03-15 Thread Kevin J. Turner

Can form bean properties be of type ArrayList?

And if yes, are there any special considerations when doing so, with
regards to the getter and setter methods?

I am using an ArrayList in a form bean as follows:

--- snip ---
...
private ArrayList recipients;
...
(in the constructor)
recipients = new ArrayList();
...

public void setRecipients(ArrayList recipients) {
  this.recipients = recipients;
}

public ArrayList getRecipients() {
  return this.recipients;
}

--- snip ---

I am getting the following error:

exception
javax.servlet.ServletException: BeanUtils.populate
...
root cause
java.lang.IllegalArgumentException: argument type mismatch

. and I suspect it has something to do with the ArrayList usage.


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




RE: problem with bean having session scope

2002-03-15 Thread Joseph Barefoot

> > I suppose the form bean is created the first time I use a jsp:useBean
tag
> > in my jsp file, isn't it ?
> >
> > (for example:  > class="be.stluc.info.struts.SearchByDateForm"/>)

Actually, the creation of the ActionForm bean is handled by the Struts
framework itself (I guess by the controller servlet?).  That's how forms can
be populated "automatically" via the Struts taglibs and then passed to the
Action class associated with this particular ActionForm class.

This is just a shot in the dark...but perhaps the explicit creation you are
specifying by the  tag is screwing up Strut's management of the
ActionForm bean?  In any case, you don't need to use the  tag
at all for ActionForm beans, as Struts takes care of instantiating,
read/writes, and scope management for these beans.


--joe

-Original Message-
From: Slimane Zouggari [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 9:15 AM
To: Struts Users Mailing List
Subject: Re: problem with bean having session scope


Thanx, I supposed it was something like that :)
The thing is, I still don't understand why my beans aren't shared among all
of my action classes :(

Friendly Regards,
Slimane

At 12:05 15/03/2002 -0500, you wrote:
>AFAIK, a session bean is destroyed when the session expires (30 min by
>default).
>
>Otavio
>
>- Original Message -
>From: "Slimane Zouggari" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Friday, March 15, 2002 12:02 PM
>Subject: Re: problem with bean having session scope
>
>
> > well as nobody seems to have a clue about my problem. I'll ask my
question
> > differently :)
> >
> > When is a session bean destroyed ?
> > If I specify, a form bean to have a session scope (as I did in the
> > struts-config.xml), when will it be destroyed ?
> >
> > I suppose the form bean is created the first time I use a jsp:useBean
tag
> > in my jsp file, isn't it ?
> >
> > (for example:  > class="be.stluc.info.struts.SearchByDateForm"/>)
> >
> > Finally, what could be the reasons, that some of my Action classes see
>(can
> > use their values) some session beans, while others don't ?
> >
> > Thanx for having taken the time to read me :)
> >
> > Friendly Regards,
> > Slimane
> >
> > At 12:11 15/03/2002 +0100, you wrote:
> > >Hi,
> > >
> > >I have 3 form beans. Each of them have a session scope defined in the
> > >struts-config.xml.
> > >
> > >Here's the config for one of them:
> > >>  > >> type="be.stluc.info.struts.PieChartAction"
> > >> name="piechartform"
> > >> scope="session">
> > >
> > >When I try to access them in one of my Action class, I don't have any
>problem.
> > >But when I try to access them, from one other Action class, then
>suddenly,
> > >they don't exist anymore.
> > >
> > >I used the piece of code, Mr Keith Bacon posted in reply of one of my
> > >previous mail (
> >
>
>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html )
> > >
> > >And that so, I saw that one time, my session contains all three form
>beans
> > >and another time my session contains only one form bean.
> > >
> > >Here's the code I use in my Action classes:
> > >
> > >> ParticipantDetailsForm partDetForm =
> > >>   (ParticipantDetailsForm)
> > >> request.getSession().getAttribute("participantdetailsform");
> > >
> > >(participantdetailsform is one of the 3 form beans I share in the
>session)
> > >
> > >Could anyone give me pointers where I should look for ? Because, I'm
sure
> > >it's a stupid mistake but I can't find it :(
> > >
> > >Thanx in advance.
> > >
> > >Friendly Regards,
> > >Slimane
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
>
> > >For additional commands, e-mail:
>
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
>
>
>--
>To unsubscribe, e-mail:

>For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: nested:iterate, indexed formvar names, and modifying their properties via javascript after the page is rendered.

2002-03-15 Thread liquid

Hi!

I had a similar problem, but I am still using struts 1.0.2 release build so
I have no access to the nested tags - still, I think, I found a solution:







 



Maybe this is not the struts way of doing, but I at least it works...

cheers,

gernot.

> Subject: nested:iterate, indexed formvar names, and modifying their 
properties via
javascript after the page is rendered.
> From: "Jeff" <[EMAIL PROTECTED]>
>  ===
> I'm rendering multiple rows of two checkboxes (among other things) within a
> nested:iterate block, as follows:
> 
> 
> 
>onchange="enableAccepted(this)"/>
>   
> 
> 
> 
> and getting the following rendered output:
> 
> 
>  onchange="enableAccepted(this)">
> 
> 
>  and so on
> 
> The goal: each row has two checkboxes. The second checkbox is "disabled"
> unless the first checkbox is "checked".
> 
> The original plan: call the function using (this) as a parameter, determine
> the name of the form element that called the function using this.name, use
> it to derive the name of the row's second checkbox, then set the second
> checkbox's "disabled" property to "false".
> 
> PROBLEM -- the only way I know of to alter the properties of a form element
> identified by a string is to attach an "id" to the element and reference it
> using document.all[variable_whose_value_is_the_id_of_the_element], as in,
> 
> document.all[elementId].disabled=false
> where "elementId" is a variable whose value is the id of the element whose
> property we want to set.
> 
> Except there doesn't seem to be any way to attach an "id" property to a
> nested:checkbox tag... and DEFINITELY not a way to give it an id whose value
> incorporates all the indexId values that are part of the current chain of
> nested:iterate blocks (say, if it were buried 3 levels deep and would have a
> corresponding name of "first[3]second[6]current[9].propertyName").
> 
> BIGGER problem -- I'm not sure whether this affects references by variable
> value rather than explicit name, but supposing for a moment the second
> checkbox ends up getting named "list[0].accepted", attempting to refer to it
> directly by name within a javascript function as an experiment fails,
> because the [x] part of the name gets interpreted by Javascript as an array
> rather than as part of the name:
> 
> // crash and burn, because Javascript thinks we're referring to an array
> named "list"
> list[0].accepted.disabled = false;
> 
> Any suggestions on using nested:iterate, nested:checkbox, and the various
> parameters available to come up with some scheme that will let me derive the
> name of the row's other checkbox and access its "disabled" property?
> 



-
Kabelsignal AGWebmail
http://www.kabelsignal.at



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




Re: problem with bean having session scope

2002-03-15 Thread Slimane Zouggari

Thanx, I supposed it was something like that :)
The thing is, I still don't understand why my beans aren't shared among all 
of my action classes :(

Friendly Regards,
Slimane

At 12:05 15/03/2002 -0500, you wrote:
>AFAIK, a session bean is destroyed when the session expires (30 min by
>default).
>
>Otavio
>
>- Original Message -
>From: "Slimane Zouggari" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Friday, March 15, 2002 12:02 PM
>Subject: Re: problem with bean having session scope
>
>
> > well as nobody seems to have a clue about my problem. I'll ask my question
> > differently :)
> >
> > When is a session bean destroyed ?
> > If I specify, a form bean to have a session scope (as I did in the
> > struts-config.xml), when will it be destroyed ?
> >
> > I suppose the form bean is created the first time I use a jsp:useBean tag
> > in my jsp file, isn't it ?
> >
> > (for example:  > class="be.stluc.info.struts.SearchByDateForm"/>)
> >
> > Finally, what could be the reasons, that some of my Action classes see
>(can
> > use their values) some session beans, while others don't ?
> >
> > Thanx for having taken the time to read me :)
> >
> > Friendly Regards,
> > Slimane
> >
> > At 12:11 15/03/2002 +0100, you wrote:
> > >Hi,
> > >
> > >I have 3 form beans. Each of them have a session scope defined in the
> > >struts-config.xml.
> > >
> > >Here's the config for one of them:
> > >>  > >> type="be.stluc.info.struts.PieChartAction"
> > >> name="piechartform"
> > >> scope="session">
> > >
> > >When I try to access them in one of my Action class, I don't have any
>problem.
> > >But when I try to access them, from one other Action class, then
>suddenly,
> > >they don't exist anymore.
> > >
> > >I used the piece of code, Mr Keith Bacon posted in reply of one of my
> > >previous mail (
> >
> >http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html )
> > >
> > >And that so, I saw that one time, my session contains all three form
>beans
> > >and another time my session contains only one form bean.
> > >
> > >Here's the code I use in my Action classes:
> > >
> > >> ParticipantDetailsForm partDetForm =
> > >>   (ParticipantDetailsForm)
> > >> request.getSession().getAttribute("participantdetailsform");
> > >
> > >(participantdetailsform is one of the 3 form beans I share in the
>session)
> > >
> > >Could anyone give me pointers where I should look for ? Because, I'm sure
> > >it's a stupid mistake but I can't find it :(
> > >
> > >Thanx in advance.
> > >
> > >Friendly Regards,
> > >Slimane
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
>
> > >For additional commands, e-mail:
>
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


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




Re: problem with bean having session scope

2002-03-15 Thread Otavio C. Decio

AFAIK, a session bean is destroyed when the session expires (30 min by
default).

Otavio

- Original Message -
From: "Slimane Zouggari" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 12:02 PM
Subject: Re: problem with bean having session scope


> well as nobody seems to have a clue about my problem. I'll ask my question
> differently :)
>
> When is a session bean destroyed ?
> If I specify, a form bean to have a session scope (as I did in the
> struts-config.xml), when will it be destroyed ?
>
> I suppose the form bean is created the first time I use a jsp:useBean tag
> in my jsp file, isn't it ?
>
> (for example:  class="be.stluc.info.struts.SearchByDateForm"/>)
>
> Finally, what could be the reasons, that some of my Action classes see
(can
> use their values) some session beans, while others don't ?
>
> Thanx for having taken the time to read me :)
>
> Friendly Regards,
> Slimane
>
> At 12:11 15/03/2002 +0100, you wrote:
> >Hi,
> >
> >I have 3 form beans. Each of them have a session scope defined in the
> >struts-config.xml.
> >
> >Here's the config for one of them:
> >>  >> type="be.stluc.info.struts.PieChartAction"
> >> name="piechartform"
> >> scope="session">
> >
> >When I try to access them in one of my Action class, I don't have any
problem.
> >But when I try to access them, from one other Action class, then
suddenly,
> >they don't exist anymore.
> >
> >I used the piece of code, Mr Keith Bacon posted in reply of one of my
> >previous mail (
>
>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html )
> >
> >And that so, I saw that one time, my session contains all three form
beans
> >and another time my session contains only one form bean.
> >
> >Here's the code I use in my Action classes:
> >
> >> ParticipantDetailsForm partDetForm =
> >>   (ParticipantDetailsForm)
> >> request.getSession().getAttribute("participantdetailsform");
> >
> >(participantdetailsform is one of the 3 form beans I share in the
session)
> >
> >Could anyone give me pointers where I should look for ? Because, I'm sure
> >it's a stupid mistake but I can't find it :(
> >
> >Thanx in advance.
> >
> >Friendly Regards,
> >Slimane
> >
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

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

> For additional commands, e-mail:

>


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




Re: problem with bean having session scope

2002-03-15 Thread Slimane Zouggari

well as nobody seems to have a clue about my problem. I'll ask my question 
differently :)

When is a session bean destroyed ?
If I specify, a form bean to have a session scope (as I did in the 
struts-config.xml), when will it be destroyed ?

I suppose the form bean is created the first time I use a jsp:useBean tag 
in my jsp file, isn't it ?

(for example: )

Finally, what could be the reasons, that some of my Action classes see (can 
use their values) some session beans, while others don't ?

Thanx for having taken the time to read me :)

Friendly Regards,
Slimane

At 12:11 15/03/2002 +0100, you wrote:
>Hi,
>
>I have 3 form beans. Each of them have a session scope defined in the 
>struts-config.xml.
>
>Here's the config for one of them:
>> > type="be.stluc.info.struts.PieChartAction"
>> name="piechartform"
>> scope="session">
>
>When I try to access them in one of my Action class, I don't have any problem.
>But when I try to access them, from one other Action class, then suddenly, 
>they don't exist anymore.
>
>I used the piece of code, Mr Keith Bacon posted in reply of one of my 
>previous mail ( 
>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html )
>
>And that so, I saw that one time, my session contains all three form beans 
>and another time my session contains only one form bean.
>
>Here's the code I use in my Action classes:
>
>> ParticipantDetailsForm partDetForm =
>>   (ParticipantDetailsForm) 
>> request.getSession().getAttribute("participantdetailsform");
>
>(participantdetailsform is one of the 3 form beans I share in the session)
>
>Could anyone give me pointers where I should look for ? Because, I'm sure 
>it's a stupid mistake but I can't find it :(
>
>Thanx in advance.
>
>Friendly Regards,
>Slimane
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


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




Groups of radio buttons

2002-03-15 Thread lindsay . hamoudi

Hi,

I noticed that this particular feature is on the Struts Project Wish-List,
but I really need it now!!  Well not really.  I could revert back to my ugly
scriptlets.

But anyway, the problem is - I have an array of Strings (each representing a
color - e.g. #33FFCC) and I'd like to present them in a table of radio
buttons, so that the user can choose a color to represent something.

I have begun by logic:iterating over the array.  I'd like the value of each
radio button to be the color (i.e. the current String from the array).  

It seems that there is no obvious support for something like this within the
current API, so I'm just wondering if anyone has found a way!

Cheers,

Lindsay

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




Re: Populating a FormBean's underlying value object

2002-03-15 Thread John M. Corro

If I understand what you're saying, (using the previous Automobile example)
you would have something like

// THE ORIGINAL VALUE CLASS
public class Automobile
{
private CarType carType = null;
public CarType getCarType(){ return carType; }
public void setCarType(CarType ct){carType = ct; }
}

// THE WRAPPER CLASS
public class AutomobileWrapper
{
private Automobile auto = new AutoMobile();
public String getCarType(){ return ; }
public void setCarType(String str){ auto.setCarType(); }
}

and then have the AutomobileWrapper class inside the ActionForm.  Is this
correct?  That's certainly one option I was considering too, but we're
looking to retrofit a current app to use Struts and theres hundreds of
classes like the Automobile classthus we'd have to write Wrapper classes
for most/all of those classes.  Unless we absolutely have to, we'd prefer
avoiding that solution.  I was originally hoping for something along the
lines of extending the BeanUtils class to accommodate additional data types,
but in a way that we don't have to alter the original source code to make
use of the extended BeanUtils class.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 9:41 AM
Subject: RE: Populating a FormBean's underlying value object


> the servlet spec only provides Strings for received parameters, so you
> need to be able to convert from this. I use adapters to get this type
> oof conversion via struts. I wrap the real bean inside, and the
> population of the underlying bean is handled by the wrapper ( it's
> actually just parsing a double out, but with special formatting
> requirements ) this also means I can populate a business bean, that's
> not an ActionForm and get web specific formatting / error handling.
>
> I'd actually like to get struts to pass in the request to the
> population call -- which would obviously make BeanUtils population a
> bit more web specific (by allowing more syntax in the property field to
> pass well known objects), but would allow my wrapper to be completely
> stateless.
>
> -Original Message-
> From: john.corro
> Sent: 15 March 2002 15:13
> To: struts-user
> Cc: john.corro
> Subject: Populating a FormBean's underlying value object
>
>
> I have a situation where I want to have an ActionForm (let's say
> AutomobileForm) w/ only 1 variable (Automobile).  If the Automobile
> class's get/set parameters were  all run of the mill types (String,
> int, boolean, etc), I would normally just have a method called
> 'getAutomobileObject()' inside the ActionForm.  Then from the JSP page
> I would just have something like ' property="automobileObject.carType"/>' and then the Automobile object
> within the AutomobileForm would automatically be populated (I believe
> via the BeanUtils.populate() method).
>
> Now the problem I'm having is the get/set parameters of Automobile are
> not run of the mill data types, but rather very specialized custom
> classes.  I saw from the Struts Javadocs that once you start running
> into anything specialized, you're going to have to implement a
> specialized means to provide for automatic bean population.  From what
> I can see, I'd have to change the code within the BeanUtils.populate()
> method to do this.I'd rather not since it makes upgrading to newer
> versions of Struts more complicated.  I'd rather create something that
> sits on top of Struts, rather than having to mutate the currently used
> version.  Moreover, I saw that BeanUtils/PropertyUtils/etc are all
> deprecated in favor of the Jakarta Commons BeanUtils package.
>
> Does anyone know of a way I can provide for this automatic type
> conversion via something that sits on top of Struts (vs. just changing
> the Struts source code)?
>
>
> Visit our website at http://www.ubswarburg.com
>
> This message contains confidential information and is intended only
> for the individual named.  If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail.  Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
>
> E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed,
> arrive late or incomplete, or contain viruses.  The sender therefore
> does not accept liability for any errors or omissions in the contents
> of this message which arise as a result of e-mail transmission.  If
> verification is required please request a hard-copy version.  This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities or
> related financial instruments.
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional

PLEASE don't crosspost to Struts and Struts-Dev

2002-03-15 Thread @Basebeans.com

Subject: PLEASE don't crosspost to Struts and Struts-Dev
From: "Jeff" <[EMAIL PROTECTED]>
 ===
Over the past few days, a few messages have been crossposted to both
"Struts" and "Struts-Dev". The focus of Struts-Dev is quite specific and
narrow, and virtually NO message genuinely falls with the scope of both
groups.

"Struts-Dev" is for discussions related to the development OF Struts.

"Struts" is for discussions related to development WITH Struts.

There's only one word different between the two, but that one word ("of" vs
"with") makes all the difference. ERYONE who reads "Struts-Dev" reads
"Struts" too. Cross-posting to both groups will certainly get somebody's
attention faster... but not necessarily in a good way.


Sample on-topic message suitables for Struts-Dev --

"What version of commons-digester.jar is needed to build the 1_1beta tagged
release?"

"Suggested enhancement -- enable (X) to do (Y) with (A) and (B) as
parameters"

"I checked out the 1_1beta tagged release from CVS into a new Forte
project... now what?"


On the other hand, any message that can be broadly summarized as, "How do I
do (something) with Struts" belongs in "Struts", not "Struts-Dev".


Being able to both read AND post to Struts-Dev without having to endure
mailing list grief is a wonderful privilege. PLEASE don't abuse it and cause
it to be taken away.



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




Re: Timestamp

2002-03-15 Thread Otavio C. Decio

For this to work you must have a property of type Timestamp in your Form
bean, for example dt_changed and access it normally either through



if you are displaying or

" />

if you want to create an edit box (you might not even need to use the
"value" clause, the html:text element should probably get it with the right
format but I didn't try). Probably other people in this list can confirm or
deny that. You can see how this is done looking into the bean.WriteTag
source code.

Ate',

Otavio


- Original Message -
From: "Fábio Queiroz Barbosa" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 10:55 AM
Subject: Re: Timestamp


> How to associate? You have a example?
>
> - Original Message -
> From: "Otavio C. Decio" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, March 15, 2002 11:41 AM
> Subject: Re: Timestamp
>
>
> > You should download the latest nightly Struts build and use
> >
> > org.apache.struts.taglib.bean.format.sql.timestamp="dd/MM/"
> >
> > in your ApplicationResource.properties file.
> >
> > Abracos,
> >
> > Otavio
> >
> >
> >
> > - Original Message -
> > From: "Fábio Queiroz Barbosa" <[EMAIL PROTECTED]>
> > To: "Struts User" <[EMAIL PROTECTED]>
> > Sent: Friday, March 15, 2002 9:20 AM
> > Subject: Timestamp
> >
> >
> > How to format a Timestamp value for print dd/MM/ using  ?
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




Re: Help about iterate tag using

2002-03-15 Thread Steve Wilkinson

Check out the JSP™ Standard Tag Library (JSTL)

http://jakarta.apache.org/taglibs/doc/standard-doc/standard-beta1/Overview.html


The convention is to use the name "var" for any tag attribute that exports information 
about the tag. For example, an iterator tag exposes the current item of the collection 
it is iterating over in the following way:
  
...
  


Hope that helps.
Steve
- Original Message -
From: Struts Newsgroup
Sent: Friday, March 15, 2002 8:42 AM
To: [EMAIL PROTECTED]
Subject: Help about iterate tag using

Subject: Help about iterate tag using
From: "PitBull" <[EMAIL PROTECTED]>
===
Hi,

i'ld like to do something like: for(j=1; j<=31; j++) in the HTML
select/option
tags using the struts tag. In the options tag I have to put value from 1 to
31.

E.s.: 
<% for(j=1; j<=31; j++){%>
<%= j %>
<%}%>


Can anyone help me giving to me some suggestion?
Thanx

PitB




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



Re: Timestamp

2002-03-15 Thread Fábio Queiroz Barbosa

How to associate? You have a example?

- Original Message -
From: "Otavio C. Decio" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 11:41 AM
Subject: Re: Timestamp


> You should download the latest nightly Struts build and use
>
> org.apache.struts.taglib.bean.format.sql.timestamp="dd/MM/"
>
> in your ApplicationResource.properties file.
>
> Abracos,
>
> Otavio
>
>
>
> - Original Message -
> From: "Fábio Queiroz Barbosa" <[EMAIL PROTECTED]>
> To: "Struts User" <[EMAIL PROTECTED]>
> Sent: Friday, March 15, 2002 9:20 AM
> Subject: Timestamp
>
>
> How to format a Timestamp value for print dd/MM/ using  ?



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




Re: nested:iterate - set method not called

2002-03-15 Thread Elijah Jacobs

Thanks for the reply Arron, ... well appreciated.

but I noticed in your example that the MonkeyBean contains an ArrayList of
monkeys  (ArrayList monkeyList) and you have both a setter and a getter
method for it.  I was trying to duplicate this on my form bean.  My
ArrayList is contained in the FormBean itself. That's why I was expecting
the setter method in the formbean to be called.

Also, is it necessary for the beans contained in my ArrayList to a reference
to the form, much like you have a reference to the BananasIncorporatedBean
from the MonkeyTeamBean.

I apologize if these are simple question, I've struggle with this for 2 days
now and the project deadline is not budging.

- ej

- Original Message -
From: "Arron Bates" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, March 10, 2002 8:04 PM
Subject: Re: nested:iterate - set method not called


> The getter will only ever be called, as it's the middle-man.
> The system only wants to set the "name" property on the nested bean. It
> will call the getter of the "extrainfo" object to get at the nested
> bean, and then set its property. Never actually calling the setter of
> the parent bean property.
>
> Arron.
>
>
> Elijah Jacobs wrote:
>
> >thanks for the reply, Scott
> >
> >
> >My syntax looks okay on the jsp side and since the getExtrainfo method is
> >being called it puzzles me that the set method is not being called on
> >submit.
> >
> >  
> >
> >
> >- ej
> >- Original Message -
> >From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >Sent: Sunday, March 10, 2002 7:03 PM
> >Subject: RE: nested:iterate - set method not called
> >
> >
> >>Could it be that the html field in your jsp is named 'extraInfo'
> >>
> >(uppercase
> >
> >>'i'), and the setter is using a lowercase 'i' in the word info?
> >>
> >>Scott
> >>
> >>>-Original Message-
> >>>From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
> >>>Sent: Monday, March 11, 2002 10:27 AM
> >>>To: Struts Users Mailing List
> >>>Subject: nested:iterate -  set method not called
> >>>
> >>>Hi,
> >>>
> >>>I am able to list the elements on  my Vector just fine, but I noticed
> >>>
> >that
> >
> >>>when I do a submit the set method is not being called, hence the field
> >>>
> >is
> >
> >>>empty when it gets to the action class.
> >>>
> >>>Can someone suggest to me what the problem might be? my code is below.
> >>>
> >>>thanks,
> >>>- ej
> >>>
> >>>*** code 
> >>>public Vector extrainfo;
> >>>
> >>>// call successfully
> >>>public Object[] getExtrainfo() {...}
> >>>
> >>>//Not being called on submit
> >>> public void setExtrainfo(Object[] infoList) {...}
> >>>
> >>>*** code 
> >>>
> >>>
> >>>--
> >>>To unsubscribe, e-mail:
> >>>
> >>>For additional commands, e-mail:
> >>>
> >>>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >
> >
> >>For additional commands, e-mail:
> >>
> >
> >
> >>
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

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

> For additional commands, e-mail:

>
>

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




Re: bean define problems

2002-03-15 Thread Steve Wilkinson

I believe the bean is not available at the scripting level.  Read the Bean Tag 
developers guide: 
http://jakarta.apache.org/struts/api/org/apache/struts/taglib/bean/package-summary.html#package_description

My advice is to use a scriptlet to get the bean.
<%
FooBar fooBar = pageContext.getAttribute("fooBar");
%>

Then your code should work.

Steve
- Original Message -
From: Miriam Aguirre
Sent: Thursday, March 14, 2002 3:45 PM
To: '[EMAIL PROTECTED]'
Subject: bean define problems



Ok, after spending over a day on what seems to be a trivial task, I finally
have to ask!
bean define is not "defining" variables in the page scope the way i thought
it should

i have this in my jsp :



then somewhere further along :

<%=fooBar.getColumnDisplayName(columnName)%>

I get this error :
[14/Mar/2002 11:27:24:5] error: Exception: SERVLET-compile_failed: Failed
in compiling template: /NASApp/webapp/reportTemplate.jsp, javac error:
c:\iplanet\ias6\ias\APPS\modules\webapp\WEB-INF\compiled_jsp\jsp\APPS\webapp
\reportTemplate.java:480: Undefined variable or class name: fooBar
  out.print(fooBar.getColumnDisplayName(columnName));


ReportActionForm is the type of ActionForm i use for the jsp :




  



I also tried adding 'toScope="page"' and that seems to make struts barf
[basically the java file is never completely generated from the jsp]:

2002-03-14 11:49:29 - ERROR-the file '\reportTemplate.jsp' generated the
following general exception: java.lang.NullPointerException
[14/Mar/2002 11:49:30:5] error: Exception: SERVLET-compile_failed: Failed in
compiling template: /NASApp/webapp/reportTemplate.jsp, javac error:
c:\iplanet\ias6\ias\APPS\modules\webapp\WEB-INF\compiled_jsp\jsp\APPS\webapp
\reportTemplate.java:270: Invalid expression statement.
org.apache.stru
  ^
c:\iplanet\ias6\ias\APPS\modules\webapp\WEB-INF\compiled_jsp\jsp\APPS\webapp
\reportTemplate.java:270: ';' expected.
org.apache.stru
   ^
c:\iplanet\ias6\ias\APPS\modules\webapp\WEB-INF\compiled_jsp\jsp\APPS\webapp
\reportTemplate.java:270: '}' expected.
org.apache.stru
   ^
3 errors


by the way, i'm using iplanet & struts 1.0.2 . What the hell is my
problem??

Thanks.
-Miriam

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



RE: Populating a FormBean's underlying value object

2002-03-15 Thread Ken . Horn

the servlet spec only provides Strings for received parameters, so you 
need to be able to convert from this. I use adapters to get this type 
oof conversion via struts. I wrap the real bean inside, and the 
population of the underlying bean is handled by the wrapper ( it's 
actually just parsing a double out, but with special formatting 
requirements ) this also means I can populate a business bean, that's 
not an ActionForm and get web specific formatting / error handling.

I'd actually like to get struts to pass in the request to the 
population call -- which would obviously make BeanUtils population a 
bit more web specific (by allowing more syntax in the property field to 
pass well known objects), but would allow my wrapper to be completely 
stateless. 

-Original Message-
From: john.corro 
Sent: 15 March 2002 15:13
To: struts-user
Cc: john.corro
Subject: Populating a FormBean's underlying value object


I have a situation where I want to have an ActionForm (let's say 
AutomobileForm) w/ only 1 variable (Automobile).  If the Automobile 
class's get/set parameters were  all run of the mill types (String, 
int, boolean, etc), I would normally just have a method called 
'getAutomobileObject()' inside the ActionForm.  Then from the JSP page 
I would just have something like '' and then the Automobile object 
within the AutomobileForm would automatically be populated (I believe 
via the BeanUtils.populate() method).

Now the problem I'm having is the get/set parameters of Automobile are 
not run of the mill data types, but rather very specialized custom 
classes.  I saw from the Struts Javadocs that once you start running 
into anything specialized, you're going to have to implement a 
specialized means to provide for automatic bean population.  From what 
I can see, I'd have to change the code within the BeanUtils.populate() 
method to do this.I'd rather not since it makes upgrading to newer 
versions of Struts more complicated.  I'd rather create something that 
sits on top of Struts, rather than having to mutate the currently used 
version.  Moreover, I saw that BeanUtils/PropertyUtils/etc are all 
deprecated in favor of the Jakarta Commons BeanUtils package.

Does anyone know of a way I can provide for this automatic type 
conversion via something that sits on top of Struts (vs. just changing 
the Struts source code)?


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


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




Help about iterate tag using

2002-03-15 Thread @Basebeans.com

Subject: Help about iterate tag using
From: "PitBull" <[EMAIL PROTECTED]>
 ===
Hi,

i'ld like to do something like: for(j=1; j<=31; j++) in the HTML
select/option
tags using the struts tag. In the options tag I have to put value from 1 to
31.

E.s.: 
<% for(j=1; j<=31; j++){%>
<%= j %>
<%}%>


Can anyone help me giving to me some suggestion?
Thanx

PitB




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




Tranforming Collection to a Map

2002-03-15 Thread @Basebeans.com

Subject: Tranforming Collection to a Map
From: "Lance" <[EMAIL PROTECTED]>
 ===
Is there a method somewhere hidden in the commons package for doing this.  I
see the CollectionUtils.getCardinalityMap(Collection col) method, but it's
not what I'm really looking for.  I wanna do something like this:

Collection roles = new ArrayList();
//populate list
Transformer tranformer = new RoleMapTransformer();

Map map = CollectionUtils.getMap(roles, transformer);

//My Transform class
class RoleMapTransformer implements
org.apache.commons.collections.Transformer
{
public Object transform(Object obj)
{
 RoleData role = (RoleData)obj;

 return new DefaultMapEntry(role.getRoleID(), role.getName());
}
 }

Maybe org.apache.commons.collections.BeanMap does this.  There's just not
enough info in javadocs

Using Struts nightly build

Thanks in Advance...

--
Lance



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




Populating a FormBean's underlying value object

2002-03-15 Thread John M. Corro

I have a situation where I want to have an ActionForm (let's say AutomobileForm) w/ 
only 1 variable (Automobile).  If the Automobile class's get/set parameters were  all 
run of the mill types (String, int, boolean, etc), I would normally just have a method 
called 'getAutomobileObject()' inside the ActionForm.  Then from the JSP page I would 
just have something like '' and then 
the Automobile object within the AutomobileForm would automatically be populated (I 
believe via the BeanUtils.populate() method).

Now the problem I'm having is the get/set parameters of Automobile are not run of the 
mill data types, but rather very specialized custom classes.  I saw from the Struts 
Javadocs that once you start running into anything specialized, you're going to have 
to implement a specialized means to provide for automatic bean population.  From what 
I can see, I'd have to change the code within the BeanUtils.populate() method to do 
this.I'd rather not since it makes upgrading to newer versions of Struts more 
complicated.  I'd rather create something that sits on top of Struts, rather than 
having to mutate the currently used version.  Moreover, I saw that 
BeanUtils/PropertyUtils/etc are all deprecated in favor of the Jakarta Commons 
BeanUtils package.

Does anyone know of a way I can provide for this automatic type conversion via 
something that sits on top of Struts (vs. just changing the Struts source code)?



RE: ActionMappings or ActionFormBeans collection cannot be found ???

2002-03-15 Thread Chappell, Simon P

I assumed it was the Friday joke! :-)

Simon

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


>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 15, 2002 8:56 AM
>To: 'Struts Users Mailing List'
>Subject: RE: ActionMappings or ActionFormBeans collection cannot be
>found ???
>
>
>What the hell is all this?  And what container supports J2SE 1.4?
>
>Mark
>
>-Original Message-
>From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 15, 2002 9:25 AM
>To: [EMAIL PROTECTED]
>Subject: ActionMappings or ActionFormBeans collection cannot be found
>???
>
>
>Subject: ActionMappings or ActionFormBeans collection cannot 
>be found 100
>101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 
>116 117 118 119
>120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 
>135 136 137 138
>139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 
>154 155 156 157
>158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 
>173 174 175 176
>177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 
>192 193 194 195
>196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 
>211 212 213 214
>215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 
>230 231 232 233
>234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 
>249 250 251 252
>253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 
>268 269 270 271
>272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 
>287 288 289 290
>291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 
>306 307 308 309
>310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 
>325 326 327 328
>329!
> 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 
>345 346 347 348
>349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 
>364 365 366 367
>368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 
>383 384 385 386
>387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 
>402 403 404 405
>406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 
>421 422 423 424
>425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 
>440 441 442 443
>444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 
>459 460 461 462
>463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 
>478 479 480 481
>482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 
>497 498 499 500
>501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 
>516 517 518 519
>520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 
>535 536 537 538
>539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 
>554 555 556 557
>558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 
>573 574 575 576
>!
>577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 
>592 593 594 595
>596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 
>611 612 613 614
>615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 
>630 631 632 633
>634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 
>649 650 651 652
>653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 
>668 669 670 671
>672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 
>687 688 689 690
>691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 
>706 707 708 709
>710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 
>725 726 727 728
>729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 
>744 745 746 747
>748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 
>763 764 765 766
>767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 
>782 783 784 785
>786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 
>801 802 803 804
>805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 
>820 821 822 823
>8!
>24 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 
>840 841 842
>843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 
>858 859 860 861
>862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 
>877 878 879 880
>881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 
>896 897 898 899
>900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 
>915 916 917 918
>919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 
>934 935 936 937
>938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 
>953 954 955 956
>957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 
>972 973 974 975
>976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 
>991 992 993 994
>995 996 997 998 999
>From: "Frank Marx" <[EMAIL PROTECTED]>
> ===
>Hi,
>
>I created a little struts test application with JB5 and it worked fine.
>Now I use Forte for JAVA 4.0 EE Early Access Programm and now the
>application doesn't work anymore.
>
>When I try to start tomcat I alwazs get the error message that
>ActionMappings or ActionFormBeans collection ca

RE: ActionMappings or ActionFormBeans collection cannot be found ???

2002-03-15 Thread Galbreath, Mark

What the hell is all this?  And what container supports J2SE 1.4?

Mark

-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: ActionMappings or ActionFormBeans collection cannot be found
???


Subject: ActionMappings or ActionFormBeans collection cannot be found 100
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
329!
 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576
!
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671
672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728
729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747
748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785
786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823
8!
24 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861
862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880
881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918
919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975
976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994
995 996 997 998 999
From: "Frank Marx" <[EMAIL PROTECTED]>
 ===
Hi,

I created a little struts test application with JB5 and it worked fine.
Now I use Forte for JAVA 4.0 EE Early Access Programm and now the
application doesn't work anymore.

When I try to start tomcat I alwazs get the error message that
ActionMappings or ActionFormBeans collection cannot be found.

I use jdk1.4 SE.

I'm pretty sure there is no error in the struts-config.xml cause it worked
before pretty good.
It looks to me like the action - Servlet is not able to read the
struts-config.xml or looks in the wrong place and not below WEB-INF ?

Any tipe how to solve this problem ?

Thanks in advance,

Frank Marx


PLEASE  REPLY TO : [EMAIL PROTECTED]

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




Cannot find ActionMappings or ActionFormBeans collection

2002-03-15 Thread @Basebeans.com

Subject: Cannot find ActionMappings or ActionFormBeans collection
From: "Frank Marx" <[EMAIL PROTECTED]>
 ===
Hi,

regarding to my recent postings and I found the root cause for the exception
which is:

- Root Cause -
javax.xml.parsers.FactoryConfigurationError:
com.sun.xml.parser.SAXParserFactoryImpl
 at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:84)
 at org.apache.struts.digester.Digester.getParser(Digester.java:275)
 at org.apache.struts.digester.Digester.parse(Digester.java:755)
 at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
 at javax.servlet.GenericServlet.init(GenericServlet.java:258)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3267)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3384)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

As I wrote before I use Forte for JAVA 4.0 Enterprise Edition Early Access
Edition, now it looks like there is some error in the XML-Parser Factory
Implementation.
How can I fix this ?

Thanks in advance,

Frank Marx





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




Re: Timestamp

2002-03-15 Thread Otavio C. Decio

You should download the latest nightly Struts build and use

org.apache.struts.taglib.bean.format.sql.timestamp="dd/MM/"

in your ApplicationResource.properties file.

Abracos,

Otavio



- Original Message -
From: "Fábio Queiroz Barbosa" <[EMAIL PROTECTED]>
To: "Struts User" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 9:20 AM
Subject: Timestamp


How to format a Timestamp value for print dd/MM/ using  ?

--
E-Consulting® Corp.
Estratégia - Tecnologia - Comunicação
www.e-consultingcorp.com.br

--
Fábio Queiroz Barbosa
Tecnologia
E-Mail: [EMAIL PROTECTED]
Tel.: (55 11) 3048-0764
Fax: (55 11) 3048-0766

---



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




ActionMappings or ActionFormBeans collection cannot be found ???

2002-03-15 Thread @Basebeans.com

Subject: ActionMappings or ActionFormBeans collection cannot be found 100 101 102 103 
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329!
 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 !
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 
661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 
682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 
703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 8!
24 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 
846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 
867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 
909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 
951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 
972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 
993 994 995 996 997 998 999
From: "Frank Marx" <[EMAIL PROTECTED]>
 ===
Hi,

I created a little struts test application with JB5 and it worked fine.
Now I use Forte for JAVA 4.0 EE Early Access Programm and now the
application doesn't work anymore.

When I try to start tomcat I alwazs get the error message that
ActionMappings or ActionFormBeans collection cannot be found.

I use jdk1.4 SE.

I'm pretty sure there is no error in the struts-config.xml cause it worked
before pretty good.
It looks to me like the action - Servlet is not able to read the
struts-config.xml or looks in the wrong place and not below WEB-INF ?

Any tipe how to solve this problem ?

Thanks in advance,

Frank Marx


PLEASE  REPLY TO : [EMAIL PROTECTED]




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




Timestamp

2002-03-15 Thread Fábio Queiroz Barbosa

How to format a Timestamp value for print dd/MM/ using  ?
--
E-Consulting® Corp.
Estratégia - Tecnologia - Comunicação
www.e-consultingcorp.com.br
--
Fábio Queiroz Barbosa
Tecnologia
E-Mail: [EMAIL PROTECTED]
Tel.: (55 11) 3048-0764
Fax: (55 11) 3048-0766
---



RE: No getter method for property managerRole of bean list

2002-03-15 Thread Yu, Yanhui

I've fixed this problem when I only use the default getter and default
setter for the vector field, managerRole.  When I override any or both of
the getter and setter, I have problem.  I wonder if Struts does not allow me
to override or overload any of these getters and setters?

Appreciate any help,
Yanhui



-Original Message-
From: Yu, Yanhui 
Sent: Thursday, March 14, 2002 1:44 PM
To: 'Ady Das-O'Toole'; Struts Users Mailing List
Subject: No getter method for property managerRole of bean list



HI,

I tried to search the list, but can't find a good answer (I thought I saw
somebody else have similar problem before, but I just can't find the answer
from the archive :)

I passed a Vector of ManagerBean object in the session and the JSP tries to
display each ManagerBean (its fields actualy) in the Vector.  one of the
fields of ManagerBean is called managerRole which is again a Vector of
different roles (String).  I get the above error (no getter for managerRole)
when I do the following in the jsp.  Any help please, thanks very much in
advance.

  



 ">
 
 
   
  
   


 
   

 
  
 

Here is from the ManagerBean:   
private String managerName = null;
private String managerID = null;
private String managerAddress = null;
private Vector managerRole = new Vector();

public Vector getManagerRole() {
return managerRole;
}

public void setManagerRole(String newRole) {
managerRole.addElement (newRole);
}

public String getManagerRole(int i) {
return (String) managerRole.get(i);
}

public void setManagerRole(String newRole, int i) {
managerRole.add (i, newRole);
}


  
  
 

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




Re: How to Pre-fill a formbean

2002-03-15 Thread Jay sissom

You can do it this way, but I would use a Struts tag instead of a jsp tag.  
Instead of using jsp:useBean and jsp:getProperty, all you need to do is



and that will write out the mfProperty to the JSP.

Jay


On Thu, 14 Mar 2002, Joe Lee wrote:

> Phil,
> 
> Your loginAction should create and populate a mainForm
> bean and then saves it in the request scope. In the
> main.jsp, get a reference to this form by:
>  class="com.MainForm">
> and the input fields on that jsp get the defaults from
> this form bean. You have to use class (not type) so
> that if you come from a differene route to main.jsp
> rather than Login and the mainform bean may not be
> there already, a new one will be created for u. Then
> your jsp won't bombs and the input fields still get
> blank defaults.
> 
> - Joe
> 
> RE: How to Pre-fill a formbean
> 
> 
> 
> From: HERSHKOWITZ,PHIL (A-Sonoma,ex1) 
> Subject: RE: How to Pre-fill a formbean 
> Date: Thu, 14 Mar 2002 18:14:30 -0800 
> 
> 
> 
> Hi,
> 
> >From the loginAction, I am calling the database to
> retrieve default values
> for some of the fields the use must fill out on
> mainAction.jsp. The default
> values depend on the user ID.
> 
> Phil
> 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


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




RE: How to Pre-fill a formbean

2002-03-15 Thread Jay sissom

That's correct.  Struts doesn't magically write your application for you. 
:)  The bean you get will be empty.  It's your job to retrieve data from 
the database and populate the bean with the proper info.  How you retrieve 
the data from the database has been the discussion of many many threads in 
this list.  Everyone does their own thing.  If you aren't sure how you 
want to do it in your app, search the archive for 100 different ways to 
look at!

Jay

On Thu, 14 Mar 2002, John Menke wrote:

> How do you know what record in the database this will retrieve?  Where does
> it get it's data.  the form bean that is instantiated will be empty unless
> you put data into it correct?
> 
> -Original Message-
> From: Jay sissom [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 9:12 PM
> To: Struts Users Mailing List
> Subject: Re: How to Pre-fill a formbean
> 
> 
> The form bean has already been created by the time your mainAction perform
> method is called if you have defined the form bean in your
> struts-config.xml file.
> 
> All you would do is this:
> 
> mainForm mf = (mainForm)form;
> // where form is passed to the perform method
> 
> mf.setProperty1("asdfasdf");
> mf.setProperty2("asdffdf");
> mf.setProperty3("asdfasdf");
> 
> Then in the JSP that you forward to, you can use  to write
> out the properties from the bean.
> 
> Jay
> 
> On Thu, 14 Mar 2002 [EMAIL PROTECTED] wrote:
> 
> > Hi,
> >
> > My jsp application begins at a login page.
> >
> > I call the login page action loginAction and I have defined loginForm to
> > process the user details.
> >
> > If the login is successful, the action forwards to mainAction.jsp, whose
> > form action is /mainAction
> >
> > Before I display the mainAction.jsp I want to pre-load some form values
> from
> > the java code that processes the login action (loginAction.java) by using
> > the Set methods of mainForm.
> >
> > Is the best way to do this to get a reference to the not-yet-created
> > mainForm bean? If so, would someone give a code snippet showing how to
> refer
> > to a bean that is not the struts form bean for the loginAction?
> >
> > Or is there a better way to do this?
> >
> > Thanks,
> > Phil
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


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




Bean Form's Vector not updated!

2002-03-15 Thread Juan Pablo Villaverde


 I have bean form with some String fields and a Vector Field. This
vector contains a collection of Customer objects. Each Customer object
have some String and int fields.
 My .jsp renders  for the bean form's String fields and
uses iterate to render  representing Customer's fields.
When I post the jsp's form, my action class receives the String fields
of my bean form updated, acordingly the changes I made in my page. BUT,
the changes made to the Customer's fields are NOT reflected in the
objects contained in the Vector! Is it normal? What can I do to get
all the bean forms contents updated on post? I need to update each
object in a Vector manually after each post using
request.getParameter()? Thanks in advance.


--
Juan Pablo Villaverde
Tec. en Infraestructura de Redes
Soluciones Punto Com S.A. 
http://www.spcom.com.ar



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




How can I used html:select with a Collection of String

2002-03-15 Thread Aroui, Dr. Djelloul

myCollection is a Vector of Integer. I dont need property or labelProperty.
How can I use the select with a Collection.





please any help

thanks

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




Re: I18N Problem with Chinese Character

2002-03-15 Thread nsg
you should turn your resource file to UTF-8 encoding using native2ascii
command.
that command locates in your-jdk-home\bin directory.
detail command line is listed below:

native2ascii ApplicationResources_zh.properties
ApplicationResources_zh.propertiesX

the first parameter is source file,second is destination file. Use the
destination file as your resource file.

Many articles introduce that the encodeing parameter should be specified
like following:

native2ascii -encoding UTF-8 ApplicationResources_zh.properties
ApplicationResources_zh.propertiesX
.
but if so, an exception would be thrown.I dont know what reason causes the
exception?

of course,you use first command and should be OK.


hope helps for you.


Laker




- Original Message -
From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 9:40 PM
Subject: I18N Problem with Chinese Character


> Subject: I18N Problem with Chinese Character
> From: "Liu Yan" <[EMAIL PROTECTED]>
>  ===
> hi List,
>
> I am using struts-1.0.2 with WebLogic 6.1-sp2. For an I18N project, I
> followed the steps:
>
> 1) I created ApplicationResources.properties and
> ApplicationResources_zh.properties files to store strings.
> 2) The whole project is using UTF-8 encoding.
> 3) On the beginning of each JSP page, add:
><%@ page contentType="text/html; charset=UTF-8" %>
>
> For static Chinese character in JSP page, this setting goes well. But when
I
> tried to use:
>
> 
>
> to get some strings from ApplicationResources_zh.properties file, the
output
> is corrupted.
>
> I am suspecting this is the  taglib's problem, but decided
to
> drop a letter here for a quick answer. Am I doing something wrong or I
have
> to wait for the upcoming 1.1 beta release?
>
> Regards!
> Liu Yan
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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


Struts& JRun 3.0 and 3.1

2002-03-15 Thread @Basebeans.com

Subject: Struts& JRun 3.0 and 3.1
From: "Gernot Pfingstl" <[EMAIL PROTECTED]>
 ===
I've a problem with the struts  tag and JRun
application server.
We currently use JRun 3.0 which cannot compile the . Instead of this we use, as the struts-team has recommended
on their web pages, >. And this works fine.

Now we plan to migrate to Jrun3.1 and we tested our jsp-pages and an error
occured at the above statement, it is not correctly interpreted: Following
lines has been generated:
__tag_html_0.setLocale(false);
out.print(">");
First locale is set to "false" instead of "true" and a ">" is printed to the
screen!

OK, the simplest way is to change the statement to '="true"', but we will
have running 3.0 and 3.1 at the same time for a wile.

Is there a way to write the above statement that it works in JRun 3.0 AND
JRun 3.1? Is > a correct statement (J2EE
compatible) or not?

Thanks, Gernot





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




I18N Problem with Chinese Character

2002-03-15 Thread @Basebeans.com

Subject: I18N Problem with Chinese Character
From: "Liu Yan" <[EMAIL PROTECTED]>
 ===
hi List,

I am using struts-1.0.2 with WebLogic 6.1-sp2. For an I18N project, I
followed the steps:

1) I created ApplicationResources.properties and
ApplicationResources_zh.properties files to store strings.
2) The whole project is using UTF-8 encoding.
3) On the beginning of each JSP page, add:
   <%@ page contentType="text/html; charset=UTF-8" %>

For static Chinese character in JSP page, this setting goes well. But when I
tried to use:



to get some strings from ApplicationResources_zh.properties file, the output
is corrupted.

I am suspecting this is the  taglib's problem, but decided to
drop a letter here for a quick answer. Am I doing something wrong or I have
to wait for the upcoming 1.1 beta release?

Regards!
Liu Yan




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




Re: Use of <%= var %> Expressions in HTML Tag's not working

2002-03-15 Thread Elwert . Marcus


That's it what is was looking for.
Thanks a lot.

Marcus



   
  
Johannes   
  
Carlén   To: Struts Users Mailing List 
<[EMAIL PROTECTED]>  
 Subject: Re: Use of <%= var %> 
Expressions in HTML Tag's not
 working   
  
15.03.2002 
  
10:08  
  
Please 
  
respond to 
  
"Struts Users  
  
Mailing List"  
  
   
  
   
  




Hi, you're right, it's not working when using the tags
that way, however try to do something like this:

 Hello all,
>
> I tried to use a Tag in my JSP as follows:
>
>  =.>
>
> as result the source code in my Browser shows
>
> /hello.jpg"  border
> =.>
>
> I expected the <%=lang%> Expression being replaced
> by the value of the
> expression.
> If I use /hello.jpg"
> border =.> in my
> jsp the replacement of the expression works fine.
>
> I think i missed something in reading the docs and
> api for struts. But
> what?
>
> Thanks in advance for any help
>
> Marcus
>
> Marcus Elwert
> Fanuc Germany GmbH
> E-Business consultant
> Phone +49 7158 187 322
> Fax + 49 7158 187 422
> Mail: [EMAIL PROTECTED]
>
>
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>

_
Hitta snörapporter...
från 500 olika skidorter i Europa
på http://se.snow.yahoo.com

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






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




problem with bean having session scope

2002-03-15 Thread Slimane Zouggari

Hi,

I have 3 form beans. Each of them have a session scope defined in the 
struts-config.xml.

Here's the config for one of them:
>  type="be.stluc.info.struts.PieChartAction"
> name="piechartform"
> scope="session">

When I try to access them in one of my Action class, I don't have any problem.
But when I try to access them, from one other Action class, then suddenly, 
they don't exist anymore.

I used the piece of code, Mr Keith Bacon posted in reply of one of my 
previous mail ( 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html )

And that so, I saw that one time, my session contains all three form beans 
and another time my session contains only one form bean.

Here's the code I use in my Action classes:

> ParticipantDetailsForm partDetForm =
>   (ParticipantDetailsForm) 
> request.getSession().getAttribute("participantdetailsform");

(participantdetailsform is one of the 3 form beans I share in the session)

Could anyone give me pointers where I should look for ? Because, I'm sure 
it's a stupid mistake but I can't find it :(

Thanx in advance.

Friendly Regards,
Slimane


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




Re: Newbie :Error- Cannot find ActionMappings or ActionFormBeans

2002-03-15 Thread Anant Sagar

I had defined all the attributes and relevant properties in
struts-config.xml . I finally found solution . It is quite weird as it was
not related with application per se but the driver. I m using JSQLConnect
driver and it expired yesterday.I changed the driver and it everything
started working

Thanks Raghuramudu anyway.

Anant Sagar


- Original Message -
From: "Vaddiyar, Raghuramudu" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 12:24 PM
Subject: RE: Newbie :Error- Cannot find ActionMappings or ActionFormBeans


> Check your struts-config.xml file.
> and the action attribute of your form.
>
> for example...in your login page if form tag looks like this
> 
>  and if you dont have a mapping in your struts-config.xml file
> you will get this exception
>
>
>
>
> -Original Message-
> From: Anant Sagar [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 7:59 AM
> To: 'Struts Users Mailing List'
> Subject: Newbie :Error- Cannot find ActionMappings or ActionFormBeans
>
>
> Hello All ,
>
> I m new to struts . I had prepared my login page .It was working fine
> .Suddenly this exception is coming
>
> javax.servlet.ServletException: Cannot find ActionMappings or
> ActionFormBeans collection
> javax.servlet.jsp.JspException: Cannot find ActionMappings or
> ActionFormBeans collection
>
> Can anybody let me know what could be the reason for the above exception.
>
> Anant Sagar
>
>
>

> The content of this e-mail is intended only for the confidential use of
the
> person addressed. If you have received this message in error, please
notify
> us immediately by electronic mail, by telephone or by fax at the above
num-
> bers.
>
> E-mail communications are not secure and therefore we do not accept any
res-
> ponsibility for the confidentiality or altered contents of this message.
>
> Please be aware that SIS Group and its subsidiary companies cannot accept
> any orders or other legally binding correspondence with a participant as
> part of an E-mail. The views expressed above are not necessarily those
held
> by SIS Group and its subsidiary companies and not binding for them.
>

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

> For additional commands, e-mail:



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




Re: Struts allergic to dom4j

2002-03-15 Thread Daniel Jaffa

I had the same problem.  The way that i fixed it is to move dom4j into the
lib dir of the app server.  And define jdom in the startup of weblogic.

After doing that the problem went away.

Daniel Jaffa

- Original Message -
From: "Mitch Gitman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 12:36 AM
Subject: Struts allergic to dom4j


> I'm developing a webapp in Tomcat. I would like to use the
> dom4j XML library. But whenever I have dom4j-full.jar in the
> webapp's WEB-INF/lib and then try to access a JSP page with
> an  tag, I get the following exception:
> javax.servlet.jsp.JspException: Cannot find ActionMappings or
> ActionFormBeans collection
>  at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:773)
>  at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
>  at
org.apache.jsp.StormPage$jsp._jspService(StormPage$jsp.java:195)
>  at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
>  at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
>  at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> ...
>
> The moment I remove the dom4j JAR, the problem goes away.
>
> It appears the error arises when Struts tries to parse its
> WEB-INF/struts-config.xml file. The presence of another XML
> parser seemingly confuses it.
>
> Any way that Struts and dom4j can all just get along?
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

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




Re: Internationalisation of images

2002-03-15 Thread houxu

Just handle the images as same as handling message.
for instance, you can put the following line into your
ApplicatonResources.properties file:
prompt.image1=

It will display the image you need.so you can make your internationalisation
images

- Original Message -
送信者 : "Benoit Segaert" <[EMAIL PROTECTED]>
宛先 : "Struts Users Mailing List" <[EMAIL PROTECTED]>
送信日時 : 2002年3月15日 17:59
件名 : Internationalisation of images


> The internationalisation of page is very easy but I want
> to change also some images depending of user's Locale.
>
> Does Struts provide a mechanism for the image internationalisation?
>
> Benoit
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: How to Pre-fill a formbean

2002-03-15 Thread Joe Lee

Phil,

Your loginAction should create and populate a mainForm
bean and then saves it in the request scope. In the
main.jsp, get a reference to this form by:

and the input fields on that jsp get the defaults from
this form bean. You have to use class (not type) so
that if you come from a differene route to main.jsp
rather than Login and the mainform bean may not be
there already, a new one will be created for u. Then
your jsp won't bombs and the input fields still get
blank defaults.

- Joe

RE: How to Pre-fill a formbean



From: HERSHKOWITZ,PHIL (A-Sonoma,ex1) 
Subject: RE: How to Pre-fill a formbean 
Date: Thu, 14 Mar 2002 18:14:30 -0800 



Hi,

>From the loginAction, I am calling the database to
retrieve default values
for some of the fields the use must fill out on
mainAction.jsp. The default
values depend on the user ID.

Phil



__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

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




Multiple war files

2002-03-15 Thread Jitesh Vidhani

Hi,

I am working on this Enterprise application where we have to split the whole
UI into multiple .war and .jar files. The .jar files shall contain all the
Action and Form beans and the .war file shall contain all the JSPs and the
respective struts-config.xml, web.xml files.

I can see how to split the jar files so that I can arrange the Action and
Form beans seperately. But I somehow cant seem to find a way to arrange the
JSPs into different war files.

I am using jsp templates all across the product and some of the components
like the header, buttons, template page etc shall be common throughout. So
my question is, can a struts-config file in a given war file access JSPs in
another war file. I guess one way to do that by prepending a "../" to the jsp so that the Server knows where to look for that JSP.

All I wanna know if this is possible and if there is any cleaner way of
doing this. How does one usually organize the whole UI into multiple units
so that some units can share some resources like templates and headers so
that they dont have to be duplicated in each war file.

Thanks.
-Jitesh


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




Need to link to another page when cancel is pressed.

2002-03-15 Thread Jane . Muse

When I press cancel, I want to perform a link to the mainMenu of my app.
Doing a forward doesn't work because there are 2 frames, and the left frame
is still there after I go to mainMenu. So logically, this is what I want to
do:

 
 
 

Does anybody know how to do this?
Thanks.
Jane


This email message and all attachments transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and
privileged information. Please DO NOT forward this email outside of the recipient's 
Company unless expressly authorized to do so herein.  Any
unauthorized review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email
and destroy all copies of the original message.

Any views expressed in this email message are those of the individual sender except 
where the sender specifically states them to be the views of Indus
 International, Inc.



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




Re: How to use XML and XSL with Struts?

2002-03-15 Thread @Basebeans.com

Subject: Re: How to use XML and XSL with Struts?
From: "Pim" <[EMAIL PROTECTED]>
 ===
Have you read this article?

http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt-p2.html

Pim
"jcorey" <[EMAIL PROTECTED]> wrote in message
news:a6o2mh$lt7$[EMAIL PROTECTED]...
> In my action I parse an xml document.  I find the section of the xml data
I
> want to display.
> Then I put a Node in the request and forward to a view jsp.  The view jsp
> transforms the node object and puts the result in the response output
> stream.
>
> Is there a better way?
>
>



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




Subject: Re: More problems: No action instance for path /login could be create d...

2002-03-15 Thread @Basebeans.com

Subject: Subject: Re: More problems: No action instance for path /login could be 
create d...
7895:From: "Pim" <[EMAIL PROTECTED]>
 ===

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




Re: Use of <%= var %> Expressions in HTML Tag's not working

2002-03-15 Thread Johannes Carlén

Hi, you're right, it's not working when using the tags
that way, however try to do something like this:

 Hello all,
> 
> I tried to use a Tag in my JSP as follows:
> 
>  =.>
> 
> as result the source code in my Browser shows
> 
> /hello.jpg"  border
> =.>
> 
> I expected the <%=lang%> Expression being replaced
> by the value of the
> expression.
> If I use /hello.jpg" 
> border =.> in my
> jsp the replacement of the expression works fine.
> 
> I think i missed something in reading the docs and
> api for struts. But
> what?
> 
> Thanks in advance for any help
> 
> Marcus
> 
> Marcus Elwert
> Fanuc Germany GmbH
> E-Business consultant
> Phone +49 7158 187 322
> Fax + 49 7158 187 422
> Mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
>  

_
Hitta snörapporter... 
från 500 olika skidorter i Europa
på http://se.snow.yahoo.com

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




Internationalisation of images

2002-03-15 Thread Benoit Segaert

The internationalisation of page is very easy but I want
to change also some images depending of user's Locale.

Does Struts provide a mechanism for the image internationalisation?

Benoit


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




Re: When i have three buttons that all can submit the same form...

2002-03-15 Thread @Basebeans.com

Subject: Re: When i have three buttons that all can submit the same form...
From: "Pim" <[EMAIL PROTECTED]>
 ===
Changing the form's action is the solution we chose with the help of
javascript.

We created a function:
function go(whatAction) {


document.forms('skillForm').action=whatAction;

document.forms('skillForm').submit();

}

The button then looks like

"/>

The advantage is that you can use an actionforms for each action (validation
in the actionforms) and a perform method in the action which does his thing.

The disadvantage is that the in the form action some other things may occur.
For example when somebody doesn't use cookies, the session id is written in
the form action. So it comes down to good old string manipulation which is
always tricky.

The other thing you could do is making the action class more intelligent. In
the action class you could find out which action is called. Based on that
knowledge do your validation en seek a correct forward. This solution is
discussed in this group several times. Just seach for 'multiple' and you get
wat you want.

Pim

"nsg" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> the three button are: Search, Add,Delete. i set the Search button as
submit
> type.the other two are button type.
>
> when i want to click Add(or Delete) to submit the form, i should change
the
> form's action and then submit using JavaScript?
>
> Are there any method else to do that except using JavaScript in Struts
> framework?
>
>
> Thanks in advance.
>
>
> Laker
>



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




Re: How to Pre-fill a formbean

2002-03-15 Thread @Basebeans.com

Subject: Re: How to Pre-fill a formbean
From: "Pim" <[EMAIL PROTECTED]>
 ===
This is exactly the answer I had in mind, except for the part to use class
instead of type, I didn't know that. Casting your original loginForm to a
mainForm won't work, you have to explicitly create a new mainForm and
populate it.

Pim
"Lee Joe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Phil,
>
> Your loginAction should create and populate a mainForm
> bean and then saves it in the request scope. In the
> main.jsp, get a reference to this form by:
>  class="com.MainForm">
> and the input fields on that jsp get the defaults from
> this form bean. You have to use class (not type) so
> that if you come from a differene route to main.jsp
> rather than Login and the mainform bean may not be
> there already, a new one will be created for u. Then
> your jsp won't bombs and the input fields still get
> blank defaults.
>
> - Joe
>
> RE: How to Pre-fill a formbean
>
> --
--
>
>
> From: HERSHKOWITZ,PHIL (A-Sonoma,ex1)
> Subject: RE: How to Pre-fill a formbean
> Date: Thu, 14 Mar 2002 18:14:30 -0800
>
> --
--
>
>
> Hi,
>
> >From the loginAction, I am calling the database to
> retrieve default values
> for some of the fields the use must fill out on
> mainAction.jsp. The default
> values depend on the user ID.
>
> Phil
>
>
>
> _
> ¨Ï¥Î¥þ²y³Ì¦h¤H¨Ï¥Îªº¹q¤l¶l¥óªA°È MSN Hotmail¡A½Ð²¾¦Ü
http://www.hotmail.com
> ¡C
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




Re: Downloading files

2002-03-15 Thread Konstantina Stamopoulou

Hello Sean,

This saves me from a  lot of work.Tnanx. I just tried it and it works fine,
except for the case of  of images. I guess for that case I have to use
ContentType("image/jpeg").

Konstantina


- Original Message -
From: "Sean Willson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 1:59 AM
Subject: Re: Downloading files


> Try this:
>
>// get the file extension
>String fileName = formFile.getFileName();
>// the mime type for this file
>String mimeType = servlet.getServletContext().getMimeType(fileName);
>// if we got one set it
>if (null != mimeType) {
>  response.setContentType(mimeType);
>}
>// otherwise set a default
>else {
>  response.setContentType("text/plain");
>}
>
>// otherwise output the file
>ServletOutputStream os = response.getOutputStream();
>os.write(formFile.getFileData());
>return null;
>
> Works for us ... This way you leave it up to the container to tell you
> the mime type. You can also configure mime types in your web.xml
> deployment descriptor file.
>
> Sean
>
> Konstantina Stamopoulou wrote:
> > Hi Alexander,
> >
> > This is what I did after searching the archieves. I'm a little bit
confused
> > with the mime type (shouldn't "multipart/form-data " work for every type
of
> > file? it doesn't work for .jsps). I think I have to search more on this
> > one.
> >
> > Thanx for the reply,
> > Konstantina
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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