Re: Struts London Square Mile Java Developers

2003-04-02 Thread Sasha Bilton

Anyone in the square mile!
Hopefully ;) I'm waiting here about a new contract in Clerkenwell (Ok, 
it's just outside the city, but it almost counts)



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


Session Load Balancing Problem

2003-04-02 Thread Noureddine Bekrar
Hello,

I have a probleme when i want to use a load balancing of my struts
application between 2 tomcat servers.

when the load balancing begin , the second server say that the session was
expired.

but when I remove the html:select tag from my jsp pages , all work well.

Do any one has any idea about this very strange problem.

Thanks



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



Array of Beans used in an ActionForm

2003-04-02 Thread Clauss, Arne
Hello!

Is is possible to deal with an Array of Beans in an AtionForm?

It should look like this:

public class TestForm extends ActionForm {
private DataBean[] dataBeans = DataBean[size_of_array];

getter and setter methods
}

public class DataBean {
private String name=;
private int id = 0;

getter and setter methods
}

Searching the list I have found the following important facts:

- It is important to have an default construktor in the ActionForm, which
creates an instance of the Array.

Have somebody some code example to help me?

Kind regards,

Arne

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



Re: Array of Beans used in an ActionForm

2003-04-02 Thread Nicolas De Loof
If you want to use an array for a property that your JSP uses as indexed (i.e. 
property=data(n)) you will have to
define indexed getters and setters :

public void setData(index i, String value) {
this.data[i] = value;
}

public String getData(index i) {
return this.data[i];
}

Struts will not create an instace of the array for you when it creates or populates 
the formBean. Your form-bean has to
create the array in the good size before population occurs.

Nico.


 Hello!

 Is is possible to deal with an Array of Beans in an AtionForm?

 It should look like this:

 public class TestForm extends ActionForm {
 private DataBean[] dataBeans = DataBean[size_of_array];

 getter and setter methods
 }

 public class DataBean {
 private String name=;
 private int id = 0;

 getter and setter methods
 }

 Searching the list I have found the following important facts:

 - It is important to have an default construktor in the ActionForm, which
 creates an instance of the Array.

 Have somebody some code example to help me?

 Kind regards,

 Arne

 -
 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]



How to use Struts to show image from database (byte[])?

2003-04-02 Thread niksa_os
I have images in database.
Prior to Struts I use servlet to show image and in JSP or sevlet. I have 
/myPackage/imageservlet?imageID=1

How to use Struts to show image from database (byte[])?

Thanks.

Re: How to use Struts to show image from database (byte[])?

2003-04-02 Thread Gemes Tibor
niksa_os írta:

I have images in database.
Prior to Struts I use servlet to show image and in JSP or sevlet. I have 
/myPackage/imageservlet?imageID=1
How to use Struts to show image from database (byte[])?
 

Use your own servlet. I cannot see the point in using Struts for this task.

Tib



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


RE: How to use Struts to show image from database (byte[])?

2003-04-02 Thread shirishchandra.sakhare
WHy not..
If you are using Struts,Then all requests should go through the struts layer so that 
The application has single controlleri.e. the struts action servlet.

You can write a action to show image..Just set the content type properly on response 
object ...and return null from action to indicate the response has been comited..

But I am not very clear what exactly u want to do

-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:53 AM
To: Struts Users Mailing List
Subject: Re: How to use Struts to show image from database (byte[])?


niksa_os írta:

I have images in database.
Prior to Struts I use servlet to show image and in JSP or sevlet. I have 
/myPackage/imageservlet?imageID=1

How to use Struts to show image from database (byte[])?
  

Use your own servlet. I cannot see the point in using Struts for this task.

Tib




-
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: Problem forwarding from a Tile or Template.

2003-04-02 Thread Cedric Dumoulin
 Hi,

 The provided code should work with Tiles if you have set the 
TilesRequestProcessor.

 The problem is that the jsp spec forbid the use of forward once the 
response is committed. But the jsp spec also said that a response is 
committed when you do an insert(). Tiles, and Templates, use 
include(). Struts action forward tag use forward(). So there is a 
problem. The TilesRequestProcessor takes care of this problem, and use 
include() instead of forward() when you use a forward ... in a struts 
action.

  Cedric

[EMAIL PROTECTED] wrote:

I get Cannot forward because the response has already been committed. I get the same response using Templates or Tiles. Here is a simplistic version of my problem.

My JSP is ...
%@ taglib uri=/WEB-INF/tld/struts-tiles.tld prefix=tiles %
tiles:insert page=/one-pane-template.jsp 
   tiles:put name=main value=/requestCreate1.do /
/tiles:insert
one-pane-template.jsp is 
%@ taglib uri=/WEB-INF/tld/struts-tiles.tld prefix=tiles %
html
head /
body
tiles:insert name=main/
   /body
/html
I am trying to attain a Tiled display, where one of the Tiles is a wizard. As there are a lot of initial form parameters for this app, I call the action and form to initialise the data. Hence, the .do call.

If I create an Action for the Tile container (one-pane-template.*) and populate the necessary beans there, calling one-pane-template.do and requestCreate1.jsp works, but this seems the wrong place to put the logic.

FYI - I initially raised this as a bug (for Templates)   http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18469, but it was invalidated as Tiles had superseded it.

Thanks

Tony. 

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

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

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

-
To unsubscribe, e-mail: [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 use Struts to show image from database (byte[])?

2003-04-02 Thread Gemes Tibor
[EMAIL PROTECTED] írta:

WHy not..
If you are using Struts,Then all requests should go through the struts layer so that The application has single controlleri.e. the struts action servlet.
 

If you want to make requests accessing a not-struts
servlet go through the struts controller use the
org.apache.struts.actions.ForwardAction.
Tib



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


Re: Using a Tile Definition from within a Servlet ?

2003-04-02 Thread Cedric Dumoulin
 Yes, it is possible. There is no simple API to do that, but take a 
look at the TilesRequestProcessor.processTilesDefinition(...) method to 
know how it is done by the struts servlet.
 What you should do is:

   * retrieve the definition from the factory
   * create the new tile context from thedefinition
   * save the current tile context
   * store the new tile context in the jsp context
   * include the new tile
   * restore the current context
  Hope this help,

 Cedric

Trevor Nightingale wrote:

Is it possible to forward to a tiles definition with a servlet ?

Something like

RequestDispatcher dispatcher = 
request.getRequestDispatcher(tile.def.goes.here);
 dispatcher.forward(request,response);
Thank you in advance,
Trevor
-
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: HELP: Dispaly Date in a JSP that used Tiles

2003-04-02 Thread Gareth Andrew
You don't need to create an ActionForm, since the form is never going to 
be submitted, and you don't need to be able to access the form 
information outside of the current page. So just use plain html tags 
instead of the struts-html tags.

Gareth.

Heligon Sandra wrote:

First, thanks a lot for your help.

I think indeed that this manner of making is better 
but I have a problem to set up it.
Because I must define a tag form. 
form name=myForm
   input type=text name=dateControl size=30
/form

As I explained in my previous message I use Tiles all the
pages are composed of several modules header, menu, body and footer.
It is in the header module that I want to display the date,
for the moment the header.jsp page is the following:
%@ taglib uri=/WEB-INF/tld/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/tld/struts-html.tld prefix=html %
form name=MyForm
table border=0 width=100% cellspacing=0 cellpadding=0
 tr
   td width=40  align=left
		bean:message key=label.project.version/		
   /td
   td width=80% align=right
html:text name=MyForm property=dateControl size=30/  
noscriptbean:message key=label.javascript.required//noscript
   /td
 /tr
/table
/form

When I run the application I have an error no instance of MyForm
has been created.
I thus defined a DynaValidatorForm in struts-config.xml,and use the Struts
tag
html:form name=MyForm. But when I compile the application I have the
following
message action is mandatory for tag form.
But I don't want to associate an action to this page.
How can I do ?
Thanks a lot in advance
Sandra


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: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 00:49
To: [EMAIL PROTECTED]
Subject: RE: HELP: Dispaly Date in a JSP that used Tiles
I think your problem has nothing to do with tiles or jsp.  You just need 
to write the output to a control instead of trying to write to the page.
If the browser were to allow your code to work as you have written it 
you would actually get a list of times.
The following code should work - it renders to a named textBox.

BEGINNING OF CODE SAMPLE --

script type=text/javascript
  function aff_heure() {
   var d=new Date()
   var weekdays=new 
Array(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
)
   var monthname=new 
Array(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
)

var weekday=weekdays[d.getDay()]
var date = d.getDate()
var month = monthname[d.getMonth()]
   var year = d.getFullYear()
   var hour = d.getHours()
   var minute = d.getMinutes()
   var second = d.getSeconds()

var time = new String(weekday +   + date
 + . + month +   + year
 + ,  + hour + : + minute
 + : + second)
document.myForm.dateControl.value=time;

  
   setTimeout(aff_heure(),100);
  }
 
/script

form name=myForm
   input type=text name=dateControl size=30
/form
END OF CODE SAMPLE --

Hope this helps,

Gareth

PS.  You can also render to put your answer in other html objects such 
as spans and divs but if you're trying to make it work on as many 
browsers as possible that might be a bit of a headache.
PPS.  Why not use d.toGMTString() or d.toLocaleString() instead of 
trying to format the string yourself?

-
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]


how to add a new record to a table

2003-04-02 Thread Thomas . Gaudin
Hi,

I guess my problem is common but I couldn't find an answer on the
archive...
I have a bean that provides an indexed  property (a java.util.List).
I  have this list displayed on a jsp page with a table and I would like the
last row of the table to be editable.
When the user submits the form, I would like the last row (the editable
one) to be added as a new entry in the indexed property
Any advise for how to do that ?
Thanks

Thomas



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



New to Struts

2003-04-02 Thread Brian McSweeney
Hi all,
I'm relatively new to struts, have used Forms before and am thinking of switching to 
use 
DynamicActions instead of normal Actions to get the use of the Validator package. Can 
people tell me if this is a worthwhile endevour and also, is there a good resource on 
how 
to make this change.
cheers,
Brian


RE: New to Struts

2003-04-02 Thread Mick . Knutson
I love DynaForms. But you don't _need_ DynaForms to use Validation.

But, I like being able to declare all my forms, and _not_ creating an ActionForm class 
for each form I create.


-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:23 AM
To: [EMAIL PROTECTED]
Subject: New to Struts


Hi all,
I'm relatively new to struts, have used Forms before and am thinking of switching to 
use 
DynamicActions instead of normal Actions to get the use of the Validator package. Can 
people tell me if this is a worthwhile endevour and also, is there a good resource on 
how 
to make this change.
cheers,
Brian

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

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

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


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



RE: Problem forwarding from a Tile or Template.

2003-04-02 Thread Anthony . Leon
I assume you mean, add the following to the struts-config.xml

controller
contentType=text/html;charset=UTF-8
debug=3
locale=true
nocache=true
processorClass=org.apache.struts.tiles.TilesRequestProcessor
/

But having done this I now get;

Cannot initialize RequestProcessor of class 
org.apache.struts.tiles.TilesRequestProcessor: java.lang.ClassCastException: 
org.apache.struts.tiles.TilesUtilImpl

Am I going in the right direction?

T.

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 09:58
To: Struts Users Mailing List
Subject: Re: Problem forwarding from a Tile or Template.



  Hi,

  The provided code should work with Tiles if you have set the 
TilesRequestProcessor.

  The problem is that the jsp spec forbid the use of forward once the 
response is committed. But the jsp spec also said that a response is 
committed when you do an insert(). Tiles, and Templates, use 
include(). Struts action forward tag use forward(). So there is a 
problem. The TilesRequestProcessor takes care of this problem, and use 
include() instead of forward() when you use a forward ... in a struts 
action.

   Cedric
 

[EMAIL PROTECTED] wrote:

I get Cannot forward because the response has already been committed. I get the 
same response using Templates or Tiles. Here is a simplistic version of my problem.

My JSP is ...
%@ taglib uri=/WEB-INF/tld/struts-tiles.tld prefix=tiles %
tiles:insert page=/one-pane-template.jsp 
tiles:put name=main value=/requestCreate1.do /
/tiles:insert

one-pane-template.jsp is 
%@ taglib uri=/WEB-INF/tld/struts-tiles.tld prefix=tiles %
html
   head /
   body
   tiles:insert name=main/
/body
/html

I am trying to attain a Tiled display, where one of the Tiles is a wizard. As there 
are a lot of initial form parameters for this app, I call the action and form to 
initialise the data. Hence, the .do call.

If I create an Action for the Tile container (one-pane-template.*) and populate the 
necessary beans there, calling one-pane-template.do and requestCreate1.jsp works, 
but this seems the wrong place to put the logic.

FYI - I initially raised this as a bug (for Templates)   
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18469, but it was invalidated as 
Tiles had superseded it.

Thanks

Tony. 


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

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

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


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


  



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


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

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

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


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



Re: How to use Struts to show image from database (byte[])?

2003-04-02 Thread Nicolas De Loof
You can migrate your original ImageServlet as Struts action :

Put servlet code inside execute() method of a new ImageAction class, that sends image 
byte[] and content-type headers in
response, then returns null.

Add an action-mapping for ImageAction (let's say /image.do) and you will be able to 
use /myApp/image.do?imageID=x

Nico.



Subject: How to use Struts to show image from database (byte[])?


I have images in database.
Prior to Struts I use servlet to show image and in JSP or sevlet. I have 
/myPackage/imageservlet?imageID=1

How to use Struts to show image from database (byte[])?

Thanks.


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



FW: Unit Testing

2003-04-02 Thread McRobb, John
 There are many test tools to stuff:
 
 struts Test
 Cactus
 HttpUnit
 
 but none of them seem to do what I want.
 
 I want to set up a test to load the request with data to test that my page
 renders ok, just now I am using a scriptlet in the jsp.
 Is there any way I can move this out to a class which launches the JSp in
 a bowser with the data on the request.
 
 Ta
 
 John
 
 


Tesco Personal Finance Limited is a joint venture between The Royal Bank of Scotland 
plc and Tesco PLC. Tesco Personal Finance Limited is registered in Scotland No 173199. 
Registered Office: 42 St Andrew Square, Edinburgh EH2 2YE. 

This e-mail message is confidential and for use by the addressee only. If you are not 
the addressee, please return the message to the sender by replying to it and then 
delete the message from your computer. 

Internet e-mails are not necessarily secure. Tesco Personal Finance Limited does not 
accept responsibility for changes made to this message after it was sent.


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



RE: New to Struts

2003-04-02 Thread Joao Batistella
I would like to use DynaForms. Do you have any tutorial or article about?

Thanks,
JP

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 2 de Abril de 2003 10:29
To: [EMAIL PROTECTED]
Subject: RE: New to Struts


I love DynaForms. But you don't _need_ DynaForms to use Validation.

But, I like being able to declare all my forms, and _not_ creating an
ActionForm class for each form I create.


-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:23 AM
To: [EMAIL PROTECTED]
Subject: New to Struts


Hi all,
I'm relatively new to struts, have used Forms before and am thinking of
switching to use 
DynamicActions instead of normal Actions to get the use of the Validator
package. Can 
people tell me if this is a worthwhile endevour and also, is there a good
resource on how 
to make this change.
cheers,
Brian

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

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

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


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

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



Re: Problem forwarding from a Tile or Template.

2003-04-02 Thread Cedric Dumoulin
 You are going in the right direction, but you should declare the tiles 
plugin as follow in the struts-config.xml:

 plug-in className=org.apache.struts.tiles.TilesPlugin 
   set-property property=definitions-config
value=/WEB-INF/tiles-defs.xml /
   set-property property=moduleAware value=true /
 /plug-in
 This should be inserted after the /action-mappings tags.

 You can check the struts-config.xml file in tiles-documentation.war as 
example.

  Cedric

[EMAIL PROTECTED] wrote:

I assume you mean, add the following to the struts-config.xml

controller
contentType=text/html;charset=UTF-8
debug=3
locale=true
nocache=true
processorClass=org.apache.struts.tiles.TilesRequestProcessor
/
But having done this I now get;

Cannot initialize RequestProcessor of class org.apache.struts.tiles.TilesRequestProcessor: java.lang.ClassCastException: org.apache.struts.tiles.TilesUtilImpl

Am I going in the right direction?

T.

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 09:58
To: Struts Users Mailing List
Subject: Re: Problem forwarding from a Tile or Template.


 Hi,

 The provided code should work with Tiles if you have set the 
TilesRequestProcessor.

 The problem is that the jsp spec forbid the use of forward once the 
response is committed. But the jsp spec also said that a response is 
committed when you do an insert(). Tiles, and Templates, use 
include(). Struts action forward tag use forward(). So there is a 
problem. The TilesRequestProcessor takes care of this problem, and use 
include() instead of forward() when you use a forward ... in a struts 
action.

  Cedric

[EMAIL PROTECTED] wrote:

 

I get Cannot forward because the response has already been committed. I get the same response using Templates or Tiles. Here is a simplistic version of my problem.

My JSP is ...
%@ taglib uri=/WEB-INF/tld/struts-tiles.tld prefix=tiles %
tiles:insert page=/one-pane-template.jsp 
  tiles:put name=main value=/requestCreate1.do /
/tiles:insert
one-pane-template.jsp is 
%@ taglib uri=/WEB-INF/tld/struts-tiles.tld prefix=tiles %
html
head /
body
tiles:insert name=main/
  /body
/html
I am trying to attain a Tiled display, where one of the Tiles is a wizard. As there are a lot of initial form parameters for this app, I call the action and form to initialise the data. Hence, the .do call.

If I create an Action for the Tile container (one-pane-template.*) and populate the necessary beans there, calling one-pane-template.do and requestCreate1.jsp works, but this seems the wrong place to put the logic.

FYI - I initially raised this as a bug (for Templates)   http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18469, but it was invalidated as Tiles had superseded it.

Thanks

Tony. 

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

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

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

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


   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Visit our website at http://www.ubswarburg.com

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

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

RE: New to Struts

2003-04-02 Thread Mick . Knutson
The How-to guide on the struts web site is OK, you can also find some articles on 
www.onjava.com, and the source code of struts has many examples in the 
struts-config.xml files.


-Original Message-
From: Joao Batistella [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:46 AM
To: Struts Users Mailing List
Subject: RE: New to Struts


I would like to use DynaForms. Do you have any tutorial or article about?

Thanks,
JP

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 2 de Abril de 2003 10:29
To: [EMAIL PROTECTED]
Subject: RE: New to Struts


I love DynaForms. But you don't _need_ DynaForms to use Validation.

But, I like being able to declare all my forms, and _not_ creating an
ActionForm class for each form I create.


-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:23 AM
To: [EMAIL PROTECTED]
Subject: New to Struts


Hi all,
I'm relatively new to struts, have used Forms before and am thinking of
switching to use 
DynamicActions instead of normal Actions to get the use of the Validator
package. Can 
people tell me if this is a worthwhile endevour and also, is there a good
resource on how 
to make this change.
cheers,
Brian

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

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

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


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

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


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

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

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


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



RE: HELP: Dispaly Date in a JSP that used Tiles

2003-04-02 Thread Heligon Sandra
thank you for your answer but when you say just use plain html tags
it is what I do with  form name=MyForm isn't it ?
But it doesn't work because when I run my application I have the error
javax.servlet.ServletException: Cannot find bean myForm in any scope.

Why ?
With the plain html tag form, who is responsible for creation of the
form instance ?




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: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 11:10
To: Struts Users Mailing List
Subject: Re: HELP: Dispaly Date in a JSP that used Tiles


You don't need to create an ActionForm, since the form is never going to 
be submitted, and you don't need to be able to access the form 
information outside of the current page. So just use plain html tags 
instead of the struts-html tags.

Gareth.


Heligon Sandra wrote:

First, thanks a lot for your help.

I think indeed that this manner of making is better 
but I have a problem to set up it.
Because I must define a tag form. 
form name=myForm
input type=text name=dateControl size=30
/form

As I explained in my previous message I use Tiles all the
pages are composed of several modules header, menu, body and footer.
It is in the header module that I want to display the date,
for the moment the header.jsp page is the following:

%@ taglib uri=/WEB-INF/tld/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/tld/struts-html.tld prefix=html %

form name=MyForm
table border=0 width=100% cellspacing=0 cellpadding=0
  tr
td width=40  align=left
   bean:message key=label.project.version/ 
/td
td width=80% align=right
 html:text name=MyForm property=dateControl size=30/  
 noscriptbean:message key=label.javascript.required//noscript
/td
  /tr
/table
/form

When I run the application I have an error no instance of MyForm
has been created.
I thus defined a DynaValidatorForm in struts-config.xml,and use the Struts
tag
html:form name=MyForm. But when I compile the application I have the
following
message action is mandatory for tag form.
But I don't want to associate an action to this page.
How can I do ?

Thanks a lot in advance
Sandra


---
-

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: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 00:49
To: [EMAIL PROTECTED]
Subject: RE: HELP: Dispaly Date in a JSP that used Tiles


I think your problem has nothing to do with tiles or jsp.  You just need 
to write the output to a control instead of trying to write to the page.
If the browser were to allow your code to work as you have written it 
you would actually get a list of times.
The following code should work - it renders to a named textBox.

BEGINNING OF CODE SAMPLE --

script type=text/javascript
   function aff_heure() {
var d=new Date()
var weekdays=new 
Array(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday

)
var monthname=new 
Array(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,De
c
)

 var weekday=weekdays[d.getDay()]
 var date = d.getDate()
 var month = monthname[d.getMonth()]
var year = d.getFullYear()
var hour = d.getHours()
var minute = d.getMinutes()
var second = d.getSeconds()
 
 var time = new String(weekday +   + date
  + . + month +   + year
  + ,  + hour + : + minute
  + : + second)
 document.myForm.dateControl.value=time;

   
setTimeout(aff_heure(),100);
   }
  
/script

form name=myForm
input type=text name=dateControl size=30
/form

END OF CODE SAMPLE --

Hope this helps,

Gareth


PS.  You can also render to put your answer in other html objects such 
as spans and divs but if you're trying to make it work on as many 
browsers as possible that might be a bit of a headache.
PPS.  Why not use d.toGMTString() or d.toLocaleString() instead of 
trying to format the string yourself?


-
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 add a new record to a table

2003-04-02 Thread Anthony . Leon
I do something like this. It may not compile (esp. myformbean.getListSize()) and 
should use logic:iterate. Hope it helps;

JSP;
% 
int i;
for (i = 0; i  myformbean.getListSize(); i++) {
String fieldName = value( + i + );
%
html:text property=%=name% /
br/
%
}
String fieldName = value( + i+1 + );
%
html:text property=%=name% / !-- new row --

class MyForm {
List list;
int getListSize() { return list.size(); }
String getValue(int i) { return (String) list.get(i); }
String setValue(int i, String s) {
if ( i  list.size()-1 ) list.add(s);
}
}

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 10:09
To: Struts Users Mailing List
Subject: how to add a new record to a table


Hi,

I guess my problem is common but I couldn't find an answer on the
archive...
I have a bean that provides an indexed  property (a java.util.List).
I  have this list displayed on a jsp page with a table and I would like the
last row of the table to be editable.
When the user submits the form, I would like the last row (the editable
one) to be added as a new entry in the indexed property
Any advise for how to do that ?
Thanks

Thomas



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


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

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

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


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



Re: New to Struts

2003-04-02 Thread Brian McSweeney
Ah, thanks Mick,

So is the DynaForm the one which allows you not to create Forms
declaratively using
xml?

Currently I write a form for each action and implement a validate method in
the form.
I was under the impression that there's a way to validate declaritively too.
Is this possible and
if so, with what component?

thanks,
brian

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:29 AM
Subject: RE: New to Struts


 I love DynaForms. But you don't _need_ DynaForms to use Validation.

 But, I like being able to declare all my forms, and _not_ creating an
ActionForm class for each form I create.


 -Original Message-
 From: Brian McSweeney [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 11:23 AM
 To: [EMAIL PROTECTED]
 Subject: New to Struts


 Hi all,
 I'm relatively new to struts, have used Forms before and am thinking of
switching to use
 DynamicActions instead of normal Actions to get the use of the Validator
package. Can
 people tell me if this is a worthwhile endevour and also, is there a good
resource on how
 to make this change.
 cheers,
 Brian

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

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

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


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



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



RE: New to Struts

2003-04-02 Thread Mick . Knutson
Yes.
Basically you create a form in struts-config.xml.
Then you reference that form in your action instead of the ActionForm you coded.
The issue is keeping the JSP form and your declared DynaForm in SYNCH. But it is not 
that big of a deal. I do not use ActionFOrms at all in my application. I do not really 
need to.

You can also validate against DynaForms, and there are heaps of postings in the 
archives to see about validation issues with DynaForms. But try them out first, and 
see how it goes.
The source code examples in the stuts_src.tar worked very well for me. Was not too 
difficult to understand.

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:52 AM
To: Struts Users Mailing List
Subject: Re: New to Struts


Ah, thanks Mick,

So is the DynaForm the one which allows you not to create Forms
declaratively using
xml?

Currently I write a form for each action and implement a validate method in
the form.
I was under the impression that there's a way to validate declaritively too.
Is this possible and
if so, with what component?

thanks,
brian

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:29 AM
Subject: RE: New to Struts


 I love DynaForms. But you don't _need_ DynaForms to use Validation.

 But, I like being able to declare all my forms, and _not_ creating an
ActionForm class for each form I create.


 -Original Message-
 From: Brian McSweeney [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 11:23 AM
 To: [EMAIL PROTECTED]
 Subject: New to Struts


 Hi all,
 I'm relatively new to struts, have used Forms before and am thinking of
switching to use
 DynamicActions instead of normal Actions to get the use of the Validator
package. Can
 people tell me if this is a worthwhile endevour and also, is there a good
resource on how
 to make this change.
 cheers,
 Brian

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

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

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


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



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


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

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

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


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



AW: Array of Beans used in an ActionForm

2003-04-02 Thread Clauss, Arne
Hello Nico!

Thanks for your help. I now have got indexed getter and setters. Showing the
data in the JSP works fine, but getting the data back formn the JSP in the
UpdateAction didn't work.

Please notice: I dont't want to handle an array of Strings in the
ActionForm, I would like to hadle an array of Beans ( with own getters and
setters) in the AtionForm.

Maybee it make sence to post some code here for a better understanding of
the problem.

This ist the ActionForm used in the JSP:

public class TestForm extends ActionForm {


/**
 * Log4j Category for this class
 */
protected final static Category cat =
Category.getInstance(TestForm.class.getName());

public TestForm (int size)
{
arrayForm = new DataBean[size];
}

public TestForm ()
{
if (cat.isDebugEnabled())
{
cat.debug(Konstruktor Start);
}
int size=3;
arrayForm = new DataBean[size];
for (int i = 0; i=(size-1);i++)
{
arrayForm[i]= new DataBean();
}
if (cat.isDebugEnabled())
{
cat.debug(Konstruktor Ende);
}
}

private DataBean[] arrayForm = null;

/**
 * Gets the arrayForm
 * @return Returns a ArrayForm[]
 */
public DataBean getArrayForm(int i) {
return arrayForm[i];
}
/**
 * Sets the arrayForm
 * @param arrayForm The arrayForm to set
 */
public void setArrayForm(int i, DataBean arrayForm) {
this.arrayForm[i] = arrayForm;
}

}

This is the Bean which is included in the array of the TestForm:

public class DataBean extends ActionForm {

/**
 * Log4j Category for this class
 */
protected final static Category cat =
Category.getInstance(TestForm.class.getName());

/**
 * Konstruktor
 */
public DataBean(String myName, int myId) {
this.setName(myName);
this.setID(myId);
}

/**
 * Konstruktor
 */
public DataBean() {
this.setName();
this.setID(Integer.MIN_VALUE);
}

private String name = ;
private int ID = Integer.MIN_VALUE;

/**
 * Gets the name
 * @return Returns a String
 */
public String getName() {
return name;
}
/**
 * Sets the name
 * @param name The name to set
 */
public void setName(String name) {
this.name = name;
}

/**
 * Gets the iD
 * @return Returns a int
 */
public int getID() {
return ID;
}
/**
 * Sets the iD
 * @param iD The iD to set
 */
public void setID(int iD) {
ID = iD;
}
}

And last but not least my JSP code:

This works fine for showing the data, but not for updating:
%
for (int i=0; i=2; i++)
{
%
brinput type=text name=testForm.arrayForm[%= i%].name value=%=
testForm.getArrayForm(i).getName()%

%
}
%

I have also tried this code int eh JSP. Than I get the following error: No
getter method for property testForm.arrayForm[0].name

html:text property=testForm.arrayForm[0].name
html:text property=testForm.arrayForm[1].name
html:text property=testForm.arrayForm[2].name

Any ideas?

Regards,

Arne


 -Ursprüngliche Nachricht-
 Von: Nicolas De Loof [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 2. April 2003 10:39
 An: Struts Users Mailing List
 Betreff: Re: Array of Beans used in an ActionForm
 
 
 If you want to use an array for a property that your JSP uses 
 as indexed (i.e. property=data(n)) you will have to define 
 indexed getters and setters :
 
 public void setData(index i, String value) {
 this.data[i] = value;
 }
 
 public String getData(index i) {
 return this.data[i];
 }
 
 Struts will not create an instace of the array for you when 
 it creates or populates the formBean. Your form-bean has to 
 create the array in the good size before population occurs.
 
 Nico.
 
 
  Hello!
 
  Is is possible to deal with an Array of Beans in an AtionForm?
 
  It should look like this:
 
  public class TestForm extends ActionForm {
  private DataBean[] dataBeans = DataBean[size_of_array];
 
  getter and setter methods
  }
 
  public class DataBean {
  private String name=;
  private int id = 0;
 
  getter and setter methods
  }
 
  Searching the list I have found the following important facts:
 
  - It is important to have an default construktor in the ActionForm, 
  which creates an instance of the Array.
 
  Have somebody some code 

Re: [RePosted] localize messages in JSP without session

2003-04-02 Thread Nicolas De Loof
I made a text search on RC1 sources for Locale :
30 classes use it,

For using localized JSP without session, only this changes shoul be needed :

RequestUtils.retrieveUserLocale() :
use 
pageContext.getAttribute(locale); // all scopes
instead of
pageContext.getAttribute(locale, PageContext.SESSION_SCOPE);


HtmlTag.currentLocale() :
use 
pageContext.getAttribute(Globals.LOCALE_KEY); // all scopes
instead of 
session.getAttribute(Globals.LOCALE_KEY);


validator/Ressources.getLocale()
use 
locale = (Locale) request.getAttribute(Globals.LOCALE_KEY);
if (locale == null)
locale = (Locale) request.getSession().getAttribute(Globals.LOCALE_KEY);
instead of
request.getSession().getAttribute(Globals.LOCALE_KEY);


I will post a bugzilla ticket for a post 1.1 enhancement.

Nico.



 You could probably override the processLocale() method in RequestProcessor
 to store it in the request scope, but Im not sure what would be involved
 over on the rendering side to get the tags to look for current locale there.
 
 If using locales does indeed require use of the session, than an enhancement
 for an option to allow this to be done using only the request is a good
 idea. This could be quite useful for higher throughput websites that dont
 need to track sessions - though it may involve a bit more effort from the
 garbage collector to clean up throwaway locale objects.
  
 -Original Message-
 From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 2 April 2003 15:13
 To: Struts Users Mailing List
 Subject: [RePosted] localize messages in JSP without session
 
 
 
  On logon.jsp I would like messages to be localized. AFAIK to do this with
 Struts I have to put this tags :
 
  html:html locale=true
bean:message key=logon.welcome /
  ...
 /html:html
 
  This tags use a Locale objet stored in session scope. My boss doesn't want
 this logon JSP to create a new session to
 limit memory usage. Is they're a way to use Struts i18n with a REQUEST
 scoped Locale or something like this ?
 
 Do you thing it could be an interseting enhancement for future versions ?
 
  Nico.
 
 
 -
 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: New to Struts

2003-04-02 Thread Brian McSweeney
appreciate it,
cheers,
Brian

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:00 AM
Subject: RE: New to Struts


 Yes.
 Basically you create a form in struts-config.xml.
 Then you reference that form in your action instead of the ActionForm
you coded.
 The issue is keeping the JSP form and your declared DynaForm in SYNCH. But
it is not that big of a deal. I do not use ActionFOrms at all in my
application. I do not really need to.

 You can also validate against DynaForms, and there are heaps of postings
in the archives to see about validation issues with DynaForms. But try them
out first, and see how it goes.
 The source code examples in the stuts_src.tar worked very well for me. Was
not too difficult to understand.

 -Original Message-
 From: Brian McSweeney [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 11:52 AM
 To: Struts Users Mailing List
 Subject: Re: New to Struts


 Ah, thanks Mick,

 So is the DynaForm the one which allows you not to create Forms
 declaratively using
 xml?

 Currently I write a form for each action and implement a validate method
in
 the form.
 I was under the impression that there's a way to validate declaritively
too.
 Is this possible and
 if so, with what component?

 thanks,
 brian

 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 10:29 AM
 Subject: RE: New to Struts


  I love DynaForms. But you don't _need_ DynaForms to use Validation.
 
  But, I like being able to declare all my forms, and _not_ creating an
 ActionForm class for each form I create.
 
 
  -Original Message-
  From: Brian McSweeney [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, April 02, 2003 11:23 AM
  To: [EMAIL PROTECTED]
  Subject: New to Struts
 
 
  Hi all,
  I'm relatively new to struts, have used Forms before and am thinking of
 switching to use
  DynamicActions instead of normal Actions to get the use of the Validator
 package. Can
  people tell me if this is a worthwhile endevour and also, is there a
good
 resource on how
  to make this change.
  cheers,
  Brian
 
  Visit our website at http://www.ubswarburg.com
 
  This message contains confidential information and is intended only
  for the individual named.  If you are not the named addressee you
  should not disseminate, distribute or copy this e-mail.  Please
  notify the sender immediately by e-mail if you have received this
  e-mail by mistake and delete this e-mail from your system.
 
  E-mail transmission cannot be guaranteed to be secure or error-free
  as information could be intercepted, corrupted, lost, destroyed,
  arrive late or incomplete, or contain viruses.  The sender therefore
  does not accept liability for any errors or omissions in the contents
  of this message which arise as a result of e-mail transmission.  If
  verification is required please request a hard-copy version.  This
  message is provided for informational purposes and should not be
  construed as a solicitation or offer to buy or sell any securities or
  related financial instruments.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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


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

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

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


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



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



Re: Array of Beans used in an ActionForm

2003-04-02 Thread Nicolas De Loof

For your indexed properties, use arrayForm(x).name instead of arrayForm[x].name

Try to use JSP tags instead of scriptlets, your JSP will be more readeable to other 
developers.

Nico.

- Original Message -
From: Clauss, Arne [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 12:02 PM
Subject: AW: Array of Beans used in an ActionForm


Hello Nico!

Thanks for your help. I now have got indexed getter and setters. Showing the
data in the JSP works fine, but getting the data back formn the JSP in the
UpdateAction didn't work.

Please notice: I dont't want to handle an array of Strings in the
ActionForm, I would like to hadle an array of Beans ( with own getters and
setters) in the AtionForm.

Maybee it make sence to post some code here for a better understanding of
the problem.

This ist the ActionForm used in the JSP:

public class TestForm extends ActionForm {


/**
* Log4j Category for this class
*/
protected final static Category cat =
Category.getInstance(TestForm.class.getName());

public TestForm (int size)
{
arrayForm = new DataBean[size];
}

public TestForm ()
{
if (cat.isDebugEnabled())
{
cat.debug(Konstruktor Start);
}
int size=3;
arrayForm = new DataBean[size];
for (int i = 0; i=(size-1);i++)
{
arrayForm[i]= new DataBean();
}
if (cat.isDebugEnabled())
{
cat.debug(Konstruktor Ende);
}
}

private DataBean[] arrayForm = null;

/**
* Gets the arrayForm
* @return Returns a ArrayForm[]
*/
public DataBean getArrayForm(int i) {
return arrayForm[i];
}
/**
* Sets the arrayForm
* @param arrayForm The arrayForm to set
*/
public void setArrayForm(int i, DataBean arrayForm) {
this.arrayForm[i] = arrayForm;
}

}

This is the Bean which is included in the array of the TestForm:

public class DataBean extends ActionForm {

/**
* Log4j Category for this class
*/
protected final static Category cat =
Category.getInstance(TestForm.class.getName());

/**
* Konstruktor
*/
public DataBean(String myName, int myId) {
this.setName(myName);
this.setID(myId);
}

/**
* Konstruktor
*/
public DataBean() {
this.setName();
this.setID(Integer.MIN_VALUE);
}

private String name = ;
private int ID = Integer.MIN_VALUE;

/**
* Gets the name
* @return Returns a String
*/
public String getName() {
return name;
}
/**
* Sets the name
* @param name The name to set
*/
public void setName(String name) {
this.name = name;
}

/**
* Gets the iD
* @return Returns a int
*/
public int getID() {
return ID;
}
/**
* Sets the iD
* @param iD The iD to set
*/
public void setID(int iD) {
ID = iD;
}
}

And last but not least my JSP code:

This works fine for showing the data, but not for updating:
%
for (int i=0; i=2; i++)
{
%
brinput type=text name=testForm.arrayForm[%= i%].name value=%=
testForm.getArrayForm(i).getName()%

%
}
%

I have also tried this code int eh JSP. Than I get the following error: No
getter method for property testForm.arrayForm[0].name

html:text property=testForm.arrayForm[0].name
html:text property=testForm.arrayForm[1].name
html:text property=testForm.arrayForm[2].name

Any ideas?

Regards,

Arne


 -Ursprüngliche Nachricht-
 Von: Nicolas De Loof [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 2. April 2003 10:39
 An: Struts Users Mailing List
 Betreff: Re: Array of Beans used in an ActionForm


 If you want to use an array for a property that your JSP uses
 as indexed (i.e. property=data(n)) you will have to define
 indexed getters and setters :

 public void setData(index i, String value) {
 this.data[i] = value;
 }

 public String getData(index i) {
 return this.data[i];
 }

 Struts will not create an instace of the array for you when
 it creates or populates the formBean. Your form-bean has to
 create the array in the good size before population occurs.

 Nico.


  Hello!
 
  Is is possible to deal with an Array of Beans in an AtionForm?
 
  It should look like this:
 
  public class TestForm extends ActionForm {
  private DataBean[] dataBeans = DataBean[size_of_array];
 
  getter and setter methods
  }
 
  public class DataBean {
  private String name=;
  private int id = 0;
 
  getter and setter methods
  }
 
  Searching the list I have found the following important facts:
 
  - It is important to have an default construktor in the ActionForm,
  which creates an instance of the Array.
 
  Have somebody some code example to help me?
 
  Kind regards,
 
  Arne
 
 
 -
  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: 

DynaForms perfomance

2003-04-02 Thread Guido
Is there any perfomance comparation DynaActionForms vs ActionForms?
What is the penalty of using Dyna ones (perfomance and other drawbacks)?
Thank you,
Guido.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Array of Beans used in an ActionForm

2003-04-02 Thread Nicolas De Loof
use : html:text property=arrayForm(0).name

html:text is use inside a html:form, so it assumes the current bean is the 
html:form form-bean.

Here are general Sruts tags usage :
- name is the name of a bean in some scope. html:xx use form-bean as default and 
doesn't need this attribute
- property is the name of the bean property, with indexed / dotted notation
- scope can be use to define where to search for teh bean. By default all scopes are 
used to search.
- id is the name of a script variable / bean in scope that tag creates for you

Nico.



Hello Nico!

I have tríed this with the following code:

html:text property=testForm.arrayForm(0).name
html:text property=testForm.arrayForm(1).name
html:text property=testForm.arrayForm(2).name

It resulted in the error:

No getter method for property testForm.arrayForm(0).name of bean
org.apache.struts.taglib.html.BEAN

Regards,

Arne

 -Ursprüngliche Nachricht-
 Von: Nicolas De Loof [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 2. April 2003 12:14
 An: Struts Users Mailing List
 Betreff: Re: Array of Beans used in an ActionForm



 For your indexed properties, use arrayForm(x).name instead of
 arrayForm[x].name

 Try to use JSP tags instead of scriptlets, your JSP will be
 more readeable to other developers.

 Nico.

 - Original Message -
 From: Clauss, Arne [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 12:02 PM
 Subject: AW: Array of Beans used in an ActionForm


 Hello Nico!

 Thanks for your help. I now have got indexed getter and
 setters. Showing the data in the JSP works fine, but getting
 the data back formn the JSP in the UpdateAction didn't work.

 Please notice: I dont't want to handle an array of Strings in
 the ActionForm, I would like to hadle an array of Beans (
 with own getters and
 setters) in the AtionForm.

 Maybee it make sence to post some code here for a better
 understanding of the problem.

 This ist the ActionForm used in the JSP:

 public class TestForm extends ActionForm {


 /**
 * Log4j Category for this class
 */
 protected final static Category cat =
 Category.getInstance(TestForm.class.getName());

 public TestForm (int size)
 {
 arrayForm = new DataBean[size];
 }

 public TestForm ()
 {
 if (cat.isDebugEnabled())
 {
 cat.debug(Konstruktor Start);
 }
 int size=3;
 arrayForm = new DataBean[size];
 for (int i = 0; i=(size-1);i++)
 {
 arrayForm[i]= new DataBean();
 }
 if (cat.isDebugEnabled())
 {
 cat.debug(Konstruktor Ende);
 }
 }

 private DataBean[] arrayForm = null;

 /**
 * Gets the arrayForm
 * @return Returns a ArrayForm[]
 */
 public DataBean getArrayForm(int i) {
 return arrayForm[i];
 }
 /**
 * Sets the arrayForm
 * @param arrayForm The arrayForm to set
 */
 public void setArrayForm(int i, DataBean arrayForm) {
 this.arrayForm[i] = arrayForm; }

 }

 This is the Bean which is included in the array of the TestForm:

 public class DataBean extends ActionForm {

 /**
 * Log4j Category for this class
 */
 protected final static Category cat =
 Category.getInstance(TestForm.class.getName());

 /**
 * Konstruktor
 */
 public DataBean(String myName, int myId) {
 this.setName(myName);
 this.setID(myId);
 }

 /**
 * Konstruktor
 */
 public DataBean() {
 this.setName();
 this.setID(Integer.MIN_VALUE);
 }

 private String name = ;
 private int ID = Integer.MIN_VALUE;

 /**
 * Gets the name
 * @return Returns a String
 */
 public String getName() {
 return name;
 }
 /**
 * Sets the name
 * @param name The name to set
 */
 public void setName(String name) {
 this.name = name;
 }

 /**
 * Gets the iD
 * @return Returns a int
 */
 public int getID() {
 return ID;
 }
 /**
 * Sets the iD
 * @param iD The iD to set
 */
 public void setID(int iD) {
 ID = iD;
 }
 }

 And last but not least my JSP code:

 This works fine for showing the data, but not for updating:
 %
 for (int i=0; i=2; i++)
 {
 %
 brinput type=text name=testForm.arrayForm[%=
 i%].name value=%= testForm.getArrayForm(i).getName()%

 %
 }
 %

 I have also tried this code int eh JSP. Than I get the
 following error: No getter method for property
 testForm.arrayForm[0].name

 html:text property=testForm.arrayForm[0].name
 html:text property=testForm.arrayForm[1].name
 html:text property=testForm.arrayForm[2].name

 Any ideas?

 Regards,

 Arne


  -Ursprüngliche Nachricht-
  Von: Nicolas De Loof [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 2. April 2003 10:39
  An: Struts Users Mailing List
  Betreff: Re: Array of Beans used in an ActionForm
 
 
  If you want to use an array for a property that your JSP uses as
  indexed (i.e. property=data(n)) you will have to define indexed
  getters and setters :
 
  public void setData(index i, String value) {
  this.data[i] = value;
  }
 
  public String getData(index i) {
  return this.data[i];
  }
 
  Struts will not create an instace of the array for you when
 it creates
  or populates the formBean. Your form-bean has to create the
 array in
  

AW: Array of Beans used in an ActionForm

2003-04-02 Thread Clauss, Arne
Hello Nico!

Once more I have followed your advises. Now the code look like this:

html:text property=arrayForm(0).name
html:text property=arrayForm(1).name
html:text property=arrayForm(2).name

I get the following error message:

No getter method for property arrayForm(0).name of bean
org.apache.struts.taglib.html.BEAN

Do Struts really know, that it has to call the method
testForm.getArrayForm(i).getName()  You know it is an Array of Benas
inside an Form.

Regards,

Arne

 -Ursprüngliche Nachricht-
 Von: Nicolas De Loof [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 2. April 2003 12:30
 An: Struts Users Mailing List
 Betreff: Re: Array of Beans used in an ActionForm
 
 
 use : html:text property=arrayForm(0).name
 
 html:text is use inside a html:form, so it assumes the 
 current bean is the html:form form-bean.
 
 Here are general Sruts tags usage :
 - name is the name of a bean in some scope. html:xx use 
 form-bean as default and doesn't need this attribute
 - property is the name of the bean property, with indexed / 
 dotted notation
 - scope can be use to define where to search for teh bean. 
 By default all scopes are used to search.
 - id is the name of a script variable / bean in scope that 
 tag creates for you
 
 Nico.
 
 
 
 Hello Nico!
 
 I have tríed this with the following code:
 
 html:text property=testForm.arrayForm(0).name
 html:text property=testForm.arrayForm(1).name
 html:text property=testForm.arrayForm(2).name
 
 It resulted in the error:
 
 No getter method for property testForm.arrayForm(0).name of 
 bean org.apache.struts.taglib.html.BEAN
 
 Regards,
 
 Arne
 
  -Ursprüngliche Nachricht-
  Von: Nicolas De Loof [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 2. April 2003 12:14
  An: Struts Users Mailing List
  Betreff: Re: Array of Beans used in an ActionForm
 
 
 
  For your indexed properties, use arrayForm(x).name instead of 
  arrayForm[x].name
 
  Try to use JSP tags instead of scriptlets, your JSP will be more 
  readeable to other developers.
 
  Nico.
 
  - Original Message -
  From: Clauss, Arne [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Sent: Wednesday, April 02, 2003 12:02 PM
  Subject: AW: Array of Beans used in an ActionForm
 
 
  Hello Nico!
 
  Thanks for your help. I now have got indexed getter and setters. 
  Showing the data in the JSP works fine, but getting the data back 
  formn the JSP in the UpdateAction didn't work.
 
  Please notice: I dont't want to handle an array of Strings in the 
  ActionForm, I would like to hadle an array of Beans ( with 
 own getters 
  and
  setters) in the AtionForm.
 
  Maybee it make sence to post some code here for a better 
 understanding 
  of the problem.
 
  This ist the ActionForm used in the JSP:
 
  public class TestForm extends ActionForm {
 
 
  /**
  * Log4j Category for this class
  */
  protected final static Category cat =
  Category.getInstance(TestForm.class.getName());
 
  public TestForm (int size)
  {
  arrayForm = new DataBean[size];
  }
 
  public TestForm ()
  {
  if (cat.isDebugEnabled())
  {
  cat.debug(Konstruktor Start);
  }
  int size=3;
  arrayForm = new DataBean[size];
  for (int i = 0; i=(size-1);i++)
  {
  arrayForm[i]= new DataBean();
  }
  if (cat.isDebugEnabled())
  {
  cat.debug(Konstruktor Ende);
  }
  }
 
  private DataBean[] arrayForm = null;
 
  /**
  * Gets the arrayForm
  * @return Returns a ArrayForm[]
  */
  public DataBean getArrayForm(int i) {
  return arrayForm[i];
  }
  /**
  * Sets the arrayForm
  * @param arrayForm The arrayForm to set
  */
  public void setArrayForm(int i, DataBean arrayForm) { 
  this.arrayForm[i] = arrayForm; }
 
  }
 
  This is the Bean which is included in the array of the TestForm:
 
  public class DataBean extends ActionForm {
 
  /**
  * Log4j Category for this class
  */
  protected final static Category cat =
  Category.getInstance(TestForm.class.getName());
 
  /**
  * Konstruktor
  */
  public DataBean(String myName, int myId) {
  this.setName(myName);
  this.setID(myId);
  }
 
  /**
  * Konstruktor
  */
  public DataBean() {
  this.setName();
  this.setID(Integer.MIN_VALUE);
  }
 
  private String name = ;
  private int ID = Integer.MIN_VALUE;
 
  /**
  * Gets the name
  * @return Returns a String
  */
  public String getName() {
  return name;
  }
  /**
  * Sets the name
  * @param name The name to set
  */
  public void setName(String name) {
  this.name = name;
  }
 
  /**
  * Gets the iD
  * @return Returns a int
  */
  public int getID() {
  return ID;
  }
  /**
  * Sets the iD
  * @param iD The iD to set
  */
  public void setID(int iD) {
  ID = iD;
  }
  }
 
  And last but not least my JSP code:
 
  This works fine for showing the data, but not for updating: %
  for (int i=0; i=2; i++)
  {
  %
  brinput type=text name=testForm.arrayForm[%=
  i%].name value=%= testForm.getArrayForm(i).getName()%
 
  %
  }
  %
 
  I have also tried this code int eh JSP. Than I get the following 
  

Re: New to Struts

2003-04-02 Thread Ruben Pardo

But ... why are dynaforms  better than BaseMap Form's? i'm using BaseMap Form and i 
think that is a good choice, and if i have to do something in the reset method, i only 
inherit from the BaseMap, in dynaform you can't do a specific reset am i wrong?
Ruben.


-
Yahoo! Messenger
Nueva versioacute;n: Super Webcam, voz, caritas animadas, y maacute;s #161;Gratis!

Re: HELP: Dispaly Date in a JSP that used Tiles

2003-04-02 Thread Gareth Andrew
Yup, the error is coming from

html:text name=MyForm property=dateControl size=30/  

as it is looking for a FormBean called MyForm.
Instead use:
input type=text name=dateControl size=30/

Heligon Sandra wrote:

thank you for your answer but when you say just use plain html tags
it is what I do with  form name=MyForm isn't it ?
But it doesn't work because when I run my application I have the error
javax.servlet.ServletException: Cannot find bean myForm in any scope.
Why ?
With the plain html tag form, who is responsible for creation of the
form instance ?


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: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 11:10
To: Struts Users Mailing List
Subject: Re: HELP: Dispaly Date in a JSP that used Tiles
You don't need to create an ActionForm, since the form is never going to 
be submitted, and you don't need to be able to access the form 
information outside of the current page. So just use plain html tags 
instead of the struts-html tags.

Gareth.

Heligon Sandra wrote:

 

First, thanks a lot for your help.

I think indeed that this manner of making is better 
but I have a problem to set up it.
Because I must define a tag form. 
form name=myForm
  input type=text name=dateControl size=30
/form

As I explained in my previous message I use Tiles all the
pages are composed of several modules header, menu, body and footer.
It is in the header module that I want to display the date,
for the moment the header.jsp page is the following:
%@ taglib uri=/WEB-INF/tld/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/tld/struts-html.tld prefix=html %
form name=MyForm
table border=0 width=100% cellspacing=0 cellpadding=0
tr
  td width=40  align=left
		bean:message key=label.project.version/		
  /td
  td width=80% align=right
   html:text name=MyForm property=dateControl size=30/  
   noscriptbean:message key=label.javascript.required//noscript
  /td
/tr
/table
/form

When I run the application I have an error no instance of MyForm
has been created.
I thus defined a DynaValidatorForm in struts-config.xml,and use the Struts
tag
html:form name=MyForm. But when I compile the application I have the
following
message action is mandatory for tag form.
But I don't want to associate an action to this page.
How can I do ?
Thanks a lot in advance
Sandra
---
   

-
 

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: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 00:49
To: [EMAIL PROTECTED]
Subject: RE: HELP: Dispaly Date in a JSP that used Tiles
I think your problem has nothing to do with tiles or jsp.  You just need 
to write the output to a control instead of trying to write to the page.
If the browser were to allow your code to work as you have written it 
you would actually get a list of times.
The following code should work - it renders to a named textBox.

BEGINNING OF CODE SAMPLE --

script type=text/javascript
 function aff_heure() {
  var d=new Date()
  var weekdays=new 
Array(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
   


 

)
  var monthname=new 
Array(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,De
   

c
 

)

   var weekday=weekdays[d.getDay()]
   var date = d.getDate()
   var month = monthname[d.getMonth()]
  var year = d.getFullYear()
  var hour = d.getHours()
  var minute = d.getMinutes()
  var second = d.getSeconds()
   
   var time = new String(weekday +   + date
+ . + month +   + year
+ ,  + hour + : + minute
+ : + second)
   document.myForm.dateControl.value=time;

 
  setTimeout(aff_heure(),100);
 }

/script

form name=myForm
  input type=text name=dateControl size=30
/form
END OF CODE SAMPLE --

Hope this helps,

Gareth

PS.  You can also render to put your answer in other html objects such 
as spans and divs but if you're trying to make it work on as many 
browsers as possible that might be a bit of a headache.
PPS.  Why not use d.toGMTString() or d.toLocaleString() instead of 
trying to format the string yourself?

-
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]
 




tiles:insert tag inserting carriage return before /td on linux box

2003-04-02 Thread Alix Jermyn
Our tiles work fine with Tomcat 4.1.12, struts1.1b3, jdk1.4.01 on an NT box,
but as soon as we port it to a Linux box (SUSE,  same 1.1b3, tomcat 4.1.24)
our rendered html displays a subtle and rather nasty error, as a carriage
return is inserted immediately before the /td tag, causing the well known
rendering bug in tables.
 
for example;
 
td blah blahtiles:insert attribute=MainHeader //td

will be rendered correctly as:
 
td blah blah Main header text/td
 
on the NT system, but as
 
td blah blah Main header text
/td
 
on the linux server, with the carriage return causing ugly display problems.
As far as we are aware, we have saved all our text files (jsp, html, tld,
xml ...) in unix format without the NT double ODOA  CR sequence.
 
Any ideas???
 


Re: Array of Beans used in an ActionForm

2003-04-02 Thread Nicolas De Loof

OUPS , sory, I'm really confusing. You where right with arrayForm[0].name.

The problem is your TestForm has no getter for property arrayForm (it has only indexed 
getter), so Struts JavaBean
property discovery doesn't find any property name arrayForm.

Add this to your form :

public DataBean[] getArrayForm() {
return arrayForm;
}

public void setArrayForm(DataBean[] arrayForm) {
this.arrayForm = arrayForm;
}

It will work (this time I tried it myself).

NB: if you doesn't use it as form-bean somewhere else, DataBean doesn't need to extend 
ActionForm.

Nico.

Hello Nico!

Once more I have followed your advises. Now the code look like this:

html:text property=arrayForm(0).name
html:text property=arrayForm(1).name
html:text property=arrayForm(2).name

I get the following error message:

No getter method for property arrayForm(0).name of bean
org.apache.struts.taglib.html.BEAN

Do Struts really know, that it has to call the method
testForm.getArrayForm(i).getName()  You know it is an Array of Benas
inside an Form.

Regards,

Arne

 -Ursprüngliche Nachricht-
 Von: Nicolas De Loof [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 2. April 2003 12:30
 An: Struts Users Mailing List
 Betreff: Re: Array of Beans used in an ActionForm


 use : html:text property=arrayForm(0).name

 html:text is use inside a html:form, so it assumes the
 current bean is the html:form form-bean.

 Here are general Sruts tags usage :
 - name is the name of a bean in some scope. html:xx use
 form-bean as default and doesn't need this attribute
 - property is the name of the bean property, with indexed /
 dotted notation
 - scope can be use to define where to search for teh bean.
 By default all scopes are used to search.
 - id is the name of a script variable / bean in scope that
 tag creates for you

 Nico.



 Hello Nico!

 I have tríed this with the following code:

 html:text property=testForm.arrayForm(0).name
 html:text property=testForm.arrayForm(1).name
 html:text property=testForm.arrayForm(2).name

 It resulted in the error:

 No getter method for property testForm.arrayForm(0).name of
 bean org.apache.struts.taglib.html.BEAN

 Regards,

 Arne

  -Ursprüngliche Nachricht-
  Von: Nicolas De Loof [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 2. April 2003 12:14
  An: Struts Users Mailing List
  Betreff: Re: Array of Beans used in an ActionForm
 
 
 
  For your indexed properties, use arrayForm(x).name instead of
  arrayForm[x].name
 
  Try to use JSP tags instead of scriptlets, your JSP will be more
  readeable to other developers.
 
  Nico.
 
  - Original Message -
  From: Clauss, Arne [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Sent: Wednesday, April 02, 2003 12:02 PM
  Subject: AW: Array of Beans used in an ActionForm
 
 
  Hello Nico!
 
  Thanks for your help. I now have got indexed getter and setters.
  Showing the data in the JSP works fine, but getting the data back
  formn the JSP in the UpdateAction didn't work.
 
  Please notice: I dont't want to handle an array of Strings in the
  ActionForm, I would like to hadle an array of Beans ( with
 own getters
  and
  setters) in the AtionForm.
 
  Maybee it make sence to post some code here for a better
 understanding
  of the problem.
 
  This ist the ActionForm used in the JSP:
 
  public class TestForm extends ActionForm {
 
 
  /**
  * Log4j Category for this class
  */
  protected final static Category cat =
  Category.getInstance(TestForm.class.getName());
 
  public TestForm (int size)
  {
  arrayForm = new DataBean[size];
  }
 
  public TestForm ()
  {
  if (cat.isDebugEnabled())
  {
  cat.debug(Konstruktor Start);
  }
  int size=3;
  arrayForm = new DataBean[size];
  for (int i = 0; i=(size-1);i++)
  {
  arrayForm[i]= new DataBean();
  }
  if (cat.isDebugEnabled())
  {
  cat.debug(Konstruktor Ende);
  }
  }
 
  private DataBean[] arrayForm = null;
 
  /**
  * Gets the arrayForm
  * @return Returns a ArrayForm[]
  */
  public DataBean getArrayForm(int i) {
  return arrayForm[i];
  }
  /**
  * Sets the arrayForm
  * @param arrayForm The arrayForm to set
  */
  public void setArrayForm(int i, DataBean arrayForm) {
  this.arrayForm[i] = arrayForm; }
 
  }
 
  This is the Bean which is included in the array of the TestForm:
 
  public class DataBean extends ActionForm {
 
  /**
  * Log4j Category for this class
  */
  protected final static Category cat =
  Category.getInstance(TestForm.class.getName());
 
  /**
  * Konstruktor
  */
  public DataBean(String myName, int myId) {
  this.setName(myName);
  this.setID(myId);
  }
 
  /**
  * Konstruktor
  */
  public DataBean() {
  this.setName();
  this.setID(Integer.MIN_VALUE);
  }
 
  private String name = ;
  private int ID = Integer.MIN_VALUE;
 
  /**
  * Gets the name
  * @return Returns a String
  */
  public String getName() {
  return name;
  }
  /**
  * Sets the name
  * @param name The name to set
  */
  public void setName(String name) {
  this.name 

messages into struts 1.1

2003-04-02 Thread [EMAIL PROTECTED]
Hi everyone,

Is anybody knows how to use messages system of struts. I just 
want to print some information on the user screen, so I use an 
ActionMessages object, then i fill it with ActionMessage, I 
save it, and in my jsp, I use the tag html:messages 
id=messages in which messages is the name of my svaed 
object, but nothing is printed out? So perhaps I do not use 
correctly this?

Cheers
Pierre

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)




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



Re: How to use Struts to show image from database (byte[])?

2003-04-02 Thread Max Cooper
I worked on an app where we had cache set to false for Struts. In that
context, using an Action to retrieve the images prevented any of them from
being cached, which was bad for server load and site performance. We were
using Struts 1.0.2, though perhaps Struts 1.1 allows you to set the cache
behavior of each mapping/Action individually, which would have solved our
performance issue for the most part.

In light of that, we wrote a little servlet to serve the images. We also
implemented getLastModified() to retrieve the last modification time of the
requested image (which was also stored in the database). This worked great,
because the images would be cached by the browser until they were updated in
the db. I am not sure if that (last modification time) is supported in
Struts 1.1 either, but it would be another nice thing to have for
applications like this.

As a side note, storing the images in the db was been very nice for us
generally. Having all the data in the database is very convenient for
deployment, since there are no filesystems to worry about and no chance that
the filesystem would be out of sync with the db (where you would likely
still store references to the binary data, stored as files in such a
scenario). The performance was fine with the caching sorted out. We didn't
do any rigorous comparisons to disk-based storage, but rather the
performance just turned out to not be an issue for this project after the
caching was fixed.

Perhaps this already exists, but it would be very cool to have a system that
stored (or simply allowed storage of) the image (or any similar binary data)
in the db and then cached them to a local disk for performance. This would
be a great J2EE or Struts-specific open source project for someone to make
available. You'd get the convenience of db storage and the performance of
disk storage. You could even provide a custom tag library to construct a tag
(or URL) from the image/resource ID, set the size of image in the HTML, or
perhaps adjust the src URL for direct access to the disk file for cached
images. Though watch out for stale caches in that last scenario -- perhaps
the mod times of the disk file versus the db blob could be checked when the
tag is processed to avoid that problem. The image could even be
pre-emptively written to the cache (assuming it is stale or not yet cached)
when the tag is processed to always be able to write a URL to the file in
the cache rather than to a servlet for processing. You might run into
trouble if someone references the image from another site or something
though, so that might not be that great after all. That is unless you have a
404 handler that could look it up in the cache if it is found to be missing
on disk and reset the response code back to 200 and serve the image data
from the db, which might be worth a try. The 404 handler idea would allow
operation with a fixed maximum disk cache size, or avoid problems if you
simply ran out of disk space to cache to, also. Or perhaps it would be
simpler and just as fast to pass all requests for images through a servlet,
since you'd be doing much the same kind of stuff that the FileServlet would
be doing to serve the image anyway. Non-image specific tags would also be
useful for other kinds of binary data stored in the db. This could be a
great project if there isn't one out there already.

-Max

- Original Message -
From: Nicolas De Loof [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 12:46 AM
Subject: Re: How to use Struts to show image from database (byte[])?


 You can migrate your original ImageServlet as Struts action :

 Put servlet code inside execute() method of a new ImageAction class, that
sends image byte[] and content-type headers in
 response, then returns null.

 Add an action-mapping for ImageAction (let's say /image.do) and you will
be able to use /myApp/image.do?imageID=x

 Nico.



 Subject: How to use Struts to show image from database (byte[])?


 I have images in database.
 Prior to Struts I use servlet to show image and in JSP or sevlet. I have
/myPackage/imageservlet?imageID=1

 How to use Struts to show image from database (byte[])?

 Thanks.


 -
 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: Session Load Balancing Problem

2003-04-02 Thread Max Cooper
Do you have the cluster setup to replicate the sessions? If so and it still
isn't working correctly, write something that checks everything in your
session to see if it is Serializable. You can use a simple JSP for the
session check thing and just load it to make sure everything is
serializable, or you could integrate some kind of serializability check
that would log exceptions into your ActionBase or perhaps add it to your app
as a Filter. You would obviously want to do this on a temporary basis just
to check that everything is in order, and then remove it after you finish
testing. Anything that isn't serializable won't be available in the session
on the other node.

-Max

- Original Message -
From: Noureddine Bekrar [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 12:12 AM
Subject: Session Load Balancing Problem


 Hello,

 I have a probleme when i want to use a load balancing of my struts
 application between 2 tomcat servers.

 when the load balancing begin , the second server say that the session was
 expired.

 but when I remove the html:select tag from my jsp pages , all work well.

 Do any one has any idea about this very strange problem.

 Thanks



 -
 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 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: Array of Beans used in an ActionForm

2003-04-02 Thread shirishchandra.sakhare
Hi,
I think you are not doing this the struts way..

Look at the following message in the archive...

http://marc.theaimsgroup.com/?l=struts-userm=104815589928698w=2

Hope this helps..

Also the message gives a solution based on struts 1.0 tags..With struts 1.1 nested 
tags u have even more elegent solution at hand..


Hope this helps.

regards,
Shirish

-Original Message-
From: Clauss, Arne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 12:46 PM
To: 'Struts Users Mailing List'
Subject: AW: Array of Beans used in an ActionForm


Hello Nico!

Once more I have followed your advises. Now the code look like this:

html:text property=arrayForm(0).name
html:text property=arrayForm(1).name
html:text property=arrayForm(2).name

I get the following error message:

No getter method for property arrayForm(0).name of bean
org.apache.struts.taglib.html.BEAN

Do Struts really know, that it has to call the method
testForm.getArrayForm(i).getName()  You know it is an Array of Benas
inside an Form.

Regards,

Arne

 -Ursprüngliche Nachricht-
 Von: Nicolas De Loof [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 2. April 2003 12:30
 An: Struts Users Mailing List
 Betreff: Re: Array of Beans used in an ActionForm
 
 
 use : html:text property=arrayForm(0).name
 
 html:text is use inside a html:form, so it assumes the 
 current bean is the html:form form-bean.
 
 Here are general Sruts tags usage :
 - name is the name of a bean in some scope. html:xx use 
 form-bean as default and doesn't need this attribute
 - property is the name of the bean property, with indexed / 
 dotted notation
 - scope can be use to define where to search for teh bean. 
 By default all scopes are used to search.
 - id is the name of a script variable / bean in scope that 
 tag creates for you
 
 Nico.
 
 
 
 Hello Nico!
 
 I have tríed this with the following code:
 
 html:text property=testForm.arrayForm(0).name
 html:text property=testForm.arrayForm(1).name
 html:text property=testForm.arrayForm(2).name
 
 It resulted in the error:
 
 No getter method for property testForm.arrayForm(0).name of 
 bean org.apache.struts.taglib.html.BEAN
 
 Regards,
 
 Arne
 
  -Ursprüngliche Nachricht-
  Von: Nicolas De Loof [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 2. April 2003 12:14
  An: Struts Users Mailing List
  Betreff: Re: Array of Beans used in an ActionForm
 
 
 
  For your indexed properties, use arrayForm(x).name instead of 
  arrayForm[x].name
 
  Try to use JSP tags instead of scriptlets, your JSP will be more 
  readeable to other developers.
 
  Nico.
 
  - Original Message -
  From: Clauss, Arne [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Sent: Wednesday, April 02, 2003 12:02 PM
  Subject: AW: Array of Beans used in an ActionForm
 
 
  Hello Nico!
 
  Thanks for your help. I now have got indexed getter and setters. 
  Showing the data in the JSP works fine, but getting the data back 
  formn the JSP in the UpdateAction didn't work.
 
  Please notice: I dont't want to handle an array of Strings in the 
  ActionForm, I would like to hadle an array of Beans ( with 
 own getters 
  and
  setters) in the AtionForm.
 
  Maybee it make sence to post some code here for a better 
 understanding 
  of the problem.
 
  This ist the ActionForm used in the JSP:
 
  public class TestForm extends ActionForm {
 
 
  /**
  * Log4j Category for this class
  */
  protected final static Category cat =
  Category.getInstance(TestForm.class.getName());
 
  public TestForm (int size)
  {
  arrayForm = new DataBean[size];
  }
 
  public TestForm ()
  {
  if (cat.isDebugEnabled())
  {
  cat.debug(Konstruktor Start);
  }
  int size=3;
  arrayForm = new DataBean[size];
  for (int i = 0; i=(size-1);i++)
  {
  arrayForm[i]= new DataBean();
  }
  if (cat.isDebugEnabled())
  {
  cat.debug(Konstruktor Ende);
  }
  }
 
  private DataBean[] arrayForm = null;
 
  /**
  * Gets the arrayForm
  * @return Returns a ArrayForm[]
  */
  public DataBean getArrayForm(int i) {
  return arrayForm[i];
  }
  /**
  * Sets the arrayForm
  * @param arrayForm The arrayForm to set
  */
  public void setArrayForm(int i, DataBean arrayForm) { 
  this.arrayForm[i] = arrayForm; }
 
  }
 
  This is the Bean which is included in the array of the TestForm:
 
  public class DataBean extends ActionForm {
 
  /**
  * Log4j Category for this class
  */
  protected final static Category cat =
  Category.getInstance(TestForm.class.getName());
 
  /**
  * Konstruktor
  */
  public DataBean(String myName, int myId) {
  this.setName(myName);
  this.setID(myId);
  }
 
  /**
  * Konstruktor
  */
  public DataBean() {
  this.setName();
  this.setID(Integer.MIN_VALUE);
  }
 
  private String name = ;
  private int ID = Integer.MIN_VALUE;
 
  /**
  * Gets the name
  * @return Returns a String
  */
  public String getName() {
  return name;
  }
  /**
  * Sets the name
  * @param name The name to set
  */
  public void setName(String name) {
  

RE: HELP: Dispaly Date in a JSP that used Tiles

2003-04-02 Thread Heligon Sandra
Thank you very much for this explanation 
I have finally a solution which goes, after such an amount of time that
given pleasure. 
I still have nevertheless a very small problem. 
I would like to post the date like a label I don't want that the user can
edit it. 
Is this possible? by what can I replace the tag input type=text
name=dateControl size=30/.

My JSP:
form name=myForm
table border=0 width=100% cellspacing=0 cellpadding=0
td width=40  align=left
bean:message key=label.xms.version/:
bean:message key=xms.version.value/
/td
td width=80% align=right
  input type=text name=dateControl size=30/
script TYPE=text/javascript
function aff_heure(){
var d=new Date();
  var weekdays=new 
  Array
(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday);
var monthname=new 
Array
(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);
var weekday=weekdays[d.getDay()];
var date = d.getDate();
  var month = monthname[d.getMonth()];
var year = d.getFullYear();
  var hour = d.getHours();
var minute = d.getMinutes();
  var second = d.getSeconds();
 
var time = new String(weekday +   + date
  + . + month +   + year
  + ,  + hour + : + minute
  + : + second);

document.myForm.dateControl.value=time;
  setTimeout(aff_heure(),100);
}
aff_heure();
  /script
/td
  /tr
/table

Thanks a lot in advance.




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: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 13:06
To: Struts Users Mailing List
Subject: Re: HELP: Dispaly Date in a JSP that used Tiles


Yup, the error is coming from

html:text name=MyForm property=dateControl size=30/  

as it is looking for a FormBean called MyForm.
Instead use:

input type=text name=dateControl size=30/


Heligon Sandra wrote:

thank you for your answer but when you say just use plain html tags
it is what I do with  form name=MyForm isn't it ?
But it doesn't work because when I run my application I have the error
javax.servlet.ServletException: Cannot find bean myForm in any scope.

Why ?
With the plain html tag form, who is responsible for creation of the
form instance ?


---
-

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: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 11:10
To: Struts Users Mailing List
Subject: Re: HELP: Dispaly Date in a JSP that used Tiles


You don't need to create an ActionForm, since the form is never going to 
be submitted, and you don't need to be able to access the form 
information outside of the current page. So just use plain html tags 
instead of the struts-html tags.

Gareth.


Heligon Sandra wrote:

  

First, thanks a lot for your help.

I think indeed that this manner of making is better 
but I have a problem to set up it.
Because I must define a tag form. 
form name=myForm
   input type=text name=dateControl size=30
/form

As I explained in my previous message I use Tiles all the
pages are composed of several modules header, menu, body and footer.
It is in the header module that I want to display the date,
for the moment the header.jsp page is the following:

%@ taglib uri=/WEB-INF/tld/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/tld/struts-html.tld prefix=html %

form name=MyForm
table border=0 width=100% cellspacing=0 cellpadding=0
 tr
   td width=40  align=left
  bean:message key=label.project.version/ 
   /td
   td width=80% align=right
html:text name=MyForm property=dateControl size=30/  
noscriptbean:message key=label.javascript.required//noscript
   /td
 /tr
/table
/form

When I run the application I have an error no instance of MyForm
has been created.
I thus defined a DynaValidatorForm in struts-config.xml,and use the Struts
tag
html:form name=MyForm. But when I compile the application I have the
following
message action is mandatory for tag form.
But I don't want to associate an action to this page.
How can I do ?

Thanks a lot in advance
Sandra


--
-


-
  

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/ 

Re: messages into struts 1.1

2003-04-02 Thread Gareth Andrew
I've just had a similar problem, recently. The docs seem to be a bit 
misleading (or perhaps the docs are right and theres a bug somewhere?).
html:messages doesn't seem to do any actual writing, its just a form 
of iterator that loops through the specified messages and puts them in a 
page-scope attribute. To actually display them you need to use bean:write
eg.
html:messages id=message
bean:write name=message/
/html:messages

Note you may also need to set the message paramater of the html:message 
tag to true if you have created your messages using the 
ActionMessages.GLOBAL_MESSAGE key as the tag (confusingly) defaults to 
using ActionErrors.GLOBAL_ERROR

Hope this helps,

Gareth

[EMAIL PROTECTED] wrote:

Hi everyone,

Is anybody knows how to use messages system of struts. I just 
want to print some information on the user screen, so I use an 
ActionMessages object, then i fill it with ActionMessage, I 
save it, and in my jsp, I use the tag html:messages 
id=messages in which messages is the name of my svaed 
object, but nothing is printed out? So perhaps I do not use 
correctly this?

Cheers
Pierre
Accdez au courrier lectronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34/mn) ; tl : 08 92 68 13 50 (0,34/mn)



-
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 add a new record to a table

2003-04-02 Thread shirishchandra.sakhare
Use logic:iterate tag to iterate over the list in the jsp...

And in the action, set a property on from which tells what is the index of last bean...

And use logic equal tag to decide if a given iteration is iterating on last 
bean..using the above mentioned property...

And only for last bean use html:text..rest use bean:message so that they are read 
only...


Hope this helps..

regards,
Shirish

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:09 AM
To: Struts Users Mailing List
Subject: how to add a new record to a table


Hi,

I guess my problem is common but I couldn't find an answer on the
archive...
I have a bean that provides an indexed  property (a java.util.List).
I  have this list displayed on a jsp page with a table and I would like the
last row of the table to be editable.
When the user submits the form, I would like the last row (the editable
one) to be added as a new entry in the indexed property
Any advise for how to do that ?
Thanks

Thomas



-
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]



Example for Struts in Cocoon

2003-04-02 Thread kavitha ramesh
Hi,

If someone works with strutscocoon integration, could
you please send me an example?Or could u suggest me
some link?

Kavitha Ramesh.


Missed your favourite TV serial last night? Try the new, Yahoo! TV.
   visit http://in.tv.yahoo.com

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



Re: HELP: Dispaly Date in a JSP that used Tiles

2003-04-02 Thread Gareth Andrew
It's about now I have to admit that my Javascript/DHTML knowledge is 
about 4 years out of date.  I have no idea how many browsers that this 
will work on, but it does seem to work on IE6.0 and Mozilla 1.3:

In your script replace:

document.myForm.dateControl.value=time;

with

document.getElementById(dateControl2).innerHTML=time;

and in your html/jsp replace :
form name=myForm
   input type=text name=dateControl size=30 readonly=true
/form
with

span id=dateControl2/span

Good luck,

Gareth

Heligon Sandra wrote:

Thank you very much for this explanation 
I have finally a solution which goes, after such an amount of time that
given pleasure. 
I still have nevertheless a very small problem. 
I would like to post the date like a label I don't want that the user can
edit it. 
Is this possible? by what can I replace the tag input type=text
name=dateControl size=30/.

My JSP:
form name=myForm
table border=0 width=100% cellspacing=0 cellpadding=0
   td width=40  align=left
	bean:message key=label.xms.version/:
	bean:message key=xms.version.value/
   /td
   td width=80% align=right
 input type=text name=dateControl size=30/
   script TYPE=text/javascript
	function aff_heure(){
 	var d=new Date();
	  var weekdays=new 
 	  Array
(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday);
 	var monthname=new 
	Array
(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);
 	var weekday=weekdays[d.getDay()];
 	var date = d.getDate();
	  var month = monthname[d.getMonth()];
 	var year = d.getFullYear();
	  var hour = d.getHours();
 	var minute = d.getMinutes();
	  var second = d.getSeconds();

 	var time = new String(weekday +   + date
 + . + month +   + year
 + ,  + hour + : + minute
 + : + second);
   
 	document.myForm.dateControl.value=time;
	  setTimeout(aff_heure(),100);
 	}
 	aff_heure();
 /script
   /td
 /tr
/table

Thanks a lot in advance.
 



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


redirect-problem

2003-04-02 Thread Jurgen de Moortel
Hi,

In Struts 1.0.2 I used the following working code

actionForward = mapping.findForward(SUCCESS);
actionForward.setRedirect(true);

When upgrading from Struts 1.0.2 to Struts 1.1, I get the next error

java.lang.IllegalStateException: Configuration is frozen 
at org.apache.struts.config.ForwardConfig.setRedirect(ForwardConfig.java:225) 
at be.schaubroeck.prj.wdcinfo.ui.web.actions.WelcomeAction.execute(Unknown Source) 
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:480)
 
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420) 
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) 
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) 
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) 
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) 
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) 
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
 
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) 
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) 
at java.lang.Thread.run(Thread.java:536) 

I searched the manuals/book/net and I didn't find a solution
How can I get rid of this error

Regards

Jurgen



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



RE: [OT] Re: A bean:define question

2003-04-02 Thread Sri Sankaran
snip/

 I've always been 
 confused by people 
 who ask things like, Does IDE X support JSP debugging?.  
 Well, if you need 
 to debug your JSP, you've got way too much logic in there and 
 no IDE will 
 save you.

Not necessarily.
  
JSP debugging is definitely handy when you are working with a not-yet-mature tag 
library.  I have -- on more than one occasion -- found the bug to be in the tag than 
in the application logic.

In lieu of JSP debugging, I use the generated Java code to debug; definitely more 
tedious -- but it works.

 
 David

Sri

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



RE: Example for Struts in Cocoon

2003-04-02 Thread Todd G. Nist
Kavitha,

There was a post awhile back by Don Brown about a prototype of a Struts 1.1
plugin that integrates Cocoon
into the Struts framework he developed.

More information, including how and why, and a demo, visit:
http://www.twdata.org/struts


Hope this helps.

Regards,
Todd G. Nist
-Original Message-
From: kavitha ramesh [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:39 AM
To: [EMAIL PROTECTED]
Subject: Example for Struts in Cocoon


Hi,

If someone works with strutscocoon integration, could
you please send me an example?Or could u suggest me
some link?

Kavitha Ramesh.


Missed your favourite TV serial last night? Try the new, Yahoo! TV.
   visit http://in.tv.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]



RE: Redirects

2003-04-02 Thread Damian Staniforth
Thanks for this.

I've just tested in my reconfigured WebSphere 4.0.3 and my redirects now 
work.



Subject:
RE: Redirects
From:
Witbeck, Shane [EMAIL PROTECTED]
Date:
Tue, 01 Apr 2003 11:18:55 -0500
To:
[EMAIL PROTECTED]
This is a known issue with WebSphere. There is an e-fix for this but you
also have to explicitly set a System Properties value. In the admin console
under Application Servers  Default Server  JVM Settings add:
name com.ibm.websphere.sendredirect.compliance
value 1
This makes WebSphere compliant to Servlet spec 2.3.

Be aware if there has been any workarounds in existing code to address
this...adding this System property may break them ;)
HTH,

Shane

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


RE: [OT] April Fools?

2003-04-02 Thread Mark Galbreath
;-)~

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2003 10:40 PM
To: Struts Users Mailing List
Subject: RE: [OT] April Fools?


I thought April Fools day was 1st of April - not the second. -or is that the
prank?

;-

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 2 April 2003 01:30
To: struts
Subject: [OT] April Fools?





-
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: FW: Unit Testing

2003-04-02 Thread James Mitchell
On Wed, 2003-04-02 at 04:41, McRobb, John wrote:
  There are many test tools to stuff:
  
  struts Test
  Cactus
  HttpUnit
  
  but none of them seem to do what I want.
  
  I want to set up a test to load the request with data to test that my page
  renders ok, just now I am using a scriptlet in the jsp.
  Is there any way I can move this out to a class which launches the JSp in
  a bowser with the data on the request.

While not *actually* launching a browser, the Cactus testing framework
(w/ HTTPUnit) allows you to test your JSPs as if they were rendered on a
browser.  It actually goes a few steps beyond just calling a JSP,
because in the beginXXX method you can setup the request (adding
cookies, headers, etc), then in the testXXX method, you can forward to
your JSP, then in endXXX you can get the results of the rendered JSP as
a WebResponse.

I've used a few variations of these methods to write the cactus tests
for the core taglibs (although not finished yet).

Check out the source distribution to see examples of how I've setup
testing for the taglibs.  


  
  Ta
  
  John
  
  
 
 
 Tesco Personal Finance Limited is a joint venture between The Royal Bank of Scotland 
 plc and Tesco PLC. Tesco Personal Finance Limited is registered in Scotland No 
 173199. Registered Office: 42 St Andrew Square, Edinburgh EH2 2YE. 
 
 This e-mail message is confidential and for use by the addressee only. If you are 
 not the addressee, please return the message to the sender by replying to it and 
 then delete the message from your computer. 
 
 Internet e-mails are not necessarily secure. Tesco Personal Finance Limited does not 
 accept responsibility for changes made to this message after it was sent.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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



RE: Does a degree matter?

2003-04-02 Thread PILGRIM, Peter, FM
 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
 
 On Sat, 29 Mar 2003, Arron Bates wrote:
 
  Date: Sat, 29 Mar 2003 20:36:21 -0600
  From: Arron Bates [EMAIL PROTECTED]
 
  Brandon,
 
  If you can do the deed (which it sounds like you can), I 
 would hazard offering
  my opinion in thinking that it wouldn't be the best use of 
 your time. By
----
 
 My personal experience (both for myself and for folks I have 
 hired over
 the years) mirrors this -- indeed, my personal opinion is 
 that a Comp Sci
 degree is worth less (to me as an employer) than a degree in 
 some field
 that is more closely associated with the general needs of potential
 employers.
 
 Why?  A couple of reasons:
 
 * Many folks who go for Comp Sci degrees obsess over learning the
   particular technologies being taught in their classes, at 
 the expense
   of courses to improve your general thinking skills.  Any specific
   technology you learn in your first year is going to be totally
   obsolete by the time you graduate from the program anyway, so why
   bother?  The important skill to employers (at least from my 
 viewpoint)
   is that you've learned how to quickly adapt your existing skills to
   new technologies as they become available.  Also, the fundamentals
   of good architecture and design practices tend to change much more
   slowly than the favorite language de jour -- so if you decide to go
   for Comp Sci, focus on fundamentals like O-O, design patterns,
   and so on.

I got my degree over 10 years ago, and technology justs moves to fast
to keep. THe first year I learned Pascal. Then second year, I learnt
Concurrent Pascal with a classic book, by Isreali fella, maybe you 
might know of it, Ali, Adi. I also learnt Assembly language. In the
forth year I finally learnt Fortran and C, pre-ANSI.

 
 * Many folks who go for Comp Sci degrees are so focused on 
 the technical
   things, and don't accumulate any domain knowledge along the way that
   would make you *more* valuable to potential employers than another
   Comp Sci graduate with similar skills.  If you're building 
 e-commerce
   systems, do you know anything about the fundamental accounting
   principles involved in tracking purchases?  If you're building
   systems to introduce novices to the world of online information,
   have you ever studied any human factors engineering?  If you're
   building trading systems for a Wall Street broker, do you have the
   slightest idea how stock and commodity exchanges work?
 
Definitely. If there a modular course in Investment Banking back in
the 1980's  and being where I am now. Knowing what I know now. 
I would have go for it like a rancid dog!

 It may surprise some of you to find out that I don't have a Comp Sci
 degree at all -- instead, I got a BA in Business with a focus on
 Accounting.  This was ***tremendously*** helpful in setting 
 me apart from
 everyone else who was learning programming and systems 
 analysis in those
 days -- I could immediately communicate with the end users 
 responsible for
 the systems we were building, using their vocabulary, without 
 having to be
 trained -- in addition to the fact that I was a fair-to-middlin'
 programmer :-).
 
 If you are looking at going to college today (either because it's that
 time in your life, or because the job market sucks right now), I would
 suggest thinking about a primary major other than Comp Sci 
 (with a Comp
 Sci minor to keep your hand in on all the technical stuff).  
 The name of
 the game is making yourself more valuable, relative to 
 everyone else out
 there -- and, quite frankly, there are more interesting things in the
 world than just computers and web apps :-).
 
 Craig
 

If you are die hard techie, then you should get first honours or
second class honours from a Computer Science degree, at
British University at least. But I would recommend, strongly,
that you also look at a ``Combined Degree'' such as computing and
international economic, computing and biotechnology (hot!),
computing and engineering, or physical sciences.

Also I would seriously look at humanities, arts related degrees
for good combination. If you are interested in digital arts, 
photography, graphic, design and web, you might something 
computing related.

Dont do what a lot of people did/do. Bog standard boring. 
Mathematics and Computer Science unless, of course, you instead to be
Professor at Oxbridge.

Mix it up
--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923



  Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 

Re: messages into struts 1.1

2003-04-02 Thread Kirby Vandivort
I was just running across this in something i was working on..

In the html tag, try

html:messages id=messages message=true

and see if that helps.

On Wed, Apr 02, 2003 at 12:25:52PM +0100, [EMAIL PROTECTED] wrote:
 Hi everyone,
 
 Is anybody knows how to use messages system of struts. I just 
 want to print some information on the user screen, so I use an 
 ActionMessages object, then i fill it with ActionMessage, I 
 save it, and in my jsp, I use the tag html:messages 
 id=messages in which messages is the name of my svaed 
 object, but nothing is printed out? So perhaps I do not use 
 correctly this?
 
 Cheers
 Pierre
 
 Accédez au courrier électronique de La Poste : www.laposte.net ; 
 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)
 
 
 

-- 

Kirby Vandivort  Theoretical and Computational Biophysics 
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

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



Struts Console

2003-04-02 Thread Edgar P. Dollin
James:

Would there be any interest in getting struts console to support
struts-menu.

Thanks

Edgar


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



Help: JavaScript pop-up menu goes behind drop down list in InternetExplorer

2003-04-02 Thread Denis Wang
Hello, all,
Sorry if it is off the subject of this mailing list.
I use JavaScript to generate a pop-up menu.  However, the menu is shadowed
by my drop down list on the same page.  Does anybody have any idea how to
fix it.
Thanks.
Denis

p.s. my JavaScript code to generate the menu

  function showMyMenu( myMenuName, myAnchorId ) {
myAnchor = getAnchorPosition( myAnchorId );
window.showMenu( myMenuName, myAnchor.x, myAnchor.y+15 );
  }



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



RE:[OT] Help: JavaScript pop-up menu goes behind drop down list in Internet Explorer

2003-04-02 Thread Jarnot Voytek Contr AU HQ/SC
I'm assuming you mean in IE?  No way to fix this, other than hiding the
drop-down while the menu is displayed...

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: Denis Wang [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 8:42 AM
 To: Struts Users Mailing List
 Subject: Help: JavaScript pop-up menu goes behind drop down list in
 Internet Explorer
 
 
 Hello, all,
 Sorry if it is off the subject of this mailing list.
 I use JavaScript to generate a pop-up menu.  However, the 
 menu is shadowed
 by my drop down list on the same page.  Does anybody have any 
 idea how to
 fix it.
 Thanks.
 Denis
 
 p.s. my JavaScript code to generate the menu
 
   function showMyMenu( myMenuName, myAnchorId ) {
 myAnchor = getAnchorPosition( myAnchorId );
 window.showMenu( myMenuName, myAnchor.x, myAnchor.y+15 );
   }
 
 
 
 -
 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 Strut too primitive for really useful Controller function?

2003-04-02 Thread David Graham
IMO, implementing business logic in the controller violates MVC principles.  
The Struts controller handles page flow by calling Actions.  Your actions 
invoke methods on your business layer.  By putting business logic in the 
controller you can't reuse it outside of that framework.  If I were 
interested in writing non-reusable code I'd use Perl ;-).

David



From: Edgar Dollin [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Igor Shabalov' [EMAIL PROTECTED], 'Struts Users Mailing List' 
[EMAIL PROTECTED]
Subject: RE: Is Strut too primitive for really useful Controller function?
Date: Wed, 2 Apr 2003 06:52:21 -0500

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 

No action instance for path your path name could be created

2003-04-02 Thread Dan Tarkenton
Hello all.  I apologize for the size of this message,
but I thought it necessary to include some of my
source.  

I am trying to do a very basic thing here.  I trying
to pass form data to an Action object.  However i am
getting the following tomcat error, when I submit from
http://localhost:8080/ginsu/test/addFile.jsp :

*** Begin My Error ***

HTTP Status 500 - No action instance for path /addFile
could be created

type Status report

message No action instance for path /addFile could be
created

description The server encountered an internal error
(No action instance for path /addFile could be
created) that prevented it from fulfilling this
request.

*** End My error **

I have consulted both the Struts in Action book as
well as the struts-example web app.  I just don't see
where my problem resides.  So I thought it best to
consult you more experienced struts users.  My first
guess is that I have configured struts-config.xml
incorrectly.

I will first list my struts-config.xml file (which is
where I _think_ my error may be), my addFile.jsp (a
simple form), my AddFileForm (struts FormBean), and my
AddFileAction class (Struts Action). 

I hope you guys can see something obvious.  Here's
hoping.

* struts-config.xml ***
?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC

  -//Apache Software Foundation//DTD Struts
Configuration 1.0//EN
 
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  !-- == Form Bean Definitions
=== --

  form-beans
  
 form-bean name=contentForm
type=ginsu.strutsApp.ContentForm /
 form-bean name=addFileForm
type=ginsu.strutsApp.AddFileForm /
 
  /form-beans
  
  !-- == Global Forward Definitions
== --

  global-forwards
!-- every Action class will forward to
XSLServlet, the View component of ginsu --
forward name=xslServlet  path=/XSLServlet /
  /global-forwards

  !-- == Action Mapping Definitions
== --

  action-mappings

actionpath=/test  
   type=ginsu.strutsApp.ContentAction
   name=contentForm 
/action

actionpath=/addFile  
   type=ginsu.strutsApp.AddFileAction
   name=addFileForm
   input=/test/addFile.jsp 
/action  

actionpath=/admin/addFormBean
  
type=org.apache.struts.actions.AddFormBeanAction/

actionpath=/admin/addForward
  
type=org.apache.struts.actions.AddForwardAction/

actionpath=/admin/addMapping
  
type=org.apache.struts.actions.AddMappingAction/

actionpath=/admin/reload
  
type=org.apache.struts.actions.ReloadAction/

actionpath=/admin/removeFormBean
  
type=org.apache.struts.actions.RemoveFormBeanAction/

actionpath=/admin/removeForward
  
type=org.apache.struts.actions.RemoveForwardAction/

actionpath=/admin/removeMapping
  
type=org.apache.struts.actions.RemoveMappingAction/

  /action-mappings

/struts-config

*** end struts-config.xml ***

And now my jsp form:

*** Begin addFile.jsp ***

html
head

  titleAdd an XML File to Slide/title

/head
body



form method=POST action=/ginsu/addFile.do
table border=0 width=100%

  tr
th align=right
  Filename:
/th
td align=left
  
input type=text name=filename value=
  
  
/td
  /tr

  tr
td align=right
  input type=submit name=submit value=Submit
filename
/td
td align=left
  input type=reset name=reset value=Reset
/td
  /tr
/table
/form



/body
/html

** End addFile.jsp 

My FormBean:

** Begin AddFileForm.java *

package src.ginsu.strutsApp;

import org.apache.struts.action.*;

public class AddFileForm extends ActionForm {

protected String filename = null;

public String getFilename() {
return this.filename;
}

public void setFilename(String filename) {
this.filename = filename;
}

}

** End AddFileForm.java 

And finally, My AddFileAction class:

** Begin AddFileAction.java 

package src.ginsu.strutsApp;

import ginsu.content.adapter.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.xml.transform.dom.DOMSource;
/**
 *
 * @author  tarkentond
 */
public class AddFileAction extends Action {

public ActionForward perform (ActionMapping
mapping,
ActionForm form,
HttpServletRequest
request,
   
HttpServletResponse 

RE: [OT] Help: JavaScript pop-up menu goes behind drop down list i n Internet Explorer

2003-04-02 Thread McCarthy, Jeffrey - Contractor - IMSC
We had a similar problem. We solved this by putting each drop down list box
into it's own div , assign it an id and write a JavaScript function that
hides each drop-down  div when the user mouse over the drop down. 

Hope that helps


-Original Message-
From: Eva Sager [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2003 9:57 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Help: JavaScript pop-up menu goes behind drop down list i
n Internet Explorer


or moving the drop down or the menu...

-Original Message-
From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 9:52 AM
To: 'Struts Users Mailing List'
Subject: RE:[OT] Help: JavaScript pop-up menu goes behind drop down list
i n Internet Explorer


I'm assuming you mean in IE?  No way to fix this, other than hiding the
drop-down while the menu is displayed...

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: Denis Wang [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 8:42 AM
 To: Struts Users Mailing List
 Subject: Help: JavaScript pop-up menu goes behind drop down list in
 Internet Explorer
 
 
 Hello, all,
 Sorry if it is off the subject of this mailing list.
 I use JavaScript to generate a pop-up menu.  However, the 
 menu is shadowed
 by my drop down list on the same page.  Does anybody have any 
 idea how to
 fix it.
 Thanks.
 Denis
 
 p.s. my JavaScript code to generate the menu
 
   function showMyMenu( myMenuName, myAnchorId ) {
 myAnchor = getAnchorPosition( myAnchorId );
 window.showMenu( myMenuName, myAnchor.x, myAnchor.y+15 );
   }
 
 
 
 -
 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: No action instance for path your path name could be created

2003-04-02 Thread Vivian, Nigel (N.)
Are you sure that you have a compilied Action class where the webserver can
find it e.g ...webapp/web-inf/classes/.../AddFileAction.class it could be
that your Action class is not compiling

Nigel Vivian

-Original Message-
From: Dan Tarkenton [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 16:23
To: [EMAIL PROTECTED]
Subject: No action instance for path your path name could be created


Hello all.  I apologize for the size of this message,
but I thought it necessary to include some of my
source.  

I am trying to do a very basic thing here.  I trying
to pass form data to an Action object.  However i am
getting the following tomcat error, when I submit from
http://localhost:8080/ginsu/test/addFile.jsp :

*** Begin My Error ***

HTTP Status 500 - No action instance for path /addFile
could be created

type Status report

message No action instance for path /addFile could be
created

description The server encountered an internal error
(No action instance for path /addFile could be
created) that prevented it from fulfilling this
request.

*** End My error **

I have consulted both the Struts in Action book as
well as the struts-example web app.  I just don't see
where my problem resides.  So I thought it best to
consult you more experienced struts users.  My first
guess is that I have configured struts-config.xml
incorrectly.

I will first list my struts-config.xml file (which is
where I _think_ my error may be), my addFile.jsp (a
simple form), my AddFileForm (struts FormBean), and my
AddFileAction class (Struts Action). 

I hope you guys can see something obvious.  Here's
hoping.

* struts-config.xml ***
?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC

  -//Apache Software Foundation//DTD Struts
Configuration 1.0//EN
 
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  !-- == Form Bean Definitions
=== --

  form-beans
  
 form-bean name=contentForm
type=ginsu.strutsApp.ContentForm /
 form-bean name=addFileForm
type=ginsu.strutsApp.AddFileForm /
 
  /form-beans
  
  !-- == Global Forward Definitions
== --

  global-forwards
!-- every Action class will forward to
XSLServlet, the View component of ginsu --
forward name=xslServlet  path=/XSLServlet /
  /global-forwards

  !-- == Action Mapping Definitions
== --

  action-mappings

actionpath=/test  
   type=ginsu.strutsApp.ContentAction
   name=contentForm 
/action

actionpath=/addFile  
   type=ginsu.strutsApp.AddFileAction
   name=addFileForm
   input=/test/addFile.jsp 
/action  

actionpath=/admin/addFormBean
  
type=org.apache.struts.actions.AddFormBeanAction/

actionpath=/admin/addForward
  
type=org.apache.struts.actions.AddForwardAction/

actionpath=/admin/addMapping
  
type=org.apache.struts.actions.AddMappingAction/

actionpath=/admin/reload
  
type=org.apache.struts.actions.ReloadAction/

actionpath=/admin/removeFormBean
  
type=org.apache.struts.actions.RemoveFormBeanAction/

actionpath=/admin/removeForward
  
type=org.apache.struts.actions.RemoveForwardAction/

actionpath=/admin/removeMapping
  
type=org.apache.struts.actions.RemoveMappingAction/

  /action-mappings

/struts-config

*** end struts-config.xml ***

And now my jsp form:

*** Begin addFile.jsp ***

html
head

  titleAdd an XML File to Slide/title

/head
body



form method=POST action=/ginsu/addFile.do
table border=0 width=100%

  tr
th align=right
  Filename:
/th
td align=left
  
input type=text name=filename value=
  
  
/td
  /tr

  tr
td align=right
  input type=submit name=submit value=Submit
filename
/td
td align=left
  input type=reset name=reset value=Reset
/td
  /tr
/table
/form



/body
/html

** End addFile.jsp 

My FormBean:

** Begin AddFileForm.java *

package src.ginsu.strutsApp;

import org.apache.struts.action.*;

public class AddFileForm extends ActionForm {

protected String filename = null;

public String getFilename() {
return this.filename;
}

public void setFilename(String filename) {
this.filename = filename;
}

}

** End AddFileForm.java 

And finally, My AddFileAction class:

** Begin AddFileAction.java 

package src.ginsu.strutsApp;

import ginsu.content.adapter.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.io.*;
import 

RE: [OT] Does a degree matter?

2003-04-02 Thread Chappell, Simon P
I completely agree. While I do have a Comp. Sci. degree, I have worked with many fine 
programmers that have degrees ranging from English to Chemistry to Astronomy to 
Meterology. If I'd know that it was possible to be a programmer without a Comp Sci 
degree, I'd have studied Astro-Physics and studied Comp.Sci. on the side.

Oh well.

Simon

-Original Message-
From: Thornton Scott Contractor CADRE/WGTD
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 9:11 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


I got my degree in Electrical Engineering. One of my good 
friends got his
masters degree in Cryptography. There are countless other 
engineers that got
their degree's in technical fields. I loved EE because it just 
brought my
brain to a new level of thinking. I am a much better problem 
solver than I
would have ever been had I not studied EE. It also gave me the 
confidence
that I could brake apart any problem into sub-problems and 
then solve each
of those sub-problems. BTW, my boss, who was also a developer before he
became a manager, has a PhD in Mathematics. Therefore, my 
advice is to study
something technically challenging (and hopefully enjoyable) and learn
software development in your language of choice on the side. 

-Original Message-
From: PILGRIM, Peter, FM [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:23 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
 
 On Sat, 29 Mar 2003, Arron Bates wrote:
 
  Date: Sat, 29 Mar 2003 20:36:21 -0600
  From: Arron Bates [EMAIL PROTECTED]
 
  Brandon,
 
  If you can do the deed (which it sounds like you can), I 
 would hazard offering
  my opinion in thinking that it wouldn't be the best use of 
 your time. By
----
 
 My personal experience (both for myself and for folks I have 
 hired over
 the years) mirrors this -- indeed, my personal opinion is 
 that a Comp Sci
 degree is worth less (to me as an employer) than a degree in 
 some field
 that is more closely associated with the general needs of potential
 employers.
 
 Why?  A couple of reasons:
 
 * Many folks who go for Comp Sci degrees obsess over learning the
   particular technologies being taught in their classes, at 
 the expense
   of courses to improve your general thinking skills.  Any specific
   technology you learn in your first year is going to be totally
   obsolete by the time you graduate from the program anyway, so why
   bother?  The important skill to employers (at least from my 
 viewpoint)
   is that you've learned how to quickly adapt your existing skills to
   new technologies as they become available.  Also, the fundamentals
   of good architecture and design practices tend to change much more
   slowly than the favorite language de jour -- so if you decide to go
   for Comp Sci, focus on fundamentals like O-O, design patterns,
   and so on.

I got my degree over 10 years ago, and technology justs moves to fast
to keep. THe first year I learned Pascal. Then second year, I learnt
Concurrent Pascal with a classic book, by Isreali fella, maybe you 
might know of it, Ali, Adi. I also learnt Assembly language. In the
forth year I finally learnt Fortran and C, pre-ANSI.

 
 * Many folks who go for Comp Sci degrees are so focused on 
 the technical
   things, and don't accumulate any domain knowledge along 
the way that
   would make you *more* valuable to potential employers than another
   Comp Sci graduate with similar skills.  If you're building 
 e-commerce
   systems, do you know anything about the fundamental accounting
   principles involved in tracking purchases?  If you're building
   systems to introduce novices to the world of online information,
   have you ever studied any human factors engineering?  If you're
   building trading systems for a Wall Street broker, do you have the
   slightest idea how stock and commodity exchanges work?
 
Definitely. If there a modular course in Investment Banking back in
the 1980's  and being where I am now. Knowing what I know now. 
I would have go for it like a rancid dog!

 It may surprise some of you to find out that I don't have a Comp Sci
 degree at all -- instead, I got a BA in Business with a focus on
 Accounting.  This was ***tremendously*** helpful in setting 
 me apart from
 everyone else who was learning programming and systems 
 analysis in those
 days -- I could immediately communicate with the end users 
 responsible for
 the systems we were building, using their vocabulary, without 
 having to be
 trained -- in addition to the fact that I was a fair-to-middlin'
 programmer :-).
 
 If you are looking at going to college today (either because 
it's that
 time in your life, or because the job market sucks right 
now), I would
 suggest thinking about a primary major other than Comp Sci 
 (with a Comp
 Sci minor to keep your hand in on all the technical stuff).  

Re: No action instance for path your path name could be created

2003-04-02 Thread Gareth Andrew
Could it be that your action class is in package:

package src.ginsu.strutsApp;

and in your struts-config.xml you are trying to load

type=ginsu.strutsApp.AddFileAction

ie. package ginsu.strutsApp



Dan Tarkenton wrote:

Hello all.  I apologize for the size of this message,
but I thought it necessary to include some of my
source.  

I am trying to do a very basic thing here.  I trying
to pass form data to an Action object.  However i am
getting the following tomcat error, when I submit from
http://localhost:8080/ginsu/test/addFile.jsp :
*** Begin My Error ***

HTTP Status 500 - No action instance for path /addFile
could be created
type Status report

message No action instance for path /addFile could be
created
description The server encountered an internal error
(No action instance for path /addFile could be
created) that prevented it from fulfilling this
request.
*** End My error **

I have consulted both the Struts in Action book as
well as the struts-example web app.  I just don't see
where my problem resides.  So I thought it best to
consult you more experienced struts users.  My first
guess is that I have configured struts-config.xml
incorrectly.
I will first list my struts-config.xml file (which is
where I _think_ my error may be), my addFile.jsp (a
simple form), my AddFileForm (struts FormBean), and my
AddFileAction class (Struts Action). 

I hope you guys can see something obvious.  Here's
hoping.
* struts-config.xml ***
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE struts-config PUBLIC

 -//Apache Software Foundation//DTD Struts
Configuration 1.0//EN

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

 !-- == Form Bean Definitions
=== --
 form-beans
 
form-bean name=contentForm
type=ginsu.strutsApp.ContentForm /
form-bean name=addFileForm
type=ginsu.strutsApp.AddFileForm /

 /form-beans
 
 !-- == Global Forward Definitions
== --

 global-forwards
   !-- every Action class will forward to
XSLServlet, the View component of ginsu --
   forward name=xslServlet  path=/XSLServlet /
 /global-forwards
 !-- == Action Mapping Definitions
== --
 action-mappings

   actionpath=/test  
  type=ginsu.strutsApp.ContentAction
  name=contentForm 
   /action
   
   actionpath=/addFile  
  type=ginsu.strutsApp.AddFileAction
  name=addFileForm
  input=/test/addFile.jsp 
   /action  
   
   actionpath=/admin/addFormBean
 
type=org.apache.struts.actions.AddFormBeanAction/

   actionpath=/admin/addForward
 
type=org.apache.struts.actions.AddForwardAction/

   actionpath=/admin/addMapping
 
type=org.apache.struts.actions.AddMappingAction/

   actionpath=/admin/reload
 
type=org.apache.struts.actions.ReloadAction/

   actionpath=/admin/removeFormBean
 
type=org.apache.struts.actions.RemoveFormBeanAction/

   actionpath=/admin/removeForward
 
type=org.apache.struts.actions.RemoveForwardAction/

   actionpath=/admin/removeMapping
 
type=org.apache.struts.actions.RemoveMappingAction/

 /action-mappings

/struts-config

*** end struts-config.xml ***

And now my jsp form:

*** Begin addFile.jsp ***

html
head
 titleAdd an XML File to Slide/title

/head
body


form method=POST action=/ginsu/addFile.do
table border=0 width=100%
 tr
   th align=right
 Filename:
   /th
   td align=left
 
   input type=text name=filename value=
 
 
   /td
 /tr

 tr
   td align=right
 input type=submit name=submit value=Submit
filename
   /td
   td align=left
 input type=reset name=reset value=Reset
   /td
 /tr
/table
/form


/body
/html
** End addFile.jsp 

My FormBean:

** Begin AddFileForm.java *

package src.ginsu.strutsApp;

import org.apache.struts.action.*;

public class AddFileForm extends ActionForm {

   protected String filename = null;
   
   public String getFilename() {
   return this.filename;
   }
   
   public void setFilename(String filename) {
   this.filename = filename;
   }
   
}

** End AddFileForm.java 

And finally, My AddFileAction class:

** Begin AddFileAction.java 

package src.ginsu.strutsApp;

import ginsu.content.adapter.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.xml.transform.dom.DOMSource;
/**
*
* @author  tarkentond
*/
public class AddFileAction extends Action {
   
   public ActionForward perform (ActionMapping
mapping,
   ActionForm 

Dynamic Forms Indexed properties (was RE: [Struts FAQ] Update #3)

2003-04-02 Thread Wendy Smoak
John wrote:
 Struts FAQ - Update #3
 http://www.scioworks.net/servlets/ShowPage?pid=54dp=3
 Q3: What are indexed struts-html tags and how to use them?

These are great, thanks!  I was just saying yesterday that indexed
properties might solve a problem I have, but looking at the example I'm not
sure if I can use them with a DynaValidatorForm.

In the example, does the programmer have to code the Person class with
phoneNo and name properties, or does that happen somehow automatically?

And how does this work:
 public void getPerson(int index) { ... }

Shouldn't that return a Person object, or at the very least an Object,
rather than void?

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management




Re: HELP: Dispaly Date in a JSP that used Tiles

2003-04-02 Thread Gareth Andrew
I'm not sure what you mean.  Perhaps if you e-mail me your code I could 
take a quick look at it.

Gareth.

Heligon Sandra wrote:

Your Javascript/DHTML knowledge knowledge is very good, your code
allows to display the date like a text and not like a field that
can be edited.
But I have yet a problem, with this code some controls (not all)
of my form do not stop moving.
what is this has?  
contrary to you my JavaScript knowledge is really basic. 
 
Thanks in advance

 

 



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


RE: No action instance for path your path name could be created

2003-04-02 Thread Dan Tarkenton
Yes I am sure everything is compiling.  I use ant to
take care of my build and creation of my ginsu.war
(ginsu = my web app name).  In my build process, after
a compile, I basically jar all of my class files into
ginsu.jar, and this jar file winds up in my
WEB-INF/lib directory.  I basically deploy my
application by dropping the ginsu.war into 
%CATALINA_HOME%/webapps, and restart my server.  So I
am sure the class is being created.  


--- Vivian, Nigel (N.) [EMAIL PROTECTED] wrote:
 Are you sure that you have a compilied Action class
 where the webserver can
 find it e.g
 ...webapp/web-inf/classes/.../AddFileAction.class it
 could be
 that your Action class is not compiling
 
 Nigel Vivian
 


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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



ANN] Struts-FreeMarker-JSP taglibs integration

2003-04-02 Thread Jonathan Revusky
Folks,

The first release of FreeMarker 2.2 labeled production/stable is 
available. FreeMarker 2.2 may be of special interest to Struts users 
because it is the first template engine, to our knowledge, that supports
the usage of 3rd party JSP taglibs. This means that you can have the 
cleanness and simplicity of a template engine like FreeMarker without
giving up the ability to use powerful 3rd party JSP taglibs like Cewolf
or SiteMesh and so on. You have the best of both worlds!

See http://freemarker.org/docs/pgui_misc_servlet.html for more details 
about how to configure Struts for use with FreeMarker. There is also an 
example of struts usage in the distro.

For those who don't know it, FreeMarker is a well-known, tried-and-true 
tool for doing page templates in Java. In practice, it is mostly used 
in the web space to get data from servlets into HTML pages.

Aside from the ability to use JSP taglibs, FreeMarker 2.2 introduces a
host of powerful new features. Here is a not-necessarily exhaustive 
list:

namespaces -- macro libraries can be defined in separate namespaces so 
that different people can work on different pieces without any
possibility of naming clashes. For more details, see: 
http://freemarker.org/docs/dgui_misc_namespace.html

fine control of whitespace -- this has been the bane of template
engines and a constant subject on mailing lists. We think we've really
nailed this problem now. For more details, see: 
http://freemarker.org/docs/dgui_misc_whitespace.html

more powerful macros -- Macros can defined with default parameters, and
can be invoked with optional body content. For more details, see: 
http://freemarker.org/docs/ref_directive_macro.html

Simplified syntax -- Macros and transforms are now invoked with a common
syntax, so, despite the increased power, FM 2.2 is actually
substantially simpler! For more details, see: 
http://freemarker.org/docs/ref_directive_userDefined.html

clean interoperability with jython -- Of special interest to python 
fans, jython objects can be used transparently from within FreeMarker 
templates. For more details, see: 
http://freemarker.org/docs/pgui_misc_jythonwrapper.html

Okay, 'nuff said, I guess. If that doesn't pique your interest, I don't 
know what will.

Enjoy,

Jonathan Revusky
--
lead developer, FreeMarker project, http://freemarker.org/
Available for java/internet consulting
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tiles:insert tag inserting carriage return before /td on linux box

2003-04-02 Thread Cedric Dumoulin
 Hi,

 The Tiles tags only insert the content of the specified pages. There 
is no extra insertion. So, your problem should come from one of your 
pages having this extra character. Check particularly the layout jsp ...
 Also, try to isolate the exact location in your pages where this extra 
car is inserted. Delete the cars and rewrite them on the unix system.

  Cedric

Alix Jermyn wrote:

Our tiles work fine with Tomcat 4.1.12, struts1.1b3, jdk1.4.01 on an NT box,
but as soon as we port it to a Linux box (SUSE,  same 1.1b3, tomcat 4.1.24)
our rendered html displays a subtle and rather nasty error, as a carriage
return is inserted immediately before the /td tag, causing the well known
rendering bug in tables.
for example;

td blah blahtiles:insert attribute=MainHeader //td

will be rendered correctly as:

td blah blah Main header text/td

on the NT system, but as

td blah blah Main header text
/td
on the linux server, with the carriage return causing ugly display problems.
As far as we are aware, we have saved all our text files (jsp, html, tld,
xml ...) in unix format without the NT double ODOA  CR sequence.
Any ideas???

 



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


Item Level Security

2003-04-02 Thread Puneet Agarwal
In our application every button does not have to be enabled for every user.

on server side we have a list of functions that are available for a
particular role and every user session has his role information.

what we have done to do this is:

we included another attribute (named function) in html taglib's  image
tag.

and in the ImageTag.java we checked whether current user role is allowed to
perform this function, if yes this button is enabled otherwise not.

Is there any better approach to do this ?

Regards,
Puneet Agarwal

Tata Consultancy Services,
C-56, Phase - II, NOIDA 201305 (India)
Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1031)
FAX  : +91-120-246 1521

Struts ... Action ... Struts in Action ... Action in Struts ... Action
with Struts ...


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



Re: No action instance for path your path name could be created

2003-04-02 Thread Dan Tarkenton
Hey, thanks Gareth.  I was using netbeans as my IDE
and it must have automatically put my src directory as
part of my package.  I appreciate the look at my
message.  Sometimes you can just stare and stare at
code and not see the obvious.  My app works now.

Thanks for the time.

--- Gareth Andrew [EMAIL PROTECTED] wrote:
 Could it be that your action class is in package:
 
 package src.ginsu.strutsApp;
 
 and in your struts-config.xml you are trying to load
 
 type=ginsu.strutsApp.AddFileAction
 
 ie. package ginsu.strutsApp
 
 
 
 
 Dan Tarkenton wrote:
 
 Hello all.  I apologize for the size of this
 message,
 but I thought it necessary to include some of my
 source.  
 
 I am trying to do a very basic thing here.  I
 trying
 to pass form data to an Action object.  However i
 am
 getting the following tomcat error, when I submit
 from
 http://localhost:8080/ginsu/test/addFile.jsp :
 
 *** Begin My Error
 ***
 
 HTTP Status 500 - No action instance for path
 /addFile
 could be created
 
 type Status report
 
 message No action instance for path /addFile could
 be
 created
 
 description The server encountered an internal
 error
 (No action instance for path /addFile could be
 created) that prevented it from fulfilling this
 request.
 
 *** End My error **
 
 I have consulted both the Struts in Action book as
 well as the struts-example web app.  I just don't
 see
 where my problem resides.  So I thought it best to
 consult you more experienced struts users.  My
 first
 guess is that I have configured struts-config.xml
 incorrectly.
 
 I will first list my struts-config.xml file (which
 is
 where I _think_ my error may be), my addFile.jsp (a
 simple form), my AddFileForm (struts FormBean), and
 my
 AddFileAction class (Struts Action). 
 
 I hope you guys can see something obvious.  Here's
 hoping.
 
 * struts-config.xml ***
 ?xml version=1.0 encoding=ISO-8859-1 ?
 
 !DOCTYPE struts-config PUBLIC
 
   -//Apache Software Foundation//DTD
 Struts
 Configuration 1.0//EN
  

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
 
 struts-config
 
   !-- == Form Bean Definitions
 === --
 
   form-beans
   
  form-bean name=contentForm
 type=ginsu.strutsApp.ContentForm /
  form-bean name=addFileForm
 type=ginsu.strutsApp.AddFileForm /
  
   /form-beans
   
   !-- == Global Forward Definitions
 == --
 
   global-forwards
 !-- every Action class will forward to
 XSLServlet, the View component of ginsu --
 forward name=xslServlet  path=/XSLServlet
 /
   /global-forwards
 
   !-- == Action Mapping Definitions
 == --
 
   action-mappings
 
 actionpath=/test  
type=ginsu.strutsApp.ContentAction
name=contentForm 
 /action
 
 actionpath=/addFile  
type=ginsu.strutsApp.AddFileAction
name=addFileForm
input=/test/addFile.jsp 
 /action  
 
 actionpath=/admin/addFormBean
   

type=org.apache.struts.actions.AddFormBeanAction/
 
 actionpath=/admin/addForward
   
 type=org.apache.struts.actions.AddForwardAction/
 
 actionpath=/admin/addMapping
   
 type=org.apache.struts.actions.AddMappingAction/
 
 actionpath=/admin/reload
   
 type=org.apache.struts.actions.ReloadAction/
 
 actionpath=/admin/removeFormBean
   

type=org.apache.struts.actions.RemoveFormBeanAction/
 
 actionpath=/admin/removeForward
   

type=org.apache.struts.actions.RemoveForwardAction/
 
 actionpath=/admin/removeMapping
   

type=org.apache.struts.actions.RemoveMappingAction/
 
   /action-mappings
 
 /struts-config
 
 *** end struts-config.xml ***
 
 And now my jsp form:
 
 *** Begin addFile.jsp ***
 
 html
 head
 
   titleAdd an XML File to Slide/title
 
 /head
 body
 
 
 
 form method=POST action=/ginsu/addFile.do
 table border=0 width=100%
 
   tr
 th align=right
   Filename:
 /th
 td align=left
   
 input type=text name=filename
 value=
   
   
 /td
   /tr
 
   tr
 td align=right
   input type=submit name=submit
 value=Submit
 filename
 /td
 td align=left
   input type=reset name=reset
 value=Reset
 /td
   /tr
 /table
 /form
 
 
 
 /body
 /html
 
=== message truncated ===


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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



RE: Does a degree matter?

2003-04-02 Thread Eva Sager
This brings up a good point...  if all you get out of a degree is learning
specific technology...  in a fast changing world you might get left behind.
If you learn how to learn technology...  if you learn another way of
thinking...  then you just might have something.  

My degree is in Computer Engineering and the courses that really taught me
something were the courses that taught me how to solve problems, how to
learn new technologies, and how people and technology relate.  The courses
that taught me about technology X didn't mean a thing, because technology X
isn't even around anymore... or has changed so much that what I learned
isn't relevant anymore.  

I guess what I am saying is that it might not be a question of Does a
degree matter?, but What should I be learning? and How can I challenge
myself?.  I don't think that my degree by itself has helped me all that
much...  but the things I learned while getting it were invaluable.  

I have worked with many people who become absolutely paralyzed by complex
problems, while getting my degree I learned to deal with these things.  As I
look back, I am not sure how much of it was learned from lecture and books
and how much of it was learned by being thrown into problems and being told
to sink or swim.  In a academic environment, if you sink...  there is
someone there to pull you out and explain to you what you did wrong and how
to deal with it next time.  In a corporate environment you may or may not
have that opportunity...  you may just get fired.  

I went to a school with a very challenging curriculum, and I went late in
life, as a full time student with a full time job and a family.  Some of the
most valuable lessons I learned had to do with time management, crisis
management and how to work in an environment where the best you can hope for
is not to fail too miserably due to the resources at hand (or lack there
of).  As I look back...  that has come in quite handy...  probably more so
than I care to admit ;-)




-Original Message-
From: Thornton Scott Contractor CADRE/WGTD
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:11 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


I got my degree in Electrical Engineering. One of my good friends got his
masters degree in Cryptography. There are countless other engineers that got
their degree's in technical fields. I loved EE because it just brought my
brain to a new level of thinking. I am a much better problem solver than I
would have ever been had I not studied EE. It also gave me the confidence
that I could brake apart any problem into sub-problems and then solve each
of those sub-problems. BTW, my boss, who was also a developer before he
became a manager, has a PhD in Mathematics. Therefore, my advice is to study
something technically challenging (and hopefully enjoyable) and learn
software development in your language of choice on the side. 

-Original Message-
From: PILGRIM, Peter, FM [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:23 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
 
 On Sat, 29 Mar 2003, Arron Bates wrote:
 
  Date: Sat, 29 Mar 2003 20:36:21 -0600
  From: Arron Bates [EMAIL PROTECTED]
 
  Brandon,
 
  If you can do the deed (which it sounds like you can), I 
 would hazard offering
  my opinion in thinking that it wouldn't be the best use of 
 your time. By
----
 
 My personal experience (both for myself and for folks I have 
 hired over
 the years) mirrors this -- indeed, my personal opinion is 
 that a Comp Sci
 degree is worth less (to me as an employer) than a degree in 
 some field
 that is more closely associated with the general needs of potential
 employers.
 
 Why?  A couple of reasons:
 
 * Many folks who go for Comp Sci degrees obsess over learning the
   particular technologies being taught in their classes, at 
 the expense
   of courses to improve your general thinking skills.  Any specific
   technology you learn in your first year is going to be totally
   obsolete by the time you graduate from the program anyway, so why
   bother?  The important skill to employers (at least from my 
 viewpoint)
   is that you've learned how to quickly adapt your existing skills to
   new technologies as they become available.  Also, the fundamentals
   of good architecture and design practices tend to change much more
   slowly than the favorite language de jour -- so if you decide to go
   for Comp Sci, focus on fundamentals like O-O, design patterns,
   and so on.

I got my degree over 10 years ago, and technology justs moves to fast
to keep. THe first year I learned Pascal. Then second year, I learnt
Concurrent Pascal with a classic book, by Isreali fella, maybe you 
might know of it, Ali, Adi. I also learnt Assembly language. In the
forth year I finally learnt Fortran and C, pre-ANSI.

 
 * Many folks who go for 

Re: Item Level Security

2003-04-02 Thread David Graham
You could also use the role attribute of the logic:present tag:
http://jakarta.apache.org/struts/userGuide/struts-logic.html#present
David



From: Puneet Agarwal [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users [EMAIL PROTECTED]
Subject: Item Level Security
Date: Wed, 2 Apr 2003 21:20:57 +0530
In our application every button does not have to be enabled for every user.

on server side we have a list of functions that are available for a
particular role and every user session has his role information.
what we have done to do this is:

we included another attribute (named function) in html taglib's  image
tag.
and in the ImageTag.java we checked whether current user role is allowed to
perform this function, if yes this button is enabled otherwise not.
Is there any better approach to do this ?

Regards,
Puneet Agarwal
Tata Consultancy Services,
C-56, Phase - II, NOIDA 201305 (India)
Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1031)
FAX  : +91-120-246 1521
Struts ... Action ... Struts in Action ... Action in Struts ... Action
with Struts ...
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Add photos to your messages 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]


Page Iteration

2003-04-02 Thread Brian McSweeney
Hi all,

I want to iterate over a collection and display a certain amount of items per page and 
list all the 
further pages available (just like on google).

I presume this is a feature that  has been added a million times. 

Did a quick search on the list and I see that use of the iterator with parameter 
offset can be used. 
Is this the general approach people would recommend?

Any good resources on showing how to do it?
cheers,
Brian


RE: Page Iteration

2003-04-02 Thread Jacob Hookom
If the data is coming from the DB, you should NOT pull down all the data and
slap it in their session for paging.  It's a waste of resources, especially
if they found what they wanted on the first page.

A better solution would be to use DB -specific bounding of the results
returned, like MySql's LIMIT on SELECT queries (btw, google uses MySql).  By
bounding the data returned from the DB in the first place, you just return
all objects received in the scope of the SELECT statement to the page.

If you aren't pulling from the DB, look at JSTL under Taglibs-Standard at
Jakarta's web site.  Their demo war for JSTL goes over scoped iteration.

-Jacob

| -Original Message-
| From: Brian McSweeney [mailto:[EMAIL PROTECTED]
| Sent: Wednesday, April 02, 2003 10:13 AM
| To: Struts Users Mailing List
| Subject: Page Iteration
| 
| Hi all,
| 
| I want to iterate over a collection and display a certain amount of items
| per page and list all the
| further pages available (just like on google).
| 
| I presume this is a feature that  has been added a million times.
| 
| Did a quick search on the list and I see that use of the iterator with
| parameter offset can be used.
| Is this the general approach people would recommend?
| 
| Any good resources on showing how to do it?
| cheers,
| Brian


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



RE: Page Iteration

2003-04-02 Thread apachep2
You can also search pager.

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED] 
Sent: April 2, 2003 11:13 AM
To: Struts Users Mailing List
Subject: Page Iteration

Hi all,

I want to iterate over a collection and display a certain amount of
items per page and list all the 
further pages available (just like on google).

I presume this is a feature that  has been added a million times. 

Did a quick search on the list and I see that use of the iterator with
parameter offset can be used. 
Is this the general approach people would recommend?

Any good resources on showing how to do it?
cheers,
Brian

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



[OT] RE: Struts London Square Mile Java Developers

2003-04-02 Thread PILGRIM, Peter, FM
 -Original Message-
 From: Marco Tedone [mailto:[EMAIL PROTECTED]

 
 I live in Leyton, when the central line will work again, is 
 not that far
 from the SM.

I live in the South london in the suburbs. I was hoping for response from 
other IT city workers, because it is easier to meet up after a hard 
working day in the centre of town ( or downtown for US readers).
PS: This also applies to Expresso Frameworkers
--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923


***
  Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB 
Regulated by the Financial Services Authority
***

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



RE: [OT] Re: A bean:define question

2003-04-02 Thread Sri Sankaran


 -Original Message-
 From: Gemes Tibor [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 02, 2003 9:09 AM
 To: Struts Users Mailing List
 Subject: Re: [OT] Re: A bean:define question
 
 
 Sri Sankaran írta:
 
 JSP debugging is definitely handy when you are working with a 
 not-yet-mature tag library.  I have -- on more than one 
 occasion -- found the bug to be in the tag than in the 
 application logic.
   
 
 I prefer using unit test cases for this purpose...
 

You mean unit test cases for the tags?  Sure.  But these aren't tags *I* have 
developed.

 Tib
 

Sri

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



RE: Using a Tile Definition from within a Servlet ?

2003-04-02 Thread Trevor Nightingale
Thank you for your response.

The way I worked around the problem was to set a session attribute to the value of the 
definition within the servlet. I then forwarded to a common jsp page that obtained 
that session attribute value and uses it in a tile insert tag.

Seems to work ok.

Thanks again,
Trevor

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 04:04
To: Struts Users Mailing List
Subject: Re: Using a Tile Definition from within a Servlet ?



  Yes, it is possible. There is no simple API to do that, but take a 
look at the TilesRequestProcessor.processTilesDefinition(...) method to 
know how it is done by the struts servlet.
  What you should do is:

* retrieve the definition from the factory
* create the new tile context from thedefinition
* save the current tile context
* store the new tile context in the jsp context
* include the new tile
* restore the current context


   Hope this help,

  Cedric

Trevor Nightingale wrote:

Is it possible to forward to a tiles definition with a servlet ?

Something like

   RequestDispatcher dispatcher = 
 request.getRequestDispatcher(tile.def.goes.here);
  dispatcher.forward(request,response);


Thank you in advance,
Trevor

-
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: [OT] Help: JavaScript pop-up menu goes behind drop down list i n Internet Explorer

2003-04-02 Thread Dan Allen
While this is a shameless plug, I have worked many hours on an open
source solution to this problem, so I felt it needed mentioning
here.  I wrote a menu system called domMenu and it uses a radial
algorithm to detect select boxes and hides them as necessary when
opening a menu.  The same algorithm is also in domTT, a tooltip
library I wrote.  The code is easily abstractable if you don't want
to use the actually libaries for the menu/tooltip.  Check them out
at 

http://mojavelinux.com

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, [EMAIL PROTECTED]
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Microsoft's Law of Software Engineering: 
Don't worry if it doesn't work right. 
If everything did, we'd be out of a job.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



Check/uncheck all boxes with JavaScript and DynaValidatorForm property

2003-04-02 Thread Heligon Sandra
I have a JSP page where I have two buttons check all (to check all
checkboxes) and uncheck all.
I know that these features can be implemented with simple JavaScript
but it is not easy to associate
the Javascript with Struts components like DynaValidatorForm.

My JSP page is the following:

logic:iterate name=MyDynaValidatorForm id=employees
property=employeestype=com.Employee
offset=offset length=length
tr
   td bgcolor=#EBEBEB width=10%
input type=checkbox name=selected 
/td
/tr
/logic:iterate

table width=100% border=0 cellpadding=0 cellspacing=0
bgcolor=#ff
  tr
td align=right valign=top width=10% 
  html:button property=userAction
onclick=checkAll(this.MyDynaValidatorForm.selected) 
bean:message key=button.select.all//html:buttonnbsp
  html:button property=userAction
onclick=uncheckAll(this.MyDynaValidatorForm.selected) 
bean:message key=button.unselect.all//html:button 
/td
  tr
/table

script language=JavaScript
function checkAll(field)
{
for (i = 0; i  field.length; i++)
field[i].checked = true ;
}

function uncheckAll(field)
{
for (i = 0; i  field.length; i++)
field[i].checked = false ;
}   
/script

In the Struts-config.xml file I defined the following form:
form-bean name=MyDynaValidatorForm dynamic=true
type=org.apache.struts.validator.DynaValidatorForm
form-property name=userAction type=java.lang.String /
form-property name=selected type=java.lang.Boolean[] /
/form-beans

I don't understand the aim of the attribute property in the
html:button tag.
This implementation doesn't work if someone has already done a
similar think,
thanks a lot for your help.



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/ 



Re: [OT] Re: A bean:define question

2003-04-02 Thread Craig R. McClanahan


On Wed, 2 Apr 2003, Affan Qureshi wrote:

 Date: Wed, 2 Apr 2003 08:36:31 +0500
 From: Affan Qureshi [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: [OT] Re: A bean:define question

 Isn't the scriplet free version more confusing/cryptic than the scriplet
 one? I know we should avoid scriplets 110% in JSPs but what about cases
 where it can save some confusion of five tags to do a simple thing?

 The reason to avoid scriplets is to allow seperation of page designers and
 developers dependancies but the poor page designer won't make much sense out
 of either of them in this case i think and its better to give him one line
 of confusion than 5.

 Intersted to know your comments.


It's not just the page author you should be worrying about -- the page
compiler is affected as well.  Pages with no scriptlets allow the compiler
to create much better executable code (including lifting the 64k limit on
method size that really affects pages with lots of custom tags).

Personally, I prefer the JSTL syntax for stuff like this:

  c:set var=varName value=${requestScope.httpParameter}/

 Regards,
 Affan

Craig

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



ViewFileAction Help

2003-04-02 Thread White, Joshua A (CASD, IT)
Hello all,

I am having a little trouble reading a file off the server and displaying it
to the user for viewing.  I am receiving the following error from explorer:

Internet explorer cannot download ...viewFile.do?fileId=8 from localhost.
Internet explorer was not able to open this internet site.  The requested
site is either unavailable or cannot be done.  Please try again later.

This is some of the code that I am using in my action class:
...
try {

response.setContentType(myFile.getContentType());
response.setContentLength(myFile.getLength());

BufferedOutputStream bos = new
BufferedOutputStream(response.getOutputStream());
FileInputStream fis = new FileInputStream(myFileFile);
byte[] buffer = new byte[1024];
int bytes_read;
while((bytes_read = fis.read(buffer)) != -1) {
bos.write(buffer, 0, bytes_read);
}
fis.close();
bos.close();
}
catch (Exception e) {
getServlet().log(ViewFileAction.executeAction  +
Exception:  + e.getMessage());
System.out.println(ERROR  + e.getMessage());
e.printStackTrace();
throw new SystemException(e);
}
return null;

The contentType and contentLength are being set correctly.  Because there is
nothing to do after writing the file to the browser, I return a null
ActionForward.

Any suggestions here?  Is an action the wrong place to put this code?  I am
hoping to generate a popup with the file displayed in it.

Regards, 

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



[Eva Sager] RE: Does a degree matter?

2003-04-02 Thread Brandon Goodin
What was your age when you went back to school? I am 29 (30 in August). I am
married and have 2 young children (3,6). School seems to be a considerable
financial/time investment. I just want to make sure I am not starting too
late and doing too much for too little a result.

Brandon Goodin


-Original Message-
From: Eva Sager [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:55 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


This brings up a good point...  if all you get out of a degree is learning
specific technology...  in a fast changing world you might get left behind.
If you learn how to learn technology...  if you learn another way of
thinking...  then you just might have something.

My degree is in Computer Engineering and the courses that really taught me
something were the courses that taught me how to solve problems, how to
learn new technologies, and how people and technology relate.  The courses
that taught me about technology X didn't mean a thing, because technology X
isn't even around anymore... or has changed so much that what I learned
isn't relevant anymore.

I guess what I am saying is that it might not be a question of Does a
degree matter?, but What should I be learning? and How can I challenge
myself?.  I don't think that my degree by itself has helped me all that
much...  but the things I learned while getting it were invaluable.

I have worked with many people who become absolutely paralyzed by complex
problems, while getting my degree I learned to deal with these things.  As I
look back, I am not sure how much of it was learned from lecture and books
and how much of it was learned by being thrown into problems and being told
to sink or swim.  In a academic environment, if you sink...  there is
someone there to pull you out and explain to you what you did wrong and how
to deal with it next time.  In a corporate environment you may or may not
have that opportunity...  you may just get fired.

I went to a school with a very challenging curriculum, and I went late in
life, as a full time student with a full time job and a family.  Some of the
most valuable lessons I learned had to do with time management, crisis
management and how to work in an environment where the best you can hope for
is not to fail too miserably due to the resources at hand (or lack there
of).  As I look back...  that has come in quite handy...  probably more so
than I care to admit ;-)




-Original Message-
From: Thornton Scott Contractor CADRE/WGTD
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:11 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


I got my degree in Electrical Engineering. One of my good friends got his
masters degree in Cryptography. There are countless other engineers that got
their degree's in technical fields. I loved EE because it just brought my
brain to a new level of thinking. I am a much better problem solver than I
would have ever been had I not studied EE. It also gave me the confidence
that I could brake apart any problem into sub-problems and then solve each
of those sub-problems. BTW, my boss, who was also a developer before he
became a manager, has a PhD in Mathematics. Therefore, my advice is to study
something technically challenging (and hopefully enjoyable) and learn
software development in your language of choice on the side.

-Original Message-
From: PILGRIM, Peter, FM [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:23 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]

 On Sat, 29 Mar 2003, Arron Bates wrote:

  Date: Sat, 29 Mar 2003 20:36:21 -0600
  From: Arron Bates [EMAIL PROTECTED]
 
  Brandon,
 
  If you can do the deed (which it sounds like you can), I
 would hazard offering
  my opinion in thinking that it wouldn't be the best use of
 your time. By
----

 My personal experience (both for myself and for folks I have
 hired over
 the years) mirrors this -- indeed, my personal opinion is
 that a Comp Sci
 degree is worth less (to me as an employer) than a degree in
 some field
 that is more closely associated with the general needs of potential
 employers.

 Why?  A couple of reasons:

 * Many folks who go for Comp Sci degrees obsess over learning the
   particular technologies being taught in their classes, at
 the expense
   of courses to improve your general thinking skills.  Any specific
   technology you learn in your first year is going to be totally
   obsolete by the time you graduate from the program anyway, so why
   bother?  The important skill to employers (at least from my
 viewpoint)
   is that you've learned how to quickly adapt your existing skills to
   new technologies as they become available.  Also, the fundamentals
   of good architecture and design practices tend to change much more
   slowly than the favorite language de jour -- so if you 

RE: [OT] Re: A bean:define question

2003-04-02 Thread apachep2
I found sometimes it is hard to use one-line JSTL code in a situation
like this

- iterate through a list.
- if odd line, use style oddTableRowStyle
- if even line, use style evenTableRowStyle

e.g.

logic:iterate name=myBean property=myCollection id=myLineItem
TR id=myStyle
TD../TD
/TR
/logic:iterate

How do I fill in this myStyle to serve the above purpose? Just a quiz,
don't take it seriously.

Regards

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: April 2, 2003 12:18 PM
To: Struts Users Mailing List
Subject: Re: [OT] Re: A bean:define question



On Wed, 2 Apr 2003, Affan Qureshi wrote:

 Date: Wed, 2 Apr 2003 08:36:31 +0500
 From: Affan Qureshi [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: [OT] Re: A bean:define question

 Isn't the scriplet free version more confusing/cryptic than the
scriplet
 one? I know we should avoid scriplets 110% in JSPs but what about
cases
 where it can save some confusion of five tags to do a simple thing?

 The reason to avoid scriplets is to allow seperation of page designers
and
 developers dependancies but the poor page designer won't make much
sense out
 of either of them in this case i think and its better to give him one
line
 of confusion than 5.

 Intersted to know your comments.


It's not just the page author you should be worrying about -- the page
compiler is affected as well.  Pages with no scriptlets allow the
compiler
to create much better executable code (including lifting the 64k limit
on
method size that really affects pages with lots of custom tags).

Personally, I prefer the JSTL syntax for stuff like this:

  c:set var=varName value=${requestScope.httpParameter}/

 Regards,
 Affan

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]



RE: HELP: Dispaly Date in a JSP that used Tiles

2003-04-02 Thread Heligon Sandra

Here is the result of my page when I do view source:

html lang=en
head
  titleLogin page/title
/head

body bgcolor=#ff text=#00 link=#023264 alink=#023264
vlink=#023264
table border=0 width=100% cellspacing=0 cellpadding=0
 tr
form name=dateForm
table border=0 width=100% cellspacing=0
cellpadding=0
  tr
td width=40  align=leftProduct version:1.0/td
td width=80% align=right
  noscriptThis page needs JavaScript!/noscript
  span id=dateControl/span
  script src=./scripts/clock.js/script 
  scriptaff_heure();/script
/td
  /tr
/table
/form
 /tr
 tr
td valign=top  align=center
  
form name=loginForm method=post action=/login.do
table bgcolor=#FF align=center cellspacing=0
cellpadding=4 border=0width=100%
tr valign=top align=left
  td align=center width=30%bUsername/b/td
td align=left   width=30%input type=text
name=userName value=   /td
td width=40%/td
/tr
  tr valign=top align=left
td align=center width=30%bPassword/b
/td
  td align=left   width=30%input type=password
name=password value=nbsp
   input type=submit value=Login
/td
  td width=40%/td
  /tr
  /table
/form
/td
/tr
/table

/body
/html

The JavaScript (clock.js file) used is the following:

function aff_heure(){
  var d=new Date();
  var weekdays=new 
 
Array(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
);
  var monthname=new 
 
Array(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
);
  var weekday=weekdays[d.getDay()];
  var date = d.getDate();
  var month = monthname[d.getMonth()];
  var year = d.getFullYear();
  var hour = d.getHours();
  var minute = d.getMinutes();
  var second = d.getSeconds();
 
  var time = new String(weekday +   + date
  + . + month +   + year
  + ,  + hour + : + minute
  + : + second);

  //document.dateForm.dateControl.value=time;
  //This instruction allows to display date like a lable and not a field
that can
  //be edited. But it dosen't work very well.
  document.getElementById(dateControl).innerHTML=time;
  setTimeout(aff_heure(),100);
}

The date can not be modified by the user but some control like the button
login flickers.





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: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 17:36
To: Struts Users Mailing List
Subject: Re: HELP: Dispaly Date in a JSP that used Tiles


I'm not sure what you mean.  Perhaps if you e-mail me your code I could 
take a quick look at it.

Gareth.

Heligon Sandra wrote:

Your Javascript/DHTML knowledge knowledge is very good, your code
allows to display the date like a text and not like a field that
can be edited.
But I have yet a problem, with this code some controls (not all)
of my form do not stop moving.
what is this has?  
contrary to you my JavaScript knowledge is really basic. 
  
Thanks in advance


  

  



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


Re: Page Iteration

2003-04-02 Thread Michael C. Lee Jr.
These are database specific and probably won't work anyway for queries that
require things such as order by, etc.
In JDBC there is a call setMaxRows() that limits the total set of data
returned from the database. Unfortuantely, the full query is performed but
DB optimizations of that sort should be done by the DBA using a query
analyzer type tool.
Michael Lee

- Original Message -
From: Jacob Hookom [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:25 AM
Subject: RE: Page Iteration


If the data is coming from the DB, you should NOT pull down all the data and
slap it in their session for paging.  It's a waste of resources, especially
if they found what they wanted on the first page.

A better solution would be to use DB -specific bounding of the results
returned, like MySql's LIMIT on SELECT queries (btw, google uses MySql).  By
bounding the data returned from the DB in the first place, you just return
all objects received in the scope of the SELECT statement to the page.

If you aren't pulling from the DB, look at JSTL under Taglibs-Standard at
Jakarta's web site.  Their demo war for JSTL goes over scoped iteration.

-Jacob

| -Original Message-
| From: Brian McSweeney [mailto:[EMAIL PROTECTED]
| Sent: Wednesday, April 02, 2003 10:13 AM
| To: Struts Users Mailing List
| Subject: Page Iteration
|
| Hi all,
|
| I want to iterate over a collection and display a certain amount of items
| per page and list all the
| further pages available (just like on google).
|
| I presume this is a feature that  has been added a million times.
|
| Did a quick search on the list and I see that use of the iterator with
| parameter offset can be used.
| Is this the general approach people would recommend?
|
| Any good resources on showing how to do it?
| cheers,
| Brian


-
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: [OT] Re: A bean:define question

2003-04-02 Thread David Graham
You should be using a table row tag to perform that logic.

David



From: apachep2 [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: [OT] Re: A bean:define question
Date: Wed, 2 Apr 2003 12:32:05 -0500
I found sometimes it is hard to use one-line JSTL code in a situation
like this
- iterate through a list.
- if odd line, use style oddTableRowStyle
- if even line, use style evenTableRowStyle
e.g.

logic:iterate name=myBean property=myCollection id=myLineItem
TR id=myStyle
TD../TD
/TR
/logic:iterate
How do I fill in this myStyle to serve the above purpose? Just a quiz,
don't take it seriously.
Regards

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
Sent: April 2, 2003 12:18 PM
To: Struts Users Mailing List
Subject: Re: [OT] Re: A bean:define question


On Wed, 2 Apr 2003, Affan Qureshi wrote:

 Date: Wed, 2 Apr 2003 08:36:31 +0500
 From: Affan Qureshi [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: [OT] Re: A bean:define question

 Isn't the scriplet free version more confusing/cryptic than the
scriplet
 one? I know we should avoid scriplets 110% in JSPs but what about
cases
 where it can save some confusion of five tags to do a simple thing?

 The reason to avoid scriplets is to allow seperation of page designers
and
 developers dependancies but the poor page designer won't make much
sense out
 of either of them in this case i think and its better to give him one
line
 of confusion than 5.

 Intersted to know your comments.

It's not just the page author you should be worrying about -- the page
compiler is affected as well.  Pages with no scriptlets allow the
compiler
to create much better executable code (including lifting the 64k limit
on
method size that really affects pages with lots of custom tags).
Personally, I prefer the JSTL syntax for stuff like this:

  c:set var=varName value=${requestScope.httpParameter}/

 Regards,
 Affan
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]


_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

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


Re: Page Iteration

2003-04-02 Thread Ashish Kulkarni
Hi ,
I am using a pager taglib which can be used on any
scrollable object like collection etc
I have also written a small HOWTO u can visit 
http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html

and try to use it

Anyone else using this taglib can u please verify and
let me know if i am missing some thing 

Ashish

--- Brian McSweeney [EMAIL PROTECTED]
wrote:
 Hi all,
 
 I want to iterate over a collection and display a
 certain amount of items per page and list all the 
 further pages available (just like on google).
 
 I presume this is a feature that  has been added a
 million times. 
 
 Did a quick search on the list and I see that use of
 the iterator with parameter offset can be used. 
 Is this the general approach people would recommend?
 
 Any good resources on showing how to do it?
 cheers,
 Brian
 


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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



Re: DynaForms perfomance

2003-04-02 Thread Craig R. McClanahan


On Wed, 2 Apr 2003, Guido wrote:

 Date: Wed, 02 Apr 2003 12:20:41 +0200
 From: Guido [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: DynaForms perfomance

 Is there any perfomance comparation DynaActionForms vs ActionForms?
 What is the penalty of using Dyna ones (perfomance and other drawbacks)?


Examining the source :-) will tell you that DynaActionForm uses a HashMap
to store the current values of all the properties, so the getters and
setters do take a little longer to run that getters and setters that just
refer to an instance variable of the bean class.

However, this is pretty unlikely to have any practical impact on response
time of a web application.  Nearly always, the database is the biggest
consumer of time, and the network is second -- the difference we are
talking about is a tiny amount of CPU time, and adding CPU capacity to an
app is generally pretty cheap.  Usually *lots* cheaper than paying your
developers the extra hours it takes to build the standard form beans.

 Thank you,
 Guido.

Craig

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



RE: [Eva Sager] RE: Does a degree matter?

2003-04-02 Thread Robert Taylor
Brandon, I was 29, married, and with a new born when I went back to school
in
1993. I finally graduated in 1999 with a B.A. in CS (Magna Cum Laude).
I worked a full time job, did web development on the side, and took classes
part time. I had to make some sacrifices, but it was worth it in the end.
It opened many windows of opportunity that had be closed.

It appears you have the experience, you just lack the all-important degree
(paper).

Good luck!

robert

-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 12:25 PM
To: Struts Users Mailing List
Subject: [Eva Sager] RE: Does a degree matter?


What was your age when you went back to school? I am 29 (30 in August). I am
married and have 2 young children (3,6). School seems to be a considerable
financial/time investment. I just want to make sure I am not starting too
late and doing too much for too little a result.

Brandon Goodin


-Original Message-
From: Eva Sager [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:55 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


This brings up a good point...  if all you get out of a degree is learning
specific technology...  in a fast changing world you might get left behind.
If you learn how to learn technology...  if you learn another way of
thinking...  then you just might have something.

My degree is in Computer Engineering and the courses that really taught me
something were the courses that taught me how to solve problems, how to
learn new technologies, and how people and technology relate.  The courses
that taught me about technology X didn't mean a thing, because technology X
isn't even around anymore... or has changed so much that what I learned
isn't relevant anymore.

I guess what I am saying is that it might not be a question of Does a
degree matter?, but What should I be learning? and How can I challenge
myself?.  I don't think that my degree by itself has helped me all that
much...  but the things I learned while getting it were invaluable.

I have worked with many people who become absolutely paralyzed by complex
problems, while getting my degree I learned to deal with these things.  As I
look back, I am not sure how much of it was learned from lecture and books
and how much of it was learned by being thrown into problems and being told
to sink or swim.  In a academic environment, if you sink...  there is
someone there to pull you out and explain to you what you did wrong and how
to deal with it next time.  In a corporate environment you may or may not
have that opportunity...  you may just get fired.

I went to a school with a very challenging curriculum, and I went late in
life, as a full time student with a full time job and a family.  Some of the
most valuable lessons I learned had to do with time management, crisis
management and how to work in an environment where the best you can hope for
is not to fail too miserably due to the resources at hand (or lack there
of).  As I look back...  that has come in quite handy...  probably more so
than I care to admit ;-)




-Original Message-
From: Thornton Scott Contractor CADRE/WGTD
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:11 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


I got my degree in Electrical Engineering. One of my good friends got his
masters degree in Cryptography. There are countless other engineers that got
their degree's in technical fields. I loved EE because it just brought my
brain to a new level of thinking. I am a much better problem solver than I
would have ever been had I not studied EE. It also gave me the confidence
that I could brake apart any problem into sub-problems and then solve each
of those sub-problems. BTW, my boss, who was also a developer before he
became a manager, has a PhD in Mathematics. Therefore, my advice is to study
something technically challenging (and hopefully enjoyable) and learn
software development in your language of choice on the side.

-Original Message-
From: PILGRIM, Peter, FM [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:23 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]

 On Sat, 29 Mar 2003, Arron Bates wrote:

  Date: Sat, 29 Mar 2003 20:36:21 -0600
  From: Arron Bates [EMAIL PROTECTED]
 
  Brandon,
 
  If you can do the deed (which it sounds like you can), I
 would hazard offering
  my opinion in thinking that it wouldn't be the best use of
 your time. By
----

 My personal experience (both for myself and for folks I have
 hired over
 the years) mirrors this -- indeed, my personal opinion is
 that a Comp Sci
 degree is worth less (to me as an employer) than a degree in
 some field
 that is more closely associated with the general needs of potential
 employers.

 Why?  A couple of reasons:

 * Many folks who go for Comp 

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

2003-04-02 Thread Igor Shabalov
	The scripting language in Exadel is Java. In general, we use similar 
technique to JSP. We generate code on-the-fly, compile and execute it. That 
gives really nice feeling, when you work with Exadel  it feels like VB. 
Developers begin to use typical VB scenario  write something, try it, fix 
it, try more etc. 	If anybody has some interest in our ideas  feel free to 
download trial version of Exadel from here:
http://www.exadel.com/products_webflowengine.htm
You can try to get this feeling, and this is NOT commercial! I really think 
that some ideas from Exadel can be incorporated into Struts and Struts will 
benefit from it!
	I can put my dream list here:
	-well defined sub-modules, module context to store module-local data, 
explicit definitions of module interfaces. (all this exists in Exadel)
	-abstract software interface to modules, free from binding to web, ability 
to reuse modules from outside  using WSDL and Java interfaces (exists in 
Exadel)
	-use compile-on-the-fly technique for action definitions (exists in 
Exadel)
	-debugger interface, step-by-step execution on action-page level, data 
introspection in contexts, introspection of data goes to/from pages and 
actions (exists in Exadel)
	-GUI tool to support all this  otherwise all this does not make a lot of 
cense.
	
	Once again, do not treat this like commercial, I do not have an intention 
to offend anybody, I just put there my dream list based on my previous 
experience, what can help me a lot with my next project.

	BTW, Im talking about 4 version of Exadel. And there was 1-st, 2-nd and 
3-rd. We actually had Java Script and XSL scripting languages in previous 
version of Exadel, but we decide to drop it  because nobody needs it.

Best regards,
Igor.
On Wed, 2 Apr 2003 06:52:21 -0500, Edgar Dollin [EMAIL PROTECTED] 
wrote:

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 

RE: message resouce bundle in validator

2003-04-02 Thread Bhagia, Mahesh
Thanks Navjot,

Actually I did work around by using default application.properties for
validator and my application refers to KEY based bundle.
only some enteries will be duplicate in both files, which can be easily
removed when Struts team comes up with bundle parameter in validator.xml.

Mahesh

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 12:03 AM
To: Struts Users List
Subject: Re: message resouce bundle in validator [adr][adr]


 hi mahesh,

i am aware of this problem but we can't call it a bug. May be a shortcoming
that might be solved in the coming release.

if you wish to change on your own. You need to look into
commons-validator.jar.

HTH
-navjot

- Original Message -
From: Bhagia, Mahesh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 8:28 PM
Subject: message resouce bundle in validator


|
| Hello Navjot,
|
| This message(from struts-user-forum) is regarding specifying message
| resource bundle in validator.xml
|
| Struts 1.1-b2
|
| I have multiple resource files for my application defined in
| struts-config.xml:
| message-resources parameter=com.myco.myapp.ApplicationResources
| null=false/
| message-resources key=myapp.module
| parameter=com.myco.myapp.module.RmaResources null=false/
|
| Then in my JSPs I reference:
| bean:message key=mykey1 /
| bean:message bundle=myapp.module key=mykey2 /
|
| This all works fine.
|
| I am now trying to add in validation on the form. Here is my
validation.xml:
| field property=partNumber depends=required
| arg0 key=label.partNumber /
| /field
| field property=faultDescription depends=required
| arg0 bundle=myapp.module key=faultDescription.title /
| /field
|
| The partNumber arg0 is in the default ApplicationResources.properties
| file and displays correctly. However the faultDescription error message
is
| not correct it returns:
| ???en.faultDescription.title??? is required.
|
| By looking at the validation_1_1.dtd I can see that the arg0 attribute
takes
| only three parameters:
| name
| key
| resource
|
| none of which is bundle. Can the validator handle multiple resources? Is
| this a bug?
|
|
| Do you know how / where,  we need to change framework for this to work?,
|
| Thanks
| Mahesh Bhagia
|
|
|


-
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: [Eva Sager] RE: Does a degree matter?

2003-04-02 Thread Eva Sager
I was 29 when I started at Georgia Tech...  married, two kids(1 when I
started and had the other in my first year).  But I also had little
experience in the field and was looking to start over...  I had to start
somewhere, so that is how I choose to start.  It was a tremendous amount of
work, and there were many times that I didn't feel like I could possibly
finish, but I did, and I am a better person for it.  I also have a
wonderfully understanding husband who shouldered a lot of the load.  I met
many people  who profoundly effected my career while at school(hey,
networking is networking) and have been told by many potential employers
(paraphrased) Hey, if you can manage a full time job, school full time, and
a family...  I think you can handle our project.  I was really surprised at
how impressed people were in that fact.  I can't stress enough though... it
was a tremendous amount of work.  At the time it seemed like the best
option, and if I had to do it all over again, I would do it in a heart beat.




-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 12:25 PM
To: Struts Users Mailing List
Subject: [Eva Sager] RE: Does a degree matter?


What was your age when you went back to school? I am 29 (30 in August). I am
married and have 2 young children (3,6). School seems to be a considerable
financial/time investment. I just want to make sure I am not starting too
late and doing too much for too little a result.

Brandon Goodin


-Original Message-
From: Eva Sager [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:55 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


This brings up a good point...  if all you get out of a degree is learning
specific technology...  in a fast changing world you might get left behind.
If you learn how to learn technology...  if you learn another way of
thinking...  then you just might have something.

My degree is in Computer Engineering and the courses that really taught me
something were the courses that taught me how to solve problems, how to
learn new technologies, and how people and technology relate.  The courses
that taught me about technology X didn't mean a thing, because technology X
isn't even around anymore... or has changed so much that what I learned
isn't relevant anymore.

I guess what I am saying is that it might not be a question of Does a
degree matter?, but What should I be learning? and How can I challenge
myself?.  I don't think that my degree by itself has helped me all that
much...  but the things I learned while getting it were invaluable.

I have worked with many people who become absolutely paralyzed by complex
problems, while getting my degree I learned to deal with these things.  As I
look back, I am not sure how much of it was learned from lecture and books
and how much of it was learned by being thrown into problems and being told
to sink or swim.  In a academic environment, if you sink...  there is
someone there to pull you out and explain to you what you did wrong and how
to deal with it next time.  In a corporate environment you may or may not
have that opportunity...  you may just get fired.

I went to a school with a very challenging curriculum, and I went late in
life, as a full time student with a full time job and a family.  Some of the
most valuable lessons I learned had to do with time management, crisis
management and how to work in an environment where the best you can hope for
is not to fail too miserably due to the resources at hand (or lack there
of).  As I look back...  that has come in quite handy...  probably more so
than I care to admit ;-)




-Original Message-
From: Thornton Scott Contractor CADRE/WGTD
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:11 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


I got my degree in Electrical Engineering. One of my good friends got his
masters degree in Cryptography. There are countless other engineers that got
their degree's in technical fields. I loved EE because it just brought my
brain to a new level of thinking. I am a much better problem solver than I
would have ever been had I not studied EE. It also gave me the confidence
that I could brake apart any problem into sub-problems and then solve each
of those sub-problems. BTW, my boss, who was also a developer before he
became a manager, has a PhD in Mathematics. Therefore, my advice is to study
something technically challenging (and hopefully enjoyable) and learn
software development in your language of choice on the side.

-Original Message-
From: PILGRIM, Peter, FM [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:23 AM
To: 'Struts Users Mailing List'
Subject: RE: Does a degree matter?


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]

 On Sat, 29 Mar 2003, Arron Bates wrote:

  Date: Sat, 29 Mar 2003 20:36:21 -0600
  From: Arron Bates [EMAIL 

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

2003-04-02 Thread Igor Shabalov
	When we did it we also think only about our project goals. I realize, that 
we actually use multi-layer controller architecture after we did it. It 
comes naturally to the following:

[web layer] - nothing special, just JSP with some custom tags, web 
developer
|
|
[web controller layer] - used to implement all page flow logic, validations 
and data transformations, calls modules from business controller layer, web 
developer
|
|
[business controller layer] - used to implement coarse business 
functions, like put bid on the sit etc., uses same flow engine, like web 
controller, calls business object layer, business developer
|
|
[business objects layer]  used to implement business objects and fine 
grained functions, like create record in history or set company address 
etc, use Java and JDO for implementation, business developer.

This is simplistic, but close to reality picture. You see, there is two 
controller layers between JSP (view) and Java (model). It provides normal 
controller function  data transformation and functional calls 
aggregation. Business controller layer used to define business 
meaningful functions by combining elements of calls to model layer and 
some peaces of code; it is also responsible for transaction handling.
We have two developers in team  I call them web developer and business 
developer and such division is very natural for our team.

Best regards,
Igor.
http://www.exadel.com
http://www.exadel.com/products_strutsstudio.htm
On Wed, 2 Apr 2003 17:29:29 +0530, Navjot Singh [EMAIL PROTECTED] 
wrote:

hi igor and list,

This is little bit off the Struts but now it seems to framework 
discussion
so i can put in my 2 cents

the *process context* in exadel reminds me that i had built exactly 
similar
stuff  (2-3 years ago in PERL ;-)
where i have the similar sub layers in controller
+ presentation ( rendering and validation )  (could be plain wml / html /
any other ML using xslt )
+ business ( with support to work over n/w as well using calls to 
daemons)

but i didn't know that i can call them controller / models or blah blah 
...
:-)

but here we talk about Java where Struts is not bad and surely will 
improve
day by day

-navjot

- Original Message -
From: Edgar Dollin [EMAIL PROTECTED]
To: 'Igor Shabalov' [EMAIL PROTECTED]; 'Struts Users Mailing
List' [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 5:22 PM
Subject: RE: Is Strut too primitive for really useful Controller 
function?

| 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 

[Validator] Correct DTD?

2003-04-02 Thread Jerry Jalenak
In the latest nightly build I noticed that both of the validator DTD's are
marked as deprecated.  Is there a new DTD to use?

Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at the following email 
address: [EMAIL PROTECTED]



-
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 Igor Shabalov
	No, it is not violating MVC design. This is some sort of MVCC design with 
two layers of controller  one to implement complex View-specific functions 
(page flow, data validation, data transformation) and another one to 
implement Model-specific functions (data flow, transactions handling, 
function aggregation). 	That gives you more flexibility in both sides. That 
gives you ability to reuse business functions on more coarse level.
	In general, your implementation technology does not matter from 
architectural point of view. But whole point of my original post was  yes, 
Struts is not suitable for such design, because it is too much coupled to 
web and Servlet container. I was talking about another controller 
framework  Exadel.

Best regards,
Igor.
http://www.exadel.com
http://www.exadel.com/products_strutsstudio.htm
On Wed, 02 Apr 2003 07:57:50 -0700, David Graham [EMAIL PROTECTED] 
wrote:

IMO, implementing business logic in the controller violates MVC 
principles.  The Struts controller handles page flow by calling Actions.  
Your actions invoke methods on your business layer.  By putting business 
logic in the controller you can't reuse it outside of that framework.  If 
I were interested in writing non-reusable code I'd use Perl ;-).

David



From: Edgar Dollin [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Igor Shabalov' [EMAIL PROTECTED], 'Struts Users Mailing 
List' [EMAIL PROTECTED]
Subject: RE: Is Strut too primitive for really useful Controller 
function?
Date: Wed, 2 Apr 2003 06:52:21 -0500

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 

using Oracle OC4J and struts, ram usage

2003-04-02 Thread Ruth Butlin
Does anyone out there using struts and the Oracle container OC4J find that 
their applications are consuming large amounts of RAM? We're running the 
memory profiler on our application and the footprint of each struts 
applications is taking up 40mb of RAM. We're running the standalone 9.03 
container, and using struts 1.1b.

Ruth

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


Default Values from a Database

2003-04-02 Thread kpullin
I've got the requirement to populate default values in the JSP page's form
attributes from a database.  I thought I heard a while back that several
people were working on doing this already.  Just seeing if anyone has
extended Struts to already provide this functionality??

Thanks

Ken



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



Re: [Validator] Correct DTD?

2003-04-02 Thread David Graham
I believe they point you to the dtd to use in the deprecation warning.
If not, it's the commons-validator dtd.
David


From: Jerry Jalenak [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: [Validator] Correct DTD?
Date: Wed, 2 Apr 2003 12:50:26 -0600
In the latest nightly build I noticed that both of the validator DTD's are
marked as deprecated.  Is there a new DTD to use?
Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496
[EMAIL PROTECTED]

This transmission (and any information attached to it) may be confidential 
and is intended solely for the use of the individual or entity to which it 
is addressed. If you are not the intended recipient or the person 
responsible for delivering the transmission to the intended recipient, be 
advised that you have received this transmission in error and that any use, 
dissemination, forwarding, printing, or copying of this information is 
strictly prohibited. If you have received this transmission in error, 
please immediately notify LabOne at the following email address: 
[EMAIL PROTECTED]



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


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: using Oracle OC4J and struts, ram usage

2003-04-02 Thread David Graham
Do you have many Tiles definitions?  There is a known issue with Tiles 
consuming a lot of memory.

David



From: Ruth Butlin [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: using Oracle OC4J and struts, ram usage
Date: Wed, 02 Apr 2003 14:13:05 -0500
Does anyone out there using struts and the Oracle container OC4J find that 
their applications are consuming large amounts of RAM? We're running the 
memory profiler on our application and the footprint of each struts 
applications is taking up 40mb of RAM. We're running the standalone 9.03 
container, and using struts 1.1b.

Ruth

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


_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

-
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 David Graham
You're extra C is more commonly referred to as a Session Facade or 
Business Delegate.
http://developer.java.sun.com/developer/restricted/patterns/J2EEPatternsAtAGlance.html

Saying, [Struts] is too much coupled to web and Servlet container implies 
a criticism.  Struts is a *web* tier MVC framework and makes no apologies 
about being tied to the Servlet API.  Your business controller sits behind 
Struts' Actions and handles business logic so the frameworks should be 
complementary.



David


From: Igor Shabalov [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Is Strut too primitive for really useful Controller function?
Date: Wed, 02 Apr 2003 10:54:43 -0800
	No, it is not violating MVC design. This is some sort of MVCC design with 
two layers of controller â?? one to implement complex View-specific 
functions (page flow, data validation, data transformation) and another one 
to implement Model-specific functions (data flow, transactions handling, 
function aggregation). 	That gives you more flexibility in both sides. That 
gives you ability to reuse â??business functionsâ?? on more â??coarseâ?? 
level.
	In general, your implementation technology does not matter from 
architectural point of view. But whole point of my original post was â?? 
yes, Struts is not suitable for such design, because it is too much coupled 
to web and Servlet container. I was talking about another â??controller 
frameworkâ?? â?? Exadel.

Best regards,
Igor.
http://www.exadel.com
http://www.exadel.com/products_strutsstudio.htm
On Wed, 02 Apr 2003 07:57:50 -0700, David Graham [EMAIL PROTECTED] 
wrote:

IMO, implementing business logic in the controller violates MVC 
principles.  The Struts controller handles page flow by calling Actions.  
Your actions invoke methods on your business layer.  By putting business 
logic in the controller you can't reuse it outside of that framework.  If 
I were interested in writing non-reusable code I'd use Perl ;-).

David



From: Edgar Dollin [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Igor Shabalov' [EMAIL PROTECTED], 'Struts Users Mailing 
List' [EMAIL PROTECTED]
Subject: RE: Is Strut too primitive for really useful Controller 
function?
Date: Wed, 2 Apr 2003 06:52:21 -0500

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 

  1   2   >