RE: Struts custom tags tutorial

2003-08-27 Thread Edgar Dollin
In the case, the user described below, I didn't.

What he wanted to do was, based on data values, guarantee a color scheme and
other criteria, i.e. maybe all negative numbers should be in red.  This is
view based logic, but one of the priciples we all use is try not to write
the same code twice.

I might be missing something but, JSTL, and most view technologies (except
custom tags, source includes and tiles), don't have the ability to
modularize common code or have strange syntax to achieve the modularization.
So to say just use the standard technologies and let the view have the view
logic is a bit of a cop out.

I suspect that most of what he wants to do is already in struts-layout so
there is a work around without writing his own tags.

Edgar

 -Original Message-
 From: Bill Chmura [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 26, 2003 12:53 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts custom tags tutorial 
 
 
 
 I am not sure if you agreed with me or not on that one.  In 
 case you did not, to clarify:  I think that the view should 
 handle all the logic for presenting the data.  It should not 
 be tied into the business logic For example, the business 
 logic should know how to get all the parts from the database 
 that are active.  The View logic should cover how to make 
 them into rows, colors, highlighting.
 
 The display should really only know what data is coming back. 
  From then on it should have the responsibility of making it 
 pretty and paginating and such.  
 
 I think we may be on the same page
 
 
-Original Message-
From: Edgar Dollin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 26, 2003 10:07 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts custom tags tutorial 


Logic in the display which needs to know anything about the 
specifics of business logic, makes no sense to me, although 
there seem to be very few of us who have this attitude.  
Examples of this include field size; required fields; 
number logic (internationalization), etc.

Edgar

 -Original Message-
 From: Bill Chmura [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 26, 2003 4:26 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts custom tags tutorial 
 
 
 
 Here are two easy ways out...
 
 http://edhill.its.uiowa.edu/display-examples/
 (Wonderful, worked great for me)
 
 or
 
 http://jakarta.apache.org/velocity
 (Simple templating, integrates nicely)
 
my code corresponding to these struts tags else where. This 
way the logic to display the data will not be there on the 
JSP page.
 
 Why don't you want the display logic there?  I always
 considered that the view should control how the data is 
 displayed...  I could (and often are wrong about these 
 things) but it strikes me as strange.  If you are trying to 
 keep it simple for HTML developers, try velocity.  Most 
 anyone can do templates in that.
 
 Me
 
 
 
-Original Message-
From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 26, 2003 2:51 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts custom tags tutorial 


Hi Steve,
Let me clarify:
I know some of the basic concepts of struts and I have 
been using things like the Action class, the Form class 
etc. But the point is, after having finished the work on 
the backend logic, I have to present my data in the form of 
tables on the page. Now the table dimensions, the colours 
used, etc. can vary based on the data generated. So I 
wanted to use custom Struts tags on the page where the 
table has to be generated and displayed. Then I want to put 
my code corresponding to these struts tags else where. This 
way the logic to display the data will not be there on the 
JSP page. This is my problem. I have tried to get the right 
tutorial for this but my search has noy yielded the right 
results. Can you please help me. 

Thanks,
Seshadhri Srinivasan

-Original Message-
From: Steve Raeburn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 11:50 AM
To: Struts Users Mailing List
Subject: RE: Struts custom tags tutorial : urgent!!


I do appreciate that when you are completely new to a 
subject it can be difficult to know where to look. However, 
you'll get a much more sympathetic response if you 
demonstrate that you have at least tried to find things out 
for yourself before asking for help.

Start with the Struts web site:
 - http://jakarta.apache.org/struts/userGuide/index.html

RE: Struts custom tags tutorial

2003-08-26 Thread Edgar Dollin
Try struts layout, it is quite complete as far as display control is
concerned.

http://struts.application-servers.com

Edgar

 -Original Message-
 From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 26, 2003 1:51 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts custom tags tutorial 
 
 
 Hi Steve,
 Let me clarify:
   I know some of the basic concepts of struts and I have 
 been using things like the Action class, the Form class etc. 
 But the point is, after having finished the work on the 
 backend logic, I have to present my data in the form of 
 tables on the page. Now the table dimensions, the colours 
 used, etc. can vary based on the data generated. So I wanted 
 to use custom Struts tags on the page where the table has to 
 be generated and displayed. Then I want to put my code 
 corresponding to these struts tags else where. This way the 
 logic to display the data will not be there on the JSP page. 
 This is my problem. I have tried to get the right tutorial 
 for this but my search has noy yielded the right results. Can 
 you please help me. 
 
 Thanks,
 Seshadhri Srinivasan
 
 -Original Message-
 From: Steve Raeburn [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 26, 2003 11:50 AM
 To: Struts Users Mailing List
 Subject: RE: Struts custom tags tutorial : urgent!!
 
 
 I do appreciate that when you are completely new to a subject 
 it can be difficult to know where to look. However, you'll 
 get a much more sympathetic response if you demonstrate that 
 you have at least tried to find things out for yourself 
 before asking for help.
 
 Start with the Struts web site:
  - http://jakarta.apache.org/struts/userGuide/index.html
  - http://jakarta.apache.org/struts/resources/tutorials.html
  - http://jakarta.apache.org/struts/resources/examples.html
 
 And also try Google:
  - http://www.google.com/search?q=Struts+tutorial
  - http://www.google.com/search?q=Struts+examples
 
 Also, there are at least seven books specifically on Struts 
 and several others that offer some coverage.
 
 rant to=everyone that uses URGENT!! to get attention 
 priority=URGENT!!
   Flagging your messages as URGENT!! gives the impression 
 that you somehow
   think your problem is so important that others should stop 
 what they are
   doing and tend to your needs. In reality, URGENT!! tends to get your
   message ignored.
 
   Please, don't use URGENT!! unless your house is on fire. 
 And even then
   you'd probably be better off calling the fire service than 
 emailing me :-) /rant
 
 
 Steve
 
http://www.ninsky.com/struts/


 -Original Message-
 From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED]
 Sent: August 25, 2003 10:30 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts custom tags tutorial : urgent!!


 Hi,
 I have a JSP page in which I am supposed to add content dynamically 
 based on some logic. I came to know that using custom struts tags in 
 the jsp page can
 aid in making the presentation logic modular. However I have no idea of
 custom Struts tags. Can some one suggest a good tutorial to cover up this
 portion as quickly as possible?
 Thanks in advance

 Seshadhri Srinivasan


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






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

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



RE: Struts custom tags tutorial

2003-08-26 Thread Edgar Dollin
Logic in the display which needs to know anything about the specifics of
business logic, makes no sense to me, although there seem to be very few of
us who have this attitude.  Examples of this include field size; required
fields; number logic (internationalization), etc.

Edgar

 -Original Message-
 From: Bill Chmura [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 26, 2003 4:26 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts custom tags tutorial 
 
 
 
 Here are two easy ways out...
 
 http://edhill.its.uiowa.edu/display-examples/
 (Wonderful, worked great for me)
 
 or 
 
 http://jakarta.apache.org/velocity
 (Simple templating, integrates nicely)
 
my code corresponding to these struts tags else where. This 
way the logic to display the data will not be there on the 
JSP page.
 
 Why don't you want the display logic there?  I always 
 considered that the view should control how the data is 
 displayed...  I could (and often are wrong about these 
 things) but it strikes me as strange.  If you are trying to 
 keep it simple for HTML developers, try velocity.  Most 
 anyone can do templates in that.
 
 Me
 
 
 
-Original Message-
From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 26, 2003 2:51 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts custom tags tutorial 


Hi Steve,
Let me clarify:
  I know some of the basic concepts of struts and I have 
been using things like the Action class, the Form class 
etc. But the point is, after having finished the work on 
the backend logic, I have to present my data in the form of 
tables on the page. Now the table dimensions, the colours 
used, etc. can vary based on the data generated. So I 
wanted to use custom Struts tags on the page where the 
table has to be generated and displayed. Then I want to put 
my code corresponding to these struts tags else where. This 
way the logic to display the data will not be there on the 
JSP page. This is my problem. I have tried to get the right 
tutorial for this but my search has noy yielded the right 
results. Can you please help me. 

Thanks,
Seshadhri Srinivasan

-Original Message-
From: Steve Raeburn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 11:50 AM
To: Struts Users Mailing List
Subject: RE: Struts custom tags tutorial : urgent!!


I do appreciate that when you are completely new to a 
subject it can be difficult to know where to look. However, 
you'll get a much more sympathetic response if you 
demonstrate that you have at least tried to find things out 
for yourself before asking for help.

Start with the Struts web site:
 - http://jakarta.apache.org/struts/userGuide/index.html
 - http://jakarta.apache.org/struts/resources/tutorials.html
 - http://jakarta.apache.org/struts/resources/examples.html

And also try Google:
 - http://www.google.com/search?q=Struts+tutorial
 - http://www.google.com/search?q=Struts+examples

Also, there are at least seven books specifically on Struts 
and several others that offer some coverage.

rant to=everyone that uses URGENT!! to get attention 
priority=URGENT!!
  Flagging your messages as URGENT!! gives the impression 
that you somehow
  think your problem is so important that others should 
stop what they are
  doing and tend to your needs. In reality, URGENT!! tends 
to get your
  message ignored.

  Please, don't use URGENT!! unless your house is on fire. 
And even then
  you'd probably be better off calling the fire service 
than emailing me :-) /rant


Steve

 http://www.ninsky.com/struts/
 
 
  -Original Message-
  From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED]
  Sent: August 25, 2003 10:30 PM
  To: 'Struts Users Mailing List'
  Subject: RE: Struts custom tags tutorial : urgent!!
 
 
  Hi,
  I have a JSP page in which I am supposed to add content dynamically
  based on some logic. I came to know that using custom 
 struts tags in 
  the jsp page can
  aid in making the presentation logic modular. However I have no idea
 of
  custom Struts tags. Can some one suggest a good tutorial to cover up
 this
  portion as quickly as possible?
  Thanks in advance
 
  Seshadhri Srinivasan
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


RE: Whats the security trick for not permiting the browser back button on SignOut?

2003-08-22 Thread Edgar Dollin
Just invalidate the session when the user logs out.

Edgar

 -Original Message-
 From: Cezar Nasui [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 21, 2003 5:30 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Whats the security trick for not permiting the 
 browser back button on SignOut?
 
 
 Hi Brad,
 
 Isn't suggested not to use with Struts direct links to the jsp pages?
 a href=javascript:location.replace('somePageName.jsp') /a
 I don't recall exactly if this is the code needed to 
 erase/change the location but it looks just like simple 
 html link and still I think this doesn't solve my refresh 
 problem I mentioned before
 
 Cezar
 
 -Original Message-
 From: Brad Balmer [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 21, 2003 8:07 AM
 To: Struts Users Mailing List
 Subject: Re: Whats the security trick for not permiting the 
 browser back button on SignOut?
 
 
 I ran into a similar problem with my login application.  What 
 I did was simply replace the page name that is put in the 
 history with a page that I wanted.
 
 a href=javascript:location.replace('somePageName.jsp') /a
 
 
 
 Cezar Nasui wrote:
 
 Hi Henry,
 
 The problem I noticed is if you go Back to the first page 
 after login 
 and make a refresh on that page  you will be able to 
 navigate again in 
 your app as a  new session is created 'cause refresh re-post 
 the login 
 data. Your app does that? Do you know any solution for this one? I 
 think with some JavaScript you can erase the history of the Back 
 button.
 I
 don;t recall exaclty the code but I'll look for it. What I 
 want to know 
 is if it's a good method as we know we shouldn't rely on user's 
 settings (ex. Javascript not enabled).
 
 Cezar
 
 -Original Message-
 From: Henry Voyer [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 20, 2003 7:30 PM
 To: [EMAIL PROTECTED]
 Subject: Whats the security trick for not permiting the browser back 
 button on SignOut?
 
 
 Hi fellow Strutser
 
 I have implemented securityFilter (http://securityFilter.org) in my 
 struts app. But once i log off i can press the browsers back 
 button and 
 go back to the users content page.
 He cant do any action since the securityFilter dont let him 
 but he can
 still
 see the pages he already accessed.  i would like to know how to 
 implement the redirection to signIn page for the browser back button 
 once he SignOut.
 
 I have seen the examples of the Apache Admin site and the 
 security app 
 examples but i cant find how they do this.
 
 So guys whats the trick?
 
 Regards and thanks for all those who worked on the securityFilter and
 struts
 examples.
 
 _
 Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
 http://join.msn.com/?page=features/featuredemail
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
 
 

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



RE: Can an INPUT tag know its form name? Also, application resources...

2003-08-20 Thread Edgar Dollin
Matt:

This is the code I use in my tags to walk the tag stack.  If I remember
correctly, Aaron (the nested tags guy), had a problem with walking the tag
stack and had a different solution.  You can find that in the nested tag
library.

The default message file has a handle in the request / session using the
o.a.s.Globals.MESSAGES_KEY.

Edgar

public static ActionForm findActionForm(PageContext context, Tag tag)
{
String bean = findBeanName(tag);
if (bean == null) {
log.warn(findActionForm: could not find the bean);
return null;
}
return (ActionForm) context.findAttribute(bean);
}

public static String findBeanName(Tag tag)
{
FormTag ft = findFormParent(tag);
if (ft == null) {
log.warn(findBeanName: couldn't find HTML:FORM tag);
return null;
}
return ft.getBeanName();
}

public static FormTag findFormParent(Tag tag)
{
if (tag == null) {
log.warn(findFormParent: the supplied tag was null);
return null;
}
if (tag instanceof FormTag) {
return (FormTag) tag;
}
return findFormParent(tag.getParent());
}

-Original Message-
From: Kruse, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 12:41 PM
To: 'Struts Users Mailing List (E-mail)'
Subject: Can an INPUT tag know its form name? Also, application
resources...


In writing a taglib for my calendar popup, I've come across two
questions:

1) I need to write javascript which references the generated input
tag. To
do this, I need to know the name of the form that it is contained in to
get
a javascript reference to it. If no form name is found, I'll default to
form
[0]. This isn't working:

protected String getFormName() {
// Acquire the form tag we are associated with
FormTag formTag =
(FormTag)pageContext.getAttribute(Constants.FORM_KEY);
if (formTag==null) {
return 0;
}
else {
return '+formTag.getName()+';
}
}

I took this from the html:option tag as an example. Is this not
possible
for the form tag?

2) I have a .properties file for my taglib which defines standard text
and
default options. It would be great if a user could over-ride those
settings
with messages in their own application-specific MessageResources. Is
there a
generalized way, in my taglib code, to get a reference to the
application's
message resources so I can search for keys that over-ride my defaults?
The other option I thought of is that the developer can extend my taglib
with their own and point to their own MessageResources file, but this
isn't
as slick.
Any other options?

PS: Just have to clear up these two things and write more examples and
it'll
be ready for testing...

Thanks!

Matt Kruse


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



RE: Does Struts Menu work with subapps?

2003-08-20 Thread Edgar Dollin
It doesn't do url rewriting, but if you are using cookies I believe you will
be OK.

Edgar

-Original Message-
From: Menke, John [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 5:31 PM
To: 'Struts (E-mail)'
Subject: Does Struts Menu work with subapps?


Will the menu be able to handle links to subapps correctly?

-jm




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



RE: Suggestions for Calendar Popup taglib?

2003-08-19 Thread Edgar Dollin
There are ways around it, but why would you go to the trouble of splitting
the logic for validation into three pieces (business logic, jsp and struts
and then have to work around the issues it creates.

Edgar

 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 19, 2003 2:01 AM
 To: 'Struts Users Mailing List'
 Subject: Re: Suggestions for Calendar Popup taglib?
 
 
 I'm not totally clear what you mean by 'multiple downloads' 
 but with the 
 validator html:javascript tag, you can set the static javascript to 
 false and instead use a script link to a jsp with just the 
 html:javascript tag in, where the static=true attribute is set.
 
 This ensures that the browser can cache it successfully.
 
 
 Adam
 
 

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



RE: Suggestions for Calendar Popup taglib?

2003-08-18 Thread Edgar Dollin
I love your tag libraries and have used most of them.  It is very generous
of you to have donated them.

One of the problems I had with some struts tags, i.e. html:options, is that
there is a repetitive download of the same text.  In large pages, especially
nested pages, the size of the html becomes excessive, which of course is
aggravated by the tendency of struts to force reloads for validation.  This
problem is repeated in the validator with the same javascript being
downloaded multiple times (one reason why I don't bother with validator).

When I modified the struts tags to use your libraries, I created separate
.js files which were loaded only once.  I assume that the struts committers
will not want to distribute .js files so when you are putting together your
your tag could you keep track of emitting the javascript and do it only once
per page.

Also, I have some old databases I access which use non-standard data
formats.  Could you have an optional property to a class/method which would
convert the text to a java standard format.  Of course you could assume this
was a reentrant singleton class and you would only load it once.

Thanks

Edgar

-Original Message-
From: Kruse, Matt [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003 10:56 AM
To: 'Struts Users Mailing List (E-mail)'
Subject: Suggestions for Calendar Popup taglib?


I'm going to have some free time soon and I plan to convert my calendar
popup javascript (http://www.mattkruse.com/javascript/calendarpopup)
into a
tag lib to be easily used in struts apps.

If anyone has suggestions on how it should work or features it should
support, please let me know!

Also, should it be extending the struts html:input tag, or since those
will
one day go away, should I be extending a different taglib? I'm more
familiar
with the struts tags (extended them before) but I want the tag to be
useable
by the majority of struts developers :)

Matt

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



RE: get data source in servlet

2003-08-18 Thread Edgar Dollin
Create a class which doles out connections.  Instantiate the class using a
struts plugin and have a static method which can be called from anywhere to
get a new connection.  You can use this for JNDI connections, struts
connections or have a properties / XML configuration file to locate a
connection.  This is useful for testing business classes as well.  Just try
to find a connection from any of the possible places (of course try the one
you are going to use in production first).

Edgar


-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003 11:08 AM
To: '[EMAIL PROTECTED]'
Subject: get data source in servlet


Hi,
I have defined a data source in my struts-config file,
which is working fine as i get the connection in my
Action class, but i need to get the data source in a
Servlet, can any one provide with the code to get the
data source in servlet

Ashish

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


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



RE: JSTL ot struts taglibs?

2003-08-14 Thread Edgar Dollin
I guess if you just don't like JSTL (the ambiguity, lack of developmental
feedback, lack of refactoring support, etc) you are SOL.

Edgar

 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 08, 2003 3:32 PM
 To: Struts Users Mailing List
 Subject: RE: JSTL ot struts taglibs?
 
 
  If they aren't faster in performance then something is 
 wrong.  All the 
  JSP rendering practically has to do is put the code as is into the 
  Servlet which
  is a Java class.  No interpretation.  I haven't looked at the source
 but
  I
  am sure the optimization for rendering code for Scriptlets 
 vs JSTL has 
  to be there.
 
 Don't be so sure.  Because the JSTL is standard, containers 
 can optimize the java code generated from JSTL tags.  This 
 means a c:if tag can be converted into a real Java if 
 statement instead of creating tag instances and invoking the 
 tag's lifecyle.  My understanding is that the Jasper JSP 
 compiler (comes with Tomcat) actually generates faster Java 
 code if you
 *don't* use scriptlets at all.  Resin and Tomcat both 
 optimize JSTL tag usage.
 
 So, with the JSTL we get the best of both worlds:  Fast page 
 rendering and standardized, powerful and easy to use markup tags.
 
 David
 
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design 
 software http://sitebuilder.yahoo.com
 

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



RE: [OT] RE: JSTL ot struts taglibs?

2003-08-14 Thread Edgar Dollin
You are not alone is questioning the solutions to the view problem.

This is an interesting problem and will really challenge the open source
community to solve it.  Right now, everyone has an opinion, no one has a
real solution, each individual users needs are limited (they tend to solve
their particular needs and move on) and the problem is EXCEPTIONALLY
complex.

Part of the problem is that there are so many ways (none of which are
particularly good compared to .NET) to paint pages in Java land.  JSF is
vapor and has a limited window of opportunity and requires REAL industry
support to succeed before the world moves past it.  .NET view technology
looks really tempting from the outside and there are statistics which
support that it enhances developer productivity (this will have a greater
importance as time passes).

The individual with the most influence in the space is Craig, which is why
JSF is seen as an overall solution.  Unfortunately, many in the community
disagree with him and with JSF.  I wish, I agreed that JSF was the answer
and that if we all jumped on the JSF bandwagon, the industry could move past
this problem, we could have great IDE's for view creation, etc.

Anyway, this is a real challenge facing the community with very strong
pressure being applied by MS.

Edgar

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



Recall: Some questions for you guys...

2003-08-14 Thread Edgar Dollin
Edgar Dollin would like to recall the message, Some questions for you
guys

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

RE: Some questions for you guys...

2003-08-14 Thread Edgar Dollin


 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 13, 2003 9:53 PM
 To: 'Struts Users Mailing List'
 Subject: Re: Some questions for you guys...
 
 
 I prefer configuring a DataSource in the servlet container 
 and retrieving it via JNDI.  This way the app knows nothing 
 about the configuration except for the JNDI name the 
 DataSource is stored under.

One of my requirements is that I have a separate DB for each of my
customers.  Each customer is using the same container instance but needs
access to a different DB (the data has to reside in separate DB's).  This
can be done in a JNDI situation but then the container configuration has to
know about each web app instance and each web app instance needs to know
about a separate JNDI configuration.

Edgar

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



RE: Urgent: generating PDF from form data

2003-08-14 Thread Edgar Dollin
Have you looked at iText?  Another one to try is JasperReports (Jasper uses
iText) but also uses POI to optionally generate XLS or HTML.

Edgar

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 13, 2003 1:33 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Urgent: generating PDF from form data
 
 
 What is FOP? I am a newbie in struts
 
 --mohan
 
 
  Have you looked at FOP?
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, August 13, 2003 1:16 PM
  To: [EMAIL PROTECTED]
  Subject: Urgent: generating PDF from form data
 
 
  Hi All
  I use struts. I wanted to know if there is a we can generate a PDF 
  with the form data the user submits so that the users can print the 
  pages. Please let me know if there is any resource on it or 
 if there 
  is something related to it.
 
 
  Thanks in Advance
 
  --Mohan
 
 
 
  
 - 
  To unsubscribe, e-mail: 
 [EMAIL PROTECTED] For 
  additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  
 - 
  To unsubscribe, e-mail: 
 [EMAIL PROTECTED] For 
  additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

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



RE: transaction tokens

2003-08-14 Thread Edgar Dollin
I have implemented and it works OK, the user can have multiple windows open
and within reason use the back / forward buttons.  The problem is what do
you do if they backup and then take a different action.  You need to have
some way of recovering the path in a graceful way, without the user loosing
to much of the information they may have typed.

Edgar

 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 06, 2003 5:41 AM
 To: 'Struts Users Mailing List'
 Subject: Re: transaction tokens
 
 
 I was thinking there might be a way of controlling transactions by 
 saving all tokens in the session once they are used, and then if it 
 crops up again, not allowing the execution.
 
 Would be simple to implement with a hashmap I think.
 
 What's the likelihood of 2 transaction tokens being 
 identical, over the 
 course of a user session?
 
 (Theoretically you could apply the same principle to action 
 forms,saving 
 them against a transaction token and then sorting it out in a 
 base class 
 during form.reset() (exceptionally seat-of-pants thinking))
 
 Andrew Hill wrote:
  oops, yep. Should have specified that. Only for a session mapped 
  actionform will there be a problem. The request ones are of 
 course not 
  affected by the problem.
  
  -Original Message-
  From: Adam Hardy [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 6 August 2003 17:56
  To: Struts Users Mailing List
  Subject: Re: transaction tokens
  
  
  Andrew Hill wrote:
  
 I dont believe so. :-(
 
 btw
 Likewise for multiple actionforms (for the same mapping) 
 when you have 
 1 windows open (such as you might want for editing several records 
 selected from a list in the main window...) /btw
  
  
  what's the problem with that? You mean you have the action 
 form in the 
  session?
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 

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



RE: Garbage Collection Problem with Write Tag

2003-08-11 Thread Edgar Dollin
The JSP specification allows Tags to live independent of the pages they are
declared upon.  As far as I know it is up to the container as to when they
are garbage collected.  Some containers optimize the occurances of the tags
based on the parameters passed to the tags, i.e. declaring a new one for
each unique set of parameters.

Edgar

 -Original Message-
 From: AshokD [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 05, 2003 8:30 AM
 To: 'Struts Users Mailing List'
 Subject: Garbage Collection Problem with Write Tag
 
 
 Hi,
  
 I am using Struts framework to my application. I observed 
 some of the strange things.
  
 After executing a action I am displaying a set of records in 
 a Grid (50 records). I tested this application by using WSAD 
 Profiling.
  
 In the profiling results, I seen 120 live WriteTag 
 instances(which is not garbage collected), same thing I 
 observed for Radio Tag also.
  
 Can any one help to make these objects as garbage collected.
  
 Pls check the attached screen shot of the results.
  
 The filled color shows the objects which are not Garbage Collected.
  
 Thanks  Regards,
 Ashok.D
  
 

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



RE: OT: JSR-168 is available for review

2003-07-27 Thread Edgar Dollin
Vic gave a very interesting Flash demo the other day.  Considering the poor
state of java view options it was good to see a real alternative to the
gobbledygook currently available.

Edgar

 -Original Message-
 From: Vic Cekvenich [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, July 26, 2003 5:29 PM
 To: '[EMAIL PROTECTED]'
 Subject: Re: OT: JSR-168 is available for review
 
 
 
 Ex: Pick one approach, from this slide show for example:
   http://www.centercomp.com/beyondstruts/index.html
 Clearly one approach is better than the other, else if you do 
 not have a 
 full time architect, consider a consultant; or maybe a vendor 
 advertisement, it that is what you want to do.
 
 I do teach Advanced Struts class, and do consulting, and then 
 I itemize 
 my recommendation and implement it.
 
 Time will tell.
 
 .V
 baseBeans.com
 Project Recovery
 
 ps:
 I also liked my Commodore 64, I liked VisiCalc, and I like Sun's 
 inventing Java, 
 http://finance.yahoo.com/q?s=SUNWd=ck=c2a=vp=e5,m20,m100,m
200,e200t=2yl=offz=lq=l 

but I think Sun and Java should go separate ways.
http://viva.sourceforge.net/


Craig R. McClanahan wrote:
 
 On Thu, 24 Jul 2003, Laurent PETIT wrote:
 
 
Date: Thu, 24 Jul 2003 09:17:13 +0100
From: Laurent PETIT [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
 Laurent PETIT [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: OT: JSR-168 is available for review

Hello,

I'm quite new in the Java / J2EE sphere, and so I don't really know 
the typical behaviors I'm supposed to have in some circumstances ? ;-)

Is it quite normal to blame the JCP specs, even without giving any 
reason for that ? Or is there such a historical life of bad specs from 
the JCP, that no more spec from it deserves to be taken away without a 
glance ?

 
 
 What you see here is pretty typical behavior for Vic lately (which is 
 one of the reasons his mail goes straight into my noisy folder), but 
 it's not typical of people on STRUTS-USER.
 
 
Please if you have 2 minutes, explain to me !

 
 
 Craig



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



RE: Testing Struts-Config

2003-07-25 Thread Edgar Dollin
 
 An additional useful test would be whether all the referenced 
 classes actually exist in your webapp (form beans, actions, 
 ...).  Of course, that probably ought to be a configurable 
 startup feature for Struts itself.
 

This would be perfect...if you need any help let me know.


  -James
 
 Craig
 


Edgar

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



Testing Struts-Config

2003-07-24 Thread Edgar Dollin
Does anyone know of a tool that just tests the struts-config for 'class
correctness'?

The situation I find myself in is I have a large project, which was heavily
refactored (unfortunately w/o adequate struts tests), and I need to debug
the struts-config.

Thanks in advance.

Edgar

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



RE: about dependent lists

2003-07-23 Thread Edgar Dollin
This idea works nicely but remember if you have pages of any size the user
experience will suffer.  As an example Bugzilla does it using dynamic
javascript and it still has annoying pauses, a page load would be worse.

Also, you should have an additionaly piece of javascript to put the cursor
back where it was when the page was submitted.

Edgar

 -Original Message-
 From: Amit Kirdatt [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 22, 2003 4:24 PM
 To: 'Struts Users Mailing List'
 Subject: RE: about dependent lists
 
 
 I am assuming both lists are present on the same page! 
 If so on the first list have a onChange javascript event 
 which calls a function that submits the page. When the page 
 is submitted you get the value the user selected on the first 
 list. Use this value to populate the second list in the form, 
 put the form back into whichever scope you had it and forward 
 the Action control to the same page.
 
 --Amit
 
 -Original Message-
 From: victor gu [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 22, 2003 1:43 PM
 To: [EMAIL PROTECTED]
 Subject: about dependent lists
 
 
 Hi, Guys:
 
 I have two lists, when I select an item from the first
 list, the second list will be populated based on the
 selected item. The results will be got from database
 in action class. The first list will be pre-populated,
 not the second. Here are my questions: do I need
 another action class taking care of selecting part?
 Once I select the item from the first list, I will get
 this item in action class, then get results, how can I
 send them back and populate the second list? Or There
 are other better and easier ways to achieve this?
 
 thanks,
 
 victor 
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design 
 software http://sitebuilder.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 This e-mail, including attachments, may include confidential 
 and/or proprietary information, and may be used only by the 
 person or entity to which it is addressed. If the reader of 
 this e-mail is not the intended recipient or his or her 
 authorized agent, the reader is hereby notified that any 
 dissemination, distribution or copying of this e-mail is 
 prohibited. If you have received this e-mail in error, please 
 notify the sender by replying to this message and delete this 
 e-mail immediately.
 

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



RE: Splash Screen in Struts

2003-07-17 Thread Edgar Dollin
Nice, clear, and will be usefull for me.  If you are using session beans it
looks like you could use a generic splash since you wouldn't need the hidden
fields.

Thanks

Edgar

 -Original Message-
 From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 17, 2003 12:02 AM
 To: 'Struts Users Mailing List'
 Subject: Re: Splash Screen in Struts
 
 
 OK, for those of you following this thread, I ended up 
 getting this to work, although it's kind of ugly IMHO.
 
 In splashAction, I cram the form containing the data from 
 input.jsp into the request, then forward to splash.jsp, which 
 keeps the data in hidden fields (populated by the previous 
 form).  The onload event handler in the body tag of 
 splash.jsp automatically submits the form to longAction.do 
 (the action that needed the data in the first place).
 
 There is a bit of lag time (0.5 to 1 second) in displaying 
 the splash screen, but the browser (I've tried this with 
 Mozilla and IE) then displays the splash screen until the 
 results are ready.
 
 Thanks to those who responded to my original post.  I wanted 
 to try subclassing the ActionServlet as suggested, but I 
 needed to get this and several other things done by the end 
 of the week.
 
 Dhruva
 
 --- Dhruva B. Reddy [EMAIL PROTECTED] wrote:
  OK, let me ask this:
  
  Let's say that I have input.jsp, which goes to 
 longAction.do, which in
  turn forwards to long_results.jsp when finished.  I've noticed that
  the
  contents of input.jsp remain displayed after the submit button is
  clicked, until the contents of input.jsp are ready for the 
 browser to
  load.
  
  I have tried to take advantage of this by creating an intermediate 
  action, splashAction.do, which forwards to splash.jsp, 
 which in turn 
  forwards to longAction.do (I have a jsp:forward tag at the end of 
  splash.jsp).  splashAction.do is invoked by the submit button on 
  input.jsp.  I would expect the contents of splash.jsp to be 
 displayed 
  until the contents of long_results.jsp are ready for 
 display. Yet the 
  contents of input.jsp remain displayed until long_results.jsp is 
  ready, just as before--I never see splash.jsp.
  
  Can anyone tell me why this didn't work?
  
  Thanks,
  Dhruva
  
  --- Dhruva B. Reddy [EMAIL PROTECTED] wrote:
   I have an Action that could potentially take a long time to
  execute,
   and would like to display a splash screen until the 
 results of the 
   action are ready.
   
   I went googling for this, but I can't seem to find a 
 solution that 
   would fit within the Struts framework.  Has anyone done this
  before?
   
   Thanks,
   Dhruva
   
   __
   Do you Yahoo!?
   SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
   
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
   
  
  
  __
  Do you Yahoo!?
  SBC Yahoo! DSL - Now only $29.95 per month!
  http://sbc.yahoo.com
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 

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



RE: what the webwork guys say about struts

2003-07-17 Thread Edgar Dollin
That would be like the Lutherans and the Episcopalians joining up.

Edgar

 -Original Message-
 From: Butt, Dudley [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 17, 2003 5:18 AM
 To: 'Struts Users Mailing List'
 Subject: RE: what the webwork guys say about struts
 
 
 why dont the struts guys and the WW guys join up? 
 
 -Original Message-
 From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 16, 2003 8:22 PM
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: RE: what the webwork guys say about struts
 
 
 I thought the use of Interceptors was interesting iN WW2, 
 given the somewhat recent discussions about a composable 
 request processor on struts-dev.
 
 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 16, 2003 9:44 AM
 To: Struts Users Mailing List
 Subject: RE: what the webwork guys say about struts
 
 
 --- Andrew Hill [EMAIL PROTECTED] wrote:
  snip src=wiki.opensymphony.com
  WebWorks pros include being a smaller, simpler framework, 
 not having 
  to build ActionForm beans,
 
 DynaActionForms anyone?
 
  making it very simple to test your Actions,
  having
  multiple well-supported view technologies, simpler views 
 with less JSP 
  tags and a more powerful expression language,
 
 Who cares?  IMO, JSTL has the best Java expression language 
 and implementing anything further in a non-standard framework 
 is a waste of time.
 
  not having to make your Actions
  thread-safe,
 
 You can override one method in the RequestProcessor to create 
 a new Action on each request so they don't have to be thread safe.
 
  not having your Actions tied to the web
 
 Struts 2 is likely to be uncoupled from the Servlet API to 
 allow use in Portals but we'll see...
 
 The only advantage I see in WebWork is that Actions and 
 ActionForms are one idea/class but JSF allows this as well.
 
 I don't know enough about WebWork to critique it but it's 
 disappointing when people get the facts wrong about Struts 
 when comparing the two.
 
 David
 
  and not being part
  of
  Jakarta J. WebWork2 also adds many new features such as 
 Interceptors, 
  packages, IoC, etc. WebWorks cons include being a smaller project 
  with fewer books and less tool support, having less 
 standards support 
  for specs like JSTL and JSF, and not being part of Jakarta
  /snip
 
  Fair enough to a point, but Id definately disagree about struts not 
  providing good support for using other views. There is nothing in 
  struts that specifically makes it hard to support other view 
  technologies - the taglibs that come with struts are purely a 
  convienience for the majority who use JSP (theres a good 
 argument to 
  make them a seperate download imho) - but
  theres nothing anything to stop you using other things. 
 Many people use
  velocity with struts - its a good fit from what I hear, and 
 you could
  use
  pretty much any other technology too so long as that 
 technology doesnt
  depend on some proprietary framework to be used with it (which would
  affect
  WW also). All the struts config objects are accessible from 
 the servlet
  context and there are even toolkits for technologies such 
 as velocity...
  I
  personally use my own homebrew rendering technology (which 
 basically is
  just
  leveraging DOM and xhtml) and found that struts didnt get 
 in the way and
  indeed meshed nicely in many cases.
 
  What I saw in the good 2 minutes or so I looked at WW just now that 
  _did_ get me excited was the idea of it making it much easier to 
  seperate classes
  from dependancies on the servlet api thus becoming easier 
 to test. One
  can
  always test struts with things like StrutsTestCase or 
 cactus doing mock
  object or in container tests, but learning how is a 
 daunting task, which
  Id
  imagine has put off many people from trying. (I know Ive 
 never bothered
  to
  work out how to do it - but hey, my codes so good it doesnt 
 need testing
  right? ;-) If it could easily test my stuff in good old Junit using
  j2se...
  that would be sweet mate...
 
 
  snip
  The mapping from HTTP Request to Actions is really 
 cohesive. You have 
  a form with fields, you have an action with corresponding fields. 
  /snip
 
  Yes - theres a lot to be said for the idea of merging the 
 actionform 
  and the action and instantiating a new instance for each 
 request (or 
  reusing one from the session). Ive never fully grokked why 
 struts was 
  so keen to use the
  singleton pattern for actions. Tis true that servlets do this - and
  actions
  resemble servlets (after all they are in the end just the bit of the
  ActionServlet that does the specific work!) , but I and 
 others have oft
  debated the merits of relaxing the threadsafety rule on actions and
  instantiating new ones each time - and merging the 
 actionform into the
  same
  object so that you have a sort of 'component' perhaps 
 follows on from
  this?
 
  hmmm... Can anyone think of 

RE: checkboxes - ActionForm in session scope

2003-07-16 Thread Edgar Dollin
If you need this to work the way you are describing, I would use a hidden
field (that matches your form) valued at either 'true' or 'false' and use
javascript to link up a checkbox to 1) set the checkbox initial value; 2)
toggle the hidden field when the checkbox is toggled; and 3) loose the
reset.  If you use boolean getters and setters you don't have to worry about
coding in the words true and false on the java side.

Edgar

 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 15, 2003 10:35 PM
 To: 'Struts Users Mailing List'
 Subject: RE: checkboxes - ActionForm in session scope
 
 
 snip
 I call reset method selectively since I am trying to develope 
 wizard style pages with one form. /snip
 
 Ah, but if you dont reset the checkbox it will always stay 
 ticked - as nothing (not even an empty string!) is submitted 
 for an unticked checkbox so the forms setter method is never called.
 
 THIS is the real reason the reset() method even exists in the 
 first place - its a workaround for this flaw in the html 
 spec. Other fields that need to be reset include 
 multiple-select boxes and textareas. Empty input fields will 
 submit an empty string so they dont need to be reset, and 
 single selects always have something selected so dont need it either.
 
 If your doing wizards you should still call reset() but you 
 do the selective stuff inside the code for the reset() method 
 (such that it resets only those fields that were visible on 
 the page just submitted).
 
 -Original Message-
 From: Khalid K. [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 16 July 2003 01:54
 To: Struts Users Mailing List
 Subject: checkboxes - ActionForm in session scope
 
 
 Hello All,
 
 I have the following problem, and any help is greatly appreciated:
 
 1. html form that has a checkbox which is associated with a 
 Action Form Bean - boolean attribute 2. ActionForm is in 
 session scope 3. I call reset method selectively since I am 
 trying to develope wizard style pages with one form. 4. using 
 struts 1.0.2
 
 problem:
 
   When I check a checkbox and submit the form, on the 
 pending page, I see the value as set to true which is OK.
 
 Now, When I click on modify which takes me to the html with 
 the form, and I uncheck the checkbox and submit againthe 
 value on the pending page is still set to TRUE. Which it 
 should be set to FALSE.  any ideas ??
 
 Khalid
 - Original Message -
 From: John M. Corro [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 15, 2003 10:48 AM
 Subject: Re: Is this really the best way to handle this problem
 
 
  I've seen two ways of dealing w/ this problem, both of 
 which I see as
 'hackish'
  in nature.
 
  Solution A:
 
  In your getters/setters you implement the following code
 
  public MyCustomBean getMyCustomBean(int index) {
 while(index = myCustomBeanList.size()) {
myCustomBeanList.add(new MyCustomBean());
 }
 return (MyCustomBean)myCustomBeanList.get(index);
  }
 
  In that way you'll never encounter the common 
  IndexOutOfBoundsException.
 The
  problem here is that you tend to use alot of hidden fields 
 in your UI 
  to
 repopulate
  the data back into the dynamically created beans.
 
  Solution B:
 
  In your reset() method you repopulate your internal Collection of 
  beans.
 The
  problem w/ this approach is that often times you have a separate 
  Action
 that
  prepopulates your ActionForm.  This provides for good 
 separation - the
 Action
  is a retriever of a data (nothing more) and the ActionForm 
 is merely a
 container
  for data (nothing more).  With this approach your 
 ActionForm suddenly
 starts
  becoming more intelligent than it really should be.  Now 
 it's aware of 
  how
 to
  populate itself...not a good thing IMO.
 
  I'd be very interested in hearing other solutions to this 
 problem as I
 find
  both of the above solutions cumbersome and hackish and 
 would love to 
  stop
 implementing
  them.
 
  I've been struggling with a problem similar to the one 
 described (and
  solved) at 
  
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg50901.h
  tml
 .
 
  Is this really the recommended way to solve population / 
 repopulation 
  of properties stored in a List() of 
  whatever-data-object-i-need-in-the-form-of-a-bean ? Is 
 there a better 
  way
 to
 
  acheive the same result ? (I.e represent a collection in a form)
  
  I've read that a practice often used to represent collections (a 
  DB-table for intstance) is to make a bean that has getters 
 / setters 
  for the properties of a single row and then have the ActionForm 
  contain a List()
 of
 
  those beans. One for every row  (in the DB-example). That far I can
 follow,
 
  and see how / why. But is there no better way to update 
 the values in 
  the ActionForm (beans) when the data is submitted than in the URL 
  above ?
  
  //Linus Nikander - [EMAIL PROTECTED]
  
  
  
  
  
 

RE: Struts and JSF?

2003-07-16 Thread Edgar Dollin
Are you working today or 2004?  If you are working today, then JSF is beta,
so most likely you would do struts only (unless you have the luxury of
working with the beta).  The struts pages have documentation about
struts-faces which allows the two to coexist.

Edgar

 -Original Message-
 From: Andy Richards [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 16, 2003 5:32 AM
 To: 'Struts Users Mailing List'
 Subject: Re: Struts and JSF?
 
 
 Being a newbie to struts then, is it still worth implementing 
 the two?. I have 
 had a look at the integration library but not yet figured it 
 out, ie which 
 would i use for validation faces or struts? which tag library 
 to use etc ? Does anyone know of any documentation implenting 
 the two technologies and the 
 benefits of doing so?
 
 cheers
 
 Andy
 

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



RE: [OT]RE: Iterating the resultset contents in the view (jsp)

2003-07-16 Thread Edgar Dollin
You might look into JDO.  Castor and a few others have implementations
(http://castor.exolab.org/jdo.html).  I know there are performance issues
with Castor although the functions it performs are pretty cool.

Edgar

 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 15, 2003 1:55 PM
 To: 'Struts Users Mailing List'
 Subject: Re: [OT]RE: Iterating the resultset contents in the 
 view (jsp)
 
 
 --- Vijay Balakrishnan [EMAIL PROTECTED] wrote:
  Hi,
  
  Is there a way to return this resultset from a SQL Query as an xml 
  file using a beanutils class or Digester ?
 
 I don't know of any class that does that.  Every application 
 will require its own XML format anyways.
 
 David
 
  
  Thanks,
  Vijay
  
  -Original Message-
  From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
  Sent: Monday, July 14, 2003 7:25 PM
  To: Struts Users Mailing List
  Subject: Re: Iterating the resultset contents in the view (jsp)
  
  
  
  
  On Mon, 14 Jul 2003, Richard Hill wrote:
  
   Date: Mon, 14 Jul 2003 16:36:17 -0700
   From: Richard Hill [EMAIL PROTECTED]
   Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED]
   To: '[EMAIL PROTECTED]'
   [EMAIL PROTECTED]
   Subject: Iterating the resultset contents in the view (jsp)
  
   Hi,
   I'm working on an action that gets a resultset from a 
 database table
   containing 4 columns. I need to pass that information 
 back to the view
  
   (jsp) which will iterate over results. My question is what is the 
   best
  
   way to do this. Do I create an array for each row in the 
 resultset 
   and
  
   insert each array in a collection, passing that back to the view?
  
  
  That is certainly one approach.  Indeed, commons-beanutils has a 
  useful little class (org.apache.commons.beanutils.RowSetDynaClass) 
  that is ideally suited to this use case.  It creates a List of 
  DynaBeans representing the
  data content returned by the SELECT.  Because it makes a 
 copy, you can
  close
  the result set (and return the connection back to the 
 connection pool)
  before forwarding to the page.
  
   If so, how would you iterate over each array in the 
 collection with
   the logic:iterate taglib? All of the examples only show 
 iterations 
   over single column lists.
  
  
  Let's assume you have done this in your Action:
  
ResultSet rs = ...;
RowSetDynaClass rsdc = new RowSetDynaClass(rs);
rs.close();
request.setAttribute(customers, rsdc.getList());
  
  so you now have a request attribute containing the list.  
 Now, in your 
  page, you can say things like:
  
logic:iterate id=customer name=customers
  Name is bean:write name=customer property=name/
  Status is bean:write name=customer property=status/
/logic:iterate
  
  and so on.  Details of RowSetDynaClass are in the javadocs for
  BeanUtils:
  
http://jakarta.apache.org/commons/beanutils/
  
   Any help would be appreciated.
  
   Thanks,
   Richard
  
  
  Craig
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
 

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



RE: Populating Drop downs

2003-07-14 Thread Edgar Dollin
The sequence is in your struts-config.xml file.  The action is always called
before the jsp since the action performs the forward to the jsp.  Validate
(if enabled) is always called on the ActionForm prior to the Action.  

Edgar

 -Original Message-
 From: Qasim Khawaja [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 14, 2003 4:15 AM
 To: 'Struts Users Mailing List'
 Subject: Populating Drop downs
 
 
 I need to populate three drop downs in a jsp before presentation. 
 Currently I have writted routines in the ActionForm which 
 access the DAO 
 class and populate the lists. The problem is that the DAO 
 class throws 
 an exception which means that I have to make my ActionForm aware of a 
 hibernateException. I want to do this in the action class and 
 make use 
 of declarative exception handling.
 
 Is the Action called prior to presenting the jsp? If so what is the 
 entry point?
 
 Q
 
 
 
 

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



RE: NestedIterateTag won't let go of collection

2003-07-09 Thread Edgar Dollin
There is a known bug if the collection is passed in directly (i.e.
%=myCollection%).  If the collection is passed in as a bean in the
session, at least certain tags handle it correctly.  The other thing to try
is to disable tag pooling ($TOMCAT_HOME/conf/web.xml --
enablePooling=false).

Edgar

 -Original Message-
 From: Sri Sankaran [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 08, 2003 10:32 PM
 To: '[EMAIL PROTECTED]'
 Subject: NestedIterateTag won't let go of collection
 
 
 Using: Struts 1.1
 Servlet Container: Tomcat 4.1.24
 
 In the process of studying the memory footprint of my 
 application, I found that certain objects were not getting 
 garbage collected even though there were no apparent 
 references.  The biggest culprit was a rather large 
 collection that was being displayed using nested:iterate.  
 
 I am mentioning *how* it is being displayed only because 
 JProbe revealed that the reason the collection isn't getting 
 free'd is because the associated NestedIterateTag object was 
 maintaining a reference to it - even after the user session 
 was invalidated.  
 
 I realize that this may not be Struts-issue per se but one of 
 how Tomcat manages (reuses) tags.  Have you seen such 
 behavior and is there a way to coerce tag to free the 
 application object?
 
 Thanks
 
 Sri
 

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



RE: Is Action Instantiated Once?

2003-07-04 Thread Edgar Dollin
The way to handle this kind of stuff is in the ActionForm.  If you have
standard actions, you can subclass ActionForm and have your forms subclass
this new form.

Edgar

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 03, 2003 8:42 PM
 To: 'Struts Users Mailing List'; 'Billy Ng'
 Subject: Re: Is Action Instantiated Once?
 
 
 
 
 On Thu, 3 Jul 2003, Billy Ng wrote:
 
  Date: Thu, 3 Jul 2003 18:21:53 -0700
  From: Billy Ng [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED],
   Billy Ng [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Subject: Is Action Instantiated Once?
 
  Hi folks,
 
  I have a address book page that has the previous and next 
 buttons.  I 
  notice if 2 different users try to access the address 
 books, last one 
  who clicks on the button always get what it should display.  This 
  sounds very like they are both are using the same Action.
 
  The address book action extends a ActionBase that extends Strut's 
  Action.  Would anybody tell me if Strut will instantiates a 
 new acton 
  everytime it is called?
 
 No ... one instance only (just like servlets).
 
   Did I miss something on the configuration to
  make it thread dependent?
 
 
 You're probably using instance variables in the Action class 
 to store things relevant only to a particular request.  If 
 so, use local variables or request/session scope attributes instead.
 
  Thanks!
 
  Billy Ng
 
 Craig
 
 

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



RE: Webapp Security?

2003-07-04 Thread Edgar Dollin
If you do go with filters and there is one other issue to consider.  If you
are using a combination web-server and container then filters are straight
forward.  If you are using your container as a web-server you have to
structure your map to allow public area files (gif's, etc.) to pass through
the filter.

Edgar

 -Original Message-
 From: David Erickson [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 03, 2003 2:11 PM
 To: 'Struts Users Mailing List'
 Subject: Re: Webapp Security?
 
 
 Ya I am thinking that creating our own security with the use 
 of filters is the way to go.  Filters is exactly what I was 
 after but didn't know existed, instead I was trying to extend 
 all the containers that Tomcat uses for resources, IE the JSP 
 one, the one for everything else, and the struts container, 
 and then having authentication built into each of their 
 request methods.
 
 What we are after is having databases that contain permission 
 to perform actions, permissions to see certain resources, and 
 the capability to extend that to other things, IE which menu 
 elements they can see on navigation pages etc.  And we don't 
 want to define groups that have selections of all of those, 
 we want each individual user to be able to have different 
 combinations of the above based on what permissions we want 
 him to have. Stereotyping groups is to limited for what we 
 want to do.  So I think we'll probably use filters to 
 accomplish this.. thoughts? -David
 
 - Original Message - 
 From: Craig R. McClanahan [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Thursday, July 03, 2003 1:05 PM
 Subject: Re: Webapp Security?
 
 
 
 
  On Thu, 3 Jul 2003, David Erickson wrote:
 
   Date: Thu, 3 Jul 2003 12:37:56 -0600
   From: David Erickson [EMAIL PROTECTED]
   Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED]
   To: Struts Users Mailing List [EMAIL PROTECTED]
   Subject: Re: Webapp Security?
  
   Ok well lets suppose you want to protect 100% of your content, 
   perhaps
 minus
   the login.jsp or what not page.
 
  For container managed security, a /* pattern is how you'd specify 
  this
  -- the container knows that the login page should not be 
 included in that
  (although I suspect various Tomcat 3.x versions had 
 problems with this).
 
We just spent a couple hours brainstorming
   how to protect our webapp.  We want flexibility above and beyond 
   what container security provides, so we want to use our own 
   mechanisms
 pulling
   permissions from a database etc.  So we we have had two veins of
 thought.
   1) Creating some kind of struts action that handles all incoming
 requests,
   where the web.xml maps  /* to struts and it handles it, 
 by using the 
   wildcard extension to map everything minus actions to a certain 
   struts action, that can perform authentication for that 
 resource, if
 permissions
   match ship it on, otherwise forward to an error.
   2) Create a servlet that runs within tomcat that takes 
 all requests, 
   performs authentication, then ships it to either struts 
 for actions 
   or wherever else for resources.
  
   We only want to use tomcat4, not apache or anything.. 
 these seem to 
   us
 to be
   the only ways to get a good flexible handle on what 
 people request 
   and
 see.
   #1 would be something we would rather use because it 
 requires only 
   one running servlet which would be struts, whereas #2 
 would need 2 
   servlets.
 
  One of the keys to container managed security is that you 
 need to be 
  able to express your authorization decisions (what can the 
 user do) in 
  terms of roles.  A role can be as coarse-grained or 
 fine-grained as 
  you want, and many users can be assigned the same role.  Generally, 
  the set of roles owned by a user is statically determined by the 
  container at login time, but that is not mandated by the 
 spec -- it's 
  perfectly legal for a container to implement a role (for 
 example) that 
  is assigned if it is now 8am-5pm on a weedkay, but not 
 other times, to 
  allow access to a particular resource only during working hours.
 
  The second key to effective use of container managed 
 security is that 
  you can express access control decisions to particular URLs (or URL 
  patterns) in terms of an AND test between roles.  If you cannot do 
  this; perhaps because there are factors besides roles 
 innvolved in the 
  decision, you might want to think about rolling your own 
 security -- 
  in that scenario, a filter is probably your best bet.
 
  Within Tomcat itself, there are several avenues to customizing the 
  behavior of container managed security, but they are all Tomcat 
  specific:
 
  * You can define your own Valve (the internal-to-Tomcat equivalent
to a Filter), and cause it to be run either before or after the
Valve that actually implements container managed security.  Valves
have read/write access to the request object, so they can do
pretty 

RE: StrutsMenu 1.2?

2003-06-09 Thread Edgar Dollin
You might consider struts menu but you would have to heavily modify the
menu.  Basically, the menu structure runs off of a collection of beans which
you would have to dynamically re-create and modify the menu displayers to
pick up your dynamic menus.  If you did do this in conjuction with struts
menu, it is the most asked for feature and the code would be a welcome
addition.

If the dynamic aspect of the menu can be implemented with a dynamic root
menu, then struts menu is a very viable option.

Edgar

 -Original Message-
 From: Bjorn T Johansen [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 09, 2003 6:33 AM
 To: 'Struts Users Mailing List'
 Subject: StrutsMenu 1.2?
 
 
 I need some kind of dynamic generation of menu items in my 
 webapp, is StrutsMenu the way to go or should I look into 
 something else, or implement it myself?
 
 
 Regards,
 
 BTJ
 
 -- 
 --
 --
 ---
 Bjørn T Johansen (BSc,MNIF)
 Executive Manager
 [EMAIL PROTECTED]  Havleik Consulting
 Phone : +47 67 54 15 17 Conradisvei 4
 Fax : +47 67 54 13 91   N-1338 Sandvika
 Cellular : +47 926 93 298   http://www.havleik.no
 --
 --
 ---
 The stickers on the side of the box said Supported 
 Platforms: Windows 98, Windows NT 4.0, Windows 2000 or 
 better, so clearly Linux was a supported platform.
 --
 --
 ---
 
 

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



Struts vs WebWork 2

2003-05-30 Thread Edgar Dollin
Mildly interesting review of Struts vs WebWork2 from JDJ:

http://blogs.browsermedia.com/patrick/index.do?date=20030519#144644

Enjoy...

Edgar

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



RE: using images for form buttons with LookupDispatchAction

2003-05-29 Thread Edgar Dollin
Why not use

a href='javascript:void(document.forms[0].submit())'img
src='yourimage.gif'/a

You do loose the i18n image name with this but to get it working it is fine.
Then you can look at the generated html from the tag and understand how to
get it working.

Edgar

 -Original Message-
 From: Pani, Gourav [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 28, 2003 2:02 PM
 To: 'Struts Users Mailing List'
 Subject: RE: using images for form buttons with LookupDispatchAction
 
 
 Additionally, has anyone used the ImageButtonBeanManager 
 available on SourceForge as a solution to my problem?
 
 -Original Message-
 From: Pani, Gourav 
 Sent: Wednesday, May 28, 2003 1:53 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: using images for form buttons with LookupDispatchAction
 
 
 Sorry for the incomplete email
 
  
 the powers that be within my organization have passed a 
 decree that all form buttons have to use images because, 
 supposedly, html text buttons are too ugly.  be that as it may.
  
  
 i am extending the LookupDispatchAction for all my Action 
 classes that have inserts/updates/searches etc in them.  the 
 following is an example of my action setup in struts-config.xml.
  
 !-- Carrier related Action Mappings --
 action 
   path=/secure/CarrierAdmin 
   name=CarrierAdminForm 
   
 type=com.brightpoint.online.admin.control.carrier.CarrierAdminAction
 
   scope=request 
   input=/jsp/admin/carrier/carrierAdmin.jsp 
   validate=false 
   parameter=action
   forward name=show_carrier_admin 
 path=/jsp/admin/carrier/carrierAdmin.jsp?action=view/
 /action
  
 in my jsp, i was able to successfully get it to work in the 
 following way.
  
  
 html:submit property=action alt=Insert.
  bean:message key=button.insert/
 /html:submit
 html:submit property=action
   bean:message key=button.update/
 /html:submit
  
  
 however, when i tried to use the html:image tag to do the 
 same thing, i got an error.
  
 the following was my syntax for the html:image tag
  
 html:image src=/bpo/buttons/insert.gif border=0 
 alt=Insert. property=action value=insert/
 
 html:image src=/bpo/buttons/update.gif border=0 
 alt=Update. property=action value=update/
  
  
 the error i got on submitting by clicking on either of those 
 images was:
  
 BrightpointOnline2.0 root appender [tcpConnection-6802-0] ERROR -
 ServletException:javax.servlet.ServletException:
 Request[/secure/CarrierAdmin] does not contain handler 
 parameter named action; 
  
  
 i guess the property with the html:image tag isn't being 
 translated like the html:submit is.  can anyone help me out 
 here?  i have scoured the web for a solution and none seemed to work.
  
  
 ted, craig?  anybody.
  
 TIA.
 
 

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



RE: JAXB vs Digester

2003-04-05 Thread Edgar Dollin
I don't know why this discussion is happening here but I'll throw in my two
cents.  Hands down the best one or two way xml-java system is Castor.

Edgar


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 04, 2003 7:15 PM
 To: Struts Users Mailing List
 Subject: Re: JAXB vs Digester
 
 
 
 
 On Fri, 4 Apr 2003, Dhulipala, Kris (SCI TW) wrote:
 
  Date: Fri, 4 Apr 2003 10:51:50 -0500
  From: Dhulipala, Kris (SCI TW) [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: '[EMAIL PROTECTED]' 
  [EMAIL PROTECTED]
  Subject: JAXB vs Digester
 
  Hi,
From what I have seen of JAXB and Digester, both fecilitate xml- 
  java class/object conversion and vice-versa. So what is the 
  difference? When to use what?
 
 A couple of very incomplete thoughts:
 
 * Digester is one way (XML-Java), JAXB is two way (XML-Java
   and Java-XML).
 
 * Digester is nice for pulling just a few things out of an XML
   document, JAXB typically wants you to process the whole thing.
 
 * Digester rules can be calculated and constructed on the fly
   as you configure the Digester, and include some interesting matching
   rules that mean you don't always need to understand the entire
   document structure.  JAXB is more like DOM, giving you a tree
   structure to process.
 
 * Digester lets you deal with dynamic sets of attributes gracefully
   (i.e. the SetPropertiesRule, for example); JAXB wants you to know
   them ahead of time.
 
 As with most things, it's kind of hard to say that one 
 approach is always going to be better or worse; thinking 
 through both approaches for each use case is probably the 
 best approach -- in particular, I'd implement a couple of 
 simple use cases both ways to see which one appeals to you more.
 
  Thanks,
  Kris
 
 Craig
 

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



RE: Is Strut too primitive for really useful Controller function?

2003-04-02 Thread Edgar Dollin
If I understand what your are saying is that there is a action scripting
language built into Exadel.  I guess then there is some kind of 'terminal'
action which decides the output or is the output built along the way.

Interesting

Edgar

 -Original Message-
 From: Igor Shabalov [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 01, 2003 4:31 PM
 To: 'Struts Users Mailing List'
 Subject: Re: Is Strut too primitive for really useful 
 Controller function?
 
 
 
   I can not find original post from Thorin - but I'm 100% 
 agree with his 
 point.
   Moreover - I have real experience with system that 
 allows me to implement 
 what Thorin is talking about. We implements almost all 
 business logic in 
 controller layer, moreover - we have two sub-layer inside 
 controller - 
 presentation controller, which handles all page flow and input 
 validations, and business controller - where actual 
 business logic where 
 implemented on high level.
   All this because of using our own implementation of MVC 
 framework - 
 Exadel.
   I'm not here to convince you to switch from Struts to 
 Exadel, but I can 
 tell you that Struts controller component is too primitive 
 compared to 
 Exadel.
   We used widely concept of module. In Exadel you can 
 define module (we call 
 it process) with process context and actually use it like 
 function 
 calls. You even can use recursion. That gives us ability to 
 split system 
 to modules using vertical (by functional areas) and 
 horizontal (by 
 architecture layer) approach. And we design system in a way 
 where we have 
 two horizontal layers - one (top) designed to handle page 
 flow and all 
 interface relater issues. And second (bottom) layer was 
 dedicated to 
 business functions.
 
   I feel that there is something good in such design, the 
 only problem - 
 Strut do not really helps here.
   
 
 Best,
 Igor.
 http://www.exadel.com http://www.exadel.com/products_strutsstudio.htm
 
 On Tue, 1 Apr 2003 12:08:09 -0800, Thorin Linderholm 
 [EMAIL PROTECTED] wrote:
 
  Filters are one of the design/imp choices I've considered under the 
  'parallel system' heading, though I hadn't thought of trying to use 
  the web.xml for this.  I'd have to look into these more.
 
  I take it you recomending that a second, parallel system of 
 specifying 
  functionality on a per-page or per-page-set basis is the way to go?
 
  What reasons would you have for this design choice, as opposed to
  extending
  struts to contain this functionality?
 
  Have you (or others,) implemented something similar to this?
 
  (This port is going to be a large chunk of time and I'm 
 just trying to
  find
  out if other people have already thought through and 
 implemented this 
  type
  of functionality before I just pick something, run with it, 
 and end up 
  with
  some kind of maintenance or design nightmare :-)
 
  -Original Message-
  From: David Graham [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, April 01, 2003 11:52 AM
  To: [EMAIL PROTECTED]
  Subject: Re: design question about action chaining
 
 
  I think Filters would be a good choice for your needs.  You 
 can define 
  a
  filter for each piece of logic and then configure them in 
 web.xml for 
  groups
 
  of pages.  You'll need to put related pages in the same 
 path scheme so
  that you can map a filter to the group instead of each page.
 
  David
 
 
 
  From: Thorin Linderholm [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List 
  [EMAIL PROTECTED]
  To: '[EMAIL PROTECTED]' 
 [EMAIL PROTECTED]
  Subject: design question about action chaining
  Date: Tue, 1 Apr 2003 11:30:39 -0800
 
 
  I have been tasked with porting an existing web 
 application with it's
  own
  proprietary controller architecture to using Struts.
 
  As they are both web controller architectures, they have many
  similarities,
  but I'm running into one difference in overall 
 architecture that I'm 
  having
  difficulty resolving.
 
  This difficulty is most closely related to the 'action chaining' 
  posts
  I've
  been able to find in the mailing list archives.
 
  Specifically, I have over 400 pages mapped to various actions (our 
  controller calls them that, and they're roughly synonymous with 
  struts
  actions.)  However, our controller allows specifying a 
 list of actions 
  to
  execute on a per-page, and per-page-set basis.  In other 
 words, we can
  assign an action like 'Ensure Session initialization has been
  completed/Initialize session' to every page in the site 
 with a single
  mapping (assuming you've already listed all the pages.)  
 Or you can 
  assign
  it to 90% of your pages if you happen to desire.  We have 
 approximatly 
  ten
  actions that happen on between 60-99% of the pages on our 
 site.  If we 
  were
  to directly translate this to the struts mapping system we 
 would end up
  having to re-specify those ten actions on most of those 
 400+ pages, 
  creating
  long action chains for 

RE: Upgrade from struts 1.0

2003-03-31 Thread Edgar Dollin
All kidding aside the upgrade will be a little time consuming but should not
be a painful one.  You are not using modules or tiles so I don't believe
there are any struts-config changes that will impact you.  If you were using
the external nested tags you will have to dispense with extra jar.  If you
were using any of the commons packages you will be upgrading those so check
those issues separately.  There are many deprecations but if you have an ide
those are relatively minor, i.e. perform -- execute.  If you have any
automated test sequence that will help as well.  All, in all the struts team
did a good job of maintaining backward compatibility.

Edgar

 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 31, 2003 8:23 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Upgrade from struts 1.0
 
 
 And whatever you do, dont let your tie get caught in the 
 RequestProcessor!
 
 -Original Message-
 From: Mark Galbreath [mailto:[EMAIL PROTECTED]
 Sent: Monday, 31 March 2003 21:11
 To: 'Struts Users Mailing List'
 Subject: RE: Upgrade from struts 1.0
 
 
 Wear a hat - protect your hair.
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 
  I'm thinking to upgrade from Struts 1.0 (maybe integrating 
 Tiles). Do
  anybody have a to-do-list or something similar to convert  the old 
  struts-config.xml into the new DTD to let me have some idea of the 
  effort before to start?
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: how to switch of logging with log4j at initialization

2003-03-28 Thread Edgar Dollin
In commons-logging.properties (somewhere on the classpath) I have these two
lines


org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategory
Log

org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jF
actory

I forget what they are both for but commons-logging always seems to find the
log4j configuration.

Edgar

 -Original Message-
 From: Martin Monsorno [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 28, 2003 3:04 AM
 To: 'Struts Users Mailing List'
 Subject: Re: how to switch of logging with log4j at initialization
 
 
 COMPAGNON GUILLAUME [EMAIL PROTECTED] writes:
 
  according to me (as the simplest way), you need to have a 
  commons-logging.propeties file with 
  
 org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.
  Log4jF
  actory
 
 I tried this already, but it doesn't change anything.
 
 Apparently, log4j is already used by Struts, but my 
 configuration is ignored.  Like there is an appender 
 configured in the java code, or so.  But I hope, this is not 
 the case ?
 
 
 -- 
 Martin
 

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



RE: SUGGESTION: Transaction token creation control in struts-config.xml (LONG)

2003-03-28 Thread Edgar Dollin
There is a session token which you can use for enforcing transaction
integrity built into struts already.  It is also a piece of cake to custom
code your own if you want finer grained control.

Edgar

 -Original Message-
 From: Igor Shabalov [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 28, 2003 6:42 PM
 To: 'Struts Users Mailing List'
 Subject: Re: SUGGESTION: Transaction token creation control 
 in struts-config.xml (LONG)
 
 
 
   Good use case! I put it into attachment...
 
   Best,
   Igor.
 
 
 On Fri, 28 Mar 2003 16:53:15 -0600, Steve Stair 
 [EMAIL PROTECTED] wrote:
 
  I've got a use case to edit an existing user.
  I've extended the ForwardAction class to make one that 
 forwards after 
  creating a transaction token.
 
  When the user clicks on a link to edit a user's data, they 
 are first 
  sent to an action that only loads the user data into the 
 form.  This 
  action can be re-used by a View User use case,
  without any modification, because it doesn't create a transaction
  token.
  On success, that action forwards to the JSP page/tile via an action
  that creates a transaction token.
 
  When the user clicks save, the update action persists the data, and 
  forwards to JSP again via the action that creates a 
 transaction token.
 
  I've seen it said here that you shouldn't chain actions, 
 but it seems 
  more clear to me this way. By doing it this way, I don't have to 
  create tokens in my code. The update action should not have to know 
  that the place it is being forwarded to will need
  a transaction token.  Isn't the point of defining forwards for an
  action that the java code
  doesn't care where it is going to next?
 
  action-mappings
  !-- Action that only loads the user data --
  action
  path=/editUserAction
  name=UserForm
  type=com.whatever.LoadUserAction
  validate=false
  scope=request
  forward name=success path=/editUser.do /
  forward name=failure path=app.Home /
  /action
 
  !-- Action that only creates a transaction token --
  action
  path=/editUser
  type=com.whatever.TransactionForwardAction
  parameter=app.EditUser/
 
  !-- Action that persists the user data (consumes the transaction
  token) --
  action
  path=/updateUserAction
  name=UserForm
  type=com.whatever.UpdateUserAction
  validate=true
  input=app.EditUser
  scope=request
  forward name=success path=/editUser.do /
  forward name=cancel path=app.Home /
  forward name=failure path=/editUser.do /
  /action
 
  /action-mappings
 
 
  In any case, in doing this, it seems to me that it would 
 make sense if 
  you could make an action create a transaction token by some 
 entry in 
  the struts-config.
 
 
 
  --
  Steve Stair
  [EMAIL PROTECTED]
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -- 
 Igor Shabalov
 Director of Engineering
 Exadel Inc.
 http://www.exadel.com
 

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



RE: Actions based on Role

2003-03-27 Thread Edgar Dollin
If you use a filter, to filter actions based on role, the action wouldn't
have to know about security.  If your authentication sticks the user
information into the session, the action could make decisions based on the
user information.

Edgar

 -Original Message-
 From: Jagadeesan,Sivakumar 
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 27, 2003 3:50 PM
 To: 'Struts Users Mailing List'
 Subject: Actions based on Role
 
 
 I have web application where users could of three types (Roles)
 
 1) Basic User
 2) Silver User
 3) Gold User
 
 According to Type / Role of user some actions could be 
 performed or not performed.
 
 I could set in my stuts-config.xml, the role based access in 
 Action Element 
 
 I am having my own authentication System that uses the 
 database . The User table has the userName and also the Role.
 
 I am not sure how could I create a Role that the Action is 
 expecting , if I am using my own authentication
 
 Thanx
 --Siva Jagadeesan
 

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



RE: Using query string in struts-menu entry

2003-03-26 Thread Edgar Dollin
One thing that I see which might be related to your problem is that the
'name' fields are not unique, might not be but they should be unique.

I use stuff like

Item   name=GuestMenu5  title=Meeting Schedule  
page=/tilesforward.do?TILES_FORWARD=meetings.tile /

and do not have any problems.  I am using the DropDownMenuDisplayer which
has very little javascript and there are some inconsistencies between the
displayers.  I would look at the generated code to see if there are any
obvious issues.

Edgar

 -Original Message-
 From: Richard Mixon [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 25, 2003 8:29 PM
 To: 'Struts Users Mailing List'
 Subject: Using query string in struts-menu entry
 
 
 
 I've been trying to use the following menu entries with no luck:
 
 Menu  name=operationMenu  title=Instructor
   Item  name=MeasurementGrid  title=Operations
  tooltip=Instructor Operations
 Item  name=configStatus  title=Status 1
toolTip=View/maintain status.
page=/config/StatusAction.do?method=inquire/
 Item  name=configStatus  title=Status 2
toolTip=View/maintain status.
page=/config/switchStatusAction.do/
   /Item 
 /Menu
 
 The first menu item is really what I want to use (with the 
 query string method=inquire). It does not seem to work at all.
 
 If I use the second method (just a simple ForwardAction that 
 forwards to the JSP page under WEB-INF/pages) everything 
 works just fine.
 
 Should the query parametes work with struts-menu?
 
 Thanks - Richard
 
 

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



RE: Formatting dates in html:text

2003-03-26 Thread Edgar Dollin
If you just want to display, the bean:write tag has some date formatting
options.

For entry the 'best' current solution is to subclass the TextTag class and
do your processing there.  The strategy I have been using in such a tag is
to use a 'hidden' field with your actual form data and javascript to do the
translations to another field the user actually edits, of course returning
the altered text to your hidden field.

One of the javascript guys was asking about a hypothetical date tag, but I
don't remember the details or the status.

Edgar

 -Original Message-
 From: Greg Dunn [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 26, 2003 11:52 AM
 To: 'Struts Users Mailing List'
 Subject: Formatting dates in html:text
 
 
 I'm trying to display a date in a particular format in an 
 html-el:text box.  I'm filling my form bean from my DAO 
 which returns a timestamp, and
 
 html-el:text size=10 property=presReadingDate 
 value=${meterReading.dtPresReadDt}/
 
 displays the long date/time format 'Tue Mar 26 10:45:59 CST 
 2003' which is no good.
 
 I was looking at a discussion on this topic in the archives, 
 but it appears that it was left as food for thought
 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg52386.html

I use the JSTL fmt:formatDate tag to display a date outside a form, but it
can't be nested so it's no good here.

This scenario seems like it would be fairly common.  What does one do here?
Format the date in a get/set pair in their bean and display that?  Use basic
HTML input type=text tags?  What's best practice?

Thanks,


Greg


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



RE: form scope question

2003-03-26 Thread Edgar Dollin
A good practice is to NEVER use the same form name unless the action is
related and you are expecting the data to pass through.  Of course the class
can be reused.

Edgar

 -Original Message-
 From: Raible, Matt [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 26, 2003 6:18 PM
 To: 'Struts Users Mailing List'
 Subject: RE: form scope question
 
 
 I've seen this a lot with Struts - it seems you can't have 
 forms with the same name in any two scopes.  To work around 
 this issue, I name my forms differently.  For instance, I 
 store the logged-in user's form in the session as 
 currentUserForm and when I edit a user, I call it userForm.
 
 HTH,
 
 Matt
 
  -Original Message-
  From: Kevin Williams [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 26, 2003 4:12 PM
  To: [EMAIL PROTECTED]
  Subject: form scope question
  
  
  Hi,
  
  I am hoping someone can clarify what is exactly happening in my 
  application.  I was trying to retrieve a form object in a 
 custom tag 
  through the pageContext.findAttribute method, but with no 
 success.  I 
  discovered the reason that I wasn't retrieving the value 
 was because I 
  had set the form object at the session level, and for some 
 reason an 
  additional form object existed at the request level.  Why 
 is there a 
  duplicate form object at the request level (whose values 
 are NOT set) 
  when I have never specified request scope on any of my 
 action objects 
  that use this form?
  
  Thanks,
  
  Kevin Williams
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 

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



RE: is there a struts club in NJ???

2003-03-25 Thread Edgar Dollin
mailto:[EMAIL PROTECTED]

John Menke runs it once or so a month at the Morris County Library.  There
is a group on yahoo under njmvcopensource as well.

Edgar

 -Original Message-
 From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 25, 2003 3:29 PM
 To: '[EMAIL PROTECTED]'
 Subject: is there a struts club in NJ???
 
 
 Hi,
 can some one forward the website or infortmation if
 there is a struts club in NJ, i would like to join it,
 
 Ashish
 
 __
 Do you Yahoo!?
 Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your 
 desktop! http://platinum.yahoo.com
 

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



RE: [Q] Apache http.conf, Tomcat Struts

2003-03-21 Thread Edgar Dollin
This sounds like a tomcat configuration error.  You need to set appBase
under host and docBase under context.  If you still have problems I would
post this under [EMAIL PROTECTED]

Edgar

 -Original Message-
 From: Sasha Bilton [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 21, 2003 4:51 AM
 To: 'Struts Users Mailing List'
 Subject: [Q] Apache http.conf, Tomcat  Struts
 
 
 Hi,
 
 I'm running an Apache (1.3) webserver on linux (Suse 8) that has 
 multiple virtual hosts. I'm using JkMount (AJP 13) to get Tomcat to 
 handle my Struts .jsp files.   At the moment JkMount only 
 looks in ROOT 
 for jsp files, so even though I have the doc root set to 
 /home/bob/jakarta/webapps/bob and happily serves .html from that 
 directory, if I try and point to a .jsp file it looks in webapps/ROOT.
 
 That would be fine if I where just running one site, but I need to be 
 able to look in multiple directories under webapps for my 
 Struts files.
 
 Also, should I do anything special to handle the .do extension in my 
 JkMount settings?
 
 Many, many thanks in advance!
 
 Sasha
 
 

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



RE: [FRIDAY] Microsoft

2003-03-21 Thread Edgar Dollin

http://www.fawcette.com/javapro/2003_03/online/j2ee_bkurniawan_03_11_03/

 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 21, 2003 9:41 AM
 To: 'Struts Users Mailing List'
 Subject: RE: [FRIDAY] Microsoft
 
 
 What article?
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]
 Sent: Friday, 21 March 2003 22:32
 To: [EMAIL PROTECTED]
 Subject: Re: [FRIDAY] Microsoft
 
 
 As developers, I think its our job to develop, making the best use of 
 the best tools available.
 
 I may be involved with a .NET project this summer. And if I 
 am, you can 
 bet I'm bringing along the C# renditions of my favorite tools. Ant, 
 Hibernate, Lucene, Maverick (similar to Struts), Velocity, 
 all have .NET 
 projects churning away at SourceForge. Some of these still need some 
 work, but its work we know how to do.
 
 The nice thing about this article is that it echoes what I have been 
 telling clients. .NET is a nice quick-to-market platform, but its 
 immature and still needs to be augmented by the products real, live 
 enterprise developers have been building in Java over the 
 last few years.
 
 Although the skills most of us bring to a project have less 
 to do with 
 the tools themselves, and more to do with how we use the tools. After 
 all, no matter how good you are using product X today, it's 
 liable to be 
 a very different product two years from now.
 
 -T.
 
 -- 
 Ted Husted,
 Struts in Action http://husted.com/struts/book.html
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: [Q] Return-to-page - is there a slick solution?

2003-03-21 Thread Edgar Dollin
It is a little cleaner to save the action in the form bean.  This gives you
a little more user navigation flexiblity.  I even like to save the stack of
actions in the bean which gives you the option of giving a controlled
simulation of the back button.  Of course if you are going to do that you
might have to save some other stuff in order to properly navigate back.

Edgar

 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 21, 2003 11:37 AM
 To: '[EMAIL PROTECTED]'
 Subject: Re: [Q] Return-to-page - is there a slick solution?
 
 
 I could easily track that info in the first action step, put it into 
 the session scope and then pop back there at the end. But 
 that seems to 
 circumvent the entire struts action forwarding mechanism.
 
 Not if you store the action name in the session in the first 
 step and have 
 the last step call mapping.findForward(storedName);
 
 David
 
 _
 STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
 
 

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



Microsoft

2003-03-20 Thread Edgar Dollin
I suppose this will start a war, but it is always healthy to keep an eye
out.
 
http://www.fawcette.com/javapro/2003_03/online/j2ee_bkurniawan_03_11_03/
http://www.fawcette.com/javapro/2003_03/online/j2ee_bkurniawan_03_11_03/ 
 
Edgar 
 


RE: StrutsMenu Coolmenu4 images

2003-03-19 Thread Edgar Dollin
I would start by looking at the generated HTML.  

One other thing to check is if your pages have any path information, i.e.
struts modules or general application context then the images need either
absolute images references or leading slashes to resolve correctly.

Edgar

 -Original Message-
 From: Jack Zakarian [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 19, 2003 8:12 AM
 To: '[EMAIL PROTECTED]'
 Subject: StrutsMenu Coolmenu4 images
 
 
 Hi,
 
  
 
 I'm trying to use images with coolmenu4. I've added 
 image=images/save.gif to 
 
 Menu and to Item lines but it doesn't load.  I checked 
 the CoolMenuDisplayer4.java
 
 code and it contains the following;
 
  
 
 private static final String TOP_IMAGE = cmTopMenuImage;
 
 private static final String SUB_IMAGE = cmSubMenuImage;
 
  
 
 cmTopMenuImage and cmSubMenuImage are found in the coolmenu4-config.js
 
 i.e. 
 
  
 
 // Struts Menu specific javascript variables
 
  
 
 // menu arrows
 
 cmTopMenuImage='nbsp;nbsp;nbsp;img 
 src=images/Rarrow.gif class=menuArrows /'
 
 cmSubMenuImage='nbsp;nbsp;nbsp;img 
 src=images/Rarrow.gif class=menuArrows /'
 
  
 
 Also CoolMenuDisplayer4.java only loads the following arguments
 
  
 
 protected String[] getArgs(MenuComponent menu) {
 
 String[] args = new String[8];
 
 args[0] = menu.getName();
 
 args[1] = getParentName(menu);
 
 args[2] = getTitle(menu);
 
 args[3] = (menu.getLocation() == 
 null)?EMPTY:menu.getLocation();
 
 args[4] = getTarget(menu); 
 
 args[5] = (menu.getOnClick() == null)?EMPTY:menu.getOnClick();
 
 args[6] = (menu.getOnMouseOver() == 
 null)?EMPTY:menu.getOnMouseOver();
 
 args[7] = (menu.getOnMouseOut() ==
 null)?EMPTY:menu.getOnMouseOut(); 
 
  
 
 return args;
 
 }
 
  
 
 How can I get images to load for my top and sub menu items?
 
  
 
 Thanks,
 
  
 
 Jack.
 
  
 
  
 
 

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



RE: Including A JSP Containing Struts

2003-03-18 Thread Edgar Dollin
Have you tried the straight text include:

%@ include file=yourPage %

Edgar

 -Original Message-
 From: Aidan Monroe [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 17, 2003 6:43 PM
 To: 'list'
 Subject: Including A JSP Containing Struts
 
 
 I'd like to create a JSP file that can be included in
 many of my other JSPs. That included JSP will need to
 have Struts tags in it and will receive 2 parameters. 
 
 I've tried using jsp:include like so:
 
 jsp:include page=../include/LovLookup.jsp
 jsp:param name=form value=TalkIndirectForm/
 jsp:param name=field value=laborAcctCode/ /jsp:include
 
 But the Struts tags inside the included JSP did not
 get resolved.
 
 Here is the included JSP:
 
 td styleClass=lov_icon
 html:img src=../images/find.jpg
 altKey=listLovCodes 
 onclick=javascript:openLovWindow( %= ' +
 request.getParameter(form) + ', ' +
 request.getParameter(field) + '% )/
 /td
 
 The resultant HTML still has the html:img in it --
 it was not resolved into a img. I've tried adding 
 
 %@ taglib uri=/WEB-INF/struts-html.tld 
 prefix=html %
 
 to the top of the included JSP but to no avail.
 
 I haven't tried using bean:include because I want to
 use parameters and didn't see in the documentation
 where bean:include recognized nested parameter tags.
 
 Any suggestions?
 
 TIA
 
 __
 Do you Yahoo!?
 Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your 
 desktop! http://platinum.yahoo.com
 

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



RE: Including A JSP Containing Struts

2003-03-18 Thread Edgar Dollin
If you use jsp:include this is a separate compilation and is more like a
function, hence the 'parameters'.

However, what it sounds like to me is you are looking for a 'c' macro
facility with parameters.  I don't believe this functionality is available.
If you use the straight text include it is a parameterless macro.  Since we
are in a servlet environment, stick the parameters in the request and in
your include pull them out of the request.  This way you will have both the
textual include with access to your form information and the parameters you
need.

Edgar

 -Original Message-
 From: Aidan Monroe [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 18, 2003 10:53 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Including A JSP Containing Struts
 
 
 no, because I want to pass parameters to the included
 page.
 
 --- Edgar Dollin [EMAIL PROTECTED] wrote:
  Have you tried the straight text include:
  
  %@ include file=yourPage %
  
  Edgar
  
   -Original Message-
   From: Aidan Monroe [mailto:[EMAIL PROTECTED]
   Sent: Monday, March 17, 2003 6:43 PM
   To: 'list'
   Subject: Including A JSP Containing Struts
   
   
   I'd like to create a JSP file that can be included
  in
   many of my other JSPs. That included JSP will need
  to
   have Struts tags in it and will receive 2
  parameters.
   
   I've tried using jsp:include like so:
   
   jsp:include page=../include/LovLookup.jsp
   jsp:param name=form
  value=TalkIndirectForm/
   jsp:param name=field
  value=laborAcctCode/ /jsp:include
   
   But the Struts tags inside the included JSP did
  not
   get resolved.
   
   Here is the included JSP:
   
   td styleClass=lov_icon
   html:img src=../images/find.jpg
   altKey=listLovCodes
   onclick=javascript:openLovWindow( %= ' +
   request.getParameter(form) + ', ' +
   request.getParameter(field) + '% )/
   /td
   
   The resultant HTML still has the html:img in it
  --
   it was not resolved into a img. I've tried
  adding
   
   %@ taglib uri=/WEB-INF/struts-html.tld
   prefix=html %
   
   to the top of the included JSP but to no avail.
   
   I haven't tried using bean:include because I
  want to
   use parameters and didn't see in the documentation
   where bean:include recognized nested parameter
  tags.
   
   Any suggestions?
   
   TIA
   
   __
   Do you Yahoo!?
   Yahoo! Platinum - Watch CBS' NCAA March Madness,
  live on your
   desktop! http://platinum.yahoo.com
   
  
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your 
 desktop! http://platinum.yahoo.com
 

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



RE: Struts-Menu onClick forcing a submit

2003-03-17 Thread Edgar Dollin
It is puzzling why you would be using the 'menu' instead of on page links or
buttons to submit the form.

There is no way to do it using struts-menu selections w/o javascript as they
do not render submit buttons.

If your menu is within the form /form block try

onclick=document.submit();

Also, you might want to use page instead of location although I don't think
that is your issue.  Page is for same site references, location is for off
site references.

Edgar

 -Original Message-
 From: Jack Zakarian [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 17, 2003 7:03 AM
 To: '[EMAIL PROTECTED]'
 Subject: Struts-Menu onClick  forcing a submit
 
 
 Hi,
 
  
 
 I am using Coolmenu4 and setting location to the URL to 
 execute e.g. location=ServiceInvoice/save.do.
 
 I found that this does not force a  submit so my action form 
 is not populated. To force a submit I tried the 
 
 onClick e.g. onClick=submitSave('ServiceInvoice/save.do').
 
   
 
 This does not work. The digester that loads the 
 menu-config.xml doesn't like the parameter with single quotes. 
 
 I tried double quotes and escaped double and single quotes 
 but no luck. e.g. onClick=submitSave(\ServiceInvoice\save.do\)  
 
  
 
 How can I pass a parameter using onClick?.  If it is possible 
 to force a submit using the location, page attribute or other approach
 
 I would rather do it that way without using javascript.
 
  
 
 Any help would be appreciated.
 
  
 
 Thanks,
 
  
 
 Jack
 
  
 
 

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



RE: Struts-Menu onClick forcing a submit

2003-03-17 Thread Edgar Dollin
I would have a hidden field which would help you decompose the action
selected, since there can be only one submit target.  You can use the
LookupDispatchAction as a model or you can simply fill the value of the
hidden field with your action code, i.e.:

onclick=actionField.value='save';document.submit();

Then in your action look for the value of 'actionField' (it would be in your
form or in the request parameters).

Edgar

 -Original Message-
 From: Jack Zakarian [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 17, 2003 11:10 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts-Menu onClick  forcing a submit
 
 
 Hi Edgar,
 
 It's a user requirement to use a horizontal dropdown menu to 
 initiate actions. For example the menu would look like:
 
 [Home]   [Action]  [Query]   [Add][Save]  [Delete]
Cancel   FieldQueryNew  Delete
ClearList All  Add Detail   Delete Selected
ResetNew Query
 There are different menus based on the screen being displayed.
 
 The action class has a number of methods for the above menu.   Some of
 the menu actions will take you to another action-to-screen.
 
 Long term the menu options will be selected from a database 
 table or XML file based on the userid and password.
 
 If I use the onclick=document.submit(); I will still need 
 to set the forms action to the new url.
 
 Thanks for the reply and suggestion.
 
 Jack
 -Original Message-
 From: Edgar Dollin [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 17, 2003 10:49 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts-Menu onClick  forcing a submit
 
 It is puzzling why you would be using the 'menu' instead of 
 on page links or buttons to submit the form.
 
 There is no way to do it using struts-menu selections w/o 
 javascript as they do not render submit buttons.
 
 If your menu is within the form /form block try
 
   onclick=document.submit();
 
 Also, you might want to use page instead of location although 
 I don't think that is your issue.  Page is for same site 
 references, location is for off site references.
 
 Edgar
 
  -Original Message-
  From: Jack Zakarian [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 17, 2003 7:03 AM
  To: '[EMAIL PROTECTED]'
  Subject: Struts-Menu onClick  forcing a submit
  
  
  Hi,
  
   
  
  I am using Coolmenu4 and setting location to the URL to
  execute e.g. location=ServiceInvoice/save.do.
  
  I found that this does not force a  submit so my action form
  is not populated. To force a submit I tried the 
  
  onClick e.g. onClick=submitSave('ServiceInvoice/save.do').
  

  
  This does not work. The digester that loads the
  menu-config.xml doesn't like the parameter with single quotes. 
  
  I tried double quotes and escaped double and single quotes
  but no luck. e.g. onClick=submitSave(\ServiceInvoice\save.do\)  
  
   
  
  How can I pass a parameter using onClick?.  If it is possible
  to force a submit using the location, page attribute or 
 other approach
  
  I would rather do it that way without using javascript.
  
   
  
  Any help would be appreciated.
  
   
  
  Thanks,
  
   
  
  Jack
  
   
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

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



RE: javascript problem

2003-03-14 Thread Edgar Dollin
You could also do a custom tag or move the doSomething() to a server side
action.

Edgar

 -Original Message-
 From: Karr, David [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 13, 2003 6:15 PM
 To: 'Struts Users Mailing List'
 Subject: RE: javascript problem
 
 
 
  -Original Message-
  From: LUCERO,DENNIS (HP-Boise,ex1) [mailto:[EMAIL PROTECTED]
  
  Hello
  I am trying to do this:
  
  html:button property= someButton 
  onClick=doSomething(%=somedynamicvariable%)  Do Something 
  /html:button
  
  Basically trying to pass a dynamic variable as arg to java script
 function
  within the struts html:button tag.
  
  I know I can build up the string in scriplet code like this
  %  String temp = doSomething( +dynamicvariable + )  ;%
   And then use this in the button tag
  html:button property= someButton  onClick=%=temp%  Do
 Something
  /html:button
  but, I  do not want to use that solution.
 
 Your only other choice (AFAIK) is to use Struts-EL, but 
 that's a bigger change than building up the string in a 
 separate statement.  Using Struts-EL, it would look like this:
 
 html-el:button property=someButton
 onClick=doSomething(${somedynamicvariable}) 
   Do Something /html-el:button
 
 This assumes you created somedynamicvariable as a scoped 
 variable (not as a scriptlet variable).
 
 If you're not familiar with this, it uses the expression 
 language mechanisms specified in the JSTL specification (and 
 the apis defined in the Jakarta Taglibs implementation of the JSTL).
 
 

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



RE: Struts-menu with Tiles

2003-03-13 Thread Edgar Dollin
Absolutely.

Just have one of your tiles be the menu.

Edgar

 -Original Message-
 From: Heligon Sandra [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 13, 2003 3:47 AM
 To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
 Subject: Struts-menu with Tiles
 
 
 
   My question is perhaps stupid, sorry. 
   I would wish to know if it is possible to use 
 struts-menu with Tiles. 
   I for a long time seek an example of horizontal 
 dropdown menu and the menu used in struts-menu example
   coolmenus3 seems to me satisfactory. 
   But I use the Tiles components to build my pages. 
   Is it possible to use the two technologies? 
   Thanks a lot in advance.
   
   Sandra
 
 --- 
 As of February 12, 2003 Thomson unifies its email addresses 
 on a worldwide basis.Please note my new email address: 
 [EMAIL PROTECTED] 
 
 Thomson is the leader in solutions and technologies for the 
 entertainment and media industries and serves its customers 
 under its four strategic
 brands: Technicolor, Grass Valley, RCA and THOMSON. 
 More about Thomson: http://www.thomson.net/videochain 
 
 

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



RE: Struts-menu with Tiles

2003-03-13 Thread Edgar Dollin
There is internationalization built into struts-menu. 

Edgar

 -Original Message-
 From: Heligon Sandra [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 13, 2003 5:13 AM
 To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
 Subject: RE: Struts-menu with Tiles
 
 

   Is it possible to do internationalization with struts-menu ?
 
   
  ---
  As of February 12, 2003 Thomson unifies its email addresses on a
 worldwide
  basis.Please note my new email address: [EMAIL PROTECTED]
  
  Thomson is the leader in solutions and technologies for the
 entertainment
  and media industries and serves its customers under its 
 four strategic
  brands: Technicolor, Grass Valley, RCA and THOMSON.
  More about Thomson: http://www.thomson.net/videochain 
  
  Original Message-
  From:   Heligon Sandra  
  Sent:   13 March 2003 09:47
  To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
  Subject:Struts-menu with Tiles
  
  
  My question is perhaps stupid, sorry. 
  I would wish to know if it is possible to use 
 struts-menu with Tiles.
  I for a long time seek an example of horizontal dropdown menu
 and
  the menu used in struts-menu example
  coolmenus3 seems to me satisfactory. 
  But I use the Tiles components to build my pages. 
  Is it possible to use the two technologies? 
  Thanks a lot in advance.
  
  Sandra
 

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



RE: Struts-menu with Tiles

2003-03-13 Thread Edgar Dollin
Not directly.

There is a security mechanism which enables or disables individual items and
menu groups.

Edgar

 -Original Message-
 From: Jose Gonzalez Gomez [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 13, 2003 9:00 AM
 To: 'Struts Users Mailing List'
 Subject: Re: Struts-menu with Tiles
 
 
 
 Edgar,
 
 Is there support in struts-menu for dynamic menus? I evaluated it 
 for one of the applications I'm developing, but I got the impression 
 that you can only render menus that are specified in a configuration 
 file, and finally I used a javascript menu directly as I needed to 
 render a dynamic menu (taken from database).
 
 Regards
 Jose
 
 Edgar Dollin wrote:
 
 There is internationalization built into struts-menu.
 
 Edgar
 
   
 
 -Original Message-
 From: Heligon Sandra [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2003 5:13 AM
 To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
 Subject: RE: Struts-menu with Tiles
 
 

 Is it possible to do internationalization with struts-menu ?
 
 
 
  
 ---
 As of February 12, 2003 Thomson unifies its email addresses on a
   
 
 worldwide
 
 
 basis.Please note my new email address: [EMAIL PROTECTED]
 
 Thomson is the leader in solutions and technologies for the
   
 
 entertainment
 
 
 and media industries and serves its customers under its
   
 
 four strategic
 
 
 brands: Technicolor, Grass Valley, RCA and THOMSON.
 More about Thomson: http://www.thomson.net/videochain
 
 Original Message-
 From:  Heligon Sandra  
 Sent:  13 March 2003 09:47
 To:'[EMAIL PROTECTED]'; 
 '[EMAIL PROTECTED]'
 Subject:   Struts-menu with Tiles
 
 
My question is perhaps stupid, sorry. 
I would wish to know if it is possible to use
   
 
 struts-menu with Tiles.
 
 
I for a long time seek an example of horizontal dropdown menu
   
 
 and
 
 
 the menu used in struts-menu example
coolmenus3 seems to me satisfactory. 
But I use the Tiles components to build my pages. 
Is it possible to use the two technologies? 
Thanks a lot in advance.

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

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



RE: Struts-menu with Tiles

2003-03-13 Thread Edgar Dollin
The only way to really understand struts-menu as it is now is to read the
source.  Of course it is just a couple of tags and a dozen classes so it is
really pretty simple.

The 'MenuBase' class has most of the attributes for each menu item and is
helpful in understanding the menu-config.xml file.

Edgar


 -Original Message-
 From: Pascal THIVENT [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 13, 2003 11:41 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts-menu with Tiles
 
 
 Quoting Heligon Sandra [EMAIL PROTECTED]:
 
 replace the string index.jsp in the location attribute with a 
 struts action path. FYI, the location attribute is is allowed 
 on both Menu and Item.
 
 Menu  name=MenuLogout  title=menu.label.logout 
 location=pathToMyLogoutAction.do 
 Menu  name=MenuHelp  title=menu.label.help 
Item  name=about title=menu.label.help.about 
 location=pathToMyAboutAction.do/
 /Menu
 
 Dont be scared, just try ;)
 
 -- 
 P. 
 
  It is perhaps a solution but I don't know where I can find 
 help about 
  syntax of the menu-config.xml file there is no dtd file 
 associated to 
  this file in the struts-menu example. I don't know which attributes 
  are available in the item or menu tag.
  
  example of menu-config.xml
  Menu  name=MenuHelp  title=menu.label.help 
Item  name=about title=menu.label.help.about 
  location=index.jsp/ /Menu
  
  
 
 --
 --
 
  
  As of February 12th, 2003 Thomson unifies its email addresses on a 
  worldwide basis.
  Please note my new email address: [EMAIL PROTECTED] 
  
  http://www.thomson.net/
  
  Original Message-
  From: Pascal THIVENT [mailto:[EMAIL PROTECTED]
  Sent: 13 March 2003 16:32
  To: Struts Users Mailing List; Heligon Sandra
  Cc: 'Struts Users Mailing List'
  Subject: RE: Struts-menu with Tiles
  
  
  Quoting Heligon Sandra [EMAIL PROTECTED]:
  
  why not using a custom Action to perform the logout and forward then
 to
  the
  tiles def ?
  
  HTH
  
  P.
  
   I defined the following entry in the tiles-def.xml.
   
   definition name=site.menu.bar path=/coolmenu2.jsp 
   /definition
   
   with coolmenu2.jsp:
   %@ taglib uri=/WEB-INF/tld/struts-menu.tld prefix=menu%
   
   script language=JavaScript1.2 src=./scripts/coolmenus3.js 
   /script script src=./scripts/coolmenu2-config.js
   /script
   
   menu:useMenuDisplayer name=CoolMenu 
   bundle=org.apache.struts.action.MESSAGE
   menu:displayMenu name=MenuHome/
   menu:displayMenu name=MenuLogout/
   menu:displayMenu name=MenuHelp/ /menu:useMenuDisplayer
   
   I can display a horizontal struts-menu.
   But when the user select the command Logout I would like 
 to call a 
   tiles definition, in this case site.login.page.
   
   definition name=site.login.page extends=site.mainLayout
 put name=title value=Login page /
 put name=body value=login.jsp /
 put name=menu value=/tiles/common/empty.jsp /
 put name=user value=/tiles/common/empty.jsp / 
   /definition
   
   If in the menu config I write
   Menu  name=MenuLogout  title=menu.label.logout
   location=site.login.page 
   /Menu
   
   It doesn't work I have the error Unable to open 
 location: Document 
   not found on server.
   To display the login page I must write 
   Menu  name=MenuLogout  title=menu.label.logout
   location=login.jsp 
   /Menu
   
   but the page doesn't have the look and feel of the application.
   
   
  
 
 --
 --
 
   
   As of February 12th, 2003 Thomson unifies its email 
 addresses on a 
   worldwide basis.
   Please note my new email address: [EMAIL PROTECTED] 
   
   http://www.thomson.net/
   
   Original Message-
   From: Edgar Dollin [mailto:[EMAIL PROTECTED]
   Sent: 13 March 2003 14:05
   To: 'Struts Users Mailing List'
   Subject: RE: Struts-menu with Tiles
   
   
   Absolutely.
   
   Just have one of your tiles be the menu.
   
   Edgar
   
-Original Message-
From: Heligon Sandra [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 3:47 AM
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Subject: Struts-menu with Tiles



My question is perhaps stupid, sorry. 
I would wish to know if it is possible to use
struts-menu with Tiles. 
I for a long time seek an example of horizontal 
dropdown menu and the menu used in struts-menu example
coolmenus3 seems to me satisfactory. 
But I use the Tiles components to build my pages. 
Is it possible to use the two technologies? 
Thanks a lot in advance.

Sandra

---
As of February 12, 2003 Thomson unifies its email addresses 
on a worldwide basis.Please note my new email address: 
[EMAIL PROTECTED] 

Thomson

RE: StrutsMenu

2003-03-12 Thread Edgar Dollin
I'll drop the cookie code on sourceforge.  It does depend on the change I
posted prior to the DropDownDisplayer (basically to write out a string after
a menu block is rendered).

I am not familiar with XSL but I like the idea of user customizable menus.
It would be really nice for a site with public and private areas, so end
users could keep the public area up while the business processes were
restricted.

Edgar



-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 9:17 AM
To: 'Struts Users Mailing List'
Subject: RE: StrutsMenu


All three of the links allow roles to be specified in menu-config.xml -
this is how the roles are used.  For an online example, see:

http://raibledesigns.com/struts-menu/rolesMenu.jsp

The dhtml menus use ListDisplayer, not DropDownDisplayer, so you're right
in that it's not in that one.  The IE6 problem is b/c the dhtmlDropDown does
not currently support nested children  2.

Care to donate your cookie code?

One enhancement I was thinking of for struts-menu was to make an
XSLDisplayer that uses XSL on the menu-config.xml file to change the menus.
It might be a lot of work, who knows until I get into it.  The idea would be
that there would be default XSL files for all menus, and then I'd add a path
attribute to the tag library so users could customize there own.  Thoughts?


Anyone know how to read an XSL file from a JAR file?

Matt



 -Original Message-
 From: Edgar P. Dollin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 6:30 AM
 To: 'Matt Raible'
 Cc: 'Struts Users Mailing List'
 Subject: RE: StrutsMenu


 Matt:

 The links below don't seem to do any role stuff that I can find.  BTW:
 there are some bugs in the dhtmlDropdown.jsp with IE6.

 Maybe I am reading the code incorrectly but the DropDown
 displayer never
 calls isAllowed or works with an object that does  The coolmenu
 displayer does makes calls although it's structure is a tad different
 than the drop down.  I have started doing the analysis of where to put
 the checks to enable the role/permission implementation.

 The tree menu link is really interesting.  The guy and his bud's are
 really good.

 BTW: I reworked the cookies and got the menu's to act
 consistently from
 page to page.

 Thanks again

 Edgar

 -Original Message-
 From: Matt Raible [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 11, 2003 9:35 PM
 To: Edgar Dollin
 Cc: 'Struts Users Mailing List'
 Subject: RE: StrutsMenu



 It should already be built into the following Displayers using the
 roles attribute on a menu or item.

 http://raibledesigns.com/struts-menu/dhtmlDropdown.jsp
 http://raibledesigns.com/struts-menu/dhtmlExpandable.jsp
 http://raibledesigns.com/struts-menu/coolmenu4.jsp

 For saving a menu's expanded location - you might want to look at the
 following Tree menu.  I hope to add support for this type of
 menu in the
 coming weeks.

 http://webfx.eae.net/dhtml/xtree/demo.html

 HTH,

 Matt

 -Original Message-
 From: Edgar Dollin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 11, 2003 6:04 PM
 To: '[EMAIL PROTECTED]'
 Cc: 'Struts Users Mailing List'
 Subject: StrutsMenu


 Would it be simple to implement roles and permissions on the
 DropDownDisplayer?  I have started to look at it and am not
 sure of all
 the touch points.

 BTW: my solution for restoring a menu position on a target
 page with the
 same menu as the prior page is sub-optimal.  The only solution I could
 come up with saved menu down and up movements and created expiring
 cookies on menu selection.  Of course if you do any other action the
 menu doesn't redrop.  If you are using contexts, the cookies are
 discarded across the change of context.  It looks like the only way to
 really make menu position controllable is to do some server
 side stuff.
 An interesting project.

 Thanks for your help.

 Edgar





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



RE: [OT] computer performance with jsp/servlets/struts

2003-03-11 Thread Edgar Dollin
There were some issues with session serialization which were resolved in the
latest nightly builds.  You could try disabling session persistence although
it would be better to resolve the serialization problems.  If I understand
correctly, in a low memory production environment those serialization
mechanisms have to work.

The other issue is that the tomcat manager reload application is 10 times
faster (10-20 seconds vs 1-3 seconds on my machine 1.8g, 512mb, w2k) than a
stop and start of tomcat.  Actually, the first few times I used the reload
function it was so fast, I didn't believe it actually worked.

Edgar

 -Original Message-
 From: Dan Allen [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 11, 2003 12:00 AM
 To: 'Struts Users Mailing List'
 Subject: Re: [OT] computer performance with jsp/servlets/struts
 
 
 Another thing that could be causing the problem.  I am using 
 Ant to reload just the application and not tomcat by using 
 the manager that comes with Tomcat.  I notice that each time 
 I reload it throws Exception Errors that the sessions could 
 not be recovered.  Whenever I am swapping and exception 
 errors are thrown, it takes many, many minutes to handle 
 them.  I guess I should work on my tomcat installation 
 regarding these reloads of applications.  Anyone else see 
 this in the logs?  Maybe the reload of applications is not 
 efficient and panned out yet, since it has to recover all the 
 objects which were in the session at the time of the reload.
 
 Dan
 
 David Graham ([EMAIL PROTECTED]) wrote:
 
  P3 1Ghz., 512MB RAM and Tomcat starts in about 10 seconds.  
 Obviously 
  don't
  need to restart Tomcat for JSP changes which load in about 
 5 seconds.
  
  David
  
  
  
  From: Dan Allen [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List 
  [EMAIL PROTECTED]
  To: Struts-User List [EMAIL PROTECTED]
  Subject: [OT] computer performance with jsp/servlets/struts
  Date: Mon, 10 Mar 2003 22:09:12 -0600
  
  I only ask this to see if I can make my life easier.  I have a PII 
  333MHz laptop with 216MB Ram and I am running Tomcat, JDK 
 1.4.1 and 
  some struts applications.  Just now it took ant 6 min 56 sec to 
  reload my application after making changes.  If I were to 
 go and get 
  a decent Athlon XP or PIV computer, what should I expect 
 for reload 
  times and compile times for a reasonable size webpage application?
  
  This is the one thing that I regret when leaving PHP.  I 
 spend close 
  to 1/8 of my day waiting for it to reload once my computer starts 
  swapping to disk.  Does anyone else have this issue?
  
  Dan
 
 -- 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Daniel Allen, [EMAIL PROTECTED]
 http://www.mojavelinux.com/
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Windows: where do you want your data to disappear to today?
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 

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



RE: The Back button on on multi-page forms ??????

2003-03-11 Thread Edgar Dollin
A form based sequence token (as opposed to struts session based token)
reduces users frustration with the lack of a back button.  If the sequence
tokens are form based users can wander to other parts of the application and
return to a still usable page.  I have found the complete removal of the
back button a relatively high user frustration issue.

Edgar

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 11, 2003 1:23 AM
 To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
 Subject: RE: The Back button on on multi-page forms ??
 
 
 
 
 On Tue, 11 Mar 2003, Andrew Hill wrote:
 
  Date: Tue, 11 Mar 2003 11:06:01 +0800
  From: Andrew Hill [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED],
   [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: The Back button on on multi-page forms ??
 
  Hasnt got to that stage yet, but Im guessing that the js 
 trick wont be 
  particularly 'appreciated'.
 
  Of course that code is centralised in one javascript file, 
 so can be 
  changed once Ive had a chance to get tokens working, but Im 
 going to 
  need some fancy code to handle the situation where the url of the 
  previous page is resubmitted as theres a fair bit of stuff 
 that has to 
  go into the session context that wont be there any more if 
 they have 
  completed that operation and then try to go back into it.
 
  Life would be a lot easier if this was just a website with some 
  interactive bits, however its very much more in the nature of a 
  complex application with bucket loads of state that happens 
 to use a 
  browser instead of a standalone client and so theres a lot 
 more 'funny 
  stuff' going on behind the scenes than your average struts 
 app would 
  have - none of which plays well with the back button (or refresh  
  multiple submit for that matter). :-(
 
 
 I've been known to discourage the use of the back button by 
 opening my apps in a browser window that doesn't have the 
 usual location bar and back button icons -- it doesn't help 
 you defend against people that know the keyboard shortcuts, 
 but I was pretty happy with how much this simple approach cut 
 down complaints about the back button not working.
 
 Of course, it's incumbent upon the app developer to include 
 enough nice navigation controls in the page layout so as to 
 minimize the temptation to use the back button in any case ... :-)
 
 When you get that (rare :-) *rational* user that complains 
 about the back button, ask them to show you where the back 
 button is on any traditional GUI app, and then ask them why 
 it should work in a web *application* as opposed to a web *site*.
 
 Yes, it's tilting at windmills, but we can at least get a 
 *few* people to understand how silly this behavior is.
 
 Craig (who is usually sympathetic to app users, but not this time)
 

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



RE: Logic tags and collections?

2003-03-11 Thread Edgar Dollin
Try struts menu http://sourceforge.net/project/struts-menu.

Edgar

 -Original Message-
 From: niksa_os [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 11, 2003 11:37 AM
 To: 'Struts Users Mailing List'
 Subject: Logic tags and collections?
 
 
 How can I make something like this with Struts or someone 
 have better idea?
 
 I have few Admin: MainAdmin, UserAdmin, EmailAdmin.
 MainAdmin can do anything, UserAdmin manage users and emails, 
 and EmailAdmin make emails only.
 
 So, I need this:
 -without Struts, I make Collection in session and
 
 If session.getAdminTypeCollection contain MainAdmin {
 do something
 If session.getAdminTypeCollection contain UserAdmin OR MainAdmin {
 do something
 If session.getAdminTypeCollection contain EmailAdmin OR 
 UserAdmin OR MainAdmin {
 do something
 } End EmailAdmin
 } End UserAdmin
 } End MainAdmin
 
 For MainAdmin Collection:
 Collection.add(MainAdmin)
 Collection.add(UserAdmin)
 Collection.add(EmailAdmin)
 
 For UserAdmin Collection:
 Collection.add(UserAdmin)
 Collection.add(EmailAdmin)
 
 For EmailAdmin Collection:
 Collection.add(EmailAdmin)
 
 -do something are links
 
 MainAdmin see all links
 UserAdmin see UserAdmin and EmailAdmin links
 EmailAdmin only EmailAdmin links
 
 I can't use role or principal or anything from JAAS.
 
 So, I need somehow to check Coolection with logic:present or 
 some others tags?
 
 Thanks.
 

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



StrutsMenu

2003-03-11 Thread Edgar Dollin
Would it be simple to implement roles and permissions on the
DropDownDisplayer?  I have started to look at it and am not sure of all the
touch points.
 
BTW: my solution for restoring a menu position on a target page with the
same menu as the prior page is sub-optimal.  The only solution I could come
up with saved menu down and up movements and created expiring cookies on
menu selection.  Of course if you do any other action the menu doesn't
redrop.  If you are using contexts, the cookies are discarded across the
change of context.  It looks like the only way to really make menu position
controllable is to do some server side stuff.  An interesting project.
 
Thanks for your help.
 
Edgar


struts-menu

2003-03-10 Thread Edgar Dollin
Does anyone know how to suppress the leading '/' in strutsmenu.
 
Does anyone know how to get the menu to remember it's position if the target
page, i.e. tiles, has the same menu.
 
Thanks in advance
 
Edgar


RE: struts-menu

2003-03-10 Thread Edgar Dollin
Thanks Matt:

I didn't find the location bit until after your message, so I submitted a
patch to test the page for https, http, mailto,  ftp so please ignore.

I submitted a patch for DropDownMenuDisplayer.java which outputs a trailer
message after a menu block.  This allowed me to write the javascript to
'toggle' the menu position based on a cookie set in the toggle function.  

It was a mind bender to write javascript in a properties file.  I would have
submitted the javascript but it was based on an external script for reading
and writing the cookies.  If you want it, I'll rework the js in the
properties file to stand alone.

Thanks again

Edgar

 -Original Message-
 From: Raible, Matt [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 10, 2003 10:22 AM
 To: 'Struts Users Mailing List'
 Subject: RE: struts-menu
 
 
 Edgar,
 
 I'm a committer on struts-menu, so hopefully I can help you out.
 
 I believe using the location attribute vs. page attribute 
 will strip out your context and use the exact value you 
 specify in location rather than pre-pending the context.
 
 As for remembering the position - which layout are you using? 
  I can possibly add the remembering functionality, but it 
 will probably involve cookies or something.
 
 Matt
 
  -Original Message-
  From: Edgar Dollin [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 10, 2003 6:20 AM
  To: 'Struts Users Mailing List'
  Subject: struts-menu
  
  
  Does anyone know how to suppress the leading '/' in strutsmenu.
   
  Does anyone know how to get the menu to remember it's 
 position if the 
  target page, i.e. tiles, has the same menu.
   
  Thanks in advance
   
  Edgar
  
 
 

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



RE: struts-menu

2003-03-10 Thread Edgar Dollin
Struts menu works nicely with struts, i.e. you add a plugin to read your
configuration files.  It uses xml and property files for menu configuration.
It can use javascript or not and works with CoolMenus.  There are a couple
of jsp tags which actually insert the menu so your jsp files stay really
clean.  The things I like best about it is that the menu positions are
relative (at least the simple and drop down displayers), i.e. you don't have
to put pixel positions in your code and the menu config just has information
actually relevant to the menu, i.e. url, description, and a tooltip.

http://sourceforge.net/projects/struts-menu

Edgar

 -Original Message-
 From: Stephen Smithstone [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 10, 2003 10:38 AM
 To: 'Struts Users Mailing List'
 Subject: Re: struts-menu
 
 
 what is this struts-menu and where can i find some examples / 
 downloads ? 
 please 
 
 On Monday 10 March 2003 3:22 pm, Raible, Matt wrote:
  Edgar,
 
  I'm a committer on struts-menu, so hopefully I can help you out.
 
  I believe using the location attribute vs. page attribute will 
  strip out your context and use the exact value you specify in 
  location rather than pre-pending the context.
 
  As for remembering the position - which layout are you 
 using?  I can 
  possibly add the remembering functionality, but it will probably 
  involve cookies or something.
 
  Matt
 
   -Original Message-
   From: Edgar Dollin [mailto:[EMAIL PROTECTED]
   Sent: Monday, March 10, 2003 6:20 AM
   To: 'Struts Users Mailing List'
   Subject: struts-menu
  
  
   Does anyone know how to suppress the leading '/' in strutsmenu.
  
   Does anyone know how to get the menu to remember it's position if 
   the target page, i.e. tiles, has the same menu.
  
   Thanks in advance
  
   Edgar
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Web sites using struts

2003-03-10 Thread Edgar Dollin
http://marc.theaimsgroup.com

This is a mirror of the archives which has a little cleaner search.

 -Original Message-
 From: Damm, Gary [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 10, 2003 12:35 PM
 To: '[EMAIL PROTECTED]'
 Subject: Web sites using struts
 
 
 I know this has been asked before but I'm getting errors when 
 searching the archive.  I need some examples (links) of sites 
 currently using struts.
 
 Any help appreciated,
 Gary
 

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



RE: Servlet Mapping

2003-03-07 Thread Edgar Dollin
I was saying two have two mappings in web.xml.  I suggesting using /live/*
for struts and /test/* for your decode.  Here I am using *.do for struts and
*.decode for your decode action.

servlet
servlet-nameaction/servlet-name

servlet-classorg.apache.struts.action.ActionServlet/servlet-class
load-on-startup2/load-on-startup
/servlet
servlet
servlet-namedecode/servlet-name
servlet-classYourDecodeServlet/servlet-class
load-on-startup2/load-on-startup
/servlet

servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping
servlet-mapping
servlet-namedecode/servlet-name
url-pattern*.decode/url-pattern
/servlet-mapping

The purpose of the decode mapping is that you can localize the logic in
determining the actual action.  The actual action will forward to the *.do
mapping of struts.

Edgar


-Original Message-
From: alexj [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2003 9:54 PM
To: 'Struts Users Mailing List'
Subject: Re: Servlet Mapping


What you will do in your web.xml def file is to define wich
servlet will map all the request you will got. And based
on wich pattern.

By doing this you tell your server all the request who
include *.do need to be *forwarded* to your servlet
to map the appropriate action (based on your struts-config)

Usually we use that one :

servlet-mapping

servlet-nameaction/servlet-name

url-pattern*.do/url-pattern


/servlet-mapping

(I'm not sure if my definition is good as well, propably someone

will correct me)

--

Alexandre Jaquet

- Original Message -
From: usha [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 07, 2003 3:32 AM
Subject: Re: Servlet Mapping


 Hi Edgar

 Sorry , i was not sure what you are saying regarding the Map struts to
 /context/live/*. can you expaling me little bit more.

 Thanks
 usha

 Edgar Dollin wrote:

 You can have a servlet mapped to /context/test/*.
 
 Map struts to /context/live/*.
 
 Your struts-config would have to have the /context/live/* entries.
 
 Your servlet does the url calculations and forward to the struts Action
 servlet.
 
 Edgar
 
 
 
 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 11:17 PM
 To: '[EMAIL PROTECTED]'
 Subject: Re: Servlet Mapping
 
 
 You can only supply one mapping to the ActionServlet.
 
 It's impolite to mark your posts as urgent because it's rather
 presumptuous.
 
 David
 
 
 
 
 
 From: usha [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List
 
 
 [EMAIL PROTECTED]
 
 
 To: [EMAIL PROTECTED]
 Subject: Servlet Mapping: urgent
 Date: Thu, 06 Mar 2003 12:01:33 +0800
 
 Hi
 
 i posted this question previously also but i didn't get any
 
 
 answer from
 
 
 any
 body so i am posting it again.
 
 i am trying to give servletmapping for the following URL
 http://localhost:8080/context/test/0/struts-action
 
 in the above URL '0' is going to be changed dynamically depending on
 the
 link the user select.how i can give a servlet-mapping for
 
 
 such type of URL
 
 
 for the ActionServlet.
 
 is this possible to do like this.
 
 Thanks
 usha
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 _
 Tired of spam? Get advanced junk mail protection with MSN 8.
 http://join.msn.com/?page=features/junkmail
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




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




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



JSF

2003-03-07 Thread Edgar Dollin
Has anyone else had a problem logging into Sun's site to download the EA3
edition?

If so, were you able to work around it.

Thanks

Edgar


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



RE: Servlet Mapping

2003-03-06 Thread Edgar Dollin
You can have a servlet mapped to /context/test/*.

Map struts to /context/live/*.

Your struts-config would have to have the /context/live/* entries.

Your servlet does the url calculations and forward to the struts Action
servlet.

Edgar

 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 11:17 PM
 To: '[EMAIL PROTECTED]'
 Subject: Re: Servlet Mapping
 
 
 You can only supply one mapping to the ActionServlet.
 
 It's impolite to mark your posts as urgent because it's rather 
 presumptuous.
 
 David
 
 
 
 From: usha [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Servlet Mapping: urgent
 Date: Thu, 06 Mar 2003 12:01:33 +0800
 
 Hi
 
 i posted this question previously also but i didn't get any 
 answer from 
 any
 body so i am posting it again.
 
 i am trying to give servletmapping for the following URL 
 http://localhost:8080/context/test/0/struts-action
 
 in the above URL '0' is going to be changed dynamically depending on 
 the
 link the user select.how i can give a servlet-mapping for 
 such type of URL 
 for the ActionServlet.
 
 is this possible to do like this.
 
 Thanks
 usha
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 _
 Tired of spam? Get advanced junk mail protection with MSN 8. 
 http://join.msn.com/?page=features/junkmail
 
 

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



RE: [struts-el] What's the benefits ?

2003-03-06 Thread Edgar Dollin
The ambiguity of the syntax is disconcerting and is probably why I limit
it's use.  Whenever I use it, it seems like a guess since the rules are so
loose.  Of course I always guess incorrectly which adds to the frustration.
I for one prefer the more complex syntax and the NPE's, since then you have
a clue as to what is going on.

Edgar

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 05, 2003 8:52 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [struts-el] What's the benefits ?
 
 
 
 
  From: alexj [mailto:[EMAIL PROTECTED]
 
  I didn't find the benefits of the use of jstl extention.
 
  Who can explain me the benefits ?
 
  From: p2 - apache [EMAIL PROTECTED]
 
  Some body don't want to see %  %? Just a guess.
 
 There's lots of advantages to the expression language that 
 Struts-EL uses (copied from JSTL 1.0, and to be embedded 
 everywhere in a JSP page in JSP 2.0).  My favorite feature is 
 independence from the underlying implementation of the 
 properties.  Consider the following expression:
 
   ${customer.mailAddress.city}
 
 This works for all of the following scenarios (as well as 
 some others):
 
 * customer is a bean with a getMailAddress() getter, which in term
   returns a bean with a getCity() getter.
 
 * customer is a bean where getMailAddress() returns a Map that has
   (among others) an entry with a key of city.
 
 * customer is a Map that has a key mailAddress whose value is a
   bean with a getCity() method.
 
 * customer is a Map with a key of mailAddress that returns a Map
   that has a key of city ...
 
 You get the idea?  The business tier developer has a fair 
 amount of freedom in how they implement the beans 
 representing the data required by the view tier -- or even 
 skips implementing them if Maps do the trick. And changing 
 your mind among these choices does not invalidate the syntax 
 of the expression that is embedded in your page.
 
 The other thing I like about EL expressions is that the 
 syntax is very close to what page authors familiar with 
 JavaScript already understand, so it's natural for them to be 
 able to script with it, without having to know any java at 
 all.  Consider a personnel management app that wants to 
 restrict the display of salary information to managers.  In a 
 JSP 1.2 environment (with JSTL), you could write:
 
   c:if test=${user.role = 'Manager'}
 c:out value=${employee.salary}/
   /c:if
 
 and have a fair chance that the page author can understand it 
 -- while the corresponding scriptlet version is pretty opaque 
 to a non-programmer:
 
   %
  if (user.getRole().equals(Manager)) {
out.println(employee.getSalary());
  }
   %
 
 to say nothing of the fact that the Java code requires you to 
 expose user and employee as instance variables in the 
 page class, while the tagged version doesn't.  (And, by the 
 way, you'd better be prepared for NullPointerException errors 
 in the scriptlet, while the expression language deals with 
 them for you.)
 
 By the way, in a JSP 2.0 environment, this example will get 
 even simpler:
 
   c:if test=${user.role = 'Manager'}
 ${employee.salary}
   /c:if
 
 because you will be able to use EL expressions anywhere 
 (including template text), not just in tags that understand it.
 
 Craig McClanahan
 
 
 

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



RE: Java script with struts

2003-03-03 Thread Edgar Dollin
This is not really a struts question and I don't know your object types but
the following is pretty generic.

script
yourJavaScriptFunc(%= yourJavaObject.toString() %);
/script

In your example you are looking for a numeric, in which case you would drop
the quotes.

Edgar

 -Original Message-
 From: Yaron Sela [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 03, 2003 1:01 PM
 To: 'Struts Users Mailing List'
 Subject: Java script with struts
 
 
 Hi all.
 
 I store in the pageContext two ArrayList that contains 
 different parameters. for example One contains priceses for 
 sell and one contains prices for rent.
 
 on checkbox Click I want to change the content of a combobox.
 
 How can I do that?
 How can I get the page context to the Javascript?
 
 Can I change dynamical the content of a combobox by struts?
 
 Example:
 %
   pageContext.setAttribute(rentprices,
 com.managers.data.DataManager.getDataList(rentprices));
   pageContext.setAttribute(sellprices,
 com.managers.data.DataManager.getDataList(sellprices));
 %
 
 script language=JavaScript
   function changePricesList(type){
   //buy
 if(type == 1){
   alert(buy);
 --  document.searchForm.budget = ??;
 }
   }
 /script
 
 html:html
 .
 .
 .
   html:select 
 property=budget tabindex=20
  html:options 
 collection=rentprices property=value labelProperty=label/
  /html:select
 
 .
 .
 /html:html
 
 Thanks for your time
 
 yaron
 
 

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



RE: FW: Running unit tests for Validator used with Struts

2003-02-27 Thread Edgar Dollin
You should be able to validate with StrutsTestCase since it uses cactus.
You have access to the request through cactus, the ActionErrors is  stored
at Globals.ERROR_KEY or returned from your validate.  So, you can manually
instantiate ActionErrors.  You can manually instantiate a mapping, although
I doubt you use it in your validations.  You can manually populate your
form.  I test my validations through successful action results so I don't do
this but the following should work.

...Instantiate form...
MyForm form = new MyForm();
form.setMyProp(value);
... Other properties ...
ActionMapping map = new ActionMapping();
... You have access to the request in StrutsTestCase ...
HttpServlet req = this.getRequest();
... No sure about this but I don't think config is frozen if you declare the
map w/o config...
FowardConfig f = new ForwardConfig(name,url,false);
Map.addForwardConfig(f);
... No we can validate ...
ActionErrors ae = form.validate(map, req);
... You can use the strutstestcase valiations by sticking the errors in the
request
Req.setAttribute(Globals.ERROR_KEY, ae);
... I think you are done ...
verifyActionErrors(new String [] {password.badpass});

Edgar


 -Original Message-
 From: otisg [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, February 26, 2003 7:46 PM
 To: '[EMAIL PROTECTED]'
 Subject: Re: FW: Running unit tests for Validator used with Struts
 
 
 Hello Edgar,
 
 I already am using StrutsTestCase to tests
 Actions I write.  I see how that could be
 used to test whether validation works, but
 unless I'm missing something testing of
 custom validators this way would really be
 just a side-effect of testing Actions.
 
 So imagine you have an Action A that uses
 Validator V.  I write a STC-bases unit test
 and run it.  It passes, no problems.  One
 day somebody modifies A to stop using V and
 modifies V and breaks it.
 
 My STC-bases tests keep running and passing,
 because A still works, but I will never find
 out that V is broken, because V is never
 really tested directly.
 
 A new developer is hired and writes a new
 Action, AA, and decides to use V.  V is
 broken and his AA class is now broken
 because V is kaput.
 
 One could argue that AA should have its unit
 tests, too, and that those should show me
 that V is (has been) broken
 
 So I will use STC for testing the Validator,
 too, but I'm wondering if there is better,
 more direct way of testing them?
 I can test them directly when they are
 Struts-independent, but when they depend on
 Struts (e.g. by taking some Struts classes
 as params), then I cannot.
 
 Thanks,
 Otis
 
 
 
 
  On Wed, 26 Feb 2003, Edgar P. Dollin
 ([EMAIL PROTECTED]) wrote:
 
   
   Use StrutsTestCase,
 http://strutstestcase.sourceforge.net.  
   It does the whole struts cycle and
 allows test of all struts 
   components.
   
   Edgar
   
-Original Message-
From: otisg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 4:51 PM
To: '[EMAIL PROTECTED]'
Subject: Q: Running unit tests for
 Validator used with Struts


Hello,

It is almost impossible to get anyone
attention on struts-user.
I'm using Struts and Validator with it.
I wrote a custom Validator and want to
 write
a unit test for it.
My Validator has a method like this:

public static boolean validateStartLetter(
Object bean,
ValidatorAction validatorAction,
Field field,
ActionErrors errors,
HttpServletRequest request
)
{
String value =
ValidatorUtil.getValueAsString(bean,
field.getProperty());
if
   
 ((GenericValidator.isBlankOrNull(value)) ||
!Character.isLetter(value.charAt(0)))
{
errors.add(field.getKey(), 
Resources.getActionError(request,
 validatorAction, field));
}

return errors.isEmpty();
}

I am running JUnit from Ant to run my unit
test class.
Apparently this doesn't work because the
instance of ActionErrors passed to this
method is null, causing a NPE.

I wanted to check the unit tests for
Validator in Struts (FieldChecks) to
 see how
you wrote your unit tests, so that
 this NPE
is avoided, but I could not find any unit
tests for it.
Are there really no unit tests there?

Regardless, how would you go about running
unit tests for a custom validator from
something like Ant?

It seems to me that doing that may be
impossible, because there is no Struts
running to instantiate ActionErrors, there
is no HttpServletRequest, and so on.

Is there a way to do this?

Thanks,
Otis


   
 
Get your own 800 number
Voicemail, fax, email, and a lot more
 http://www.ureach.com/reg/tag


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

RE: Action input

2003-02-27 Thread Edgar Dollin
The only way I found was to do the following:

Turn on validate.

Don't return the errors generated, put them in the request under the
Globals.ERRORS_KEY.  This way, the ActionServlet will not return immediately
to prior page but the ErrorsTag will still know where to find the errors.

Save the last action map in your form in the prior action.  All you need is
the string.

At the start of your action pull the errors from the request, if there are
any errors,
and return to the mapping you saved in your prior action.

Not to straight forward but not a big deal either.

Edgar

 -Original Message-
 From: Sri Sankaran [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, February 26, 2003 9:41 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Action input
 
 
 If your intent is to re-use the same action class you can 
 simply create an action mapping for each usage.  The only 
 thing that has to be unique is the path.  Each action mapping 
 can, of course, define it's own input attribute; effectively 
 providing the dynamism you seek.
 
 Sri
 
 -Original Message-
 From: harish krishnaswamy [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, February 26, 2003 8:30 PM
 To: [EMAIL PROTECTED]
 Subject: Action input
 
 
 Is there a way of providing the action input in a
 dynamic fashion? In other words, if I had the same
 action being submitted from multiple pages/forms, how
 would I go back to the page/form I came from?
 
 __
 Do you Yahoo!?
 Yahoo! Tax Center - forms, calculators, tips, more 
http://taxes.yahoo.com/

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


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



ActionForm serialization

2003-02-27 Thread Edgar Dollin
Is anyone familiar with the consequenses if an ActionForm is not
serializable?
 
Is anyone familiar with how to determine which element of an ActionForm is
causing the lack of serialization?  
 
Here is the stack of the serialization error in tomcat and other than my
ActionForm ChangePassword you don't get
much help.
 
Thanks in advance.
 
Edgar
 
2003-02-27 05:56:55 StandardManager[] Cannot serialize session attribute
ChangePassword for session C1B9C1E80D3F9BADB8FB57D7C9D85008
java.io.NotSerializableException:
org.apache.coyote.tomcat4.CoyoteRequestFacade
 at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
 at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
 at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
 at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
 at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java
:1427)
 at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.
java:869)
 at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:507)
 at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:662)
 at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3665)
 at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1036)
 at
org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.ja
va:420)
 at org.apache.catalina.core.StandardHost.remove(StandardHost.java:852)
 at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:919)
 at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:899)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:370)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
 at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1221)
 at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1233)
 at org.apache.catalina.core.StandardService.stop(StandardService.java:554)
 at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2224)
 at
org.apache.catalina.startup.CatalinaService.stop(CatalinaService.java:295)
 at java.lang.reflect.Method.invoke(Native Method)
 at
org.apache.catalina.startup.BootstrapService.stop(BootstrapService.java:260)
 at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:309)



Re: ActionForm serialization

2003-02-27 Thread Edgar Dollin
I found it, I was keeping a copy of HttpServletRequest which is
quite understandably not serializable.

Edgar

Subject:  Re: ActionForm serialization
From: Chetan Sahasrabudhe chetans () wisorindia ! soft ! net
Date: 2003-02-27 10:58:21
[Download message RAW]

Edgar:

in your form do u have any customize java object which acts as a
attribute ?
if it is so, make sure the object class is extending serializable classes.

one more question, r u having your operation in transaction ?
- Original Message -
From: Edgar Dollin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 4:35 PM
Subject: ActionForm serialization

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



[Q]Logic tags

2003-02-27 Thread Edgar Dollin
The bean is already in scope.  The name is the name of the bean supplied in 
Your ActionMap, i.e.

action path=/viewschedule 
type=net.bmllc.actions.DataEntry 
name=ViewSchedule 
validate=true 
input=viewschedule.tile
forward name=lookup path=viewschedule.tile /
/action

In the case above the bean attribute name is 'ViewSchedule' which would be
Equivalent to your webadminwizardform in the id attribute of the jsp:useBean
tag.

In other words, the jsp:useBean is redundant and possibly causing a new
Copy of your form bean to be instantiated, tossing the original.

Edgar



Subject:  [Q]Logic tags
From: Chetan Sahasrabudhe chetans () wisorindia ! soft ! net
Date: 2003-02-27 11:47:41
[Download message RAW]

[Attachment #2 (multipart/alternative)]


BlankHi,
I am trying to use logic tags to find if the value is present in my
formbean attribute,
depending on if value is present or not i have to take some action
please check attached code for details.

 logic:empty name=wigadminwizardform
property=sTransactionType
html:text property=sTransactionType size=25
maxlength=25/
/logic:empty
logic:notEmpty name=wigadminwizardform
property=sTransactionType
 bean:write name=wigadminwizardform
property=sTransactionType/
/logic:notEmpty

wigadminwizardform is my formbean with session scope. above the code i have
put aline

jsp:useBean id=wigadminwizardform scope=session
class=wigadmin.struts.forms.WIGAdminWizardForm/

so my page has a view for the bean.

what is happening in, even if sTransationType is populated i am getting text
box.
which should appear on page only if sTransactionType is empty.

what can be the problem



Regards
Chetan

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



FW: websites that use Struts..

2003-02-26 Thread Edgar Dollin


 -Original Message-
 From: Edgar Dollin 
 Sent: Wednesday, February 26, 2003 5:01 PM
 To: 'Raible, Matt'
 Subject: RE: websites that use Struts..
 
 
 They are going to have to switch to extension mapping when 
 they upgrade :-}...
 
  -Original Message-
  From: Raible, Matt [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 12:29 PM
  To: 'Struts Users Mailing List'
  Subject: RE: websites that use Struts..
  
  
  Baahhh, they don't like modern browsers eh?  Using Mozilla, I
  get the following page.  No response needed, just thought 
  maybe the developers are listening ;-)
  
  You cannot access Online Account Services with your current
  Web browser.
  
  Possible reasons for this could be one of the following:
  
  * You are using Netscape 4.0 through 4.07, which we
  cannot support for online account transactions due to 
  security reasons.
  * You are using a browser that is incompatible with our 
  Online Account Services system. We suggest Netscape version 
  4.08 or higher or Internet Explorer version 4.0 or higher. 
  For Macintosh users, we suggest Internet Explorer version 4.5 
  or higher.
  * Your browser does not support 128-bit encryption.
  
  We regret any inconvenience this may cause but, with these
  policies, we strive to keep your account information as 
  secure as possible. 
  
  
  
   -Original Message-
   From: Brandon Goodin [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, February 26, 2003 10:01 AM
   To: Struts Users Mailing List
   Subject: RE: websites that use Struts..
   
   
   Found this one too.
   
  
 https://service.capitalone.com/oas/login.do?objectclicked=LoginSplash
   
   Brandon Goodin
   Phase Web and Multimedia
   PO Box 85
   Whitefish MT 59937
   P (406) 862-2245
   F (406) 862-0354
   [EMAIL PROTECTED]
   http://www.phase.ws

   
   -Original Message-
   From: Brandon Goodin [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, February 26, 2003 9:56 AM
   To: Struts Users Mailing List
   Subject: RE: websites that use Struts..
   
   
   Opps...
   
   One of my links was bad. :-o
   
   http://www.bearmountainmercantile.com
   
   Brandon Goodin
   Phase Web and Multimedia
   PO Box 85
   Whitefish MT 59937
   P (406) 862-2245
   F (406) 862-0354
   [EMAIL PROTECTED]
   http://www.phase.ws

   
   -Original Message-
   From: Brandon Goodin [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, February 26, 2003 9:53 AM
   To: Struts Users Mailing List
   Subject: RE: websites that use Struts..
   
   
   Here is a collection of sites that use struts:
   
   http://www.bearmountainmercantilec.com
   http://www.joebasirico.com
   http://www.whitefishre.com
   http://www.eisenhartbuilders.com
   http://www.parkersvilllecollection.com - contact page only.
   
   Brandon Goodin
   Phase Web and Multimedia
   PO Box 85
   Whitefish MT 59937
   P (406) 862-2245
   F (406) 862-0354
   [EMAIL PROTECTED]
   http://www.phase.ws

   
   -Original Message-
   From: James Prance [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, February 26, 2003 8:42 AM
   To: [EMAIL PROTECTED]
   Subject: websites that use Struts..
   
   
   The list on the Apache website, half the links dont work... does
   anyone know of some websites out there on the old 
  'interweb' that are
   currently live using struts..
   I need to find some good examples to convince our PM's that
   this is our way
   forward..
   
   James
   
   
   
   
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
   
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
   
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
   
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
  
  
 

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



RE: monkey tree - must be session-based?

2003-02-26 Thread Edgar Dollin
 Question about session access.  No idea...
 
 Question about multiple browsers in a single session:
 
 Put a sequence number in your form and your jsp.  Similar to 
 the one struts puts in the session.  I don't like that one 
 since it really restricts the user movement, i.e. they can't 
 be working in a form, jump to another form for some info and return.
 
 Always validate.
 
 In your validation check the sequence number in the form vs 
 the jsp.  If not equal, fail the action.
 
 In my case I am usually doing data entry.  If this is a new 
 record, I just warn of the sequence / session problem.  If 
 its an old record, I re-read the data.  The actions you 
 choose will depend upon your circumstances.
 
 Edgar
 
  -Original Message-
  From: Pani R [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 11:36 AM
  To: 'Struts Users Mailing List'
  Subject: Re: monkey tree - must be session-based?
  
  
  Affan,
  
  Iam sorry, I dont the answer for u r question. But, just
  wondering if you know a way to access a SESSION variables 
  from the constructor of MONKEYTREEBEAN which is an ActionForm.
  
  -Pani.
  --
  
  On Wed, 26 Feb 2003 08:27:56
   Affan Qureshi wrote:
  I have been using Nested tags to create pretty complicated nested
  structures in a flash. But I have a problem when the user opens 
  multiple windows and the session values can get messed up 
  and the trees
  throw ArrrayIndexOutOfBound Exceptions. Has anyone come across the
  same? How to resolve it?
  
  Can we make the html:form to pick up a ActionForm bean from the
  session dynamically? I mean instead of using the name defined in 
  struts-config.xml, can we specify a name of formbean to use 
  at runtime?
  This way we can create 'N' no. of independent trees and store in
  session under different names and and the user can work with them 
  simultaneously.
  
  Thanks a lot.
  
  Affan
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
  
  
  _
  Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for
  $19.95/year. 
  http://login.mail.lycos.com/brandPage.shtml? 
 pageId=plusref=lmtplus
  
 

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



Struts Console

2003-02-21 Thread Edgar Dollin
James or any other Struts Console maven:
 
I have started working more with Struts Console and find it interesting
since it is always presenting all the options available on actions, etc.
Also, that it is doing xml validation against the dtd is very nice as well.
I still do enjoy using my editor (emacs) on the config files for cut and
paste and search and replace, but find the default struts-console xml output
format difficult.  
 
Is it possible that struts-console 'pretty' will not toss comments and also
be available under eclipse?   Even better would be the ability to add
comments to each xml property.  Better still would be a 'copynew' function
for major items such as tiles-definitions and action mappings.  Of course if
you do 'copynew' you would need search and replace.
 
I hope you take this commentary in the spirit in which it is meant, as a
thanks for a program useful enough to be worth commenting about.
 
Thanks
 
Edgar



Subject: RE: [Q] Iterating over a collections.Bag works, but..?

2003-02-19 Thread Edgar Dollin
Do you have the indexed getter method in your main form? i.e.

Object [] getNestedObjs() {
return nestedObjs.toArray();
}

Edgar

From: WILLIAMS,RAND (HP-USA,ex1) rand.williams () hp ! com
Date: 2003-02-19 21:58:19
[Download message RAW]

The problem is that I can display the bean fine:

nested:write name=unused/

But I want to use it as an input field:

nested:text ??? /

-Original Message-
From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 12:12 PM
To: 'Struts Users Mailing List'
Subject: [Q] Iterating over a collections.Bag works, but..?


Hello, hoping for some help on this:

The nested:iteration on a Bag seems to work fine, and it iterates ok,
but I am having trouble accessing the contents of the Bag (SortedBag or
TreeBag etc)
from the code, please help :) 

  nested:form action=engtest.do
logic:notEmpty name=_engineer property=products_SortedBag 
  nested:iterate property=products_SortedBag indexId=i id=unused

%=i%
html:text property='%=products_SortedBag[+i+]%' /
  /nested:iterate
/logic:notEmpty
nested:submit property=submitValueSubmit Changes/nested:submit
  /nested:form

Returns:
java.lang.IllegalArgumentException: Non-indexed property for
'products_SortedBag[0]'

And if I try,

html:text property='%=products_SortedBag(+i+)%' /

it returns:
java.lang.IllegalArgumentException: Non-mapped property for
'products_SortedBag(0)'

Using nested:text gives the same output as well.
So how can I access the contents??

Thanks!

Rand Williams
Hewlett-Packard

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

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

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




tomcat shared jars

2003-02-11 Thread Edgar Dollin
This a question of interest only.  It seems like it should work but doesn't.
 
If you jar up some code and put it in the tomcat/shared/lib it seems to have
an impact on where the system looks for message resource property files and
throws the following error:
 
2003-02-11 21:16:31 StandardContext[]: Servlet  threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path 
 at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:9
52)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
 at actions.TableLoad.init(TableLoad.java:45)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
4)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3420)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
 at org.apache.catalina.core.StandardService.start(StandardService.java:497)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
 at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273)
 at java.lang.reflect.Method.invoke(Native Method)
 at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
)
 at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
 
If you put the jar into the WEB-INF/lib directory the container finds the
message files.  
 
TableLoad is a a class which extends ActionServlet to startup log4j.
TableLoad is not in a jar, but some of the action and form classes are, each
with their own local property files - in the jar.  
 
Any help would be appreciated.
 
Thanks
 
Edgar
 
 



RE: The best way for learning struts (stupid question)

2003-01-17 Thread Edgar Dollin
I would add, learning a java based IDE, eclipse is a good one, and logging
(or do you count that as part of learning the container?).

Edgar



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 1:57 AM
To: 'Struts Users Mailing List'
Subject: Re: The best way for learning struts (stupid question)




On Thu, 16 Jan 2003, joni santoso wrote:

 Date: Thu, 16 Jan 2003 11:33:21 +0700
 From: joni santoso [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: The best way for learning struts (stupid question)

 Hi,

 Now, I can already make struts read the new setting
 changes without resetting Tomcat.

 My question is now : what should I learn first? what
 should I master? As I see there are too many concepts
 and technical terms


When I'm learning something new, I have always preferred to go bottom
up.  For a prospective Struts developer, that probably means starting at
the appropriate point (for you) on the following list, depending on what
you're already familiar with:

* Fundamentals of object-oriented programming

* Java as a programming language

* Design patterns (at the programming level)

* Unit testing concepts and test-first design (JUnit is a wonderful
  tool for this in the Java space)

* Basics of relational databases, SQL, and the
  corresponding Java API (JDBC).

* Fundamentals of XML and XSLT (if you're going to be doing
  web services or XML-heavy applications)

* Architecture of the web (particularly how HTTP, HTML, and
  JavaScript work)

* The Servlet API -- foundation to every Java-based web application

* Basics of the view-layer technology (such as JSP) you plan to use
  If you're planning to use JSPs, plan on spending some time on:
  - Custom tags
  - JSTL 1.0 and the expression language

* Design patterns (at the architectural level)

* Implementations of the design patterns you plan to use
  (i.e. Struts as an implementation of the MVC design pattern)

* Use of advanced Struts features and extensions

The above list presumes you are going to be responsible for the entire
application.  In larger-scale environments there tend to be folks that
specialize on the various layers or tiers (persistent data storage,
business logic, presentation logic) -- if that is the place you are at,
you should spend more time on the technologies relevant to that specialty.

In all cases, there are an abundance of articles, tutorials, and books
around - the Struts resources pages include at least some starting points
for many of these areas.  To find more, Google is your friend :-).

Yes, that list is very long.  But the rewards for persevering and becoming
an expert are very great :-).

Craig


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


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




static elements in forms

2002-12-11 Thread Edgar Dollin
I have worked around this and it is not major, but does anyone know the
reason why optionsCollection can't take a  [ public static Collection ] from
a form bean as input?  This is an issue for me since if a select list is
related to the form, not the application, I prefer to keep it as part of the
form.
 
Thanks in advance.
 
Edgar



RE: LookupDispatchAction onchange

2002-12-10 Thread Edgar Dollin
My requirement (not necessarily on text, but on select fields) is to force
the jsp page to recalculate.  Yes, this can all be done with javascript and
hidden fields, but hiding and redisplaying with javascript is a pain and
more logic that I care to put into a jsp.

Edgar

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 10, 2002 11:05 AM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction onchange


The LookupDispatchAction was designed with the intention of not having to
use javascript to work with multiple submit buttons in one form. 

Since what you need is a submit from an onChange event in a text field which
is a somewhat not often seen operation (at least from my experiences), you
have no choice but to do the javascript in this case.

Just our of curiosity, what requirement in your application do you have that
needs the form to be submitted when a text field changes???

-Original Message-
From: Cook, Graham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 10:50 AM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction onchange


Thanks Andrew  Juan, thats very helpful. 

Its is a shame that I have to use JavaScript to achieve a submit from a text
field. The other buttons on the screen use the html:submit tag, 

html:submit property=doaction
bean:message key=button.savedetails/
/html:submit

obviously theres no Javascript there, shame there isnt some way of doing
this with a tag rather than having javascript code to do the submit.

Thanks you for your help.




-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: 10 December 2002 15:25
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction onchange


If I remember correctly the LookupDispatchAction does a reverse lookup on
your resource bundle in order to determine which method to call in the
class.

Example:

if you have a key in your ApplicationResources.properties called:

textfield.changed=submit form

then you would obviously need something like the following in the
getKeyMethodMap:

map.put(textfield.changed, textFieldChangedMethod);

So when your text field changes, you will need to submit the parameter you
configured for your LookupDispatchAction in struts-config.xml with the a
value of 'submit form'

What the action should do is do a reverse lookup on the ApplicationResources
file and look for a value of 'submit form'. 'submit form' is associated with
the key textfield.changed and it will cause the textFieldChangedMethod to be
called in your class.

Also, make sure you follow Andrew's suggestion about not using 'action' as
the parameter name. This has the potential to cause your form to behave in a
very weird manner. It caused me lots of headaches in the past until I
figured out it was the parameter name I used was 'action'.

If you need any more help on this let me know.

Take care

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 9:54 AM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction onchange


Should be possible.
You may need to do something like appending a parameter to your forms action
url with a bit of javascript to simulate whats submitted by a button. Can't
remember the details for LookupDispatchAction since I havent used it, but
heres some js that will play with your forms action and append a parameter
named 'method' with value defined by useMethod. Adapt as required. (nb: its
modified from a similar script (which works with DispatchAction rather than
LookupDispatchAction) of mine for the purposes of this reply and thus
untested!)

snip
function submitBlah(useMethod)
{
document.forms[0].action =
appendParameter(document.forms[0].action,'method',useMethod);
document.forms[0].submit();
  }
}

function appendParameter(url, parameter, value)
{
  var delimeter = url.indexOf('?') == -1 ? '?' : '';
  return url + delimeter + parameter + '=' + value;
}
/snip

Having said all that I should point out that you might be able achieve a
similar effect using an appropriate hidden field too. Much simpler (though
doesnt work too well with multipart forms submitting to a DispatchAction).
If you try that be careful you dont submit 2 values for your property when a
button is clicked.

btw: Just looking at the javadocs for LDA. I see they use 'action' as the
name of their example parameter. Bad idea naming anything on a form
'action'. It will shadow the form.action property (which means above script
wont work for one thing). Same reason that naming a button 'submit' will
lead you into trouble when you later try to add a call to javascripts
form.submit() method...



-Original Message-
From: Cook, Graham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 22:27
To: '[EMAIL PROTECTED]'
Subject: LookupDispatchAction onchange


Is it possible to use an onchange event on a text input field to submit the
form to a 

RE: Request losing data after container security check

2002-12-06 Thread Edgar Dollin
This is the way CMS works, there is actually an interim request for the
login so your original request doesn't exist anymore.  That is why I
suggested using a filter for authentication since you can better control the
authentication cycle.  If you think it is a bug then you would have to get
the CMS specification changed.

Edgar

-Original Message-
From: Michael Lee [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 10:19 AM
To: 'Struts Users Mailing List'
Subject: Re: Request losing data after container security check


Hey david, thanks again! I appreciate all your input on this.

I have a filter we use for other purposes but we use container managed
security. We have a lot tied into this.
Also, these requests use struts forms. We use post requests throughout the
system so url encoding is out of the question, at least until the next
version.
I noticed this behavior in all my struts actions. This seems like a bug to
me. Don't know if its with j_security_check wiping out the http request form
data or struts not sending it properly.
thanks again,
Mike

- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 05, 2002 11:34 AM
Subject: Re: Request losing data after container security check


 Your authentication filter could do this:
 1. Is user logged in, yes forward to resource, no go to 2.
 2. Forward to login page with the url the user wants to go to.
 3. User logs in and login action sends them to url stored in step 2.

 This handles not only form submission but clicking links as well.  You'll
 probably have to set your form's method to get so the parameters are in
 the url's query string for the login action to see.

 David

 From: Michael Lee [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: Request losing data after container security check
 Date: Thu, 5 Dec 2002 10:59:36 -0500
 
 Its an http request. It should't matter if the session times out or not.
 a.jsp is posting data to a.do through an http request. If we have
container
 managed security it should just forward the data.
 
 When the container times out the session it doesn't touch the browser.
 When
 the user clicks on a field to create an action the request is still
 available to the container. 
 Ya, that's why I'm so perplexed? The user typed in the info, leaves to
make
 a sandwich, comes back and clicks submit. Regardless of session timeout,
if
 this is an http request it should alway work the same except maybe with a
 login before it shows the results.
 thanks,
 Mike
 
 - Original Message -
 From: edgar [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Wednesday, December 04, 2002 7:22 PM
 Subject: RE: Request losing data after container security check
 
 
   If you care enough about this situation you can satisfy most of it
with
   an authentication filter and a custom logon action.
  
   When the container times out the session it doesn't touch the browser.
   When the user clicks on a field to create an action the request is
still
   available to the container.  If you write your own authentication
   filter, you can take what you need from the request and stick it
   someplace until the user establishes a valid session.  When the user
has
   established the session then you grab it and put him back where he
was.
  
   Edgar
  
   -Original Message-
   From: David Graham [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, December 04, 2002 4:59 PM
   To: '[EMAIL PROTECTED]'
   Subject: Re: Request losing data after container security check
  
  
   That's the way session time outs are supposed to work.  This is a
   security
   feature when people leave in the middle of something.  The user must
   complete the transaction in one sitting.
  
   If you don't want that to happen then set your session timeout to an
   incredibly large number of minutes or (I think) entering 0 disables it
   on
   some containers.
  
   David
  
  
  
  
  
  
   From: Michael Lee [EMAIL PROTECTED]
   Reply-To: Struts Users Mailing List
[EMAIL PROTECTED]
   To: Struts Users Mailing List [EMAIL PROTECTED]
   Subject: Re: Request losing data after container security check
   Date: Wed, 4 Dec 2002 16:50:40 -0500
   
   i know.
   a.jsp calls a.do which forwards to b.jsp
   user enters data in a.jsp
   user leaves
   session times out
   user clicks submit on a.jsp
   a.do action is of scope request
   when we get to b.jsp, it should display the data entered on a.jsp
   (verify
   screen)
   it does not if the session times out and the user has to log in again
   thanks,
   Mike
   
   - Original Message -
   From: David Graham [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Wednesday, December 04, 2002 4:09 PM
   Subject: Re: Request losing data after container security check
   
   
 The session only times out if it's idle; it won't timeout in mid
   

RE: LookupDispatchAction

2002-12-03 Thread Edgar Dollin
You have to use the same logic the Action is using to decompose the which
action in order to get conditional validations.

The other alternative is to use separate actions for the form load (set
validate to false) and other form actions.

Edgar

-Original Message-
From: Cook, Graham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 10:08 AM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction



When using LookupDispatchAction for a page with multiple buttons. ie SUBMIT,
SEARCH, etc...
How can you turn off the validation on the form when clicking on the SEARCH
button. (The user is filling a form in top down and hasnt filled in the
fields below the SEARCH button)?





 This message contains information that may be privileged or confidential
and 
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for 
the person to whom it is addressed. If you are not the intended recipient,
you 
are not authorized to read, print, retain, copy, disseminate, distribute, or
use 
this message or any part thereof. If you receive this message in error,
please 
notify the sender immediately and delete all copies of this message .




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

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




RE: Design Issue in struts

2002-12-03 Thread Edgar Dollin
Look into the nested tags.

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 12:02 PM
To: Struts Users Mailing List
Subject: Re: Design Issue in struts


Shirish

By dynamically generating a form i mean querying a db table which contains
information about what fields etc to produce for the user to be able to add
content to their site.

I'm porting an existing cms written in perl on mysql, to java and oracle.

I have 2 forms:
1. Admin form that basically adds fields to an sql table
(AddCustomFieldAction). E.g. What kind of field would you like, etc?

2. The content manager then uses a form that is generated by the table
refered to in form 1.

There appears no elegant means of using struts for form 2, as the action
form cant know what to expect. The only thing i can think of is posting an
array of custom field values as an array and dealing with it when i get to
the action or associated logic.

Please tell me if i'm wrong in this, and i'm missing something. I hate not
to use something because of something I've not understood.

Many thanks

mark

On 3-12-2002 17:34, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 What u mean by dynamically generating a form?
 Its a normal form(Extends ActionForm).
 And the action to deal with will be what ever action u define to achieve
this
 functionality.It will be a very simple action.
 Home this clarifies the confusion.
 
 regards,
 Shirish
 
 -Original Message-
 From: marklowe [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 3:11 PM
 To: struts-user
 Cc: marklowe
 Subject: Re: Design Issue in struts
 
 
 If you're dynamically generating a form, what action would deal with the
 form produced?
 
 I have this problem and i'm thinking of using standard java/jsp for this
 problem now.. As I'd have to pass an array of values and one form element
to
 an action. 
 
 Any thoughts on this issue will be gratfully recieved.
 
 Thanks in advance
 
 Mark
 
 
 On 3-12-2002 12:10, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
 
 Hi,
 I have implemented pretty much the same functionality in our application.
 U can do this using Struts actions.When the user presses a button,call an
 action.In the action add an empty row to the form(add a empty object to
the
 list on form).And then call the same jsp which will just iterate over the
 list
 as earlier.
 //Pseudo code
 Form MyForm{
 List rowList = new ArrayList();
 public Bean getBean(int index){
 if(rowList.size  index){
 rowList.add(new Bean());
 }
 return rowList.get(index);
 }// getObject
 public void setBean(int index,Bean obj){
 rowList.setObject(index,obj);
 }//setBean
 //getter setter for list
 public List getRowList (){
 }
 public void setRowList (List list){
 }
 }//MyForm
 
 //JSP //
 tabletr
 logic:iterate name=myForm property=rowList indexId=i
 tdhtml:text name=myForm property=%=\bean[\ + i +
 \].name\%/td
 tdhtml:text name=myForm property=%=\bean[\ + i +
 \].location\%/td
 /logic:iterate
 /trtable
 So when the action is called, all the data on screen will be preserved as
the
 screen data gets repopulated in the form automatically.Then u add a new
 object
 and the jsp cretes new table with a empty row.
 
 Hope this helps.
 Regards,
 Shirish
 
 
 -Original Message-
 From: graham.cook [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 11:30 AM
 To: struts-user
 Subject: Design Issue in struts
 
 
 
 Can I use struts to perform the following task:
 
 generate a JSP page, but have multiple entry lines on the page. Im not
going
 to know how many lines the user is going to enter, so i'd like them to
have
 some kind of way ( maybe a button ) that the user can click on, the page
 refreshes (retaining data) and shows a new blank line at the bottom of
the
 page under the other lines. When im talking lines I mean eg. Name,
Location,
 DOB, last contact
 
 
 ---
 
 Security Code: 0162
 
 Entry Date:  03/12/2002
 
 
 
 NameLocationDOBLast Contact
 -----
 --
 FredWoking07/12/197311/11/2002
 BertWolverhampton04/11/197611/11/2002
 {Add}
 
 
 {Submit} {Reset}
 -
 
 Then when the user presses SUBMIT the action is called and all data
entered
 into a database.
 
 Has anyone got some real world example of this
 Ta
 
 
 
 

*
*
 **
 
  This message contains information that may be privileged or
confidential
 and
 is the property of the Cap Gemini Ernst  Young Group. It is intended
only
 for
 the person to whom it is addressed. If you are not the intended
recipient,
 you
 are not authorized to read, print, retain, copy, disseminate, distribute,
or
 use 
 this message or any part thereof. If you receive this message in error,
 please
 notify the sender immediately and 

RE: Design Issue in struts

2002-12-03 Thread Edgar Dollin
There is a version compatible with 1.0.2.

I don't know if you can get it now, but there was a nested.jar release for
1.0.2.  Aaron Bates was the author and it was in the contrib section.

Hopefully, Aaron will see this and let you know where to get it.

Edgar

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 12:16 PM
To: Struts Users Mailing List
Subject: Re: Design Issue in struts


I have seen that nested tags is a way around this but i believe they're not
supported on version 1 only on version 1.1.

I'm off recheck the docs...



On 3-12-2002 18:19, Edgar Dollin [EMAIL PROTECTED] wrote:

 Look into the nested tags.
 
 -Original Message-
 From: Mark [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 12:02 PM
 To: Struts Users Mailing List
 Subject: Re: Design Issue in struts
 
 
 Shirish
 
 By dynamically generating a form i mean querying a db table which contains
 information about what fields etc to produce for the user to be able to
add
 content to their site.
 
 I'm porting an existing cms written in perl on mysql, to java and oracle.
 
 I have 2 forms:
 1. Admin form that basically adds fields to an sql table
 (AddCustomFieldAction). E.g. What kind of field would you like, etc?
 
 2. The content manager then uses a form that is generated by the table
 refered to in form 1.
 
 There appears no elegant means of using struts for form 2, as the action
 form cant know what to expect. The only thing i can think of is posting an
 array of custom field values as an array and dealing with it when i get to
 the action or associated logic.
 
 Please tell me if i'm wrong in this, and i'm missing something. I hate not
 to use something because of something I've not understood.
 
 Many thanks
 
 mark
 
 On 3-12-2002 17:34, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
 
 What u mean by dynamically generating a form?
 Its a normal form(Extends ActionForm).
 And the action to deal with will be what ever action u define to achieve
 this
 functionality.It will be a very simple action.
 Home this clarifies the confusion.
 
 regards,
 Shirish
 
 -Original Message-
 From: marklowe [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 3:11 PM
 To: struts-user
 Cc: marklowe
 Subject: Re: Design Issue in struts
 
 
 If you're dynamically generating a form, what action would deal with the
 form produced?
 
 I have this problem and i'm thinking of using standard java/jsp for this
 problem now.. As I'd have to pass an array of values and one form element
 to
 an action. 
 
 Any thoughts on this issue will be gratfully recieved.
 
 Thanks in advance
 
 Mark
 
 
 On 3-12-2002 12:10, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
 
 Hi,
 I have implemented pretty much the same functionality in our
application.
 U can do this using Struts actions.When the user presses a button,call
an
 action.In the action add an empty row to the form(add a empty object to
 the
 list on form).And then call the same jsp which will just iterate over
the
 list
 as earlier.
 //Pseudo code
 Form MyForm{
 List rowList = new ArrayList();
 public Bean getBean(int index){
 if(rowList.size  index){
 rowList.add(new Bean());
 }
 return rowList.get(index);
 }// getObject
 public void setBean(int index,Bean obj){
 rowList.setObject(index,obj);
 }//setBean
 //getter setter for list
 public List getRowList (){
 }
 public void setRowList (List list){
 }
 }//MyForm
 
 //JSP //
 tabletr
 logic:iterate name=myForm property=rowList indexId=i
 tdhtml:text name=myForm property=%=\bean[\ + i +
 \].name\%/td
 tdhtml:text name=myForm property=%=\bean[\ + i +
 \].location\%/td
 /logic:iterate
 /trtable
 So when the action is called, all the data on screen will be preserved
as
 the
 screen data gets repopulated in the form automatically.Then u add a new
 object
 and the jsp cretes new table with a empty row.
 
 Hope this helps.
 Regards,
 Shirish
 
 
 -Original Message-
 From: graham.cook [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 11:30 AM
 To: struts-user
 Subject: Design Issue in struts
 
 
 
 Can I use struts to perform the following task:
 
 generate a JSP page, but have multiple entry lines on the page. Im not
 going
 to know how many lines the user is going to enter, so i'd like them to
 have
 some kind of way ( maybe a button ) that the user can click on, the page
 refreshes (retaining data) and shows a new blank line at the bottom of
 the
 page under the other lines. When im talking lines I mean eg. Name,
 Location,
 DOB, last contact
 
 
 ---
 
 Security Code: 0162
 
 Entry Date:  03/12/2002
 
 
 
 NameLocationDOBLast Contact
 -----
 --
 FredWoking07/12/197311/11/2002
 BertWolverhampton04/11/197611/11/2002
 {Add}
 
 
 {Submit} {Reset

RE: Complicated Web Interfaces?

2002-11-28 Thread Edgar Dollin
Nested tags made struts work for me.

Thanks

Edgar

-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 28, 2002 8:32 AM
To: Struts Users Mailing List
Subject: RE: Complicated Web Interfaces?


 It solves my problem in theory at least : ) all I have to work out now 
 is how to maintain a tree in Struts :( I don't think the applet way is 
 a very nice way of doing it.

Mate, here at the keyboard of monkeys, we aim to please...

http://www.keyboardmonkey.com/pilotlight

... and scroll to the part where it says...
JSP Recursion  TREES!!!

...it's about the most flexible tree generation method there is, and I'm
actually being modest. :P

Requires a JSP 1.2 container (Tomcat3).


Enjoy.


Arron.



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

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




RE: Known issues with JDK1.4.1_01 and struts 1.1b2

2002-11-27 Thread Edgar Dollin
My apologies in advance.  You have a collection in the subform?

-Original Message-
From: McClung, Brian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 27, 2002 3:14 PM
To: '[EMAIL PROTECTED]'
Subject: Known issues with JDK1.4.1_01 and struts 1.1b2


I've scanned the previous messages and I know that most of the responses
have been there are no issues, but I'm having a problem with a nested
optionscollection pulling information.  Are there any known issues between
the two that anyone has encountered?

Thanks for your help.

Brian McClung
Senior Programmer
Belo Interactive
214-977-4083


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

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




RE: Is Struts (or browser based applications in general) useable to build maintenance-applications?

2002-11-26 Thread Edgar Dollin
I have resolved all my Web Application issues (it did take a while).

The back button can be solved by subclassing the ActionForm and having a
standard sequence field.  In all your JSP make sure there is a hidden field
for the sequencer.  Then before any action occurs (write to the db) check
the sequencer to make sure it is the value expected.

If you only use POST methods in JSP the bookmark issue is moot.

Hope that helps

Edgar


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 3:10 AM
To: Struts Users Mailing List
Subject: RE: Is Struts (or browser based applications in general)
useable to build maintenance-applications?


Well I dont know what the issues with maintenance apps in particular are,
but for any web app (which is an application rather than just some trivial
website or portal with dynamic bits) you will have a lot of issues with
users doing things like using back buttons, bookmarks, etc... which can
really upset your server side sense of application state. Managing this can
be a real pain.

As soon as you go beyond trivial UI needs (ie: anything more complex than a
very basic example app) you also have to deal with a myriad of issues
related to browser compatibilities, container portability issues, etc...
Some ppl will tell you to develop code that meets the 'standards' and runs
on all broswers without using javascript. Unless your users are happy with a
very minimalist UI (Ive yet to meet one who is) thats something of an
impossibility so you have a lot of decisions to make in terms of what and
what not to support.
A lot of things that might take only a few lines of code to achieve in a
Swing based client can be fiendishly complex in html (keeping your state
maintained correctly in relation to what the user is seeing on their screen,
fancy widgets, modal stuff...)

On the positive side, your users wont need to install a client application
onto their machines which makes rolling out changes a lot easier (and for a
big organisation a LOT cheaper).
In addition a lot of things that require tons of code in Swing can be
achieved relatively easily from a browser UI. (For example printing a fancy
report just means forwarding to a page that presents the info nicely and
telling the user to click 'print' ;-)

-Original Message-
From: Martin Kuhn [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 15:46
To: [EMAIL PROTECTED]
Subject: Is Struts (or browser based applications in general) useable to
build maintenance-applications?


We are in a decision-process about the front-end for
a maintenance-application in insurance-domain.

The communication with the backend (mainframe)
happens via XML.

This front-end infrastructure should be the base structure
for new applications (not only for the maintenance-application).

So my preference is to build a browser-based front end
with Struts :-)

But I'm unsure about the useability of a browser based
front-end in maintenance context ( - keyboard-navigation,
etc.). I know, several things can resolved with Javascript.

Is it a risky way to develop a browser-based front-end for
a maintenance app.

Can someone share experience to build maintenance-apps
with struts (or a browser based front-end in general)?

TIA

Martin Kuhn




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

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




RE: Is Struts (or browser based applications in general) useable to build maintenance-applications?

2002-11-26 Thread Edgar Dollin
Quite correct, I (and somewhat reluctantly the user base) have accepted the
limitations of the back button.  There is no risk to the database however.

I give users as many of those links you describe as possible but only to
informational pages, and with container managed security (or filter based
security) they maintain some of what the users desire for flexibility
without sacrificing application integrity.

Interesting commentary.

Thanks.

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 10:51 PM
To: Struts Users Mailing List
Subject: RE: Is Struts (or browser based applications in general)
useable to build maintenance-applications?


Ive a quite lot of links that look like
thingAction.do?method=edituid=1234. As I go along Im rather coming to the
view that I should just try and use POST for everything and eliminate GETs
altogether. The browser just takes far too many liberties with them...

The sequencer idea has merit (seems similar in concept to the token token
support struts already provides), but the problem is that they want the damn
back button to actually work. Given that the app needs to maintain fifty
tons of state (including state of various ui widgets, workflows and other
wierdities) to meet all the other requirements its very hard to figure out a
suitable way to handle this short of incorperating a TARDIS in my
application.

The basic problem of course is the app vs website dilema. In a website the
back button is very useful as your just navigating round a bunch of
relatively stateless pages and a request is a direction for which page you
want next. In a web app however you arent navigating round a bunch of pages,
but rather firing events to the server that cause changes in server state
which are reflected in the response page. Clicking the back button would
cause the last 'event' to be fired again, or a snapshot of an earlier
response page to be shown, but the server is already in a different state.
The last event was already processed. Database writes have been commited.
Objects created or destroyed. Widgets toggled and workflows woggled.

Keeping a token gives you a chance to tell if the user is submitting from an
earlier page cached in the browser, and you can show an error message and
perhaps even direct them back on track - but when your requirement is that
that old page work again just like it did before, its nearly impossible. It
will work in some cases, but in others you can end up with all sorts of
problems if there are things that depend on server side state as well as
client side state - and in all but the most trivial of cases this will be
true. What to do?
:-(

Its hard enough to try an explain this problem to the (more experienced
technical) people who give me these requirements. I hate to think how the
concept can be imparted to users...

-Original Message-
From: Edgar Dollin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 19:02
To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
Subject: RE: Is Struts (or browser based applications in general)
useable to build maintenance-applications?


I have resolved all my Web Application issues (it did take a while).

The back button can be solved by subclassing the ActionForm and having a
standard sequence field.  In all your JSP make sure there is a hidden field
for the sequencer.  Then before any action occurs (write to the db) check
the sequencer to make sure it is the value expected.

If you only use POST methods in JSP the bookmark issue is moot.

Hope that helps

Edgar


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 3:10 AM
To: Struts Users Mailing List
Subject: RE: Is Struts (or browser based applications in general)
useable to build maintenance-applications?


Well I dont know what the issues with maintenance apps in particular are,
but for any web app (which is an application rather than just some trivial
website or portal with dynamic bits) you will have a lot of issues with
users doing things like using back buttons, bookmarks, etc... which can
really upset your server side sense of application state. Managing this can
be a real pain.

As soon as you go beyond trivial UI needs (ie: anything more complex than a
very basic example app) you also have to deal with a myriad of issues
related to browser compatibilities, container portability issues, etc...
Some ppl will tell you to develop code that meets the 'standards' and runs
on all broswers without using javascript. Unless your users are happy with a
very minimalist UI (Ive yet to meet one who is) thats something of an
impossibility so you have a lot of decisions to make in terms of what and
what not to support.
A lot of things that might take only a few lines of code to achieve in a
Swing based client can be fiendishly complex in html (keeping your state
maintained correctly in relation to what the user is seeing on their screen,
fancy

RE: Action Name

2002-11-25 Thread Edgar Dollin
Yeah I found it.  When I first read the documentation I misinterpreted it.

Thanks.

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 9:16 PM
To: Struts Users Mailing List; Edgar Dollin
Subject: Re: Action Name




On Mon, 25 Nov 2002, edgar wrote:

 Does anyone know how to easily get the current action name (other than
 decomposing it from the URI)?

 The idea is I am writing a class of generic reporting servlets and I
 would like to stick in a simple form or link to return to the prior
 action.

You mean something like mapping.getPath()?

--
Martin Cooper



 Any ideas would be appreciated.

 Edgar.


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



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




struts-config

2002-11-07 Thread Edgar Dollin
Has anyone ever worked with forwarding to a servlet as opposed to a jsp
page?  The controller handles that well as the only association the jsp page
is to the ActionForm and the actions are independent of the jsp.  
 
From my reading and tests It looks like you can't forward to another Action
class, which would be ideal.  You have to forward to a HttpServlet pick up
is the original requests ActionMapping
(request.getAttribute(Action.MAPPING_KEY)) or the WHOLE action map
(context.getAttribute(Action.MAPPINGS_KEY)) and do you own decode.
 
All this is workable, just wondering if I am missing something in my
analysis.
 
Thanks in advance.
 
 
Edgar P. Dollin
23 Carpenter Place
Union, NJ  07083
908-688-0823
Fax 908-688-0671
[EMAIL PROTECTED] mailto:edollin;aol.com 
 



Struts 1.0.2, Nested 1.0 and Standard Tags 1.0.2

2002-11-05 Thread Edgar Dollin
Has anyone gotten JSTL c:set to work with  Struts nested:write.
 
I get a null pointer exception in NestedPropertyHelper line 174.
 
Thanks
 
Edgar P. Dollin
Blue Moose Software, LLC
P/O Box 3865
Union, NJ  07083
908-688-0823
Fax 908-688-0671
[EMAIL PROTECTED] mailto:edgar;blue-moose.net 
http://www.blue-moose.net



Newbie Question

2002-09-19 Thread Edgar Dollin

This is a little off topic, my apologies.

Has anyone gotten Eclipse working so you can debug the JSP and / or the
Java classes?  On resin?

Thanks


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




RE: refreshing application properties

2002-09-17 Thread Edgar Dollin

Write a method which removes the attribute (or sets it null) named
'org.apache.struts.action.MESSAGE' or similar object in the application
context.

edgar

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 17, 2002 10:43 AM
To: 'Struts Users Mailing List'
Subject: refreshing application properties


I have a webapp running under Resin using Struts. I am storing message
strings and SQL queries in an application properties file. I have a
class that extends Action. It does... MessageResources
messages=getResources(); String msg = messages.getMessage(myString);

I would like to be able to make changes to the properties file while the
appserver is running and have the changes be used by my classes and JSPs
(w/o having to restart the appserver). However, when I make these
changes and then reload the page, these changes are not propogated to
the class or the JSP that uses the class. I have tried removing all java
 class files generated from compiling the JSPs from the work/_web
directory but that did not work.

Has anyone had any experience doing this?
Apologies if this is Resin-related, not Struts-related.

thx
andy



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


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




RE: [OT] Newbie Design best practice question

2002-09-17 Thread Edgar Dollin

You might consider writing custom tags of the form

custom:fulluser functionality for full user /custom:fulluser

etc.

This would keep the jsp simple but allow you to localize the functionality.

Edgar

-Original Message-
From: Piper, James D CECOM SEC EPS
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 2:05 PM
To: [EMAIL PROTECTED]
Subject: [OT] Newbie Design best practice question


If I were to have a STRUTS enabled application where I had user types of
restricted_users, full_access_users, and admins and for the most part the
content of the screens the different user types get to see are the same,
except for maybe Id like there to be a few extra bits of functionality on
the full_access_users and admin screens that doesn't get shown on the
restricted_users screen, then what's the best way to go about this? It will
probably also be that each user type will require some Action objects not
used by the other user types.

Should I attempt to use one set of JSPs for all the different types of users
and put logic inside each of the JSPs that says something like 'if the user
is of type full_access_users then shown these extra few buttons', or should
I give each type of user their own set of JSPs?

I am tempted to try and use one set of JSPs for all user types so that I
don't have to worry about maintenance of three sets of almost identical JSP
files.  On the other hand I feel I may be asking for security trouble by
trying to have each JSP check for the user's user type - I also have a
notion that checking user types is something that I should be doing
elsewhere.

If I do use separate JSPs for each user type, would it make sense to use the
STRUTS sub-application mechanism to separate them out?

Thanks for your thoughts,

- Jim

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

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




RE: Design Q: Multiple Form Beans for one HTML form/JPS page?

2002-09-17 Thread Edgar Dollin

You could use a new form which has the other forms as properties (ArrayLists
with one element) and use the 'nested' interface.

Edgar

-Original Message-
From: Vipul Sagare [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 4:02 PM
To: Struts Users Mailing List
Subject: Design Q: Multiple Form Beans for one HTML form/JPS page?


Question:

  I have case where one JSP page expects different type of inputs
leading to a scenario where I have multiple form beans on one jsp page.
 How would I deal with this issue?
Example:
JSP page: form has fields1. MealOptions 2. DrinksOption 3. Want
Insurance?
First two fields are in one FormBean while third one is in different
form.


Thank you

__
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

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

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