connecting to mssql from struts

2005-12-02 Thread Stanislav
I manage to set up realm inside jboss (tomcat) for mssql, but i have problem 
with
inserting/selecting data from db.

I put this code into struts-config:

data-sources
  data-source type=org.apache.commons.dbcp.BasicDataSource
 set-property property=driverClassName
value=com.microsoft.jdbc.sqlserver.SQLServerDriver /
 set-property property=url
value=jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=WorkFlow /
 set-property property=username value=sa /
 set-property property=password value= /
 set-property property=maxActive value=10 /
 set-property property=maxWait value=5000 /
 set-property property=defaultAutoCommit value=false /
 set-property property=defaultReadOnly value=false /
  /data-source
/data-sources


and this code into some action:

Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
ResultSet rs2 = null;

DataSource dataSource =
(DataSource)servlet.getServletContext().getAttribute(org.apache.struts.action.DATA_SOURCE);
try {
   conn = dataSource.getConnection();
   stmt = conn.createStatement();
   int id = 0;
   rs = stmt.executeQuery(select max(id) as counter from owner);
   while(rs.next()){
  id = rs.getInt(counter);
   }
   id += 1;
   stmt.executeUpdate(insert into owner values( + id + , ' + rere 
+ ', ' + name + ', '
+ šđč枊ĐČĆŽ + ', ' + adresa + ',  + 10 + ));
   rs.close();
   stmt.close();
   conn.close();
}
catch(SQLException e){
throw new SQLException(database error);
}

This part of code (in action class) perfectly works for mysql, but here i get 
error Unhandled
exception type SQLException.

What is wrong?

Tnx, Stanislav

PS: I didnt change anything in other files and everything works with mysql.

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



[Shale] Clay - Not serving .css and .png

2005-12-02 Thread hermod.opstvedt
Hi

I my continued persuit of Shale and Clay and have now started to apply my 
standard style (lquid) to the template application. What I discovered was that 
Clay will not serve .css files. I noticed in Geeta's ShaleNShark1 demo that the 
style sheet was named .html. So I renamed my stylesheet to .html and the 
style's where applied, with 1 exception: my .png files. They did not appear.

I noticed that in the log I got (when named .html):
02.des.2005 09:04:58 org.apache.shale.faces.ShaleViewHandler setupViewController
WARNING: No ViewController for viewId /theme/styles.xml found under name 
theme$styles
02.des.2005 09:04:58 org.apache.shale.clay.faces.ClayViewHandler renderView
INFO: Clay template renderView for /theme/styles.xml

I have in my chain-config file:

command 
className=org.apache.shale.clay.config.beans.ConfigDefinitionsWatchdogFilter

includes=\S*\.faces,\S*\.html,/index\.jsp,\S*\.xml /

command className=org.apache.shale.application.ContextRelativePathFilter

includes=\S*\.xml,\S*\.faces,\S*\.html,\S*\.gif,\S*\.css,\S*\.png,\S*\.jpg,/index\.jsp
excludes=\S*\.jsp,\S*\.jspf /

So it should allow access to it. I have not had the time to investigate into 
why this is happening, but since Geeta obviously hit this I thought maybe 
someone had an answer.

Hermod


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



SV: Re: SV: Re: checkbox for nested collection

2005-12-02 Thread Per Jørgen Walstrøm
thank you for your answer. I think I know the request processing life-cycle, 
but what I apparently do not know, is how to map those checkboxes... The thing 
is that the restrictive-property is a direct mapping to the database; I do 
actually have a column called restrictive, which contains boolean values. So 
when I iterate over my collection geSectionComponents, what I really do is to 
lazily fetch the values from the database. I do not have an intermediate 
representation of those values in my form. So I do not know how to reset those 
values _without changing the actual values_.

nested:iterate id=sectionComponent property=geSectionComponents
  nested:checkbox property=restrictive/
/nested:iterate

I am not sure how to go about to do this, but it seems to me that I might need 
some intermediate values in my form and that I have to set the 
sectionComponent.restrictive values manually, based on the intermediate values. 
It just seems like an unnecessary extra step...

cheers,
pj

-Opprinnelig melding-
Fra: Laurie Harper [mailto:[EMAIL PROTECTED] 
Sendt: 1. desember 2005 19:44
Til: user@struts.apache.org
Emne: Re: SV: Re: checkbox for nested collection

The trick is understanding the request processing life-cycle. The following is 
the sequence of events:

   - Struts either instantiates the action form or, if you use session
 scoped forms and one already exists, retrieves it from the session

   - Struts calls reset() on the form (I *think* in all cases, but it
 may only do this when retrieving a form from session scope)

   - if this request is a form submit, the form data is stored into
 the form bean

   - Struts calls your action, passing in the form bean

   - In your pre-populate action, you would set the boolean properties
 in the form ready for display; in your form processing action, you
 would read their state reflecting the request data

   - You return a forward mapping that Struts uses to render the next
 view

So, you set everything to false in reset(); *after* that, your setup action 
gets the opportunity to set the properties as appropriate for display. On the 
next request, when the form is submitted, reset() is called which clears the 
boolean properties and then they're updated based on the form data.

L.

Per Jørgen Walstrøm wrote:
 hello,
 you are right, I do have access to the POJO and the properties and I am able 
 to pre-populate the form. However, the checkboxes are rendered dynamically in 
 the jsp from the getRestrictive() method of my GeSectionComponent. I can't 
 really set them all to false beforehand, because then they would not be 
 populated right, I guess... Don't know if I'm making myself clear, but I 
 can't see how I can reset my checkboxes without resetting the actual 
 properties. Should I try to use a multibox with an array of dynamic size 
 (i.e. a size which depends on the size of the geSectionComponents-Collection)?
 
 /pj
 
 -Opprinnelig melding-
 Fra: Laurie Harper [mailto:[EMAIL PROTECTED]
 Sendt: 1. desember 2005 00:03
 Til: user@struts.apache.org
 Emne: Re: checkbox for nested collection
 
 Per Jørgen Walstrøm wrote:
 hello,
 I have the following code in my jsp:

 nested:iterate id=sectionComponent property=geSectionComponents
   nested:checkbox property=restrictive/ /nested:iterate

 my Collection geSectionComponents contains objects of type 
 GeSectionComponent

 GeSectionComponent.java (an auto-generated Hibernate POJO), contains the 
 following field (with getter and setter):
 private Boolean restrictive;

 How do I go about to make sure Struts detects when I uncheck a checkbox? I 
 am aware of that I should set all corresponding boolean properties to false 
 in the reset()-method, but in this case I do not have any direct access to 
 those properties.

 any suggestions?
 
 What do you mean you don't have any direct access to those properties? 
 You must be creating a reference to that object (or retrieving one through 
 Hibernate) somewhere in your code. Assuming you're storing the POJO in your 
 form bean as part of pre-population, you can then access it in your reset() 
 method.
 
 L.
 
 
 
 
 -
 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: [Shale] Clay - Not serving .css and .png

2005-12-02 Thread hermod.opstvedt
Hi

Part 2:

If I try to access the resource directly, it just prints out the URI. If I 
comment out ClayViewHandlerCommand from chain-config, it still does it so I am 
at a loss as to what is going on here.

Hermod

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, December 02, 2005 9:24 AM
To: user@struts.apache.org
Subject: [Shale] Clay - Not serving .css and .png


Hi

I my continued persuit of Shale and Clay and have now started to apply my 
standard style (lquid) to the template application. What I discovered was that 
Clay will not serve .css files. I noticed in Geeta's ShaleNShark1 demo that the 
style sheet was named .html. So I renamed my stylesheet to .html and the 
style's where applied, with 1 exception: my .png files. They did not appear.

I noticed that in the log I got (when named .html):
02.des.2005 09:04:58 org.apache.shale.faces.ShaleViewHandler setupViewController
WARNING: No ViewController for viewId /theme/styles.xml found under name 
theme$styles
02.des.2005 09:04:58 org.apache.shale.clay.faces.ClayViewHandler renderView
INFO: Clay template renderView for /theme/styles.xml

I have in my chain-config file:

command 
className=org.apache.shale.clay.config.beans.ConfigDefinitionsWatchdogFilter

includes=\S*\.faces,\S*\.html,/index\.jsp,\S*\.xml /

command className=org.apache.shale.application.ContextRelativePathFilter

includes=\S*\.xml,\S*\.faces,\S*\.html,\S*\.gif,\S*\.css,\S*\.png,\S*\.jpg,/index\.jsp
excludes=\S*\.jsp,\S*\.jspf /

So it should allow access to it. I have not had the time to investigate into 
why this is happening, but since Geeta obviously hit this I thought maybe 
someone had an answer.

Hermod


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


-
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: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread netsql

in CoR so it could be ported to Shale and others :-) ?
.V



Ted Husted wrote:
 and a iBATIS JPetShop port would be next. Film at 11. :)






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



Re: connecting to mssql from struts

2005-12-02 Thread Robin Clarke
 set-property property=url
 value=jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=WorkFlow /

Your URL does not look like a correct MySQL URL. It should look something like:

jdbc:mysql://[host][,failoverhost...][:port]/[database]

http://dev.mysql.com/doc/refman/5.1/en/cj-configuration-properties.html

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



re: connecting to mssql from struts

2005-12-02 Thread Stanislav
 I manage to set up realm inside jboss (tomcat) for mssql, but i have problem 
 with
 inserting/selecting data from db.
 
...

I figure it out..

Wrong SQL Exceptio, and missing comit();

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



Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Ted Husted
On 12/2/05, Michael Jouravlev [EMAIL PROTECTED] wrote:
 Struts died long live Struts?

Yes. The ASF envisions that our projects can have livespans counted by
decades. Not months, not years. Decades. No one expects a project to
retain the same codebase year after year, decade after decade.

As Craig mentioned, Struts 1.3.0 is not Struts 0.5. We've steadily
evolved the API. Today, you can't run a Struts 0.5  application under
Struts 1.3.0 without making a wad of changes. Witness the war stories
from people trying to move from Struts 1.0 to 1.3 in a fell swoop.

Neither is Java 5, Java 1. Java 1 is not dead. It lives on in Tiger.

WebWork is not a foreign codebase. WebWork is a Struts revolution that
Richard Oberg started back at the beginning. Now, the time has come to
merge the revolution back into the trunk, as contemplated by the Rules
for Revolutionaries.

* http://incubator.apache.org/learn/rules-for-revolutionaries.html

Seeing the writing on the wall, Erik Hatcher suggested that we merge
with WebWork2 back in August 2003. We're just finally getting around
to following Erik's advice. :)

* http://tinyurl.com/at2ln

Realistically, if we did continue with the improvements we have
planned for Struts 1.x, we would end up with WebWork. That's the
truth, plain and simple. We're just cutting to the chase, so we can
get on with what's important: Shipping our own applications and making
development lighter, faster, and easier in the process.

I'm just finishing up some new acceptance tests for MailReader using
WebTest, and I should be able to get started on a WebWork MailReader
tonight, which I think will open some eyes.

-Ted.

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



Re: connecting to mssql from struts

2005-12-02 Thread Stanislav
  set-property property=url
  value=jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=WorkFlow /
 
 Your URL does not look like a correct MySQL URL. It should look something 
 like:
 
 jdbc:mysql://[host][,failoverhost...][:port]/[database]
 
 http://dev.mysql.com/doc/refman/5.1/en/cj-configuration-properties.html

:-) That's OK because I'm using MSSQL.

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



RE: [Shale] Clay - Not serving .css and .png

2005-12-02 Thread Gary VanMatre
 Hi 
 
 Part 2: 
 
 If I try to access the resource directly, it just prints out the URI. If I 
 comment out ClayViewHandlerCommand from chain-config, it still does it so I 
 am 
 at a loss as to what is going on here. 
 

I guess that I don't understand what you are trying.  If you want to include a 
file in the template, take a look at the /rolodex.viewsource.html page of the 
rolodex example.  

span jsfid=clayImport url=/mystyle.css /

Anything that has an HTML suffix will be dispatched thru the faces servlet if 
you are using full html views.  

The ConfigDefinitionsWatchdogFilter is used to check the last modified date 
of the Clay configuration files/templates and reload them.

The ContextRelativePathFilter you might not need.  This command is designed 
to reject direct access to jsp's.  I would remove it if you are not using 
jsp's. 

 Hermod 
 

Gary

 -Original Message- 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 02, 2005 9:24 AM 
 To: user@struts.apache.org 
 Subject: [Shale] Clay - Not serving .css and .png 
 
 
 Hi 
 
 I my continued persuit of Shale and Clay and have now started to apply my 
 standard style (lquid) to the template application. What I discovered was 
 that 
 Clay will not serve .css files. I noticed in Geeta's ShaleNShark1 demo that 
 the 
 style sheet was named .html. So I renamed my stylesheet to .html and the 
 style's 
 where applied, with 1 exception: my .png files. They did not appear. 
 
 I noticed that in the log I got (when named .html): 
 02.des.2005 09:04:58 org.apache.shale.faces.ShaleViewHandler 
 setupViewController 
 WARNING: No ViewController for viewId /theme/styles.xml found under name 
 theme$styles 
 02.des.2005 09:04:58 org.apache.shale.clay.faces.ClayViewHandler renderView 
 INFO: Clay template renderView for /theme/styles.xml 
 
 I have in my chain-config file: 
 
  className=org.apache.shale.clay.config.beans.ConfigDefinitionsWatchdogFilter
   
 
 includes=\S*\.faces,\S*\.html,/index\.jsp,\S*\.xml / 
 
  
 includes=\S*\.xml,\S*\.faces,\S*\.html,\S*\.gif,\S*\.css,\S*\.png,\S*\.jpg,/ind
  
 ex\.jsp 
 excludes=\S*\.jsp,\S*\.jspf / 
 
 So it should allow access to it. I have not had the time to investigate into 
 why 
 this is happening, but since Geeta obviously hit this I thought maybe someone 
 had an answer. 
 
 Hermod 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 This email with attachments is solely for the use of the individual or 
 entity to whom it is addressed. Please also be aware that DnB NOR cannot 
 accept any payment orders or other legally binding correspondence with 
 customers as a part of an email. 
 
 This email message has been virus checked by the virus programs used 
 in the DnB NOR Group. 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 
 - 
 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: [Shale] Clay - Not serving .css and .png

2005-12-02 Thread Alexandre Poitras
I have the same problem but I found an easy workaround. Change the url
pattern of the shale filter to *.html and everything will work fine.

On 12/2/05, Gary VanMatre [EMAIL PROTECTED] wrote:
  Hi
 
  Part 2:
 
  If I try to access the resource directly, it just prints out the URI. If I
  comment out ClayViewHandlerCommand from chain-config, it still does it so I 
  am
  at a loss as to what is going on here.
 

 I guess that I don't understand what you are trying.  If you want to include 
 a file in the template, take a look at the /rolodex.viewsource.html page of 
 the rolodex example.

 span jsfid=clayImport url=/mystyle.css /

 Anything that has an HTML suffix will be dispatched thru the faces servlet if 
 you are using full html views.

 The ConfigDefinitionsWatchdogFilter is used to check the last modified date 
 of the Clay configuration files/templates and reload them.

 The ContextRelativePathFilter you might not need.  This command is designed 
 to reject direct access to jsp's.  I would remove it if you are not using 
 jsp's.

  Hermod
 

 Gary

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Friday, December 02, 2005 9:24 AM
  To: user@struts.apache.org
  Subject: [Shale] Clay - Not serving .css and .png
 
 
  Hi
 
  I my continued persuit of Shale and Clay and have now started to apply my
  standard style (lquid) to the template application. What I discovered was 
  that
  Clay will not serve .css files. I noticed in Geeta's ShaleNShark1 demo that 
  the
  style sheet was named .html. So I renamed my stylesheet to .html and the 
  style's
  where applied, with 1 exception: my .png files. They did not appear.
 
  I noticed that in the log I got (when named .html):
  02.des.2005 09:04:58 org.apache.shale.faces.ShaleViewHandler 
  setupViewController
  WARNING: No ViewController for viewId /theme/styles.xml found under name
  theme$styles
  02.des.2005 09:04:58 org.apache.shale.clay.faces.ClayViewHandler renderView
  INFO: Clay template renderView for /theme/styles.xml
 
  I have in my chain-config file:
 
   className=org.apache.shale.clay.config.beans.ConfigDefinitionsWatchdogFilter
 
  includes=\S*\.faces,\S*\.html,/index\.jsp,\S*\.xml /
 
  
  includes=\S*\.xml,\S*\.faces,\S*\.html,\S*\.gif,\S*\.css,\S*\.png,\S*\.jpg,/ind
  ex\.jsp
  excludes=\S*\.jsp,\S*\.jspf /
 
  So it should allow access to it. I have not had the time to investigate 
  into why
  this is happening, but since Geeta obviously hit this I thought maybe 
  someone
  had an answer.
 
  Hermod
 
 
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
  This email with attachments is solely for the use of the individual or
  entity to whom it is addressed. Please also be aware that DnB NOR cannot
  accept any payment orders or other legally binding correspondence with
  customers as a part of an email.
 
  This email message has been virus checked by the virus programs used
  in the DnB NOR Group.
 
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 
  -
  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]
 



--
Alexandre Poitras
Québec, Canada

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



Re: [Shale] Clay - Not serving .css and .png

2005-12-02 Thread gramani
[EMAIL PROTECTED] wrote on 12/02/2005 03:23:58 AM:

 Hi
 
 I my continued persuit of Shale and Clay and have now started to 
 apply my standard style (lquid) to the template application. What I 
 discovered was that Clay will not serve .css files. I noticed in 
 Geeta's ShaleNShark1 demo that the style sheet was named .html. 

Hermod, just an fyi, but right now I do have a Shale/Tiles web app working 
against a style sheet with a .css name. Like you I too noticed that having 
.css in filter (in command-config.xml) didn't do the trick. Things started 
working when I downloaded a later version of Shale and/or Tiles. Having 
other issues to deal with, I didn't question it any further..:)

Reagrds,
Geeta


[shale] Clay - Logic components?

2005-12-02 Thread Alexandre Poitras
Hi,

I am wondering right now how is it possible to generate a dynamic data
list component (dl) since no faces package offer it. First, I taught
no problem, Clay solves this situation quite easily but right now I am
stuck. I don't know how to make a loop to render all list elements.
Tapestry offers the forEach component to solve this problem. Is Shale
going to go this way too? Gary any suggestions?
--
Alexandre Poitras
Québec, Canada

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



Re: checkbox for nested collection

2005-12-02 Thread Per Jørgen Walstrøm
ok, I finally solved it. Here is what I did:

1) in my form's reset()-method, I iterate through all my sectionComponents and 
set restrictive=false
2) after the reset()-method is run, I do session.evict() on all my 
sectionComponents to remove them from the Hibernate-cache
3) I reload all the sectionComponents from the database and put them back into 
the form. When Struts renders my jsp later on, the checkboxes represents the 
values from the database, and not all falses as set in 1)

when submitting the form, the reset()-method is then automatically run once 
more, setting all values to false. And when the form is populated, the correct 
values are being set to my sectionComponents

took me some time to figure this one out, even though it seems quite easy :-)

cheers,
pj
 

-Opprinnelig melding-
Fra: Per Jørgen Walstrøm 
Sendt: 2. desember 2005 09:26
Til: Struts Users Mailing List
Emne: SV: Re: SV: Re: checkbox for nested collection

thank you for your answer. I think I know the request processing life-cycle, 
but what I apparently do not know, is how to map those checkboxes... The thing 
is that the restrictive-property is a direct mapping to the database; I do 
actually have a column called restrictive, which contains boolean values. So 
when I iterate over my collection geSectionComponents, what I really do is to 
lazily fetch the values from the database. I do not have an intermediate 
representation of those values in my form. So I do not know how to reset those 
values _without changing the actual values_.

nested:iterate id=sectionComponent property=geSectionComponents
  nested:checkbox property=restrictive/ /nested:iterate

I am not sure how to go about to do this, but it seems to me that I might need 
some intermediate values in my form and that I have to set the 
sectionComponent.restrictive values manually, based on the intermediate values. 
It just seems like an unnecessary extra step...

cheers,
pj

-Opprinnelig melding-
Fra: Laurie Harper [mailto:[EMAIL PROTECTED]
Sendt: 1. desember 2005 19:44
Til: user@struts.apache.org
Emne: Re: SV: Re: checkbox for nested collection

The trick is understanding the request processing life-cycle. The following is 
the sequence of events:

   - Struts either instantiates the action form or, if you use session
 scoped forms and one already exists, retrieves it from the session

   - Struts calls reset() on the form (I *think* in all cases, but it
 may only do this when retrieving a form from session scope)

   - if this request is a form submit, the form data is stored into
 the form bean

   - Struts calls your action, passing in the form bean

   - In your pre-populate action, you would set the boolean properties
 in the form ready for display; in your form processing action, you
 would read their state reflecting the request data

   - You return a forward mapping that Struts uses to render the next
 view

So, you set everything to false in reset(); *after* that, your setup action 
gets the opportunity to set the properties as appropriate for display. On the 
next request, when the form is submitted, reset() is called which clears the 
boolean properties and then they're updated based on the form data.

L.

Per Jørgen Walstrøm wrote:
 hello,
 you are right, I do have access to the POJO and the properties and I am able 
 to pre-populate the form. However, the checkboxes are rendered dynamically in 
 the jsp from the getRestrictive() method of my GeSectionComponent. I can't 
 really set them all to false beforehand, because then they would not be 
 populated right, I guess... Don't know if I'm making myself clear, but I 
 can't see how I can reset my checkboxes without resetting the actual 
 properties. Should I try to use a multibox with an array of dynamic size 
 (i.e. a size which depends on the size of the geSectionComponents-Collection)?
 
 /pj
 
 -Opprinnelig melding-
 Fra: Laurie Harper [mailto:[EMAIL PROTECTED]
 Sendt: 1. desember 2005 00:03
 Til: user@struts.apache.org
 Emne: Re: checkbox for nested collection
 
 Per Jørgen Walstrøm wrote:
 hello,
 I have the following code in my jsp:

 nested:iterate id=sectionComponent property=geSectionComponents
   nested:checkbox property=restrictive/ /nested:iterate

 my Collection geSectionComponents contains objects of type 
 GeSectionComponent

 GeSectionComponent.java (an auto-generated Hibernate POJO), contains the 
 following field (with getter and setter):
 private Boolean restrictive;

 How do I go about to make sure Struts detects when I uncheck a checkbox? I 
 am aware of that I should set all corresponding boolean properties to false 
 in the reset()-method, but in this case I do not have any direct access to 
 those properties.

 any suggestions?
 
 What do you mean you don't have any direct access to those properties? 
 You must be creating a reference to that object (or retrieving one through 
 Hibernate) somewhere in your code. Assuming you're 

Re: How to prevent URL cached

2005-12-02 Thread info3853 Bush
All pages are JSPs. 
  
  After added the samilar user check on sessionFilter.java class, now all  
back action after logout will be directed to login page. 
  In this way, I don't need to add user check on each JSP pages.
  
  Thanks for the hint.

Michael Jouravlev [EMAIL PROTECTED] wrote:  Did you say pages are static 
(HTML)? Or they are JSPs? Or does request
pass through Struts action? If they are not plain HTML, then in your
action or in JSP page check if user is logged in. If not, redirect to
login page.

Here is the simple scriptlet, that you should stick in the beginning
of every session-related page:

%
   if (session.getAttribute(USER) == null) {
   response.sendRedirect(Login.do);
   }
%

Or you may want to write a guard tag, see Ted Husted's MailReader
sample application for details. Or you may want to write a servlet
filter.

Michael.

On 12/1/05, info3853 Bush  wrote:
  Yes, I did that. Now all pages are blank. What I really wish is that  after 
 logout, when user hit back button, the page goes back to login  page, never 
 visit all pages visited before even just blank page now.

 Michael Jouravlev  wrote:  On 12/1/05, info3853 Bush wrote:
  That's true. This topic belongs to web application security.
 
   The thing is that all static content are shown when you used the  back 
 button. Of course, you can't click any link since the session is  already 
 invalidated.

 Mark page as non-cachable with no-cache, no-store cache-control
 header. You may want to add some other headers too, like
 must-revalidate. When you hit Back, the browser would try to reload a
 page, here you would show the error.

 Michael.

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





-
 Yahoo! Personals
 Skip the bars and set-ups and start using Yahoo! Personals for free

RE: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Pilgrim, Peter

 -Original Message-
 From: Don Brown [mailto:[EMAIL PROTECTED]
====
 
 
 While you are certainly entitled to your opinion, I'd ask 
 that you reserve
 judgement until at least the first Struts Ti release.  Yes, 
 we plan to seed
 Struts Ti with WebWork 2.2, but that doesn't mean it will 
 stay that way or
 that Struts Action 1.x users and even code aren't important.  
 I just started
 working on the Struts Action 1.x compatibility layer tonight 
 so its too
 early to say, but my goal is to be able to run most Struts Action
 1.xapplications unchanged on Struts Ti.  Struts Ti was born with the
 idea of
 filling the gap between a new development frame of mind with 
 JSF and Struts
 Action 1.x, providing Struts developers a powerful new framework that
 leverages their Struts knowledge, not negates it.
 
 Furthermore, it has been said before and I'll say it again - 
 Struts Action
 1.x isn't going anywhere.  Just as development continued when 
 Shale was
 born, development will continue today.  I have at least one 
 major Struts
 Action 1.x application myself that will never see a rewrite, 
 so if for some
 reason Struts Ti doesn't have full Struts Action 1.x 
 compatibility, it'll
 stay on the stable, supported Struts Action 1.x.
 

I have been at at three investment banks in London where I
build Struts applications. I think that these applications
will not be radically changed in the future regarding
moving from Struts to another web framework e.g Spring MVC, Tapestry 
or JSF.

What I do envision is that they may be refactored, particular
if the underlying framework makes it easier?

I think Don's Struts compatibility layer will make or break
the adoption. If it is a very good piece of engineering
that makes it easier to enhance, develop, and more importantly
maintain Struts application, then that would be a big seller.

On the otherhand if the layer is piecemeal, and there no obvious
quick win here and there. For example you still have to fight
with code and javascript all over the place, and base actions
and action forms, and you have to set validation manually,
and incorporate application resources, download ApplicationResources.properties
with `error.required' from the net, then I can see it wont
work very well.

I am not saying that it should be Ruby on Rails with active
database dynamic records, but it could be a lot be easier
for developer to get a basic web application up and running,
but still have extensibility. One of the secrets of Struts
wide adoption is that it didn't try to be the jack of all spades
and stuck cooly to MVC Model2. Now it has to grow with the
trend for metaprogramming, which is not as easier to do
with Java as it is with other languages. 

 This is open source - if you are convinced Struts Action 1.x 
 is the one true
 way, feel free to jump in and contribute.  Just because 
 Struts Ti may be
 right for me, it may not be for you.
 
 Don
 
 On 12/1/05, Michael Jouravlev [EMAIL PROTECTED] wrote:
 
  Maybe I do not know how to do business. Heck, I do not have MBA. But
  for some reason I have a sour taste in the mouth. If
  StrutsTi/Struts2.0 is so heavily based on WebWork code that one did
  put an equal sign between the two, then Struts2.0 is not Struts
  anymore. It would be honest just to say that Struts ran out 
 of steam,
  it is crusty, it sucks, its development is concluded and everyone is
  welcomed to switch to shiny WebWork. I would get that. I 
 would accept
  that. At least I won't feel being fooled.
 
  In case of DaimlerChrysler one has an option to go and buy 
 an original
  product. There is no such an option in Struts/WebWork case. 
 How do you
  think you will explain to those who know that Struts sucks that
  Struts 2.0 is not Struts 1.x they knew (or actually did not know)
  before? Will you be telling them that this is actually 
 WebWork, which
  is so much better? Now that would be fun.
 
  I have nothing against WebWork, I had looked into it once 
 or twice, it
  is surely a nice framework, but I will not buy WebWork skinned as
  Struts.
 
  Michael.



--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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



Re: [Shale] Clay - Links not working

2005-12-02 Thread Alexandre Poitras
On 12/1/05, Gary VanMatre [EMAIL PROTECTED] wrote:
  Hi
 
  No sooner did I send this, when I decided to clean out my Tomcat work 
  directory
  - and now it works. javax.faces.DEFAULT_SUFFIX hads to be set to .xml for 
  this
  to work.
 

 The RI behaves differently here.  It will allow a view id suffix with a 
 suffix that matches the faces servlet mappings.  Myfaces is pretty strict 
 about this.  It wants to rename to the value of java.faces.DEFAULT_SUFFIX.  
 The ClayViewHandlerCommand intercepts the URI before the myfaces servlet 
 normalizes the name.  My hope was to be able to switch between view types 
 (jsp, xml, html) within an application but it seems that you almost need to 
 pick one type :-(


  Anyway, I now have a Template application which functionally behaves like 
  it was
  built with Tiles, meaning I have a standard page layout, and only have to 
  worry
  about the individual parts of it. Now, in Tiles I would define definitions 
  in
  the tile-config.xml file - Can I define my Clay views in the clay-config.xml
  file instead of having to write an extra .xml file for each new view (I 
  already
  have to write the content (.html file))?
 

 Nope, If you are using full XML or HTML views as an entry point, you have to 
 define a new page.  This is a reflection of how JSF create the view ID from 
 the URI.  Tiles doesn't have this restriction.  The full XML and HTML 
 templates are parsed on demand.  If a template is changed, it is reloaded.  
 If the global config files are changes, they are reloaded and everthing else 
 is invalidated.

Would it be possible to catch the URI that are matching component ids
in the global file and then create the pages dynamically from there or
the JSF specification doesn't allow that? I already use some kind of
uri for my components ids.

 I'm planning on making full HTML templating allowed.

 html jsfid=/layout.html contentBody=/page1Body.html allowBody=false
 ..
 ..
 ..
 /html

 I can see how the Tapestry like remove and content tags would be handly 
 here.

 Gary




  Hermod
 



--
Alexandre Poitras
Québec, Canada

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



Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Craig McClanahan
On 12/2/05, netsql [EMAIL PROTECTED] wrote:

 in CoR so it could be ported to Shale and others :-) ?
 .V


It is already there.

Craig


Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Simonin, Bradley K (Brad)

Craig McClanahan wrote:


On 12/1/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 


I think Struts is pretty cool.  But JSF seems to be the future so I am now
learning it.  But I am getting really confused about Shale versus pure JSF
versus Struts.  Maybe Craig McClanahan can give me some more insite into
what I should be learning for my next Java based web project. Is JSF the
future? And if it is which JSF should I be learning?
   




One of the most important lessons that newcomers to the software realm need
to understand is this:  there is no one size fits all answer to any
significant engineering problem.

Fundamentally, in the Java-based web application architecture space, two
schools of thought are emerging as very popular ... an action framework
based approach (Struts 1.x, WebWork, Spring MVC, ...) and a component
based approach (JavaServer Faces, Tapestry, ASP.Net, ...).  Both approaches
have their adherents, and the programming styles involved will tend to
attract developers with different tastes for things like object
orientedness and where the responsibility for creating the actual view tier
markup should be placed (put way too simplistically, templates versus
components).  But both architectural styles are viable, and neither one is
going to go away any time soon -- although I will contend that both
architectural styles will need to pay attention to what AJAX means to the
craft of creating web applications.

So, which should you learn?  Depends on what you are planning to do.  If you
are tasked to maintain and enhance an existing Struts-based (or WebWork
based, or whatever-based) application, it would certainly behoove you to
become an expert in that underlying technology :-).  If, on the other hand,
you are facing a new project, you need to evaluate issues like:

* How long do I have to complete it?

* What's the expertise level of my team with the various technologies?

* Do I have a budget (time and/or $$) to acquire expertise and/or tools
 that support the various technologies?

My personal belief is that component oriented development is more accessible
to a wider array of developers than action oriented frameworks.  Therefore,
I spend my time (disclaimer:  I'm paid to do this too, but that doesn't
cover much of my open source effort :-) working on technologies that are
designed to increase the overall number of developers in the world that are
using Java based technologies.  Does that mean JSF is better than action
oriented frameworks?  Depends on your goals -- for my goal, it is, but
remember  this is not a good versus bad dichotomy ... its better
(for this particular goal) versus good.

One other potential confusion around JSF, in particular, is that it can be
viewed as having a couple of different personalities:

* JSF is an API for user interface components that happens
 to support a view-tier oriented controller tier.

* JSF is an extensible controller tier that also has a robust
 view tier API for components.

Nearly every existing web framework can claim we integrate with JSF based
on viewing it as the first personality.  What you end up with is the ability
to use the emerging set of JSF components that are available, but you're not
leveraging the fact that JSF knows how to do things like navigation between
pages as well.

Shale was (until Seam came along) the only framework I know of that took the
second viewpoint -- Shale is all about leveraging existing JSF capabilities
as the front controller, and utilizing its extensibility APIs to add
functionality and/or ease of use, *without* reimplementing fundamental
things (like validation and navigation) that JSF already supports.  Starting
from this viewpoint lets Shale be a *lot* smaller (read, less for me to
have to learn).  Indeed, the core of Shale is currently around 112kb
(versus nearly five times that for Struts 1.2).  Yes, you need a JSF
implementation as well, but that's not a long term problem ... any app
server that implements Java EE 5 is going to be required to support JSF,
just like it's required to support the servlet and JSP APIs, so it's going
to be built in to your servers already -- and, if you use a standalone
container like Tomcat, you can accomplish the same result by putting either
the JSF RI or MyFaces into the shared library directories available to all
webapps installed on that server instance.

So, to answer your original question, it is in your economic best interest
to understand both kinds of technologies, and to learn which ones to apply
in which circumstances.  Buf if you find that JSF fits your needs for a
particular project, you'll also want to investigate Shale, because it
smooths off a bunch of the edges of component based development -- to say
nothing of providing functional equivalence with Struts 1.x support for
things like client side validation and support for Tiles.

--Brad


Craig

 

Thanks Craig.  I guess now my question is when will I be able to buy 
books on Struts/Shale.  As a 

Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Rick Reumann

Don Brown wrote the following on 12/2/2005 12:44 AM:

When we started Struts Ti, it was conceived as a new
framework that aimed to simplify the developers life requiring no
configuration,  


What?? No configuration? You mean you aren't using the Spring/ EJB/ 
JASS/ RMI/ Hibernate/ JMS/ Struts/ Maven/ XDoclet/ Ajax/ AspectJ/ 
WebServices/ 1050 XML confif files/ KitchenSink solution? That framework 
must suck.


But all kidding aside, that's my biggest complaint right now with Java 
solutions that seem to be pushed - Too many 'extra' parts that you need 
and lack of good documentation and/or examples in getting started.


Even when I taking my first stab into JSF a few months ago, I was quite 
annoyed with having to go to several different web sites to get what I 
needed, and even then, there was little documentation on how to 
integrate everything. Now granted Craig and the others on the MyFaces 
list were more than helpful, but I certainly can see how someone new to 
choosing a JSF solution would be really overwhelmed. You don't just go 
get JSF - you have to get a JSF implementation like MyFaces and then 
also probably get Shale. But regardless, look how difficult the process 
is... put yourself in the 'newbie' shoes. You hear the buzz word JSF so 
you decide to google it. Go ahead put in JSF in google. What do you 
get? Well one of the hits near the top is JSFCentral so you go and click 
on that link http://www.jsfcentral.com/  That home page doesn't help 
much for just getting started, you try some other sites (ignoring the 
military ones). Next there is one on JSF-Spring.. newbie thinking Oh 
great, more confusion, I need to use Spring with this?. Well scroll 
though the Google results yourself and start clicking on some links - 
It's darn confusing to someone wanting to try and use the technology. 
Hmmm there's this Oracle stuff, there's this MyFaces stuff I keep 
seeing... Hmm there is Shale stuff and I see Spring mentioned. I 
understand JSF is a reference and not an implementation but I'd love to 
get some focus group surveys going on with 'new developers' and give 
them a day to explore the web with just the question Figure out how to 
get started coding a JSF application.


Even the examples out there for JSF applications aren't that great. Even 
the MyFaces ones often break (hit the browser refresh button when going 
through them). I understand, as has been mentioned numerous times 
before, that JSF take a different mindset. To quote Craig:


quote
Fundamentally, in the Java-based web application architecture space, two
schools of thought are emerging as very popular ... an action framework
based approach (Struts 1.x, WebWork, Spring MVC, ...) and a component
based approach (JavaServer Faces, Tapestry, ASP.Net, ...).'
/quote

I agree that both are viable and *I actually do LIKE* JSF - I'm not here 
to bash it and I look forward to watching it progress.  I would disagree 
though with the statement that I believe many in the latter camp above 
are claiming: that JSF is 'easier' to pick up for a newbie. I'm not 
going to say that it will be 'more difficult' to learn, but I wouldn't 
say it will be easier either. I guess if you know Zero about the servlet 
api (basic request/response) stuff and you are using a JSF GUI designer 
tool, then yea, for a basic app, I'm guessing JSF might be quicker. Do I 
have empirical evidence to make this claim? No I do not. However, I've 
worked with people over enough time on the Struts list to notice where 
most of the questions come from. I still firmly believe that once we see 
a lot of 'average-to-new' developers coding with JSF, that we'll see 
just as many questions as you see new struts developers post. I 
obviously can't state that as 'fact' but I'll be willing to bet that the 
learning curve will end up about the same (assuming little Servlet 
programming experience.. if someone has a decent amount of JSP/Servlet 
programming experience, I'd actually tip to the side that Struts will be 
easier to pick up).


I sort of digressed a bit with my above JSF comments. My point was that 
I'm frustrated with the current trend that seems to push for the 
inclusion of more and more 'stuff' into J2EE applications. Sure, some of 
it is necessary, but some of it isn't. (Do I really need 50 Factory 
objects in the event my web app becomes a Swing app in the future? Do I 
really need 25 layers and 30 XML files to get to a DAO? Do I really have 
to be injecting so much stuff at runtime?).


It's sort of funny.. for the heck of it, I pulled out my old JSP book 
Web Development with JavaServerPages by Fields/Kolb (Manning) and 
looked back at their simple example of a web application. The example 
has one main servlet controller you submit to and you pass in the 
request the name of a Command object which gets looked up in a Map and 
execute called on it. Basically, in a sense, the concept isn't much 
different from Struts. Someone that understands Java and understands 

struts and JSTL

2005-12-02 Thread fea jabi

using struts 1.2.7

Used c tags in my jsp and also gave this

%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %

in web.xml
 taglib
 taglib-urihttp://java.sun.com/jstl/core/taglib-uri
 taglib-location/WEB-INF/lib/c.tld/taglib-location
 /taglib

 taglib
 taglib-urihttp://java.sun.com/jstl/fmt/taglib-uri
 taglib-location/WEB-INF/lib/fmt.tld/taglib-location
 /taglib

 taglib
 taglib-urihttp://java.sun.com/jstl/xml/taglib-uri
 taglib-location/WEB-INF/lib/x.tld/taglib-location
 /taglib

 taglib
 taglib-urihttp://java.sun.com/jstl/sql/taglib-uri
 taglib-location/WEB-INF/lib/sql.tld/taglib-location
  /taglib

thinking one of the jars in it will have the JSTL stuff. Which ar has the 
JSTL stuff in it?


Where can I get the tld's for these.

I don't see the above tld's in my proj. I might have to get them. Where can 
I get these from?


Thanks.

_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



struts 1.2.7 and JSTL

2005-12-02 Thread fea jabi
does struts 1.2.7 have JSTL tag lib included in it? or so I have to download 
the JSTL seperately?


Thanks.

_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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



[Shale] #{managed-bean-name} always returns 0

2005-12-02 Thread Alexandre Poitras
Like the title says, #{managed-bean-name} is always evaluated to 0.
Any idea why?
--
Alexandre Poitras
Québec, Canada

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



Re: [shale] symbols not resolving

2005-12-02 Thread Alexandre Poitras
ok I found the problem, I was still using an old version of Shale

On 12/2/05, Alexandre Poitras [EMAIL PROTECTED] wrote:

 Hi,

 Me again :)

 I have tried to use symbols like you suggested to built a layout system.
 Everything seems to work great except my symbols are not resolved :

 Here's my code :

 page1.xml :

 ?xml version='1.0' encoding=UTF-8?
 !DOCTYPE view PUBLIC
   -//Apache Software Foundation//DTD Shale Clay View Configuration
 1.0//EN
   http://struts.apache.org/dtds/shale-clay-config_1_0.dtd;
 view
 component jsfid=/page1.xml extends=baseLayout
 symbols
 set name=titre value=Test /
 set name=contenu value=page1.html /
 /symbols
 /component
 /view

 in my global clay-config.xml :
component jsfid=baseLayout extends=clay
attributes
set name=clayJsfid value=/gabarit/gabarit.html/
/attributes

/component


 gabarit.html:

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=fr lang=fr


 headtitle@titre/title/head

 bodyspan jsfid=clay clayJsfid=@contenu  allowBody=false/body
 /html

 Then I receive the error that the component '@contenu' doesn't exist so
 it's mean my symbols are not resolved.
 Any ideas of what is wrong???
 --
 Alexandre Poitras
 Québec, Canada




--
Alexandre Poitras
Québec, Canada


Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Frank W. Zammetti
Preach on, brother Rick! :)

I think your arguments about simplicity are very cogent.  I think too
often, people mistake having to do less work for something being more
simple.  Simplicity, to me, is being able to fully understand what it is
I'm doing, not necessarily having to do less of it.  This is the failing I
see in a great many things we're all playing with today, be is JSF, JSTL,
Struts, Spring, Hibernate or any of 100 other things we could all name.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Fri, December 2, 2005 3:11 pm, Rick Reumann said:
 Don Brown wrote the following on 12/2/2005 12:44 AM:
 When we started Struts Ti, it was conceived as a new
 framework that aimed to simplify the developers life requiring no
 configuration,

 What?? No configuration? You mean you aren't using the Spring/ EJB/
 JASS/ RMI/ Hibernate/ JMS/ Struts/ Maven/ XDoclet/ Ajax/ AspectJ/
 WebServices/ 1050 XML confif files/ KitchenSink solution? That framework
 must suck.

 But all kidding aside, that's my biggest complaint right now with Java
 solutions that seem to be pushed - Too many 'extra' parts that you need
 and lack of good documentation and/or examples in getting started.

 Even when I taking my first stab into JSF a few months ago, I was quite
 annoyed with having to go to several different web sites to get what I
 needed, and even then, there was little documentation on how to
 integrate everything. Now granted Craig and the others on the MyFaces
 list were more than helpful, but I certainly can see how someone new to
 choosing a JSF solution would be really overwhelmed. You don't just go
 get JSF - you have to get a JSF implementation like MyFaces and then
 also probably get Shale. But regardless, look how difficult the process
 is... put yourself in the 'newbie' shoes. You hear the buzz word JSF so
 you decide to google it. Go ahead put in JSF in google. What do you
 get? Well one of the hits near the top is JSFCentral so you go and click
 on that link http://www.jsfcentral.com/  That home page doesn't help
 much for just getting started, you try some other sites (ignoring the
 military ones). Next there is one on JSF-Spring.. newbie thinking Oh
 great, more confusion, I need to use Spring with this?. Well scroll
 though the Google results yourself and start clicking on some links -
 It's darn confusing to someone wanting to try and use the technology.
 Hmmm there's this Oracle stuff, there's this MyFaces stuff I keep
 seeing... Hmm there is Shale stuff and I see Spring mentioned. I
 understand JSF is a reference and not an implementation but I'd love to
 get some focus group surveys going on with 'new developers' and give
 them a day to explore the web with just the question Figure out how to
 get started coding a JSF application.

 Even the examples out there for JSF applications aren't that great. Even
 the MyFaces ones often break (hit the browser refresh button when going
 through them). I understand, as has been mentioned numerous times
 before, that JSF take a different mindset. To quote Craig:

 quote
 Fundamentally, in the Java-based web application architecture space, two
 schools of thought are emerging as very popular ... an action framework
 based approach (Struts 1.x, WebWork, Spring MVC, ...) and a component
 based approach (JavaServer Faces, Tapestry, ASP.Net, ...).'
 /quote

 I agree that both are viable and *I actually do LIKE* JSF - I'm not here
 to bash it and I look forward to watching it progress.  I would disagree
 though with the statement that I believe many in the latter camp above
 are claiming: that JSF is 'easier' to pick up for a newbie. I'm not
 going to say that it will be 'more difficult' to learn, but I wouldn't
 say it will be easier either. I guess if you know Zero about the servlet
 api (basic request/response) stuff and you are using a JSF GUI designer
 tool, then yea, for a basic app, I'm guessing JSF might be quicker. Do I
 have empirical evidence to make this claim? No I do not. However, I've
 worked with people over enough time on the Struts list to notice where
 most of the questions come from. I still firmly believe that once we see
 a lot of 'average-to-new' developers coding with JSF, that we'll see
 just as many questions as you see new struts developers post. I
 obviously can't state that as 'fact' but I'll be willing to bet that the
 learning curve will end up about the same (assuming little Servlet
 programming experience.. if someone has a decent amount of JSP/Servlet
 programming experience, I'd actually tip to the side that Struts will be
 easier to pick up).

 I sort of digressed a bit with my above JSF comments. My point was that
 I'm frustrated with the current trend that seems to push for the
 inclusion of more and more 'stuff' into J2EE applications. Sure, some of
 it is necessary, but some of it isn't. (Do I really need 50 

[shale] sample app use-cases deployment

2005-12-02 Thread Vishwaroopa Rangamgari
Hi friends,
I just installed shale on my system and realized that use-cases is a
sample application. How to deploy this application on jboss? I tried to make
it a war-file and deploy but looks like it does not work (throws
null-pointer exception etc).

Your response is appreciated

Thanks
Chary


Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread gramani
Rick Reumann [EMAIL PROTECTED] wrote on 12/02/2005 03:11:48 PM:

 Don Brown wrote the following on 12/2/2005 12:44 AM:
  When we started Struts Ti, it was conceived as a new
  framework that aimed to simplify the developers life requiring no
  configuration, 
 
 What?? No configuration? You mean you aren't using the Spring/ EJB/ 
 JASS/ RMI/ Hibernate/ JMS/ Struts/ Maven/ XDoclet/ Ajax/ AspectJ/ 
 WebServices/ 1050 XML confif files/ KitchenSink solution? That framework 

 must suck.
 
 But all kidding aside, that's my biggest complaint right now with Java 
 solutions that seem to be pushed - Too many 'extra' parts that you need 
 and lack of good documentation and/or examples in getting started.
 

Rick, enjoyed your rant - Fridays don't come by often enough..;)

A couple of days ago I decided to set everything down and do some reading 
since I was getting sick of not being sure of stuff. And found this 
site: http://www.jsftutorials.net/. Yes, I know, it is mentioned in other 
places, but I don't think anyone has singled it out as a *really* good 
site for a JSF newbie. I just spent most of the day reading through a lot 
of the stuff there and guess what, by the end of the day, I felt pretty 
good about JSF and decided it isn't all that difficult after all. In fact 
the past couple of days have been quite easy - none of the usual 
unsettling thoughts like I think this should work,.. let's see.. ahh it 
does work! Cool... hmm... but am not sure why this works and the other 
thing doesn't..? oh well, better move on and hope it continues to work on 
Tuesdays too!. What's more, now even posts from Simon Kitching on the 
MyFaces list are starting to make sense. Plus Shale is losing it's scary 
face! Is that cool or is that cool?!! :)

Hence this note is for all those disheartened newbies out there who feel 
that JSF is just taking far too long to feel like home: Tell your boss 
you have a headache, go home, and read some of the stuff on 
jsftutorials.net. JSF/Shale (and life) will seem far sweeter. :)

 -- 
 Rick
 

Geeta


RE: OT: OutOfMemory

2005-12-02 Thread Garner, Shawn
I would think he should use some kind of a buffered input stream and only
read in part of the data at once.

That way he would never have the entire string in the buffer at once.

Then open an output stream at the same time and write out the modified
contents to it.

This way I wouldn't think the buffer would have to be any more than three
times the length of the longest string you're searching for.

If you were searching for b*e*a*r your buffer would only need to be 3 times
the length of bear plus the max length of a * (there has to be some limit if
you look at actual data).

Shawn
-Original Message-
From: Chen Jerry [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 29, 2005 12:12 AM
To: Struts Users Mailing List
Subject: Re: OT: OutOfMemory

Rechard,

I suppose Eric wanna output HTML.

I myself prefer css to font tags. Introducing an XSLT engine is a nice
idea, however, it seems not the choice of Eric.

I suppose the current problem results from default configuration of
JVM or large numbers of substring with a big string.

Regards,

Jerry

2005/11/29, Richard Yee [EMAIL PROTECTED]:
 Jerry,
 Are you trying to output HTML? If so, you should consider:
 1) using CSS instead of the font tags
 2) use an XSLT transform or transform the text as you output it rather
 than doing it in memory.

 -Richard


 Jason Lea wrote:
  What is textFormat?
  It isn't a StringBuilder is it?
 
  textFormat.append(subText);
 
 
  Eric Plante wrote:
  for (Integer posLetter: positions){
  String subText = fullText.substring(start, posLetter);
  textFormat.append(subText);
  subText = null; //not required
  start = posLetter + 1;
  }
 
  with fullText = 5M and textFormat that's even bigger it crashes.
 
  An friend tried with a 15M file using Lingo language and it worked
  without
  problems and I bet .NET would have no problem either but I'll know
  tomorrow.
  
  Sorry to hear that.
 
  Would you please show some source code relative to the problem?
 
  Well, 5000 loops of substring with a big string is terrible.
 
  2005/11/29, Eric Plante [EMAIL PROTECTED]:
 
  It wasn't there but I added it and whatever I used -Xmx or -XX, it
  didn't
  work. I wrote 100m for the -XX...
 
  I also checked again where I could optimized and where I could find
  memory
  leakage. Reducing the number of string meant using StringBuilder's
  insertthe slowness of that command makes it not an option. I
  couldn't
  find any memory leakage.
 
  Where the program systematicaly crash is a loop where I do a
  substring of
  the big string everytime(about 5000 loops).I then fill a StringBuilder
 
  which
 
  will eventualy be bigger than the main string. That's the fastest way
I
 
  can
 
  do what need to be done and it needs to be fast.
 
  I'm starting to loose faith in Java...I'll ask a friend that
  isa.NETspecialist to see if.NET has that problem too...a problem Java
  shouldn't have...
 
  ---
 
  I found in my catalina.bat:
  set JAVA_OPTS=
  Instead of that, use:
  set JAVA_OPTS=-XX:MaxPermSize=10m
 
  -Xmx512m seems only increase max size of heap rather than perm
  division.
 
  2005/11/29, Eric Plante [EMAIL PROTECTED]:
 
  I found the required catalina files and I see 4 lines with the
  JAVA_OPTS
  variable. I tried replacing JAVA_OPTS and then %JAVA_OPTS% by
-Xmx512m
 
  in
 
  the catalina.bat file but I still get the error message, what am I
 
  suppose
 
  to do in that file?
 
  - Original Message -
  From: netsql [EMAIL PROTECTED]
  To: user@struts.apache.org
  Sent: Sunday, November 27, 2005 10:09 PM
  Subject: Re: OT: OutOfMemory
 
 
 
  http://tomcat.apache.org/faq/memory.html#adjust
 
 
  Eric Plante wrote:
 
  I'm on windows XP and the only catalina files that might serve for
  configuration are Catalina.properties and catalina.policy
 
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 


 

Re: [Shale] #{managed-bean-name} always returns 0

2005-12-02 Thread Gary VanMatre
 Like the title says, #{managed-bean-name} is always evaluated to 0. 
 Any idea why? 

The new syntax is [EMAIL PROTECTED]  This was changed to be consistent with the 
other symbols.  All symbols must be prefixed with an @. The documentation 
doesn't reflect this yet.  

 -- 
 Alexandre Poitras 
 Québec, Canada 
 

Gary

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

Re: [Shale] #{managed-bean-name} always returns 0

2005-12-02 Thread Alexandre Poitras
Ok I finally found why. Now you have to use [EMAIL PROTECTED]
because it is a symbol. I hope this can help some other people.

On 12/2/05, Alexandre Poitras [EMAIL PROTECTED] wrote:
 Like the title says, #{managed-bean-name} is always evaluated to 0.
 Any idea why?
 --
 Alexandre Poitras
 Québec, Canada



--
Alexandre Poitras
Québec, Canada

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



Re: [shale] Clay - Logic components?

2005-12-02 Thread Gary VanMatre
 Hi, 
 
 I am wondering right now how is it possible to generate a dynamic data 
 list component (dl) since no faces package offer it. First, I taught 
 no problem, Clay solves this situation quite easily but right now I am 
 stuck. I don't know how to make a loop to render all list elements. 
 Tapestry offers the forEach component to solve this problem. Is Shale 
 going to go this way too? Gary any suggestions? 


Clay doesn't have a forEach component yet.  The Clay component is a Naming 
Container so I don't think it would be too bad to implement.  I've been 
thinking about it but for now the best Clay solution would be to use the 
shapeValidator event to generate your list at runtime.  Take a look at the 
Rolodex example.  The tabs are generated using the runtime callback method to 
the ViewController.  All you are doing here is creating the same metadata 
generated by digesting the XML config files.  It looks kind of messy but it's 
very powerful.

Gary



 -- 
 Alexandre Poitras 
 Québec, Canada 
 
 - 
 To unsubscribe, e-mail: [EMAIL PROTECTED] 
 For additional commands, e-mail: [EMAIL PROTECTED] 
 

Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Preston CRAWFORD
You may not be marketing anything, Ted. But those of us out in the field
that work with the decision makers and who help in the decision making
have to think about these things. It's the reality of living and
developing in a world where there are so many options.

Preston

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



[shale] symbols not resolving

2005-12-02 Thread Alexandre Poitras
Hi,

Me again :)

I have tried to use symbols like you suggested to built a layout system.
Everything seems to work great except my symbols are not resolved :

Here's my code :

page1.xml :

?xml version='1.0' encoding=UTF-8?
!DOCTYPE view PUBLIC
  -//Apache Software Foundation//DTD Shale Clay View Configuration 1.0
//EN
  http://struts.apache.org/dtds/shale-clay-config_1_0.dtd;
view
component jsfid=/page1.xml extends=baseLayout
symbols
set name=titre value=Test /
set name=contenu value=page1.html /
/symbols
/component
/view

in my global clay-config.xml :
   component jsfid=baseLayout extends=clay
   attributes
   set name=clayJsfid value=/gabarit/gabarit.html/
   /attributes

   /component


gabarit.html:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=fr lang=fr


headtitle@titre/title/head

bodyspan jsfid=clay clayJsfid=@contenu  allowBody=false/body
/html

Then I receive the error that the component '@contenu' doesn't exist so it's
mean my symbols are not resolved.
Any ideas of what is wrong???
--
Alexandre Poitras
Québec, Canada


RE: struts 1.2.7 and JSTL

2005-12-02 Thread Karr, David
If you use the struts-el distribution, in the contrib directory,
you'll find the JSTL jars.

It's recommended that you use struts-el if you're going to use Struts
with the JSTL.  That is, assuming you're not using a Servlet 2.4
container.  If you're using a Servlet 2.4 container, you shouldn't use
struts-el, and you shouldn't use the JSTL jars that come with struts-el,
because they're from an older version that won't work in a Servlet 2.4
container.

 -Original Message-
 From: fea jabi [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 02, 2005 7:51 AM
 To: user@struts.apache.org
 Subject: struts 1.2.7 and JSTL
 
 
 does struts 1.2.7 have JSTL tag lib included in it? or so I 
 have to download 
 the JSTL seperately?
 
 Thanks.
 
 _
 Don't just search. Find. Check out the new MSN Search! 
 http://search.msn.click-url.com/go/onm00200636ave/direct/01/
 
 
 -
 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: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Frank W. Zammetti
You know, I can't believe I'm about to say this given some of the comments
I've made in the past, but here goes anyway...

I think the compatibility later is almost pointless and maybe the effort
isn't worth it.

The reason I say this is that many people have the opinion that Struts is
old news and needs to evolve.  Many people also believe it is already
pretty far behind the times.

When situations like that arise, it is often best to simply start charting
the new territory without concern for supporting the old.  Now, I don't
mean drop support for Struts 1.x... as others have said, 1.x isn't going
anywhere and there are people willing to continue to support it and even
evolve it, me included.  What I'm asking is if there really is any good
reason to make Struts Ti compatible with the 1.x world, or is it time for
a whole new world?

Shale was, and I presume still is, suggested as a possible Struts 2.0
direction.  People are willing to accept that as a possibility, and
there's no promise, that I'm aware of anyway, of a Strtus 1.x app ever
being able to run under Shale.  And what would be the point of even trying
to allow for that?  I'd would suggest none.

People with existing 1.x applications aren't too likely to upgrade to Ti
anyway.  Some will of course, but by and large I'd say it won't be a
common occurance.  It's the *new* projects that will or will not latch on
to it, and they won't have a compatibility concern.

But if Struts Ti is going to be a relatively big departure from what
Struts is now, and it sounds like that might be the case, and given that
1.x isn't going anywhere, is there really a point to a compatibility
later?

Further, might it even hurt the cause to some degree?

Now, it sounds like Don has a relatively easy way to accomplish it, and if
that's true than that fact takes a bit of the wind out of my comment here.
 I mean, if a compatibility layer isn't a big deal to implement, then
there's obviously no *harm* in doing it.

But still, I wonder if it might not be better to simply offer people a
(potentially) incompatible choice, much like they have now when choosing
between Struts and JSF... the integration library notwithstanding, they
really are two fundamentally different, competing views on web
development.  And that's OK, it's a choice.

I'm starting to think that maybe the best course for Struts is one where
1.x is allowed to continue to evolve, to the extent the community supports
and contributes to it, and Struts Ti goes off, without worrying about
compatibility, and just tries to be as good as it can be.

I don't know, I'm just tossing out some thoughts here.  I'm not sure I
completely agree with myself :)  Just some talking points I guess.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Fri, December 2, 2005 1:00 pm, Pilgrim, Peter said:

 -Original Message-
 From: Don Brown [mailto:[EMAIL PROTECTED]
 ====


 While you are certainly entitled to your opinion, I'd ask
 that you reserve
 judgement until at least the first Struts Ti release.  Yes,
 we plan to seed
 Struts Ti with WebWork 2.2, but that doesn't mean it will
 stay that way or
 that Struts Action 1.x users and even code aren't important.
 I just started
 working on the Struts Action 1.x compatibility layer tonight
 so its too
 early to say, but my goal is to be able to run most Struts Action
 1.xapplications unchanged on Struts Ti.  Struts Ti was born with the
 idea of
 filling the gap between a new development frame of mind with
 JSF and Struts
 Action 1.x, providing Struts developers a powerful new framework that
 leverages their Struts knowledge, not negates it.

 Furthermore, it has been said before and I'll say it again -
 Struts Action
 1.x isn't going anywhere.  Just as development continued when
 Shale was
 born, development will continue today.  I have at least one
 major Struts
 Action 1.x application myself that will never see a rewrite,
 so if for some
 reason Struts Ti doesn't have full Struts Action 1.x
 compatibility, it'll
 stay on the stable, supported Struts Action 1.x.


 I have been at at three investment banks in London where I
 build Struts applications. I think that these applications
 will not be radically changed in the future regarding
 moving from Struts to another web framework e.g Spring MVC, Tapestry
 or JSF.

 What I do envision is that they may be refactored, particular
 if the underlying framework makes it easier?

 I think Don's Struts compatibility layer will make or break
 the adoption. If it is a very good piece of engineering
 that makes it easier to enhance, develop, and more importantly
 maintain Struts application, then that would be a big seller.

 On the otherhand if the layer is piecemeal, and there no obvious
 quick win here and there. For example you still have to fight
 with code and javascript all over the place, and base actions
 and action 

Re: [shale] Clay - Logic components?

2005-12-02 Thread Craig McClanahan
On 12/2/05, Alexandre Poitras [EMAIL PROTECTED] wrote:

 Hi,

 I am wondering right now how is it possible to generate a dynamic data
 list component (dl) since no faces package offer it. First, I taught
 no problem, Clay solves this situation quite easily but right now I am
 stuck. I don't know how to make a loop to render all list elements.
 Tapestry offers the forEach component to solve this problem. Is Shale
 going to go this way too? Gary any suggestions?
 --
 Alexandre Poitras
 Québec, Canada


The right long term answer to this kind of question would be to find a JSF
Data List component that does what you want ... then, all you'd need to do
is write the Clay definition for it.  Doesn't Tomahawk (from MyFaces) have a
component like that?

Craig


Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread netsql
Rick ...realy consider Rails crowd input. Please spend 2 hours on 
Groovy, as per example on Resin.


I am going to find a way for CoR create Groovy classes.

.V

Rick Reumann wrote:

aimed to simplify the developers life requiring no
configuration,  



What?? No configuration? You mean you aren't using the Spring/ EJB/ 
JASS/ RMI/ Hibernate/ JMS/ Struts/ Maven/ XDoclet/ Ajax/ AspectJ/ 
WebServices/ 1050 XML confif files/ KitchenSink solution? That framework 
must suck.





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



Re: [FRIDAY] Struts 1.x is Struts Classic after all

2005-12-02 Thread Larry Meadors
AMEN!

Less Code  Simple

In my experience, over-complexificationialzing in the name of writing
less code always makes for more cost.

Larry


On 12/2/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 Preach on, brother Rick! :)

 I think your arguments about simplicity are very cogent.  I think too
 often, people mistake having to do less work for something being more
 simple.  Simplicity, to me, is being able to fully understand what it is
 I'm doing, not necessarily having to do less of it.  This is the failing I
 see in a great many things we're all playing with today, be is JSF, JSTL,
 Struts, Spring, Hibernate or any of 100 other things we could all name.

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 AIM: fzammetti
 Yahoo: fzammetti
 MSN: [EMAIL PROTECTED]

 On Fri, December 2, 2005 3:11 pm, Rick Reumann said:
  Don Brown wrote the following on 12/2/2005 12:44 AM:
  When we started Struts Ti, it was conceived as a new
  framework that aimed to simplify the developers life requiring no
  configuration,
 
  What?? No configuration? You mean you aren't using the Spring/ EJB/
  JASS/ RMI/ Hibernate/ JMS/ Struts/ Maven/ XDoclet/ Ajax/ AspectJ/
  WebServices/ 1050 XML confif files/ KitchenSink solution? That framework
  must suck.
 
  But all kidding aside, that's my biggest complaint right now with Java
  solutions that seem to be pushed - Too many 'extra' parts that you need
  and lack of good documentation and/or examples in getting started.
 
  Even when I taking my first stab into JSF a few months ago, I was quite
  annoyed with having to go to several different web sites to get what I
  needed, and even then, there was little documentation on how to
  integrate everything. Now granted Craig and the others on the MyFaces
  list were more than helpful, but I certainly can see how someone new to
  choosing a JSF solution would be really overwhelmed. You don't just go
  get JSF - you have to get a JSF implementation like MyFaces and then
  also probably get Shale. But regardless, look how difficult the process
  is... put yourself in the 'newbie' shoes. You hear the buzz word JSF so
  you decide to google it. Go ahead put in JSF in google. What do you
  get? Well one of the hits near the top is JSFCentral so you go and click
  on that link http://www.jsfcentral.com/  That home page doesn't help
  much for just getting started, you try some other sites (ignoring the
  military ones). Next there is one on JSF-Spring.. newbie thinking Oh
  great, more confusion, I need to use Spring with this?. Well scroll
  though the Google results yourself and start clicking on some links -
  It's darn confusing to someone wanting to try and use the technology.
  Hmmm there's this Oracle stuff, there's this MyFaces stuff I keep
  seeing... Hmm there is Shale stuff and I see Spring mentioned. I
  understand JSF is a reference and not an implementation but I'd love to
  get some focus group surveys going on with 'new developers' and give
  them a day to explore the web with just the question Figure out how to
  get started coding a JSF application.
 
  Even the examples out there for JSF applications aren't that great. Even
  the MyFaces ones often break (hit the browser refresh button when going
  through them). I understand, as has been mentioned numerous times
  before, that JSF take a different mindset. To quote Craig:
 
  quote
  Fundamentally, in the Java-based web application architecture space, two
  schools of thought are emerging as very popular ... an action framework
  based approach (Struts 1.x, WebWork, Spring MVC, ...) and a component
  based approach (JavaServer Faces, Tapestry, ASP.Net, ...).'
  /quote
 
  I agree that both are viable and *I actually do LIKE* JSF - I'm not here
  to bash it and I look forward to watching it progress.  I would disagree
  though with the statement that I believe many in the latter camp above
  are claiming: that JSF is 'easier' to pick up for a newbie. I'm not
  going to say that it will be 'more difficult' to learn, but I wouldn't
  say it will be easier either. I guess if you know Zero about the servlet
  api (basic request/response) stuff and you are using a JSF GUI designer
  tool, then yea, for a basic app, I'm guessing JSF might be quicker. Do I
  have empirical evidence to make this claim? No I do not. However, I've
  worked with people over enough time on the Struts list to notice where
  most of the questions come from. I still firmly believe that once we see
  a lot of 'average-to-new' developers coding with JSF, that we'll see
  just as many questions as you see new struts developers post. I
  obviously can't state that as 'fact' but I'll be willing to bet that the
  learning curve will end up about the same (assuming little Servlet
  programming experience.. if someone has a decent amount of JSP/Servlet
  programming experience, I'd actually tip to the side that Struts will be
  easier to pick up).

Re: [Shale] #{managed-bean-name} always returns 0

2005-12-02 Thread Alexandre Poitras
Yeah I agree, I will try to give some help but I need to experiment Clay
more deeply. It's quite complex at first!

On 12/2/05, Gary VanMatre [EMAIL PROTECTED] wrote:

  Like the title says, #{managed-bean-name} is always evaluated to 0.
  Any idea why?

 The new syntax is [EMAIL PROTECTED]  This was changed to be
 consistent with the other symbols.  All symbols must be prefixed with an @.
 The documentation doesn't reflect this yet.

  --
  Alexandre Poitras
  Québec, Canada
 

 Gary

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




--
Alexandre Poitras
Québec, Canada


Re: [shale] sample app use-cases deployment

2005-12-02 Thread Craig McClanahan
On 12/2/05, Vishwaroopa Rangamgari [EMAIL PROTECTED] wrote:

 Hi friends,
 I just installed shale on my system and realized that use-cases is a
 sample application. How to deploy this application on jboss? I tried to
 make
 it a war-file and deploy but looks like it does not work (throws
 null-pointer exception etc).

 Your response is appreciated


The example app should be self contained enough that what you describe
works, but I don't have enough knowledge of JBoss deployment to help much
... although it might be useful if you could show the stack traces you are
actually geting when you try to deploy.

Thanks
 Chary

 Craig


Re: [shale] sample app use-cases deployment

2005-12-02 Thread Vishwaroopa Rangamgari
Craig,
  Thanks for the reply. I was trying to build/deploy myself but did'nt
observe the build ant script.  Now able to launch the use-cases application.

Now I have something to start with..

- Chary


On 12/2/05, Craig McClanahan [EMAIL PROTECTED] wrote:

 On 12/2/05, Vishwaroopa Rangamgari [EMAIL PROTECTED]
 wrote:
 
  Hi friends,
  I just installed shale on my system and realized that use-cases is
 a
  sample application. How to deploy this application on jboss? I tried to
  make
  it a war-file and deploy but looks like it does not work (throws
  null-pointer exception etc).
 
  Your response is appreciated


 The example app should be self contained enough that what you describe
 works, but I don't have enough knowledge of JBoss deployment to help much
 ... although it might be useful if you could show the stack traces you are
 actually geting when you try to deploy.

 Thanks
  Chary
 
  Craig




Re: Problem using LookupDispatchAction

2005-12-02 Thread Dakota Jack
Don't bother with this.  This is just the purloined nutso version.  Try the
original which is simple and works at www.michaelmcgrady.com.



On 11/30/05, Michael Jouravlev [EMAIL PROTECTED] wrote:

 On 11/30/05, Matheus Eduardo Machado Moreira [EMAIL PROTECTED]
 wrote:
  Hi,
 
  I have a problem using LookupDispatchAction. I already tried
  looking for the solution on Google, this list archive and other
  resources but I wasn't able to fix the problem. Maybe some of you can
  help me.
 
  My action extends LookupDispatchAction and implements the
  getKeyMethodMap() method. In my ApplicationResources.properties file I
  define all the keys for the buttons that can be shown in my
  interfaces. Everything seems to be ok but every time I try to access
  my pages I receive the following error:
  javax.servlet.ServletException: Action[/pesquisaIngrediente] missing
  resource 'comando.iniciar' in key method map.
 
  I did everything as shown in the LookupDispatchAction's javadoc
  but the application doesn't work. Can someone help me with this
  frustrating error?

 Source code snippet would be nice. Can you access other resources from
 this file? Is it in proper location?

 Anyway, do you want to try a better alternative? Here it is:
 http://struts.sourceforge.net/strutsdialogs/selectaction.html

 This class is not available as separate download, so you need to get
 the whole library, but it is very small.

 The latest update in version 1.24 allows you to use this action as
 utility class, that is, your action does not have to extend it, you
 can just instantiate it and call it. Check the samples for example of
 how to do that.

 Michael.

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




--
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~


Preserving the query string while validating a form using dynamic initialization with DynaAction

2005-12-02 Thread Shivani Sawhney
Hi,

 

Can someone please help solve the following problems? 

 

Query 1:

 

I am trying to access an action through a hyperlink and provide some
parameters through query string. This action forwards to a JSP, whose
URL reads something like
http://servername:port/rd/masters/SetupEditJobProfileAction.do?id0=13. I
have added validations on this JSP through DynaValidator Framework. Now
if the user feeds some incorrect input, the user is taken to the same
JSP with the errors listed but the URL doesn't have the query string
attached anymore, i.e., the URL becomes something like,
http://servername:port/rd/masters/SetupEditJobProfileAction.do which is
causing errors in my code.

 

Could someone please suggest how to keep the query string (request
parameters) intact even when validation errors are caught and displayed
on the JSP?

 

 

Query 2:

Can I use user defined classes while initializing form fields using Dyna
Action?

E.g., Can I write something like,

form-bean name=ChangePasswordForm
type=org.apache.struts.validator.DynaValidatorForm

  form-property name=date type=java.lang.String
initial=rd.admin.DateFormat.getDate()/

 

Any help will be much appreciated.

Thanks in advance.

Regards,

Shivani