Re: Array of checkboxes in JSP -> props in bean

2001-12-31 Thread Shengmeng Liu

Hi,
I agree with you that the property attribute for form element is "overloaded" to
have two meanings. It determines both:

1)which getter method will be invoked on the form bean to obtain its initial value;

2)which setter method will be invoked on the form bean (or the name of the request
parameter will be used for this element) to store its current value.

Well, I aslo feel that handling situations where multiple checkboxes share the same
name is quite confusing and complex in Struts, as the form-bean property refers to
a SINGLE data row, but the request parameter can have an ARRAY of values.

It seems to me that one straightforward workaround for this is to avoid multiple
checkboxes sharing the same name, by using different names for all those fields.
Such as:
group_check1="on"&group_check2="on"
where value can only be "on" and parameter name now indicates its real value.

Hope this helps,
Shengmeng Liu

- Original Message - 
From: "David M. Karr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 01, 2002 8:46 AM
Subject: Array of checkboxes in JSP -> props in bean


> I've noticed some problems, and have some questions, with situations where I
> use "logic:iterate" to display a list of checkboxes and then (hopefully)
> automatically populate those values in the downstream form object.  I'm sure
> I'm misunderstanding some things, so please correct me if you see a
> misstatement.  I've asked about some of this in the past, but I don't believe I
> ever got an answer (except for some direct responses to me asking if I ever got
> a response).
> 
> The first issue is the use of the "property" attribute in "html:checkbox".  If
> I understand this correctly, the value of this attribute is "overloaded" to
> have two meanings.  The first interpretation is as the attribute of the bean
> specified as the "name" attribute in this element.  This value is apparently
> used as the "current value" of the checkbox, although I'm not really sure what
> that means.  I don't see the real purpose for htis.  When I render a
> html:checkbox, unless I specifically use "bean:write" to print the value,
> nothing is displayed except the checkbox, so it's apparently not used for the
> rendered text.
> 
> Then, the second interpretation of the "property" attribute is the name of the
> outgoing request parameter.  This causes some confusion wrt checkboxes, because
> the first interpretation refers to a SINGLE data row, but the second
> interpretation essentially refers to an ARRAY of items.  This is because the
> name of the request parameter associated with a set of checkboxes will get
> multiple values associated with that request parameter.
> 
> For instance, if the field of the bean representing is "objectName", then the
> "property" attribute will be set to "objectName".  Then, in the downstream
> form/action objects, we expect to find an ARRAY of values associated with
> "objectName".  It might be less confusing if the "property" attribute wasn't
> overloaded in this situation, so that one attribute specified the property of
> the bean, and another attribute specified the name of the request parameter to
> set.
> 
> The second issue is with automatic population of properties in downstream forms
> from request parameters.  In general, this works pretty well.  However, I don't
> see what's supposed to happen when the request parameter is multi-valued, like
> from a set of checkboxes.  If I were to guess, I would think I would have to
> add methods to my downstream form (wrt the "objectName" example) of
> "getObjectName()" and "setObjectName()", although they would return and take an
> ARRAY of strings (goes back to the first issue).  However, nothing happened
> when I tried this.
> 
> The third issue is the "value" attribute of both html:checkbox and html:radio.
> This will very often use a scriptlet expression, as the value will likely be an
> attribute of the bean associated with each checkbox.  Is there some reason that
> a "valueProperty" attribute wouldn't be useful?  This would specify the
> property of the bean that will be used for the value.  It's my impression that
> it's always a good idea to avoid scriplets, if possible.
> 
> Again, I'd appreciate any corrections if I've misunderstood how this is
> supposed to work.
> 
> -- 
> ===
> David M. Karr  ; Best Consulting
> [EMAIL PROTECTED]   ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



The indexId in iterate tag

2001-12-31 Thread Prem Kumar Ponnuraj

Hi,
I'm using the value of the indexId in the radio tag.But I get an
error that
Incompatible type for method. Can't convert java.lang.Integer to
java.lang.String.

The code is
  
 
 
   

>From the error I understand that indexValue is declared as Integer.How
to make the declaration of the indexValue as String.

Rgds,

Prem



---
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




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


Re: Looking for a clean required-bean handler

2001-12-31 Thread Reid Pinchback


   Francisco Hernandez <[EMAIL PROTECTED]> wrote: 
this sounds something like the "Pull" model where the jsps "Pull" the data
they need rather then the "Push" model where the data is "Pushed" into the
jsp.. hrmm..
checkout http://sourceforge.net/projects/webwork
its "Pull HMVC" its worth a shot if i correctly understand what your trying
to accomplish

 Thanks for the pointer, I'll check it out!  I also had a few thoughts about a
Struts solution on the train home.  See if you think this makes sense.
1. Create "before" and "after" actions.
2. "after" actions look like what people are used to for processing forms
in Struts, only a bit simpler.  The job of an "after" action is to consume
any form beans and generate appropriate side-effects *independent*
of what the next page might be.  So, in an EJB app you would make
state changes, and in a login page you might stuff some kind of User
javabean into the session context because you know all pages would
go looking for it.  Once done, the "after" action would look for a magic
request parameter; if present that would provide the name of the next
action (basically a return path), otherwise transition out in whatever
way(s) would be normal for the action.
3. each "before" action only preps for the display of one particular JSP
page and inherits from a base class that adds a bit of simple
workflow support to the basic Action. All such subclasses provide
lists of bean names to look for and the context in which they should
be found.  The parent class functionality iterates over those lists, 
and if anything is missing then the magic return parameter is set
and an action is invoked to supply the missing bean.  The action
could be derived by applying a naming convention to the bean name
(e.g. "myBean" -> "/before/myBean.do").  Once you have the required
beans, you do any other setup work required for the page, and then
forward to the JSP page.
Now, there is some complexity to that magic return value that
I'm glossing over, but aside from that I think this would work.  It
results in an extra "K" before action classes, where "K" is the
number of web pages in your application.  It would also end up
with another "K" action mapping entries in struts-config.xml. On
the other hand, all the after action classes would be simpler and
more independent of each other.

 



-
Do You Yahoo!?
Send your FREE holiday greetings online at Yahoo! Greetings.


Array of checkboxes in JSP -> props in bean

2001-12-31 Thread David M. Karr

I've noticed some problems, and have some questions, with situations where I
use "logic:iterate" to display a list of checkboxes and then (hopefully)
automatically populate those values in the downstream form object.  I'm sure
I'm misunderstanding some things, so please correct me if you see a
misstatement.  I've asked about some of this in the past, but I don't believe I
ever got an answer (except for some direct responses to me asking if I ever got
a response).

The first issue is the use of the "property" attribute in "html:checkbox".  If
I understand this correctly, the value of this attribute is "overloaded" to
have two meanings.  The first interpretation is as the attribute of the bean
specified as the "name" attribute in this element.  This value is apparently
used as the "current value" of the checkbox, although I'm not really sure what
that means.  I don't see the real purpose for htis.  When I render a
html:checkbox, unless I specifically use "bean:write" to print the value,
nothing is displayed except the checkbox, so it's apparently not used for the
rendered text.

Then, the second interpretation of the "property" attribute is the name of the
outgoing request parameter.  This causes some confusion wrt checkboxes, because
the first interpretation refers to a SINGLE data row, but the second
interpretation essentially refers to an ARRAY of items.  This is because the
name of the request parameter associated with a set of checkboxes will get
multiple values associated with that request parameter.

For instance, if the field of the bean representing is "objectName", then the
"property" attribute will be set to "objectName".  Then, in the downstream
form/action objects, we expect to find an ARRAY of values associated with
"objectName".  It might be less confusing if the "property" attribute wasn't
overloaded in this situation, so that one attribute specified the property of
the bean, and another attribute specified the name of the request parameter to
set.

The second issue is with automatic population of properties in downstream forms
from request parameters.  In general, this works pretty well.  However, I don't
see what's supposed to happen when the request parameter is multi-valued, like
from a set of checkboxes.  If I were to guess, I would think I would have to
add methods to my downstream form (wrt the "objectName" example) of
"getObjectName()" and "setObjectName()", although they would return and take an
ARRAY of strings (goes back to the first issue).  However, nothing happened
when I tried this.

The third issue is the "value" attribute of both html:checkbox and html:radio.
This will very often use a scriptlet expression, as the value will likely be an
attribute of the bean associated with each checkbox.  Is there some reason that
a "valueProperty" attribute wouldn't be useful?  This would specify the
property of the bean that will be used for the value.  It's my impression that
it's always a good idea to avoid scriplets, if possible.

Again, I'd appreciate any corrections if I've misunderstood how this is
supposed to work.

-- 
===
David M. Karr  ; Best Consulting
[EMAIL PROTECTED]   ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)


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




Struts modifications policy

2001-12-31 Thread Matt Raible

Jeff,

This e-mail is concerning the post at:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg18542.html

Do you happen to have these modified classes available?  I'd love to use
these "improvements" on an upcoming project.

Thanks,

Matt


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




StrutsTestCase (Mock vs. Cactus) and HttpUnit

2001-12-31 Thread Matt Raible

I'm getting ready to write a new application and was wondering what the
recommended "test case methodology" to use is.  I've discovered
StrutsTestCase which can do out-of-container (Mock) testing and in-container
(Cactus) testing - very slick.  I'm thinking that writing HttpUnit test
cases for my JSP pages (use cases) and Mock tests for my Action classes.

Anyone have any ideas.  It seems it would be easiest to simply write
HttpUnit test cases for everything.

Thanks,

Matt

P.S.  How do I turn on logging in Tomcat 4 - the only messages I get are on
startup?



winmail.dat
Description: application/ms-tnef

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


Re: Struts and XForms.

2001-12-31 Thread Matt Raible

Do you know of a browser that supports XForms?

--- "Ramanswamy, Muthu" <[EMAIL PROTECTED]> wrote:
> Can we use XForms with Struts? 
> 
> Any info would be of help. Thanks.,
> 
> -Muthu
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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




Struts and XForms.

2001-12-31 Thread Ramanswamy, Muthu

Can we use XForms with Struts? 

Any info would be of help. Thanks.,

-Muthu



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




How to populate initial nested value of form bean from request?

2001-12-31 Thread Freeman-Nguyen, Cary

My issue is that the initial value of my 'name' text field never gets
populated with the value 'Intel'.  The initial value should come from a
request parameter.  I thought that this was automatically handled, but
could be wrong.  Any ideas?

I have a url with a parameter that looks like this:
http://www.ebenx.com/SelectEmployer.do?employerBean.name=Intel

The 'SelectEmployer' JSP page has the following on it:




The EmployerBean has the following code:
private String name=null;
public EmployerBean() {}
public String getName() {return name;}
public void setName(String name) {this.name=name;}


The Form Bean associated with the 'SelectEmployer' action has the
following code:
private EmployerBean employerBean = new EmployerBean();
public EmployerBean getEmployerBean() { return employerBean; }
public void setEmployerBean(EmployerBean employerBean) {
this.employerBean = employerBean; }

Thanks, Cary



Re: Looking for a clean required-bean handler

2001-12-31 Thread Francisco Hernandez

this sounds something like the "Pull" model where the jsps "Pull" the data
they need rather then the "Push" model where the data is "Pushed" into the
jsp.. hrmm..
checkout http://sourceforge.net/projects/webwork
its "Pull HMVC" its worth a shot if i correctly understand what your trying
to accomplish
- Original Message -
From: "Reid Pinchback" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 31, 2001 12:03 PM
Subject: Looking for a clean required-bean handler


>
> Hi all!
>
> The more I did into Struts the more I like it.  I have noticed
> something that has me scratching my head a bit, wondered
> if anybody else had come up with a clean solution.
>
> Struts has a nice clean approach to organizing code and
> behaviour after you click on something.  In other words, if
> I have a form then I have a nice way in Struts to associate
> the handler with the form.  If I have a URL then there are
> decent ways that I can maintain the destinations in the
> controller instead of in the html/jsp pages.  All nice.
>
> What I don't see is a straight-forward way of indicating
> what I want *before* going to a JSP page.
>
> Ok, I know... that probably sounds a little odd.  My point
> is simply this: my JSP pages are maintainable because
> they, as view artifacts, don't know much about each other.
> If I want may action classes to be just as maintainable
> then they can't know much about each other either.
>
> That is the thing I don't like about actions at the moment.
> The action figures out how to process the incoming data
> from the request *and* prepare the page/session/whatever
> context before going to the next page.  An action can only
> do that if it *knows* what the next page will require.  That
>  means there is less point in having that transition information
> explicitly captured in struts-config.xml because I might have
> to know the same information implicitly in the action code.
>
> So, here is what I want, and I'm hoping somebody has
> already found a clean approach for it.  Instead of only
> writing "process-X" actions, I also want to write some
> "prepare-for-Y" actions.  Then any JSP page has
> potentially two actions; one executed as I head
> into the page (e.g. to prep dynamic content), the other
> executed as I head out of the page (e.g. for user response).
> The clean way I can think of is to have some kind of
> action that iterates over the beans that will be needed
> by the next page, i.e.:
>
> - step 1, if I don't have a UserBean, get me a UserBean
> - step 2, if I don't have a UserPrefsBean, get me one
>   (etc)
>
> Then, you'd need some way of getting a controller-mediated
> way of recognizing that some particular action must be
> invoked to get a UserBean, etc., and then returning control
> back to the "prep" action.  Once the prep action has
> everything it needs, it forwards to the next step.
>
> Is this crazy?  Sane but not done before?  Sane and
> done already?
>
> Inquiring minds want to know!
>
> Thanks Reid
>
>
>
>
>
>
>
> -
> Do You Yahoo!?
> Send your FREE holiday greetings online at Yahoo! Greetings.


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




Looking for a clean required-bean handler

2001-12-31 Thread Reid Pinchback


Hi all!

The more I did into Struts the more I like it.  I have noticed
something that has me scratching my head a bit, wondered
if anybody else had come up with a clean solution.

Struts has a nice clean approach to organizing code and
behaviour after you click on something.  In other words, if
I have a form then I have a nice way in Struts to associate
the handler with the form.  If I have a URL then there are
decent ways that I can maintain the destinations in the
controller instead of in the html/jsp pages.  All nice.

What I don't see is a straight-forward way of indicating
what I want *before* going to a JSP page.

Ok, I know... that probably sounds a little odd.  My point
is simply this: my JSP pages are maintainable because
they, as view artifacts, don't know much about each other.
If I want may action classes to be just as maintainable
then they can't know much about each other either.

That is the thing I don't like about actions at the moment.
The action figures out how to process the incoming data
from the request *and* prepare the page/session/whatever
context before going to the next page.  An action can only
do that if it *knows* what the next page will require.  That
 means there is less point in having that transition information
explicitly captured in struts-config.xml because I might have
to know the same information implicitly in the action code.

So, here is what I want, and I'm hoping somebody has
already found a clean approach for it.  Instead of only
writing "process-X" actions, I also want to write some 
"prepare-for-Y" actions.  Then any JSP page has
potentially two actions; one executed as I head
into the page (e.g. to prep dynamic content), the other
executed as I head out of the page (e.g. for user response).
The clean way I can think of is to have some kind of
action that iterates over the beans that will be needed
by the next page, i.e.:

- step 1, if I don't have a UserBean, get me a UserBean
- step 2, if I don't have a UserPrefsBean, get me one
  (etc)

Then, you'd need some way of getting a controller-mediated
way of recognizing that some particular action must be
invoked to get a UserBean, etc., and then returning control
back to the "prep" action.  Once the prep action has
everything it needs, it forwards to the next step.

Is this crazy?  Sane but not done before?  Sane and
done already?  

Inquiring minds want to know!

Thanks Reid

 

 



-
Do You Yahoo!?
Send your FREE holiday greetings online at Yahoo! Greetings.


ClassCastException only with 1.4b3

2001-12-31 Thread David M. Karr

I'm running Tomcat4.02b1, and Struts 1.0.1rc1.  I've started to write a small
Struts application with a few pages, and several actions and forms.  When I run
Tomcat with JDK1.3.1, it deploys fine (although I get some errors that are due
to me).  However, if I deploy it while Tomcat is using JDK1.4b3, I see the
following in the startup output:

Begin event threw exception
java.lang.IllegalArgumentException: java.lang.ClassCastException@6fa9fc
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
at java.lang.reflect.Method.invoke(Method.java:327)
at 
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:986)

I also tried this with a Struts version of a few months ago (about 9/29).  I'm
not sure how to tell exactly what version it is.  The results were the same.

I've noticed that the stack trace sometimes is "GeneratedMethodAccessor11",
instead of "10", but I have no idea what that means.

I tried searching for some of these aspects in the struts-user and tomcat-user
lists, but I didn't find anything.

-- 
===
David M. Karr  ; Best Consulting
[EMAIL PROTECTED]   ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)


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




RE: Struts & EJB support

2001-12-31 Thread Taylor Cowan

+AD4-So why would anyone say +ACI-people attempt EJBs to much+ACI-  for 
+AD4-medium sized projects ?

Because those points don't make sense.

1) J2EE supports pooled database connections without EJB, unless I don't understand 
what +ACI-Automated Database pooling+ACI- means.

2) Even if I were using EJB, I would NOT use container managed persistence.  As a 
matter of fact, I'd first avoid entity beans until absolutely necessary, and then I'd 
only use BMP.  When you use BMP you can easily plug in another type of persistence, 
for example, switching from JDBC to JDO.  Since you are a fan of plugability, then 
it's odd that you like CMP.  

3) more plugable that what?  When you use CMP you are first isolating yourself to EJB 
2.0.  People who used CMP in 1.0 learned that the hard way.  CMP 1.0 wasn't even 
+ACI-plugable+ACI- to the next version of CMP.

-Original Message-
From: Sushant Patney +AFs-mailto:xpatney+AEA-hotmail.com+AF0-
Sent: Monday, December 31, 2001 2:27 AM
To: Struts Users Mailing List
Subject: Re: Struts +ACY- EJB support


Hi
I am geeting the idea from a no. of people that that EJB should only be used
if u want Scalibility /Distributed or Transaction Managment.
But That is against of my knowledge. Apart from the Software Appserver Cost
we do get benefits from EJB also
1) Automatic Database pooling
2) easier deveopment +ACY- more flexibility by use of container managed services
3) more plugable component architechure
So why would anyone say +ACI-people attempt EJBs to much+ACI-  for medium sized
projects ?
Thanks


- Original Message -
From: +ACI-Vic Cekvenich+ACI- +ADw-vic+AEA-basebeans.com+AD4-
To: +ACI-Struts Users Mailing List+ACI- +ADw-struts-user+AEA-jakarta.apache.org+AD4-
Sent: Friday, December 28, 2001 9:18 PM
Subject: Re: Struts +ACY- EJB support


+AD4- When I did EJB's, my understanding was that Sun would recommend them for
+AD4- distributed application. Other's found them very slow.
+AD4- This is said on EBB home page +ACI- the EJBTM server-side component model
+AD4- simplifies development of middleware components that are transactional,
+AD4- scalable, and portable.+ACI-
+AD4- So if you do not need midldleware, ie, distributed, consider not using
+AD4- EJBs. Middleware makes sense on only about 5+ACU- of applications, so
+AD4- perhaps people attempt EJBs to much. If you do need distributed, perhaps
+AD4- SOAP is better. EJB API to me is like SWING api, it has it's uses,
+AD4-
+AD4- Just a JavaBean or a rowset or a combo for model does just fine.
+AD4-
+AD4- Vic
+AD4-
+AD4- Jon Ferguson wrote:
+AD4-
+AD4- +AD4-Am I not correct in suggesting that Action objects are essentially our
+AD4- +AD4-opportunity to connect into an EJB model... Therefore struts' major
+AD4- +AD4-focus is not on the Model side of things which is where EJB majors (esp.
Entity
+AD4- +AD4-Beans).  The two seem like a cool fit.
+AD4- +AD4-
+AD4- +AD4-As far as scalability issues... what features make you say struts is
generally
+AD4- +AD4-targets medium sized projects?  Perhaps the single servlet controller?
+AD4- +AD4-Or are you drawing a parallel between size and complexity? Eg. lack of
workflow
+AD4- +AD4-yet (unless its farther on than I thought+ACE-).
+AD4- +AD4-
+AD4- +AD4-Cheers,
+AD4- +AD4-Jon
+AD4- +AD4-
+AD4- +AD4-Gopalakrishnan Rangaswamy wrote:
+AD4- +AD4-
+AD4- +AD4APg-Patney,
+AD4- +AD4APg-
+AD4- +AD4APg-The struts framework is basically meant for medium sized projects, so
+AD4- +AD4APg-EJBs are not envisaged as part of it.  If the project is big, and likely
+AD4- +AD4APg-to face scalability issues then it is better to adapt ejb based design
+AD4- +AD4APg-patterns.
+AD4- +AD4APg-
+AD4- +AD4APg-And nothing stops from calling a ejb in the struts framework.
+AD4- +AD4APg-
+AD4- +AD4APg-hope this helps.
+AD4- +AD4APg-
+AD4- +AD4APg--Original Message-
+AD4- +AD4APg-From: Patney +AFs-mailto:xpatney+AEA-hotmail.com+AF0-
+AD4- +AD4APg-Sent: Friday, December 28, 2001 5:09 PM
+AD4- +AD4APg-To: 'Struts Users Mailing List'
+AD4- +AD4APg-Subject: Struts +ACY- EJB support
+AD4- +AD4APg-
+AD4- +AD4APg-Hi All,
+AD4- +AD4APg-Can anyone give comment for my observation below :
+AD4- +AD4APg-
+AD4- +AD4APg-According to the struts documentation , it seams to be focusing a lot on
+AD4- +AD4APg-the
+AD4- +AD4APg-Servlet / JSP combination and does not seam to be exploiting the EJB
+AD4- +AD4APg-features as extensively as it could.
+AD4- +AD4APg-
+AD4- +AD4APg-Do i need to use Sun Pet Store for best EJB design practises and
+AD4- +AD4APg-possible
+AD4- +AD4APg-pick up some code (generic classes) from it
+AD4- +AD4APg-
+AD4- +AD4APg-Thanks in advance
+AD4- +AD4APg-
+AD4- +AD4APg---
+AD4- +AD4APg-To unsubscribe, e-mail:
+AD4- +AD4APgA8-mailto:struts-user-unsubscribe+AEA-jakarta.apache.org+AD4-
+AD4- +AD4APg-For additional commands, e-mail:
+AD4- +AD4APgA8-mailto:struts-user-help+AEA-jakarta.apache.org+AD4-
+AD4- +AD4APg-
+AD4- +AD4APg---
+AD4- +AD4APg-To unsubscribe, e-mail:
+ADw-mailto:struts-user

Re: Resin 2.0.0 & Struts 1.0 & JDK1.4.0-beta3 BUG?

2001-12-31 Thread Dietmar Kling

Hi,

seems to me like my JDK1.4.0 bug (see archive: Problem with different 
Struts versions )
Replace JDK with IBM JDK
 and i bet this Exception will go away ...

Regards
Dietmar


Ted Husted wrote:

>
> 
>
> Subject:
>
> Re: Resin 2.0.0 & Struts 1.0 & JDK1.4.0-beta3 BUG?
> From:
>
> Ted Husted <[EMAIL PROTECTED]>
> Date:
>
> Mon, 31 Dec 2001 09:19:54 -0500
> To:
>
> Struts Users Mailing List <[EMAIL PROTECTED]>
>
> To:
>
> Struts Users Mailing List <[EMAIL PROTECTED]>
>
>
>It looks like there are some mis-matched JARs. Try replacing the ones in
>the WEB-INF/lib with fresh copies from the struts-example application
>(assuming that one works for you).
>
>
>Lenharcik Juraj wrote:
>
>>Hi,
>>
>>I have tried to run a simple struts web-app with this configuration (above).
>>I get then this exception:
>>
>>$ Resin 2.0.0 (built Fri Jun  8 12:04:24 PDT 2001)
>>Copyright(c) 1998-2001 Caucho Technology.  All rights reserved.
>>
>>Starting Resin on Sat, 22 Dec 2001 08:44:50 +0100 (CET)
>>Begin event threw exception
>>java.lang.IllegalArgumentException: object is not an instance of declaring
>>class
>>
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at
>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>>java:42)
>>at
>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>>sorImpl.java:28)
>>at java.lang.reflect.Method.invoke(Method.java:327)
>>at
>>org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.
>>java:825)
>>at
>>org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.
>>java:756)
>>at
>>org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:7
>>82)
>>at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:541)
>>at
>>org.apache.struts.digester.SetPropertiesRule.begin(SetPropertiesRule.
>>java:120)
>>at
>>org.apache.struts.digester.Digester.startElement(Digester.java:498)
>>at
>>org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.ja
>>va:329)
>>at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490)
>>at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
>>at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
>>at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
>>at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
>>at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
>>at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>>at
>>org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
>>
>>at
>>org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
>>
>>at javax.xml.parsers.SAXParser.parse(SAXParser.java:316)
>>at javax.xml.parsers.SAXParser.parse(SAXParser.java:91)
>>at org.apache.struts.digester.Digester.parse(Digester.java:716)
>>at
>>org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java
>>:1301)
>>at
>>org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
>>at javax.servlet.GenericServlet.init(GenericServlet.java:82)
>>at
>>com.caucho.server.http.Application.createServlet(Application.java:212
>>7)
>>at
>>com.caucho.server.http.Application.loadServlet(Application.java:2091)
>>
>>at
>>com.caucho.server.http.Application.initServlets(Application.java:1347
>>)
>>at com.caucho.server.http.Application.init(Application.java:1303)
>>at com.caucho.server.http.VirtualHost.init(VirtualHost.java:446)
>>at
>>com.caucho.server.http.ServletServer.initHosts(ServletServer.java:480
>>)
>>at com.caucho.server.http.ServletServer.init(ServletServer.java:386)
>>at
>>com.caucho.server.http.ServletServer.(ServletServer.java:214)
>>at com.caucho.server.http.ResinServer.init(ResinServer.java:289)
>>at com.caucho.server.http.ResinServer.main(ResinServer.java:871)
>>at com.caucho.server.http.HttpServer.main(HttpServer.java:93)
>>http listening to *:8080
>>srun listening to 127.0.0.1:6802
>>
>>When I run it with java 1.3.0._02 it works fine. Can someone explain me,
>>waht happend?
>>
>>Thank you Juraj
>>
>>plz do as CC -> [EMAIL PROTECTED]
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>




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




Re: html:link tag bug???, Really need help!

2001-12-31 Thread Ted Husted

You may have to put the anchor link in by hand

THe linkTHe
link

I agree that it should produce both. You might submit this as an
enhancement request to Bugzilla. 

http://nagoya.apache.org/bugzilla/



"Struts Newsgroup (@Basebeans.com)" wrote:
> 
> Subject: html:link tag bug???, Really need help!
> From: "Nicolas Parisé" <[EMAIL PROTECTED]>
>  ===
> Hi,
> 
> I work in a project now where I need to use the html:link tag
> this way
> 
> THe
> link
> 
> Every time the linkName param is present, the page tag is removed, so in the
> previous
> example, here is the rendered HTML
> 
> THe link
> 
> Where is my href="/listProducts.do" ???
> 
> I really need to use the anchor "name" tag, because I call this anchor from
> a Javascript menu
> 
> please help me
> 
> Thank you!
> 
> Nicolas Parise
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: Resin 2.0.0 & Struts 1.0 & JDK1.4.0-beta3 BUG?

2001-12-31 Thread Ted Husted

It looks like there are some mis-matched JARs. Try replacing the ones in
the WEB-INF/lib with fresh copies from the struts-example application
(assuming that one works for you).


Lenharcik Juraj wrote:
> 
> Hi,
> 
> I have tried to run a simple struts web-app with this configuration (above).
> I get then this exception:
> 
> $ Resin 2.0.0 (built Fri Jun  8 12:04:24 PDT 2001)
> Copyright(c) 1998-2001 Caucho Technology.  All rights reserved.
> 
> Starting Resin on Sat, 22 Dec 2001 08:44:50 +0100 (CET)
> Begin event threw exception
> java.lang.IllegalArgumentException: object is not an instance of declaring
> class
> 
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:42)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:28)
> at java.lang.reflect.Method.invoke(Method.java:327)
> at
> org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.
> java:825)
> at
> org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.
> java:756)
> at
> org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:7
> 82)
> at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:541)
> at
> org.apache.struts.digester.SetPropertiesRule.begin(SetPropertiesRule.
> java:120)
> at
> org.apache.struts.digester.Digester.startElement(Digester.java:498)
> at
> org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.ja
> va:329)
> at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490)
> at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
> at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
> at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
> at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
> at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
> at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
> 
> at
> org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
> 
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:316)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:91)
> at org.apache.struts.digester.Digester.parse(Digester.java:716)
> at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java
> :1301)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
> at javax.servlet.GenericServlet.init(GenericServlet.java:82)
> at
> com.caucho.server.http.Application.createServlet(Application.java:212
> 7)
> at
> com.caucho.server.http.Application.loadServlet(Application.java:2091)
> 
> at
> com.caucho.server.http.Application.initServlets(Application.java:1347
> )
> at com.caucho.server.http.Application.init(Application.java:1303)
> at com.caucho.server.http.VirtualHost.init(VirtualHost.java:446)
> at
> com.caucho.server.http.ServletServer.initHosts(ServletServer.java:480
> )
> at com.caucho.server.http.ServletServer.init(ServletServer.java:386)
> at
> com.caucho.server.http.ServletServer.(ServletServer.java:214)
> at com.caucho.server.http.ResinServer.init(ResinServer.java:289)
> at com.caucho.server.http.ResinServer.main(ResinServer.java:871)
> at com.caucho.server.http.HttpServer.main(HttpServer.java:93)
> http listening to *:8080
> srun listening to 127.0.0.1:6802
> 
> When I run it with java 1.3.0._02 it works fine. Can someone explain me,
> waht happend?
> 
> Thank you Juraj
> 
> plz do as CC -> [EMAIL PROTECTED]
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: Removing obsolete form beans from request?

2001-12-31 Thread Ted Husted

It's not necessary. 

Craig describes it as "defensive programming", but its not something I
do in my own applications. 


Hai-Bang Pham wrote:
> 
> I've noticed in the struts examples that the form beans are removed even if the
> scope is set to "request".
> 
> Is this really necessary?  This happens in the LogonAction, SaveRegistrationAction, 
>and SaveSubscriptionAction as below:
> 
> ...
> // Remove the obsolete form bean
>  if (mapping.getAttribute() != null) {
> if ("request".equals(mapping.getScope()))
> request.removeAttribute(mapping.getAttribute());
> else
> session.removeAttribute(mapping.getAttribute());
> }
> ...
> 
> I can understand that this would be needed for "session" scope but why do it for
> the request if a new one is created with each http request?
> 
> -Hai
> 
> -
> Do You Yahoo!?
> Send your FREE holiday greetings online at Yahoo! Greetings.

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




Re: false call

2001-12-31 Thread Ted Husted

Personally, I can envision an "wrapper" application running on your
client network that would make autenticated calls to your network and
relay the response. The wrapper application would consist entirely of
Actions that would capture the response from the SOAP exchange, write it
out as the response, and then return NULL to the controller. It may be
possible that it would be a single action configured through various
mappings. (Though, I can't help but think there might be simpler
solutions as well.)

For now, the best way to provide application-wide security is to
subclass ActionServlet, and scan the incoming requests at that level.
This ensures the request is authorized before it ever gets to an Action.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- "Building web applications with Struts."
-- Tel 585 737-3463.
-- http://www.husted.com/struts/



Himanshu Chhabra wrote:
> 
> Hi !
> Now, this problem is gruelling me.
> The statement is thus :
> 
> I have a intranet site for our company. I have another intranet site which
> belongs to our client.
> Now, we have a set of users which belong to the client network but still
> should be able to access our company site.
> We can't open our intranet to the client intranet for that would open it to
> people outside the company.
> Also, don't want to open any ports other than the default 80 for http.
> 
> One of the ways we have thought is to put up an application in the client
> network which will be the authenticated entry point.
> This application will send SOAP messages to a service running on our
> intranet. This web-service would simulate a browser call and get the html
> which it would send back to the application. The application would then put
> it to the client browser.
> 
> Does this sound feasible ?
> 
> Please advise.
> 
> Also, do we have a configuration mechanism by which we can pass any request
> coming to the application server through a code piece which would be say
> responsible for security ?
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: reload button

2001-12-31 Thread Ted Husted

See 

http://jguru.com/forums/view.jsp?EID=480547


Crisalyn Ramos wrote:
> 
> Hi, all.
> 
> How do I disable the resubmission of a data when the reload button is
> clicked?
> 
> thanks,
> Cris
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: force a reset of value

2001-12-31 Thread Ted Husted

Struts 1.0 does not call reset if the ActionForm is being instantiated
by the html:form tag. This behaviour has been changed in the nighty
build. 

The best all-around solution is to route control through an Action
first, and then forward to the page. This lets the controller call
reset, and keeps the name of your JSPs out of the navigational logic. 





So now you can refer to logon.do instead of /pages/Logon.jsp

The ContinueAction can be implemented with a single line in the perform
method 

return mapping.findForward("continue");

If creating action mappings is an issue, you can do the same thing with
a "relay action"

http:// ... /relay.do?forward=/pages/Logon.jsp






return mapping.findForward(request.getParameter("forward"));



Crisalyn Ramos wrote:
> 
> Hi, all!
> 
> How do I force a reset of property values on page load. Already
> overriden the public void reset(ActionMapping, HttpServletRequest)
> methods but still does not reset the values on page load.
> 
> Something I am missing?
> 
> thanks,
> Joy
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: action classes aren't dinamically loaded (with BroadVision)

2001-12-31 Thread Ted Husted

It's been my experience that different containers vary in their ability
to sense changes to Action classes and even JavaServer Pages. Resin is
quite good at this. Tomcat on Linux is also good at this. (Though Tomcat
on NT does not seem to be quite as good.) This is really up to the
container, and there isn't much that Struts can do about it. 

The load-on-startup is defined by the servlet specification. 

http://java.sun.com/products/servlet/

It simply indicates in which order the servlet should be loaded. The
"zeros" are loaded first, then the "1"s and then the "2"s and so forth.
It doesn't affect runtime behavior. 


If I were using something like BroadVision, I might be tempted to do my
desktop development using another container, like Resin, and then test
the deployment against both Tomcat and Broadvision. This is to ensure
that application remains compliant, and is not relying on any
proprietary "features". Of course, this implies that automated unit
tests are being written and can be run automatically using something
like Cactus, on at least a daily basis.



Gaetano Bigliardi wrote:
> 
>  I've a problema using Struts with BroadVision One-To-One Enterprise. The
> problem is: I write an action class, after defining it in the file 
>"/WEB-INF/struts-config.xml",
> and I execute it. When I make a change in the Java action class  I execute
> again it, the result is that the action class is not reloaded!
> 
>   I've definded the "/demo" context to be reloadable in the BroadVision
> XML configuration file (and this define also that "/demo" is using JSP rather
> than server-side JavaScript). Using plain JSP the classes in the directory
> "/WEB-INF/classes" are dinamically reloaded when the JSP is recompiled.
> Using Struts the actions aren't reloaded dinamically.
> 
>   This is my web.xml and struts-config.xml file. A question: what does it
> mean "load-on-startup" with value 2?
> 
>   Thanks, Gaetano Bigliardi
> 
> --- web.xml
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd";>
> 
> 
> 
> 
> jspCompiler
> 
> 
> *.jsp
> 
> 
> 
> 
> jspCompiler
> 
> 
> org.apache.jasper.runtime.JspServlet
> 
> 
> scratchdir
> /home/jsvil/bv1to1_var/scratchdemo
> 
> 
> 
> action
> *.do
> 
> 
> action
> org.apache.struts.action.ActionServlet
> 
> config
> /WEB-INF/struts-config.xml
> 
> 
> debug
> 0
> 
> 
> detail
> 0
> 
> 
> validate
> true
> 
> 2
> 
> 
> 
> --- struts-config.xml
> 
> 
>"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";
> >
> 
> 
> 
> 
>   
>type="demoa_login"
>  scope="session">
>
>  
>type="test01"
>  scope="session">
>
>  
>type="anagrafica_mvc"
>  scope="session">
>
>  
>   
> 
> 
> --- bvsm.xml
> 
>   
> 
> 
> __
> Abbonati a Tiscali!
> Con Tiscali By Phone puoi anche ascoltare ed inviare email al telefono.
> Chiama Tiscali By Phone all' 892 800http://byphone.tiscali.it
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: Nested templates...

2001-12-31 Thread Ted Husted

You might want to try Cedric's Tiles library, which is more powerful
than the original template library. 

http://www.lifl.fr/~dumoulin/tiles/

This is also in the contrib folder for the nightly build, though I
believe Cedric will be submitting it to Jakarta Taglibs soon, since it
can be also used outside of Struts. 

Tiles also has a very nifty feature that can render a template
dynamically, and eliminate many of the "wrapper" files. I've used Tiles
my own production applications, and couldn't imagine getting by without
it. Highly recommended.


Marcelo Caldas - CCSC wrote:
> 
> Hi,
> Is it possible to nest templates?
> 
> Like for instance I have template.jsp with:
> 
> 
> 
> 
> 
> Then I have a listTemplate.jsp like:
> 
> 
>  
>  
>  
>  
>  
> 
> 
> Now it's time to use my listTemplate.jsp:
> Finally my page
> 
> 
> 
> 
> Right now, I'm receiving the following exception:
> java.lang.ClassCastException: org.apache.struts.taglib.template.util.ContentMap
> 
> Thanks in advance,
> Marcelo.

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




Re: Resetting Application Scope Data Once A Day

2001-12-31 Thread Ted Husted

You might consider setting up an administrative action that would
refresh the application attributes on demand. The URL for the admin
action could be called as part of the batch job, possibly using Cactus
or some other utility designed to submit a HTTP request. 

So you would simply have something like

http://mydomain.tld/myapp/Admin/refreshMenu.do?password=glock3nspi3l

That you could call yourself, or some external process could call on a
schedule, with all the other batch jobs.

I don't know if this applies, but you should also consider any
latency/threading issues that may occur if the application data changes
in the middle of a transaction. Would anything bad happen if someone
used the 3:59a menu at 4:01a ?

If so, you may need to keep two sets of the data, and flip back and
forth (3:59a was batch 0, 4:01a is batch 1, tomorrow would be batch 0
again), and include the batch id as part of the request. Of course, this
assumes that no one will their session active for 24+ continous hours
and be able to submit Wednesday's page on Friday.


"Hohlen, John" wrote:
> 
> > Hi.
> >
> >  I was wondering if any other Struts developers have a situation
> > similar to ours regarding the resetting "Application" scoped data once a
> > day?  If so, I'd like to know what solution you used.
> >
> >  Here's our particular situation:
> >
> >  We have choices on an input screen, a drop-down menu to be exact,
> > that come from a database.  The choices only change once a day -- in the
> > middle of the night after a batch job runs on another machine.   Since
> > these choices are always the same, we don't want to take a database hit
> > every time a user comes to our particular page.  Therefore, we've elected
> > to store the choices in hashmap scoped at the Application level.
> >  However, once a day we would like to update the hashmap.  Ideally, at
> > a particular time after we know the batch job on the other machine has.
> > For example, 4:00 a.m.   We would like this time to be configurable via
> > the web.xml file.  We've extended both the Struts "ActionServlet" and
> > "Action" classes to do some additional processing that we need.  Hence,
> > all our action classes derive from our extended Struts "Action" class.  We
> > use our extended Struts "ActionServlet" class as our main servlet.
> >
> >  My question is this:
> >
> >  If we write some logic to monitor for the first request that occurs
> > after each day rollover time (e.g. 4:00 a.m.), should this logic reside in
> > the Servlet or our base Action class?  Either way, this day rollover check
> > would have to occur every time a HTTP request is made.Is this a
> > reasonable solution?  Or would a better solution be to spawn a separate
> > thread that simply sleeps until the configured time each day (e.g 4:00
> > a.m.) and then wakes up to update the Application scoped hashmap?
> >  Has anyone addressed this need before?
> >
> > Thanks,
> >
> > John
> >
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: a problem with struts logic:iterate

2001-12-31 Thread Ted Husted

Using the iterate tag to create the HTML for table is no different than
creating any type of HTML. 

You might take a look a the struts-exercise-taglib example in the
distribution. This tests iterating over a String array and an ArrayList.
You could try placing this page in your application, substituting your
own JavaBeans, and continuing from there. 

Of course, in a production application, the beans should be created in
an Action and forwarded to a page, rather than be created by scriplets
as is done on the test page. But having a page like this can be very
handy for initial development.


Xin Li wrote:
> 
> Hi,
> 
> I tried to use logic:iterate to populate a table. I used
> 
> this is the test page
> 
> 
> KeyTableArray is the attribute, which contatains an ArrayList.
> 
> When I try to run the the application, it gave me the following error:
> 
> org.apache.jasper.compiler.CompileException: Unable to find setter method
> for attribute: indexId
> 
> Can anybody tell me why this happens?  I would appreciate if an example of
> how to use iterate to populate a table is provided.
> 
> Xin
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: New entities in struts-config?

2001-12-31 Thread Ted Husted

Deft handling of HTTPS is a blind spot in the framework. I do think we
need a better all-around solution for this. For now, you could set up
alternate struts-config's for each host, and then edit the web.xml when
its deployed. But that's really messy. The entity in the DTD is a clever
idea but that also requires editing the configuration after it is
deployed.

Another alternative would be to use a utility method in the Action which
turned the context relative path into an absolute path using a specified
scheme and port. Something that looked like this: 

ActionForward newForwardAbsolute( HttpServletRequest request,
ActionForward forward, String scheme, String port); 

So this would return a new ActionForward based on the first, but with an
adjusted path. 

In the Action, you could call it like this:

return newForwardAbsolute(request, mapping.findForward("continue"),
"HTTPS", ""); 

If you do anything like this, please consider contributing it back to
the community as an enhancement request to RequestUtils.

http://nagoya.apache.org/bugzilla/


"Wilson, Wayne" wrote:
> 
> Hi,
> 
> In order to be able to toggle back and forth between secure and insecure
> mode (https & http) I have had to use some static URLs in the
> global-forwards section of the struts-config. Since this app gets deployed
> into multiple environments (with different hostnames) I would like an easier
> way to update my struts-config with the hostnames. I created a custom dtd
> (and pointed the struts-config at it) with a new HOST entity (and a
> reference to the existing dtd for all the rest):
> 
> 
> 
> 
>  "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
> 
> 
> 
> which I used in my path attribute in a forward tag in the struts-config:
> 
> 
> http://&HOST;/test.jsp"/>
> https://&HOST;/test.jsp"/>
> 
> 
> 
> 
> This worked fine when opened up the struts-config.xml in IE, but Tomcat
> (Struts) complained that HOST wasn't defined. Is the digester going straight
> to the "official" dtd and ignoring mine? Does anyone know what I am doing
> wrong or how else I can do this type of replacement in the struts-config?
> 
> Thanks,
> 
> Wayne Wilson
> 
>

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




Re: FOP, XSL & Struts

2001-12-31 Thread Ted Husted

The Action has direct access to the HttpResponse, and would do it the
same way as any plain servlet.

I can't be more specific without spending more time in the FOP
documentation. But any example for a plain servlet should work in an
Action, just use the provided response instance to obtain the writer.


Ajay Chitre wrote:
> 
> Hello,
> 
> I am trying to create a report in PDF format using FOP in my Struts based
> application.  When I use a previously created "fo" file my code works fine.
> 
> For example, when I do something like this it works fine;
> 
> //This is a test!
> String foParam = "c:\\temp\\TestReport.fo";   //TODO
> FileInputStream file = new FileInputStream(foParam);
> InputSource foFile = new InputSource(file);
> ByteArrayOutputStream out = new ByteArrayOutputStream();
> 
> //Instantiate Driver
> org.apache.fop.apps.Driver driver = new Driver(foFile, out);
> 
> driver.setLogger(log);
> driver.setRenderer(Driver.RENDER_PDF);
> driver.run();
> 
> This works!
> 
> Now what I would like to do is create the "fo" file dynamically.  The report
> data is in a collection of Value objects.  What's the best way to do this
> in my Struts Action class?  Please help.
> 
> Thanks.
> 
> Ajay Chitre
> 
> Diligent Team, Inc.
> (Where Diligent People Work as a Team)
> 
> http://www.DiligentTeam.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: How do I use nested Collections with iterate tag?

2001-12-31 Thread Ted Husted

You might have a look at Arron's Nested Struts Extension

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


Prem Kumar Ponnuraj wrote:
> 
> Hi,
> 
> I have an ArrayList of ArrayList.
> /***
> ArrayList objScreenDetailsContainer = new ArrayList();
> ArrayList objRowDetails = new ArrayList();
> objRowDetails.add("Hello1");
> objRowDetails.add("Hello2");
> objScreenDetailsContainer.add(objRowDetails);
> objRowDetails = new ArrayList();
> objRowDetails.add("World1");
> objRowDetails.add("World2");
> objScreenDetailsContainer.add(objRowDetails);
> ***/
> 
> I have set the objScreenDetailsContainer object to the form bean.
> 
> Could you give an idea of how to get this collection from the form bean
> to the iterate tag(I'm not setting that object in the request).
> 
> Also my display requirement is this :
> /***
> 
> 
> 
> Hello1
> Hello2
> 
> 
> 
> World1
> World2
> 
> 
> ***/
> 
> The problems faced are :
> Not able to get the object from the bean (applcation scope)thru' iterate
> tag.
> Not able to get the indexId of the ArrayList and set it as value to the
> radio.
> Don't have idea of how to get the inner ArrayList and iterate.
> 
> the code for this will be of much help.We want to achieve this with tags
> alone.We
> don't want to use scriptlets.
> 
> Rgds,
> 
> Prem
> 
>   
>Name: Wipro_Disclaimer.txt
>Wipro_Disclaimer.txtType: Plain Text (text/plain)
>Encoding: 7bit
> 
>   
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




How do I use nested collections with iterate tag

2001-12-31 Thread Prem Kumar Ponnuraj

Hi,

I have an ArrayList of ArrayList:

ArrayList objScreenDetailsContainer = new ArrayList();
ArrayList objRowDetails = new ArrayList();
objRowDetails.add("Hello1");
objRowDetails.add("Hello2");
objScreenDetailsContainer.add(objRowDetails);
objRowDetails = new ArrayList();
objRowDetails.add("World1");
objRowDetails.add("World2");
objScreenDetailsContainer.add(objRowDetails);


I have set the objScreenDetailsContainer object to the form bean.

Could you give an idea of how to get this collection from the form bean
to the iterate tag(I'm not setting that object in the request).

My display requirement is this :




Hello1
Hello2



World1
World2




The problems faced are :
Not able to get the object from the bean (applcation scope)thru' iterate

tag.
Not able to get the indexId of the ArrayList and set it as value to the
radio.
Don't have idea of how to get the inner ArrayList and iterate.

the code for this will be of much help.We want to achieve this with tags

alone.We don't want to use scriptlets.

Rgds,

Prem





---
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




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


html:text and international date / value formats (like bean:write)

2001-12-31 Thread Torsten Trzeciak

Hi,
I am developing an application which must present numbers and dates in
different international formats.
The new bean:write tag (format attribute) works great. Although I don't
know to which version the nightly built belongs.
 
Now I need something similar for the html:text tag to present my form
data in different formats.
 
What is the best approach?
 
Using a common html tag with bean:write as a value ?
How will the form -> bean mapping work after sending the form data?
 
Thanks in advance
 



Any readonly property for The tag

2001-12-31 Thread Sudhir S. Shetty

Hello,
 I'd Like to make my  Readonly, Is there any property
for it., If I use disabled="true" I cant access the parameter of the Select
tag
thanks in advance.
regards,
Sudhir


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