Re: how to access tiles defs in inserted jsp ?

2003-07-09 Thread Michael Muller
After another evening of flailing, I managed to make this work in a 
rather inelegant way:

In myPageTemplate.jsp, I added this tag:

tiles:importAttribute name=foo scope=request/

and I changed myBodyImpl.jsp to say:

foo = %= request.getAttribute(foo) %

This works, but I'mnot very happy with it.  Does anyone have a better 
solution?

  -- Mike

Michael Muller wrote:

i tried this, and got the following error in my jsp:

Error - tag.getAsString : attribute 'foo' not found in context. Check 
tag syntax'

I had to change the tag to say

tiles:getAsString name=foo /

since attribute is not an attribute of getAsString.

  -- Mike

Hibbs, David wrote:

Sneaky little issue on this one.  Try the following...

in tiles-defs.xml change
definition name=myTilesPageDef path=myPageTemplate.jsp
to
definition name=myTilesPageDef template=myPageTemplate.jsp
and in myBodyImpl.jsp change
foo = tiles:insert attribute=foo /
to
foo = tiles:getAsString attribute=foo /
David Hibbs
Staff Programmer / Analyst
Distributed Applications Development and Support
American National Insurance Company

-Original Message-
From: Michael Muller [mailto:[EMAIL PROTECTED]
Sent: Monday, July 07, 2003 11:11 PM
To: Struts Users Mailing List
Subject: how to access tiles defs in inserted jsp ?


How do I access the value of a tiles setting from a JSP that is 
inserted into a template?  For instance, in the following scenario, I 
want a rendering of myTilesPageDef to say bfoo = bar/b, but 
it just says bfoo = /b.  I've tried some ugly hacks, which in 
addition to be ugly, didn't work.

Help!

Thanks,

  -- Mike

tiles-defs.xml:

  definition name=myTilesPageDef path=myPageTemplate.jsp
put name=body value=myBodyImpl.jsp /
put name=foo value=bar type=string /
  /definition
myPageTemplate.jsp:

  btiles:insert attribute=body //b

myBodyImpl.jsp:

  foo = tiles:insert attribute=foo /







**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**




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


Refreshing screens

2003-07-09 Thread Mohan Radhakrishnan
Hi

This is a question about the best practice followed when refreshing
screens to reflect new data in the database.


1. View 1 has a 'search' button.
2. The searched records are displayed with a hyperlink for editing
them.
3. The edit page opens a new JSP. After editing the first page is
shown again.
4. The edited values will not be reflected until the 'search' button
is clicked another time in the first page. The records are in the scope in
the presentation tier.

What is the popular practice for this ? It is something like yahoo
mail that doesn't refresh the screen
automatically.

Do I call the same 'search' action every time I edit a record so
that the user need not click the button ?

Mohan







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



Validation of user input depending upon the user locale.

2003-07-09 Thread Sagar A. Phanse
Hi!
I need some help.
I have a textfield in my JSP where user can enter the text.
Now I wanted to validate the user entered text into the textfield such that when 
jsp-form is submitted it will let only those characters to be entered in the textfield 
which are 
belonging to the language/locale of the user.. Depending upon the user locale.
E.g. If user is in Japanese Locale and if user enters ä or ü (german characters) it 
should be validated giving an error.
Is there any fascility available in struts for this?
If there is any other way than struts to achive this, even then do let me know.

-Thanks in Advance
Sagar

 



*--
This message and any attachment(s) is intended only for the use of the addressee(s) 
and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the 
intended addressee(s), you are hereby notified that any use, distribution, disclosure 
or copying of this communication is strictly prohibited. If you have received this 
communication in error, please erase all copies of the message and its attachment(s) 
and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and not of 
Kanbay.

Although we have taken steps to ensure that this e-mail and any attachment(s) are free 
from any virus, we advise that in keeping with good computing practice the recipient 
should ensure they are actually virus free.



Re: Workflow engine status

2003-07-09 Thread Matthias Bauer
Seems like we are about to start a flame war on this ;-)

It didn't say that this is a workflow engine. I just tried to point 
Kevin to a this extension because it might cover what he is looking for.

--- Matthias





JavaXML Developer wrote:

Its a workflow extension NOT engine.

*/Sandeep Takhar [EMAIL PROTECTED]/* wrote:

That is not a workflow engine per se.

sandeep
--- Matthias Bauer
wrote:
 I don't think that there has been anybody working on
 this proposal for
 several months. It is definitely not part of the
 latest Struts releases.

 Depending on what your requirements are, you might
 want to have a look
 at the Struts Workflow Extension at
 http://www.livinglogic.de/Struts .

 --- Matthias


 Kevin K wrote:

 I was looking at Jakarta for a workflow engine and
 I
 found this URL -

http://jakarta.apache.org/struts/proposal-workflow.html.
 What I can't find is when this proposal was written
 and if this workflow engine is included in the
 latest
 releas e of Struts.
 
 Thanks for your help,
 Kevin
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 

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




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

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Do you Yahoo!?
SBC Yahoo! DSL 
http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/ 
- Now only $29.95 per month! 




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


Re: Refreshing screens

2003-07-09 Thread Nagendra Kumar O V S








  hi,
  1. first thing u need to do is turn off the client caching by setting 
  nocache=true in the controller element of the struts-config file
  2. if this does't solve ur problem, pl check if ur updating the 
  records in the scope after updating to the datasource.
  
  -- nagi
  
  
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Wednesday, July 
  09, 2003 11:58:21 AM
  To: 'Struts Users Mailing 
  List'
  Subject: Refreshing 
  screens
  HiThis is a question about the best practice 
  followed when refreshingscreens to reflect new data in the 
  database.1. View 1 has a 'search' button.2. The searched 
  records are displayed with a hyperlink for editingthem.3. The edit 
  page opens a new JSP. After editing the first page isshown 
  again.4. The edited values will not be reflected until the 'search' 
  buttonis clicked another time in the first page. The records are in 
  the scope inthe presentation tier.What is the popular practice 
  for this ? It is something like yahoomail that doesn't refresh the 
  screenautomatically.Do I call the same 'search' action every 
  time I edit a record sothat the user need not click the button 
  ?Mohan-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



RE: Validation of user input depending upon the user locale.

2003-07-09 Thread Andrew Hill
Yep. Your Japanese users are sure gonna love that feature when they try to
enter the names of their German clients into the application (or whatever).

-Original Message-
From: Sagar A. Phanse [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 July 2003 14:32
To: [EMAIL PROTECTED]
Subject: Validation of user input depending upon the user locale.


Hi!
I need some help.
I have a textfield in my JSP where user can enter the text.
Now I wanted to validate the user entered text into the textfield such that
when jsp-form is submitted it will let only those characters to be entered
in the textfield which are
belonging to the language/locale of the user.. Depending upon the user
locale.
E.g. If user is in Japanese Locale and if user enters ä or ü (german
characters) it should be validated giving an error.
Is there any fascility available in struts for this?
If there is any other way than struts to achive this, even then do let me
know.

-Thanks in Advance
Sagar





*--
This message and any attachment(s) is intended only for the use of the
addressee(s) and may contain information that is PRIVILEGED and
CONFIDENTIAL. If you are not the intended addressee(s), you are hereby
notified that any use, distribution, disclosure or copying of this
communication is strictly prohibited. If you have received this
communication in error, please erase all copies of the message and its
attachment(s) and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and
not of Kanbay.

Although we have taken steps to ensure that this e-mail and any
attachment(s) are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.



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



Tiles - Support for conditional composite?

2003-07-09 Thread Richard Tomlinson
I'm evaluating a possible Struts-Tiles solution but require clarification to the Tiles 
approach to page composition.

My requirement is that a potential web user could be categorised as an individual, a 
small business, a corporate, etc.   All categories of users have access to the same 
pages but the content may be different for each category of user.  The differences 
could be as small as a single content area or it could be a different template with 
differing areas.  From initial appearances Tiles assumes that the composition is 
static with respect to specifying the individual content areas.

A poor solution would be to generate lots of different Tiles defs for all combinations 
and employ complicated routing to each.  Likewise, generating a virtual site for each 
category of user leads to similar complications and duplication.

We have a propriatary, non-Struts/Tiles soluton (But of a remarkably similar approach) 
which has addressed all of these problems though we need to ensure that any other 
solution will have similar functionality to what we have already.

So, my questions are:

o  Is this type of functionality currently available?   

o  Has anyone thought of this before and is there a well known solution?

o  Is there any plan to extend Tiles to offer conditional composition?

Regards
Richard Tomlinson


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



Passing parameter to another Action class using POST

2003-07-09 Thread Rajesh Khater

Hi,

I need to pass some parameters to another action class from my action
class. I can do it using query String. But how can I send the parameters
using HTTP POST programmatically ??

Query strings also have some maximum length and my parameter values can
get pretty lengthy.

Thanks,
Rajesh.

**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***

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



No stream could be found

2003-07-09 Thread sriram
Did anyone face the following problem while loading validation-rules.xml?

The following message is displayed during deployment and so I'm unable to use 
validator framework:

13:08:42,913 INFO  [Engine] validator: Loading validation rules file from '/WEB-
INF/validation-rules.xml'
13:08:42,923 INFO  [Engine] validator: Skipping validation rules file from '/WEB
-INF/validation-rules.xml'.  No stream could be opened.



RE: Passing parameter to another Action class using POST

2003-07-09 Thread Navjot Singh
1 simple way

+ map = request.getParameterMap()
+ request.getSession().setAttribute(past_req_data,map);
+ redirect to next action
+ request.getSession().getAttribute(past_req_data);
+ request.getSession().removeAttribute(past_req_data);

HTH
-navjot


|-Original Message-
|From: Rajesh Khater [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, July 09, 2003 1:03 PM
|To: Struts Users Mailing List
|Subject: Passing parameter to another Action class using POST
|
|
|
|Hi,
|
|I need to pass some parameters to another action class from my action
|class. I can do it using query String. But how can I send the parameters
|using HTTP POST programmatically ??
|
|Query strings also have some maximum length and my parameter values can
|get pretty lengthy.
|
|Thanks,
|Rajesh.
|
|**Disclaimer
|
|Information contained in this E-MAIL being proprietary to Wipro Limited is
|'privileged' and 'confidential' and intended for use only by the individual
| or entity to which it is addressed. You are notified that any
|use, copying
|or dissemination of the information contained in the E-MAIL in any manner
|whatsoever is strictly prohibited.
|
|***
|
|-
|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: Passing parameter to another Action class using POST

2003-07-09 Thread Kwok Peng Tuck
You can set the attribute in the request as well.
String string1 = Stuff ;
request.setAttribute(Info, string1) ;
Then later in the other action class, just do :

String output = (String)   request.getAttribute(Info) ;



Rajesh Khater wrote:

Hi,

I need to pass some parameters to another action class from my action
class. I can do it using query String. But how can I send the parameters
using HTTP POST programmatically ??
Query strings also have some maximum length and my parameter values can
get pretty lengthy.
Thanks,
Rajesh.
**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***

-
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: Tiles - Support for conditional composite?

2003-07-09 Thread Navjot Singh
hi richard,

Well, tiles are great as they allow to create and define your template
definitions in xml files that can be changed easily.
One may follow the simple jsp includes way but usually i prefer tiles.

Your problem goes into conditional tiling.
In terms of typical web applications, these conditions rarely go beyond
roles. You may choose diff conditions. But i will take role example :-)

__Baseline__
What you can have is a common tile for all roles but then you can use core
taglibs.

__How__
c:choose
c:when test=${param.role == 'user'}
t:put name=left_panel value=/jsp/left_user.jsp type=page/
/c:when
c:when test=${param.role == 'corp'}
t:put name=left_panel value=/jsp/left_corp.jsp type=page/
/c:when
  .
  .
  .
/c:choose

I am pretty sure that you can move this check to 1 single file IF
+ roles are clearly defined and
+ the number of areas in page, that can change, are NOT TOO MANY.

Do let us know whichever you way you decided to choose.

HTH
-navjot


|-Original Message-
|From: Richard Tomlinson [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, July 09, 2003 12:40 PM
|To: [EMAIL PROTECTED]
|Subject: Tiles - Support for conditional composite?
|
|
|I'm evaluating a possible Struts-Tiles solution but require
|clarification to the Tiles approach to page composition.
|
|My requirement is that a potential web user could be categorised
|as an individual, a small business, a corporate, etc.   All
|categories of users have access to the same pages but the content
|may be different for each category of user.  The differences could
|be as small as a single content area or it could be a different
|template with differing areas.  From initial appearances Tiles
|assumes that the composition is static with respect to specifying
|the individual content areas.
|
|A poor solution would be to generate lots of different Tiles defs
|for all combinations and employ complicated routing to each.
|Likewise, generating a virtual site for each category of user
|leads to similar complications and duplication.
|
|We have a propriatary, non-Struts/Tiles soluton (But of a
|remarkably similar approach) which has addressed all of these
|problems though we need to ensure that any other solution will
|have similar functionality to what we have already.
|
|So, my questions are:
|
|o  Is this type of functionality currently available?
|
|o  Has anyone thought of this before and is there a well known solution?
|
|o  Is there any plan to extend Tiles to offer conditional composition?
|
|Regards
|Richard Tomlinson
|
|
|-
|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]



Reusable Components

2003-07-09 Thread Frédéric Dreier
Hi,

I really need your help and hints... I was not able to found something
related on internet.

how can i make reusable 'high-level' components? taglib seems to be useless
for such components (that already use JSP's and actions). Tiles is exactly
what i need but it does not seems to work if sub-component JSPs are packed
in a JAR library..

Does anyone has some link or other resources about it? or even has another
solution?

Thanks in advance,

Frederic


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



RE: Passing parameter to another Action class using POST

2003-07-09 Thread Rajesh Khater

Hi,

Setting attributes in the request is fine .. But the other action class
can also directly be called by a JSP, in which case it will have to do
request.getParameter() , not request.getAttribute().

Of course, it can check if request.getParameter() returns null, then try
for request.getAttribute().

But isn't there a way to send POST data programmatically ??

Thanks,
Rajesh.

-Original Message-
From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 1:39 PM
To: Struts Users Mailing List
Subject: Re: Passing parameter to another Action class using POST


You can set the attribute in the request as well.
String string1 = Stuff ;
request.setAttribute(Info, string1) ;

Then later in the other action class, just do :

String output = (String)   request.getAttribute(Info) ;



Rajesh Khater wrote:

Hi,

I need to pass some parameters to another action class from my action
class. I can do it using query String. But how can I send the
parameters
using HTTP POST programmatically ??

Query strings also have some maximum length and my parameter values can
get pretty lengthy.

Thanks,
Rajesh.

**Disclaimer***
*

Information contained in this E-MAIL being proprietary to Wipro Limited
is 
'privileged' and 'confidential' and intended for use only by the
individual
 or entity to which it is addressed. You are notified that any use,
copying 
or dissemination of the information contained in the E-MAIL in any
manner 
whatsoever is strictly prohibited.

***


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


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***

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



html:img doesn't get rendered

2003-07-09 Thread TopBid987654321
Hi All,

Maybe someone has done this before :

I am trying to use bean:message to deliver a html:img in my JSP, however, 
the html:img tag doesn't get rendered when it is delivered. Instead, the 
raw tag, html:img page=/logos/PublishersEnglish.jpg alt=Publishers 
border=0 width=135 height=26/, is delivered.

Am I missing anything here? Any suggestions please.

Thank you.

Bob.

A  snippet from my ApplicationResources.properties file :
.
.
books.publisher.heading=html:img page=/logos/PublishersEnglish.jpg 
alt=Publishers border=0 width=135 height=26/
.
.


A  snippet from my JSP :
.
.
bean:message key=books.publisher.heading/
.
.


Re: html:img doesn't get rendered

2003-07-09 Thread Jason Lea
Hi Bob,

Use this in the JSP:

html:img srcKey=books.publisher.heading alt=Publishers border=0 
width=135 height=26/

and ApplicationResources.properties:

books.publisher.heading=/logos/PublishersEnglish.jpg

--jason

[EMAIL PROTECTED] wrote:
Hi All,

Maybe someone has done this before :

I am trying to use bean:message to deliver a html:img in my JSP, however, 
the html:img tag doesn't get rendered when it is delivered. Instead, the 
raw tag, html:img page=/logos/PublishersEnglish.jpg alt=Publishers 
border=0 width=135 height=26/, is delivered.

Am I missing anything here? Any suggestions please.

Thank you.

Bob.

A  snippet from my ApplicationResources.properties file :
.
.
books.publisher.heading=html:img page=/logos/PublishersEnglish.jpg 
alt=Publishers border=0 width=135 height=26/
.
.

A  snippet from my JSP :
.
.
bean:message key=books.publisher.heading/
.
.


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


RE: Passing parameter to another Action class using POST

2003-07-09 Thread Andrew Hill
snip
But isn't there a way to send POST data programmatically ??
/snip

Servlet API 2.3 supports the HttpServletRequestWrapper class so you could
subclass and create one of these that returns the parameters you want. The
tricky bit will be in having it used for the forwarding. You will probably
need to play round with the RequestProcessor for that.

An alternative is to forward to a page that writes out a form with hidden
fields and submits to the other action but this involves the client side.

-Original Message-
From: Rajesh Khater [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 July 2003 16:31
To: Struts Users Mailing List
Subject: RE: Passing parameter to another Action class using POST



Hi,

Setting attributes in the request is fine .. But the other action class
can also directly be called by a JSP, in which case it will have to do
request.getParameter() , not request.getAttribute().

Of course, it can check if request.getParameter() returns null, then try
for request.getAttribute().

But isn't there a way to send POST data programmatically ??

Thanks,
Rajesh.

-Original Message-
From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 1:39 PM
To: Struts Users Mailing List
Subject: Re: Passing parameter to another Action class using POST


You can set the attribute in the request as well.
String string1 = Stuff ;
request.setAttribute(Info, string1) ;

Then later in the other action class, just do :

String output = (String)   request.getAttribute(Info) ;



Rajesh Khater wrote:

Hi,

I need to pass some parameters to another action class from my action
class. I can do it using query String. But how can I send the
parameters
using HTTP POST programmatically ??

Query strings also have some maximum length and my parameter values can
get pretty lengthy.

Thanks,
Rajesh.

**Disclaimer***
*

Information contained in this E-MAIL being proprietary to Wipro Limited
is
'privileged' and 'confidential' and intended for use only by the
individual
 or entity to which it is addressed. You are notified that any use,
copying
or dissemination of the information contained in the E-MAIL in any
manner
whatsoever is strictly prohibited.

***


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


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.

***

-
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: Passing parameter to another Action class using POST

2003-07-09 Thread Kwok Peng Tuck
If this is the case then I guess setting the attribute in the session is 
the easiest way to go.

Rajesh Khater wrote:

Hi,

Setting attributes in the request is fine .. But the other action class
can also directly be called by a JSP, in which case it will have to do
request.getParameter() , not request.getAttribute().
Of course, it can check if request.getParameter() returns null, then try
for request.getAttribute().
But isn't there a way to send POST data programmatically ??

Thanks,
Rajesh.
-Original Message-
From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 1:39 PM
To: Struts Users Mailing List
Subject: Re: Passing parameter to another Action class using POST

You can set the attribute in the request as well.
String string1 = Stuff ;
request.setAttribute(Info, string1) ;
Then later in the other action class, just do :

String output = (String)   request.getAttribute(Info) ;



Rajesh Khater wrote:

 

Hi,

I need to pass some parameters to another action class from my action
class. I can do it using query String. But how can I send the
   

parameters
 

using HTTP POST programmatically ??

Query strings also have some maximum length and my parameter values can
get pretty lengthy.
Thanks,
Rajesh.
**Disclaimer***
   

*
 

Information contained in this E-MAIL being proprietary to Wipro Limited
   

is 
 

'privileged' and 'confidential' and intended for use only by the
   

individual
 

or entity to which it is addressed. You are notified that any use,
   

copying 
 

or dissemination of the information contained in the E-MAIL in any
   

manner 
 

whatsoever is strictly prohibited.

***
   


 

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

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***

-
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: bean:write problem with struts 1.1

2003-07-09 Thread Linus Nikander
I'm running Weblogic 6.1 and have experienced exactly the same problem. It
goes away if you change the returntype of the getter to a String instead of
whatever you are using. Not a solution to the problem though. I sent in a
post eariler to this group, but didn't get any replies that solved the
issue.

//Linus Nikander - [EMAIL PROTECTED]

Nicolas Seinlet [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have the same problem. I solve it by deleting the data-sources section
and some Action in the struts config file.

 It's the only way I can solve the problem, but it's not a solution,
because I need the data-sources and the actions.

 After reading the net, the problem can also be due to xml parser, so I try
to change the XML parser, but the problem is still present.

 So, I'm lost on the way to find to solve the problem.

 I will try with another Server, like jboss and see...

 -Message d'origine-
 De : David Jiao [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 8 juillet 2003 17:09
 À : Struts Users Mailing List
 Objet : RE: bean:write problem with struts 1.1


 But I didn't specify any data-sources from my struts-config file. Do I
 have to include it anyway?

 On Tue, 2003-07-08 at 09:59, Nicolas Seinlet wrote:
  It kept throwing a
  message: org.apache.jasper.JasperException: Cannot find message
  resources under key org.apache.struts.action.MESSAGE.
 
  It seems to be due to the the data-sources
 
  -
  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: Converting an ActionError to a string programmatically

2003-07-09 Thread Viacheslav Novgorodtsev, E-Commerce SO
Example:
ConfigHelper helper = new ConfigHelper();
helper.setApplication(servlet.getServletContext());
MessageResources messageResources = helper.getMessageResources();
ActionErrors errors =
searchProductMasksForm.validate(actionMapping,request);
if (errors !=null  !errors.isEmpty()) {
Vector verr = new Vector();
for(Iterator er = errors.get();er.hasNext();) {
ActionError err = (ActionError)er.next();
String message =
MessageResources.getMessageResources
(resources.application).getMessage(request.getLocale(),err.getKey(),err.ge
tValues());
verr.add(message);
if (log.isDebugEnabled()){
log.debug(message=+message);
}
}
}

S privetom,
Slava   

-Original Message-
From: Kornelis Sietsma [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 5:12 AM
To: [EMAIL PROTECTED]
Subject: Converting an ActionError to a string programmatically


Hi all.

I am looking for a good way to turn an ActionError into a string, without
having a
PageContext or anything else so useful (so I can't use the
RequestUtils.message()
function).

Is there a simple way to do this?  I can probably do it the hard way, by
digging
through the RequestUtils source and working out what it does, but I'm hoping
that
either (a) there is another utility class I've missed that will do this, or
(b)
someone else has done this and can save me the pain!

The reason I need this is that I have some code that updates a back-end
system, and
returns ActionErrors if there are any validation failures.  Usually this
gets called
from a struts action, and the errors get displayed to the user with the
errors/
tag.

However, now we need to do some background batch updates, called from a
thread
spawned from a servlet (which is outside our normal struts pages).  The
batch process
is likely to be slow, and so we want the results of any validation failures
to get
logged to an error file, rather than getting displayed to the user.

Any suggestions?

- Korny
--
Kornelis Sietsma   http://www.sietsma.com/korny  [EMAIL PROTECTED]
goofey: korny  yahoo: kornysietsma  icq: 2039172 ph: 0421 079 693

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


Re: ClassCastException using the DynaValidatorForm

2003-07-09 Thread Adam Hardy
Don't you just love caching? The number of errors I have made like that 
which drove me insane until whatever it was - the browser, the server, 
the memory - stopped caching. Torture.

Michael Muller wrote:
That would explain it.  The struts-config got re-loaded telling it that 
myForm was a dyna bean, but the re-serialized bean in the session was 
still one of my custom beans.

Thank you!  I had no idea that Tomcat serialized the session data when 
it shut down.

  -- Mike

Wendy Smoak wrote:

this resulted in the ClassCastException i described earlier, despite 
reloading the webapp and even restarting tomcat.


Did you also close the browser window you were using to test?  IIRC, 
Tomcat
serializes session data when you shut it down.  Just a guess, but I think
you had a session sitting around with the old form bean, and since the
name was the same, it got used.  If you had changed the name from the
beginning (myForm2) you likely never would have seen this.





-
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: Login Form

2003-07-09 Thread Sean Radford
On Tue, 2003-07-08 at 20:34, Erez Efrati wrote:
 Thanks Sean, 
 
 I looked at it and it does avoid the BIG limitation posed by the
 standard spec in fact. Still I cannot use it since it disables the
 passing of the principal identity through calls to EJB methods.
 
That's what it says in the introductory documentation, but...

You're using JBoss/Tomcat right? Well give me a day and I'll email you a
class that should do all you want... It's a RealmAdaptor for
securityfilter/Jboss that uses the JBoss security extension and so
correctly instantiates the Principal for the EJB layer. It works for me
with JBoss4/Jetty, so you should give it a try. (I'm waiting on some
code from another guy whose done similar and so just want to compare -
if his stuff doesn't arrive shortly, I'll send mine as it)


 Now, I am new to the web development and it amazes me that such a basic
 feature is missing from the Servlet spec and is not addressed. Why is it
 that way? Is it so unusual to want to have the login fields on the start
 page??

Not unusual at all... And many Java sites have it that way, but they
don't necessarily use container authentication and they probably don't
use EJB's (many people steer clear - deep seated reservations from 1.0
are still abound).

If I get time I'm going to try and get the Jetty guys to 'surface' their
web Authenticators to allow developers to roll their own... I've looked
at the code and shouldn't be too difficult - one or two areas I'm not
sure about, but...


 
 Thanks,
 Erez 
 
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 08, 2003 8:21 PM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 Have a look at this (you may find what you want):
 
 http://sourceforge.net/projects/securityfilter/
 
 Sean
 
 
  -Original Message-
  From: Erez Efrati [mailto:[EMAIL PROTECTED] 
  Sent: July 8, 2003 10:11 AM
  To: 'Struts Users Mailing List'
  Subject: Login Form
  
  
  Hi,
  
  My question is a bit off Struts but still since I am using Struts and
  it's too urgent for me I thought to try my luck here, maybe someone
 had
  stumbled on this issue too.
  
  I am running JBoss/Tomcat/Struts using the JAAS for handling the
  application security aspects. I have used the
  auth-methodFORM/auth-method clauses inside the Web.xml file.
  
  In my web site I want to have the site home page to have also a small
  login form where the user could enter username and password and login
 to
  the site. The home page, contains other links as well, which lead to
  other parts of the site or even to external pages on other sites.
  
  From what I've read so far, it seems to me that the FORM method is
  activated only when the web user tries to access a protected page.
 Then
  the Web Server (Tomcat in my case) returns the loginPage stated in the
  Web.xml file, and only after the login is performed (j_security_check)
  the Tomcat then redirects the web user to the original portected page.
  
  Is it possible to have the site home page as the login page still
 using
  mechanisms of FORM and JAAS? If so I would really appreciate any help
 on
  how to do it, and what are the configurations required. 
  
  Thanks,
  Erez
  
  
  
  -
  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]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



Re: Design question: Confirm action after validation ?

2003-07-09 Thread Adam Hardy
I have an Action base class which all my other Action classes inherit. 
In the execute() of this base class I check whether the user clicked 
cancel, before I call the child class execute().

I presume it would be easy enough to store the originating URL in the 
session, and if cancel is clicked, roll your own Action Forward back to 
this URL.

Since it is all in the base class, it could work for every action as 
long as you are careful to watch the parameters or ids.

Ajay Patil wrote:
Hello,

In my Struts application, the validation is done on server-side 
for every page. If the validation is successful, the user would
like to see a page to confirm his action. The Confirm page should
also have a Cancel button allowing him to go back to the previous
page showing the data entered so far.

This functionality is needed for every action.

I am thinking if there is a generic way by which I can achieve this
functionality. 

I also realize that I might end up making scope=session for
every form, in trying to implement this requirement. (and I am
worried about this too).
Any ideas, pointers and/or thoughts will be very useful.

Ajay


Ajay Patil
Vertex Software Pvt. Ltd.
[EMAIL PROTECTED]
http://www.vertex.co.in

-
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: Design question: Confirm action after validation ?

2003-07-09 Thread Shashank Dixit
Hello Adam

I have one doubt. 

You have base action class for all your subaction classes.
What is the responsibility of this base action class.
Do your base action class checks which button is clicked?
If there are say 10 buttons in one form (say, GO, ADD, SAVE, NEXT, etc)
are there 10 if statements in your class. Or it
is sub action class resposibility to check this.? are there 10 or (any no)
of if statements in subaction classes.?
How to eliminate those if statements? any idea?

Pls reply
Shashank


- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 2:52 PM
Subject: Re: Design question: Confirm action after validation ?


 I have an Action base class which all my other Action classes inherit. 
 In the execute() of this base class I check whether the user clicked 
 cancel, before I call the child class execute().
 
 I presume it would be easy enough to store the originating URL in the 
 session, and if cancel is clicked, roll your own Action Forward back to 
 this URL.
 
 Since it is all in the base class, it could work for every action as 
 long as you are careful to watch the parameters or ids.
 
 Ajay Patil wrote:
  Hello,
  
  In my Struts application, the validation is done on server-side 
  for every page. If the validation is successful, the user would
  like to see a page to confirm his action. The Confirm page should
  also have a Cancel button allowing him to go back to the previous
  page showing the data entered so far.
  
  This functionality is needed for every action.
  
  I am thinking if there is a generic way by which I can achieve this
  functionality. 
  
  I also realize that I might end up making scope=session for
  every form, in trying to implement this requirement. (and I am
  worried about this too).
  
  Any ideas, pointers and/or thoughts will be very useful.
  
  Ajay
  
  
  Ajay Patil
  Vertex Software Pvt. Ltd.
  [EMAIL PROTECTED]
  http://www.vertex.co.in
  
  
  
  -
  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: Tiles - Support for conditional composite

2003-07-09 Thread Navjot Singh
hi richard,

I thought there is only part of the area that would differ based on roles --
user/corp/xyz
It seems your entire page will be different. In that case it does make sense
to

+ avoid tiles
OR
+ keep separate tiles for diff conditions.

My example works good only if 1/2 of N sections of the page are required to
be changed based on conditions.

hope i am clear ;-)
-navjot


|-Original Message-
|From: Richard Tomlinson [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, July 09, 2003 2:08 PM
|To: [EMAIL PROTECTED]
|Subject: Re: Tiles - Support for conditional composite
|
|
|Thanks for the reply.
|
|snip
|c:choose
|c:when test=${param.role == 'user'}
|   t:put name=left_panel value=/jsp/left_user.jsp type=page/
|/c:when
|c:when test=${param.role == 'corp'}
|   t:put name=left_panel value=/jsp/left_corp.jsp type=page/
|/c:when
|/snip
|
|With this method, I assume that it is not possible therefore to
|use the tiles.xml file to create a tiles definition.  All pages
|must therefore be defined in their own jsp page using the tags
|shown above?   This looks fine for my requirement.
|
|Regards
|Richard Tomlinson
|


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



Re: Design question: Confirm action after validation ?

2003-07-09 Thread Adam Hardy
my base action class sorts out all the general objects and variables 
that the child actions need - this is the child action's execute() 
signature:

public String executeList(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response,
  BlackSailUser user,
  Locale locale,
  MessageResources messages,
  ActionErrors errors,
  Connection conn)
throws Exception
I guess the list of responsibilites for the base action superclass is:

(1) establish the action to carry out (your GO, ADD, SAVE etc) which is 
a token that is set by any of a request parameter, request attribute, 
action mapping parameter, or cancel button.
(2) get a jdbc connection object from pool
(3) get message resources from request
(4) get locale from request
(5) get user object from session
(6) get errors from request
(7) error handling  (I don't have any in my subclasses)
(8) get any lists for drop-down boxes (a seperate call to subclass)

Had to check that out by looking at the code. It served me fine since my 
first struts app.

Shashank Dixit wrote:
Hello Adam

I have one doubt. 

You have base action class for all your subaction classes.
What is the responsibility of this base action class.
Do your base action class checks which button is clicked?
If there are say 10 buttons in one form (say, GO, ADD, SAVE, NEXT, etc)
are there 10 if statements in your class. Or it
is sub action class resposibility to check this.? are there 10 or (any no)
of if statements in subaction classes.?
How to eliminate those if statements? any idea?
Pls reply
Shashank
- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 2:52 PM
Subject: Re: Design question: Confirm action after validation ?



I have an Action base class which all my other Action classes inherit. 
In the execute() of this base class I check whether the user clicked 
cancel, before I call the child class execute().

I presume it would be easy enough to store the originating URL in the 
session, and if cancel is clicked, roll your own Action Forward back to 
this URL.

Since it is all in the base class, it could work for every action as 
long as you are careful to watch the parameters or ids.

Ajay Patil wrote:

Hello,

In my Struts application, the validation is done on server-side 
for every page. If the validation is successful, the user would
like to see a page to confirm his action. The Confirm page should
also have a Cancel button allowing him to go back to the previous
page showing the data entered so far.

This functionality is needed for every action.

I am thinking if there is a generic way by which I can achieve this
functionality. 

I also realize that I might end up making scope=session for
every form, in trying to implement this requirement. (and I am
worried about this too).
Any ideas, pointers and/or thoughts will be very useful.

Ajay


Ajay Patil
Vertex Software Pvt. Ltd.
[EMAIL PROTECTED]
http://www.vertex.co.in

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


Vacancy

2003-07-09 Thread Indra Gunawan
PACIFIC COMMUNICATION NETWORK - VACANCY

Pacomnet (Pacific Communication Networks) is an application service provider
(ASP). 
We deliver virtual financial services to the empowered customer. We offer
e-Banking and online settlement solutions. 
Due to the regional expansion of our business, we are seeking personnel for
full-time employment of:

SOFTWARE DEVELOPER
Responsibility : Developing solutions for e-Banking Projects
Requirements :
* IT formal background
* Minimum of 3 years experience in software development working with JAVA,
EJB, J2EE, HTML, XML and RDBMS
* Has strong background and understanding of Object-Oriented Modeling
* Familiarity with WebLogic is a plus
* Abilities to work as a team player or work independently
* Fast learner, hard working and good interpersonal skills

Please submit your CV to :

PT. Pacomnet
Wisma Indovision, 12 Floor
Jl Raya Panjang Z/III 
Kompleks Green Garden
Jakarta 11520 - Indonesia
Email : [EMAIL PROTECTED]

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



[SCAFFOLD] StorageBeanBase feature request

2003-07-09 Thread Umberto Nicoletti
I am in the middle of the process of defining the data access layer to 
be used for a new Struts-based application, for which we already use 
Scaffold's ProcessBeans.

We decided not to go with Hibernate as a persistence layer (to my 
disappointment) and to choose Scaffold Access/StorageBean approach instead.
Reading on this list I found an email by Ted Husted saying that he was 
(maybe still is?) not happy with the StorageBean deployment.

So my question is what should I do? I quite like the Scaffold data 
access layer and more importantly my DBA trusts it too.
I'd prefer to go with StorageBeanBase, but in this case I should make 
minor modifications to the Scaffold code (which I will give back to the 
community of course). The other option is the Access approach, but it is 
deprecated and it is not nice to compile an application with lots of 
warnings.

The modifications I have to introduce in the StorageBeanBase are:

replace all calls to

StatementUtils.executeUpdate(null,etc);

with:

StatementUtils.executeUpdate(getResource(),etc);

and add a static String resource=null; with getters and setters
that can be overriden by subclasses. This is motivated by tha fact that 
I have tables located in many different schemas/db hosts and want 
ConnectionAdaptor to return the right connection for that schema/db host.

Thank you,
Umberto


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


how to upload files to the server

2003-07-09 Thread Jagannayakam
hi  all , 
Is it possible to upload file from the client to the server using struts. 

Regards,
Jagan.


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



Tiles: Unable to convert a String to java.lang.Object

2003-07-09 Thread Kern P., DP ITS, SCP, M
Hello,

I'm trying to read some tiles documentation from the webapp
tiles-documentation but I get the following error 
on page /tiles-documentation/test/quickOverview.jsp :
---
2003-07-09 12:44:31 - Ctx(/tiles-documentation) : Compiling:
/test/testAll.jsp to test.testAll_1
2003-07-09 12:44:31 - Ctx(/tiles-documentation) : compile error: req=R(
/tiles-documentation + /test/testAll.jsp + null)
 - org.apache.jasper.compiler.CompileException:
F:\BSM\Programme\jakarta-tomcat-3.3.1a\webapps\tiles-documentation\test\
testAll.jsp(14,5) Unable to convert a String to java.lang.Object for
attribute value
---

The complete stack trace is at the end of the mail.

I'm using the following software
--
Tomcat: 3.3.1a
JDK: 1.2.2
Struts: 1.1
--
For technical reasons we can not use the newest version of tomcat and the
jdk ?

What can I do to use tiles in my setup?
I searched google for more than an hour but I found nothing helpful.

Thanks and best regards.

Peter


Complete stack trace:

2003-07-09 12:44:31 - Ctx(/tiles-documentation) : Compiling:
/test/testAll.jsp to test.testAll_1
2003-07-09 12:44:31 - Ctx(/tiles-documentation) : compile error: req=R(
/tiles-documentation + /test/testAll.jsp + null)
 - org.apache.jasper.compiler.CompileException:
F:\BSM\Programme\jakarta-tomcat-3.3.1a\webapps\tiles-documentation\test\
testAll.jsp(14,5) Unable to convert a String to java.lang.Object for
attribute value
at
org.apache.jasper.compiler.TagBeginGenerator.convertString(TagBeginGenerator
.java:268)
at
org.apache.jasper.compiler.TagBeginGenerator.generateSetters(TagBeginGenerat
or.java:208)
at
org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatements
(TagBeginGenerator.java:315)
at
org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator.java
:374)
at
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J
spParseEventListener.java:792)
at
org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi
stener.java:221)
at
org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE
ventListener.java:176)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
at
org.apache.tomcat.facade.JasperLiaison.jsp2java(JspInterceptor.java:790)
at
org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:73
1)
at
org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
at
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968
)
at
org.apache.tomcat.facade.RequestDispatcherImpl.doInclude(RequestDispatcherIm
pl.java:353)
at
org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcherImpl
.java:189)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:413)
at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
at
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:881)
at
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
at layout.classicLayout_1._jspService(classicLayout_1.java:235)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at
org.apache.tomcat.facade.RequestDispatcherImpl.doInclude(RequestDispatcherIm
pl.java:402)
at
org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcherImpl
.java:189)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:413)
at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
at
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:881)
at
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
at test.quickOverview_1._jspService(quickOverview_1.java:94)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at 

RE: NestedIterateTag won't let go of collection

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

Edgar

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

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



RE: Multibox over a collection

2003-07-09 Thread Alex Shneyderman
 My problem is that I have a table in which every row is a object of a
 formbean and has checkbox on the left which is a column of the table.
So

Then each row is identified somehow (indexed?). Each row will need to
have 
that checkbox named (property) exactly the same way on each row, but you
can assign a different value (suppose index value) to the checkbox of
different row. Your form that accepts values from html request will need
to have String [] property that will be filled with indexes of checked
rows upon submission.

Alex.


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



RE: Bread crumb trail

2003-07-09 Thread Holman, Cal
I have created breadcrumbs two ways one using a TilesAction to read the tiles 
definitions and a simpler tag that access the tiles definitions.  I can send you the 
code if you are interested.  I have not created a tutorial.

Cal 

http://www.calandva.com/   

-Original Message-
From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 16:25
To: Struts Users Mailing List
Subject: Bread crumb trail

Greetings!!

Does anyone know of a bread crumb trail implemenation using Struts and Tiles?
A link to a tutorial/info would be helpful.

Thanks inadvance,

Curtney Jacobs


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

  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.

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



RE: how to upload files to the server

2003-07-09 Thread Alex Shneyderman
There is an example on struts site called struts-upload.
It is well commented, so try it out. If you can't find it
let me know and I will email it to you directly. The file 
size is ~1.4M.



 -Original Message-
 From: Jagannayakam [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 6:30 AM
 To: Struts Users Mailing List (E-mail)
 Subject: how to upload files to the server
 
 hi  all ,
 Is it possible to upload file from the client to the server using
struts.
 
 Regards,
 Jagan.
 
 
 -
 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 and tabs; post instead of link

2003-07-09 Thread Natalie D Rassmann
Can anyone help?  I am trying to change the tab links in the tabLayout
to submits  I am having so much trouble.  I can't get it to work.
Has anyone tried to do this?  Can anyone give me an example or point me
in the right direction??

Any help would be much appreicated?

Natalie

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

Re: Tag inside a tag

2003-07-09 Thread Kris Schneider
Kishan,

That's the expected behavior of the tag. If you use disabled=true, it will
output disabled=disabled. If you use disabled=false it won't output anything.

Quoting [EMAIL PROTECTED]:

 
 My apologies, It works (the text is disabled) although it prints
 disabled=disabled
 
 Thanks guys
 
 Kishan
 
 
 
 
 [EMAIL PROTECTED] on 09/07/2003 14:55:02
 
 Please respond to Struts Users Mailing List
[EMAIL PROTECTED]
 
 To:Struts Users Mailing List [EMAIL PROTECTED]
 cc:
 
 Subject:Re: Tag inside a tag
 
 
 Kris, the solution of using equal tag is not working. The html in the page
 displayed has following text
 
 input type=text name=name maxlength=40 size=38 value= disabled
 =disabled
 
 I do not know why it is writing disabled=disabledwhen I am giving it
 disabled=true in the struts html text tag like
 
 logic:equal name=form property=textDisabled value=yes
html:text property=name
   size=40
   maxlength=40
   disabled=true/
 /logic:equal
 
 It is not able to convert properly the struts html tag to html tag.
 
 Any ideas.
 
 Thanks
 
 Kishan
 
 
 
 
 
 Kris Schneider [EMAIL PROTECTED] on 09/07/2003 12:26:51
 
 Please respond to Struts Users Mailing List
[EMAIL PROTECTED]
 
 To:Struts Users Mailing List [EMAIL PROTECTED]
 cc:
 
 Subject:Re: Tag inside a tag
 
 But you've still got a few choices:
 
 Standard Struts w/logic tags:
 logic:equal name=form property=textDisabled value=yes
html:text property=name
   size=40
   maxlength=40
   disabled=true/
 /logic:equal
 logic:notEqual name=form property=textDisabled value=yes
html:text property=name
   size=40
   maxlength=40/
 /logic:notEqual
 
 Standard Struts w/request-time expression:
 html:text property=name
 size=40
 maxlength=40
 disabled=%= rt expr that evals to true of false %/
 
 Struts-EL:
 html-el:text property=name
size=40
maxlength=40
disabled=${el expr that evals to true or false}/
 
 And probably a few others...
 
 David Graham wrote:
  --- [EMAIL PROTECTED] wrote:
 
 Is it a limitation of HTML or struts tag implementation?
 Does struts 1.1 solve this issue (JSTL or otherwise).
 
 
  It has nothing to do with HTML or Struts.  This is a syntax error
  according to the JSP spec which means that no tag library can use a tag
 as
  another tag's attribute value.
 
  David
 
 
 Kishan
 
 
 
 
 
 Benjamin Stewart [EMAIL PROTECTED] on 09/07/2003 11:39:09
 
 Please respond to Struts Users Mailing List
[EMAIL PROTECTED]
 
 To:Struts Users Mailing List [EMAIL PROTECTED]
 cc:
 
 Subject:Re: Tag inside a tag
 
 you cant use tags inside tags... I discovered this recently :-( There
 are
 ways around it using jstl etc.
 
 [EMAIL PROTECTED] writes:
 
 
 Hi,
 
 Can I specify a disabled attribute of a text tag using another tag.
 
 For example:
 html:text property=name size=40 maxlength=40 logic:equal
 name=form property=textDisabled value=yesdisabled/logic:equal
 /
 
 Here I have to disable the text depending upon the property
 textDisabaled. The above thing is not working.
 
 Has anyone tried this thing before. I am using struts 1.02.
 
 Thanks in advance,
 
 Kishan
 
 --
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



RE: Bread crumb trail

2003-07-09 Thread Navjot Singh
no better documentation than code itself ;-)
can you post it?

|-Original Message-
|From: Holman, Cal [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, July 09, 2003 4:44 PM
|To: Struts Users Mailing List
|Subject: RE: Bread crumb trail
|
|
|I have created breadcrumbs two ways one using a TilesAction to
|read the tiles definitions and a simpler tag that access the tiles
|definitions.  I can send you the code if you are interested.  I
|have not created a tutorial.
|
|Cal
|
|http://www.calandva.com/
|
|-Original Message-
|From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, July 01, 2003 16:25
|To: Struts Users Mailing List
|Subject: Bread crumb trail
|
|Greetings!!
|
|Does anyone know of a bread crumb trail implemenation using Struts
|and Tiles?
|A link to a tutorial/info would be helpful.
|
|Thanks inadvance,
|
|Curtney Jacobs
|
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|
|Learn more about Paymentech's payment processing services at
www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are
proprietary and confidential information intended only for the use of the
recipient(s) named above.  If you are not the intended recipient, you may
not print, distribute, or copy this message or any attachments.  If you have
received this communication in error, please notify the sender by return
e-mail and delete this message and any attachments from your computer.

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



Struts upload problem

2003-07-09 Thread J.Broeking
Hi there,

i have a problem with the struts upload. We need to upload files larger than
1 MB.
We currently use Struts 1.1.b2. I have recompiled the struts classes - this
works fine.

In the upload example und web-inf i modified the struts-config.xml file as
follows:

 !-- This is where you set the maximum file size for your file uploads.
   -1 is an unlimited size. If you
   don't specify this here, it defaults to -1. --
  controller maxFileSize=-1 /

Normally i thougth i now would be able to upload file larger than 1 MB, but
this doesn't work.
We have changed or tomcat port from 8090 to 80. Does this has any influence
on the upload?

help needed!

best regards

Jens




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



Re: Design question: Confirm action after validation ?

2003-07-09 Thread Shashank Dixit
Hi again

Are you using EJBs??
If you are using EJB, where is the connection pool?
At webserver side or app server side.
Or where datasource is defined. at web server or app server?
How you are taking data(Value Objects)  from webserver to appserver

Shashank

- Original Message -
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 3:26 PM
Subject: Re: Design question: Confirm action after validation ?


 my base action class sorts out all the general objects and variables
 that the child actions need - this is the child action's execute()
 signature:

 public String executeList(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response,
BlackSailUser user,
Locale locale,
MessageResources messages,
ActionErrors errors,
Connection conn)
  throws Exception

 I guess the list of responsibilites for the base action superclass is:

 (1) establish the action to carry out (your GO, ADD, SAVE etc) which is
 a token that is set by any of a request parameter, request attribute,
 action mapping parameter, or cancel button.
 (2) get a jdbc connection object from pool
 (3) get message resources from request
 (4) get locale from request
 (5) get user object from session
 (6) get errors from request
 (7) error handling  (I don't have any in my subclasses)
 (8) get any lists for drop-down boxes (a seperate call to subclass)

 Had to check that out by looking at the code. It served me fine since my
 first struts app.

 Shashank Dixit wrote:
  Hello Adam
 
  I have one doubt.
 
  You have base action class for all your subaction classes.
  What is the responsibility of this base action class.
  Do your base action class checks which button is clicked?
  If there are say 10 buttons in one form (say, GO, ADD, SAVE, NEXT, etc)
  are there 10 if statements in your class. Or it
  is sub action class resposibility to check this.? are there 10 or (any
no)
  of if statements in subaction classes.?
  How to eliminate those if statements? any idea?
 
  Pls reply
  Shashank
 
 
  - Original Message -
  From: Adam Hardy [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, July 09, 2003 2:52 PM
  Subject: Re: Design question: Confirm action after validation ?
 
 
 
 I have an Action base class which all my other Action classes inherit.
 In the execute() of this base class I check whether the user clicked
 cancel, before I call the child class execute().
 
 I presume it would be easy enough to store the originating URL in the
 session, and if cancel is clicked, roll your own Action Forward back to
 this URL.
 
 Since it is all in the base class, it could work for every action as
 long as you are careful to watch the parameters or ids.
 
 Ajay Patil wrote:
 
 Hello,
 
 In my Struts application, the validation is done on server-side
 for every page. If the validation is successful, the user would
 like to see a page to confirm his action. The Confirm page should
 also have a Cancel button allowing him to go back to the previous
 page showing the data entered so far.
 
 This functionality is needed for every action.
 
 I am thinking if there is a generic way by which I can achieve this
 functionality.
 
 I also realize that I might end up making scope=session for
 every form, in trying to implement this requirement. (and I am
 worried about this too).
 
 Any ideas, pointers and/or thoughts will be very useful.
 
 Ajay
 
 
 Ajay Patil
 Vertex Software Pvt. Ltd.
 [EMAIL PROTECTED]
 http://www.vertex.co.in
 
 
 
 -
 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: Cancel button not working?

2003-07-09 Thread Sashi Ravipati
I am trying this on Struts 1.1 final. Will this make any difference..


 [EMAIL PROTECTED] 07/08/03 05:11PM 
Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.

m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:
 This is how I have my cancel tag.
 
 html:cancel
 bean:message key=button.cancel/
   /html:cancel
 
  [EMAIL PROTECTED] 07/08/03 02:27PM 
 The complete content of your html:cancel tag is
 probably key to solving this problem.
 
 m
 
 --- Sashi Ravipati [EMAIL PROTECTED] wrote:
  
   isCancelled(request) is always returning false
  (Even when cancel button
  is clicked)
  
  Need some help...
  
  Thanks
  
  
   [EMAIL PROTECTED] 07/08/03 09:10AM 
  I have a html:cancel in my jsp page. and in my
  action I have
  
  if(isCancelled(request)){
return mapping.findForward(index); 
  }
  
  
  But it is not working. What am I doing wrong here.
 I
  am using Struts 1.1
  final
  
  Thanks
  
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Re: Cancel button not working?

2003-07-09 Thread Nagendra Kumar O V S








  i am using struts1.1 final and i don't find any probs with the cancel 
  button
  
  --nagi
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Wednesday, July 
  09, 2003 05:46:35 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Cancel 
  button not working?
  I am trying this on Struts 1.1 final. Will this make any 
  difference.. [EMAIL PROTECTED] 07/08/03 05:11PM 
  Odd, I can't reproduce that in 1.1-rc1. Unless 
  you'reextending something which might override 
  theisCancelled(HttpServletRequest) method, or thehtml:cancel tag 
  is not contained within an html:formtag, I can't think of anything 
  else.m--- Sashi Ravipati [EMAIL PROTECTED] 
  wrote: This is how I have my cancel tag.  
  html:cancel bean:message 
  key="button.cancel"/ /html:cancel  
   [EMAIL PROTECTED] 
  07/08/03 02:27PM  The complete content of your 
  html:cancel tag is probably key to solving this problem. 
   m  --- Sashi Ravipati [EMAIL PROTECTED] 
  wrote:isCancelled(request) is always returning 
  false  (Even when cancel button  is 
  clicked)Need some help...  
Thanks   
  [EMAIL PROTECTED] 
  07/08/03 09:10AM   I have a html:cancel in 
  my jsp page. and in my  action I have   
   if(isCancelled(request)){  return 
  mapping.findForward("index");   }
But it is not working. What am I doing wrong here. 
  I  am using Struts 1.1  final  
Thanks 
  __ Do you Yahoo!? SBC 
  Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com 
  - 
  To unsubscribe, e-mail: [EMAIL PROTECTED] 
  For additional commands, e-mail: [EMAIL PROTECTED] 
  __Do you Yahoo!?SBC 
  Yahoo! DSL - Now only $29.95 per month!http://sbc.yahoo.com-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED]





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



Use of ActionForms with ActionForwards - seems to be a non starter...

2003-07-09 Thread Brook, Andy

Hi all,
I cant seem o get a form to be passed through an ActionForward to a
target Action.
 
Previously I had multiple Actions, and forms were submitted fine.  I've
migrated the multiple action types I had into a single Action class to
be more maintainable, and replaced existing action class names (in
struts-config.xml) with ActionForward instead.  
 
Now, the validate() method of the associated form gets executed, but the
form does not get passed on to the target 'dispatcher' Action, I get a
null form within the dispatcher Action.
 
Is the use of ActionForms and ActionForwards not mutually compatible, I
think I've missed something somewhere.  Perhaps ActionForwards are for
routing only and don't handle form submission...
 
Any clarification appreciated!
 
Andy.

This message (including any attachments) may contain confidential information intended 
for a specific individual and purpose. If you are not the intended recipient, delete 
this message. If you are not the intended recipient, disclosing, copying, 
distributing, or taking any action based on this message is strictly prohibited.


Re: [SCAFFOLD] StorageBeanBase feature request

2003-07-09 Thread Umberto Nicoletti
I have submitted a patch to Bugzilla 
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21433) for this issue.
Is there anyone interested in it?

Thanks,
Umberto
Umberto Nicoletti wrote:
I am in the middle of the process of defining the data access layer to 
be used for a new Struts-based application, for which we already use 
Scaffold's ProcessBeans.

We decided not to go with Hibernate as a persistence layer (to my 
disappointment) and to choose Scaffold Access/StorageBean approach instead.
Reading on this list I found an email by Ted Husted saying that he was 
(maybe still is?) not happy with the StorageBean deployment.

So my question is what should I do? I quite like the Scaffold data 
access layer and more importantly my DBA trusts it too.
I'd prefer to go with StorageBeanBase, but in this case I should make 
minor modifications to the Scaffold code (which I will give back to the 
community of course). The other option is the Access approach, but it is 
deprecated and it is not nice to compile an application with lots of 
warnings.

The modifications I have to introduce in the StorageBeanBase are:

replace all calls to

StatementUtils.executeUpdate(null,etc);

with:

StatementUtils.executeUpdate(getResource(),etc);

and add a static String resource=null; with getters and setters
that can be overriden by subclasses. This is motivated by tha fact that 
I have tables located in many different schemas/db hosts and want 
ConnectionAdaptor to return the right connection for that schema/db host.

Thank you,
Umberto


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


Re: tiles and tabs; post instead of link

2003-07-09 Thread Affan Qureshi
You need to change the code that generates links in tabLayout.jsp and call
javascript methods to submit the form on those links using onclick.

Affan

Natalie D Rassmann [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Can anyone help?  I am trying to change the tab links in the tabLayout
 to submits  I am having so much trouble.  I can't get it to work.
 Has anyone tried to do this?  Can anyone give me an example or point me
 in the right direction??

 Any help would be much appreicated?

 Natalie








 -
 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: [SCAFFOLD] StorageBeanBase feature request

2003-07-09 Thread James Childers
Umberto, 

You may be better served by directing your queries to the struts-dev mailing list.

[EMAIL PROTECTED]

-= J

 -Original Message-
 From: Umberto Nicoletti [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 8:04 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [SCAFFOLD] StorageBeanBase feature request
 
 
 I have submitted a patch to Bugzilla 
 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21433) for 
 this issue.
 Is there anyone interested in it?
 
 Thanks,
 Umberto
 
 Umberto Nicoletti wrote:
  I am in the middle of the process of defining the data 
 access layer to 
  be used for a new Struts-based application, for which we 
 already use 
  Scaffold's ProcessBeans.
  
  We decided not to go with Hibernate as a persistence layer (to my 
  disappointment) and to choose Scaffold Access/StorageBean 
 approach instead.
  Reading on this list I found an email by Ted Husted saying 
 that he was 
  (maybe still is?) not happy with the StorageBean deployment.
  
  So my question is what should I do? I quite like the Scaffold data 
  access layer and more importantly my DBA trusts it too.
  I'd prefer to go with StorageBeanBase, but in this case I 
 should make 
  minor modifications to the Scaffold code (which I will give 
 back to the 
  community of course). The other option is the Access 
 approach, but it is 
  deprecated and it is not nice to compile an application 
 with lots of 
  warnings.
  
  The modifications I have to introduce in the StorageBeanBase are:
  
  replace all calls to
  
  StatementUtils.executeUpdate(null,etc);
  
  with:
  
  StatementUtils.executeUpdate(getResource(),etc);
  
  and add a static String resource=null; with getters and setters
  that can be overriden by subclasses. This is motivated by 
 tha fact that 
  I have tables located in many different schemas/db hosts and want 
  ConnectionAdaptor to return the right connection for that 
 schema/db host.
  
  Thank you,
  Umberto
 
 
 
 -
 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: Design question: Confirm action after validation ?

2003-07-09 Thread Adam Hardy
I plan on using EJB but haven't got that far yet. At the moment I am 
using a bunch of 'factory' classes as my model, and would like to 
isolate this layer from the request, response objects etc in the actions.

So the fact that I get the connection in the base action is a legacy 
thing - I thought about changing it and probably will soon, to a 
strategy where the actions don't see the connection.  I changed the 
database configuration so that the pool is a JNDI resource, but I 
haven't got around to this second bit yet because the interface between 
the actions and the factories requires more thought as to how I marshall 
the data across.

Adam

Shashank Dixit wrote:
Hi again

Are you using EJBs??
If you are using EJB, where is the connection pool?
At webserver side or app server side.
Or where datasource is defined. at web server or app server?
How you are taking data(Value Objects)  from webserver to appserver
Shashank

- Original Message -
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 3:26 PM
Subject: Re: Design question: Confirm action after validation ?


my base action class sorts out all the general objects and variables
that the child actions need - this is the child action's execute()
signature:
public String executeList(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response,
  BlackSailUser user,
  Locale locale,
  MessageResources messages,
  ActionErrors errors,
  Connection conn)
throws Exception
I guess the list of responsibilites for the base action superclass is:

(1) establish the action to carry out (your GO, ADD, SAVE etc) which is
a token that is set by any of a request parameter, request attribute,
action mapping parameter, or cancel button.
(2) get a jdbc connection object from pool
(3) get message resources from request
(4) get locale from request
(5) get user object from session
(6) get errors from request
(7) error handling  (I don't have any in my subclasses)
(8) get any lists for drop-down boxes (a seperate call to subclass)
Had to check that out by looking at the code. It served me fine since my
first struts app.
Shashank Dixit wrote:

Hello Adam

I have one doubt.

You have base action class for all your subaction classes.
What is the responsibility of this base action class.
Do your base action class checks which button is clicked?
If there are say 10 buttons in one form (say, GO, ADD, SAVE, NEXT, etc)
are there 10 if statements in your class. Or it
is sub action class resposibility to check this.? are there 10 or (any
no)

of if statements in subaction classes.?
How to eliminate those if statements? any idea?
Pls reply
Shashank
- Original Message -
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 2:52 PM
Subject: Re: Design question: Confirm action after validation ?



I have an Action base class which all my other Action classes inherit.
In the execute() of this base class I check whether the user clicked
cancel, before I call the child class execute().
I presume it would be easy enough to store the originating URL in the
session, and if cancel is clicked, roll your own Action Forward back to
this URL.
Since it is all in the base class, it could work for every action as
long as you are careful to watch the parameters or ids.
Ajay Patil wrote:


Hello,

In my Struts application, the validation is done on server-side
for every page. If the validation is successful, the user would
like to see a page to confirm his action. The Confirm page should
also have a Cancel button allowing him to go back to the previous
page showing the data entered so far.
This functionality is needed for every action.

I am thinking if there is a generic way by which I can achieve this
functionality.
I also realize that I might end up making scope=session for
every form, in trying to implement this requirement. (and I am
worried about this too).
Any ideas, pointers and/or thoughts will be very useful.

Ajay


Ajay Patil
Vertex Software Pvt. Ltd.
[EMAIL PROTECTED]
http://www.vertex.co.in

-
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: Validation of user input depending upon the user locale.

2003-07-09 Thread Kamholz, Keith (corp-staff) USX
I agree.  What you wants sounds like it would cause more harm than good.
Just my humble opinion though.


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 2:41 AM
To: Struts Users Mailing List
Subject: RE: Validation of user input depending upon the user locale.


Yep. Your Japanese users are sure gonna love that feature when they try to
enter the names of their German clients into the application (or whatever).

-Original Message-
From: Sagar A. Phanse [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 July 2003 14:32
To: [EMAIL PROTECTED]
Subject: Validation of user input depending upon the user locale.


Hi!
I need some help.
I have a textfield in my JSP where user can enter the text.
Now I wanted to validate the user entered text into the textfield such that
when jsp-form is submitted it will let only those characters to be entered
in the textfield which are
belonging to the language/locale of the user.. Depending upon the user
locale.
E.g. If user is in Japanese Locale and if user enters ä or ü (german
characters) it should be validated giving an error.
Is there any fascility available in struts for this?
If there is any other way than struts to achive this, even then do let me
know.

-Thanks in Advance
Sagar





*--
This message and any attachment(s) is intended only for the use of the
addressee(s) and may contain information that is PRIVILEGED and
CONFIDENTIAL. If you are not the intended addressee(s), you are hereby
notified that any use, distribution, disclosure or copying of this
communication is strictly prohibited. If you have received this
communication in error, please erase all copies of the message and its
attachment(s) and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and
not of Kanbay.

Although we have taken steps to ensure that this e-mail and any
attachment(s) are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.



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



No stream could be opened

2003-07-09 Thread sriram
I'm facing this problem for the past 2 days - unable to fix this...Any help is very 
much appreciated...

Did anyone face the following problem while loading validation-rules.xml?

The following message is displayed during deployment and so I'm unable to use 
validator framework:

13:08:42,913 INFO  [Engine] validator: Loading validation rules file from '/WEB- 
INF/validation-rules.xml' 13:08:42,923 INFO  [Engine] validator: Skipping validation 
rules file from '/WEB -INF/validation-rules.xml'.  No stream could be opened.



Re: Cancel button not working?

2003-07-09 Thread Adam Hardy
Sashi, what HTML does the tag produce?

Adam

Sashi Ravipati wrote:
I am trying this on Struts 1.1 final. Will this make any difference..



[EMAIL PROTECTED] 07/08/03 05:11PM 
Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.
m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:

This is how I have my cancel tag.

html:cancel
   bean:message key=button.cancel/
 /html:cancel
[EMAIL PROTECTED] 07/08/03 02:27PM 
The complete content of your html:cancel tag is
probably key to solving this problem.
m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:

isCancelled(request) is always returning false
(Even when cancel button
is clicked)
Need some help...

Thanks



[EMAIL PROTECTED] 07/08/03 09:10AM 
I have a html:cancel in my jsp page. and in my
action I have
if(isCancelled(request)){
 return mapping.findForward(index); 
}

But it is not working. What am I doing wrong here.
I

am using Struts 1.1
final
Thanks



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: No stream could be opened

2003-07-09 Thread Jamie M. Guillemette
First i would recomend double checking that the file exists at /WEB-INF/
remember to be careful about capitalization.

The error message would lead to the conclusion the file is either not there
is is not readable.


- Original Message -
From: sriram [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 9:13 AM
Subject: No stream could be opened


 I'm facing this problem for the past 2 days - unable to fix this...Any
help is very much appreciated...

 Did anyone face the following problem while loading validation-rules.xml?

 The following message is displayed during deployment and so I'm unable to
use validator framework:

 13:08:42,913 INFO  [Engine] validator: Loading validation rules file from
'/WEB- INF/validation-rules.xml' 13:08:42,923 INFO  [Engine] validator:
Skipping validation rules file from '/WEB -INF/validation-rules.xml'.  No
stream could be opened.




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



Re: Cancel button not working?

2003-07-09 Thread Sashi Ravipati
HTML is as shown below

  input type=submit name=org.apache.struts.taglib.html.CANCEL
value=Cancel onclick=bCancel=true;

 [EMAIL PROTECTED] 07/09/03 09:21AM 
Sashi, what HTML does the tag produce?

Adam

Sashi Ravipati wrote:
 I am trying this on Struts 1.1 final. Will this make any difference..
 
 
 
[EMAIL PROTECTED] 07/08/03 05:11PM 
 
 Odd, I can't reproduce that in 1.1-rc1.  Unless you're
 extending something which might override the
 isCancelled(HttpServletRequest) method, or the
 html:cancel tag is not contained within an html:form
 tag, I can't think of anything else.
 
 m
 
 --- Sashi Ravipati [EMAIL PROTECTED] wrote:
 
This is how I have my cancel tag.

html:cancel
bean:message key=button.cancel/
  /html:cancel

[EMAIL PROTECTED] 07/08/03 02:27PM 

The complete content of your html:cancel tag is
probably key to solving this problem.

m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:

 isCancelled(request) is always returning false
(Even when cancel button
is clicked)

Need some help...

Thanks



[EMAIL PROTECTED] 07/08/03 09:10AM 

I have a html:cancel in my jsp page. and in my
action I have

if(isCancelled(request)){
  return mapping.findForward(index); 
}


But it is not working. What am I doing wrong here.

I

am using Struts 1.1
final

Thanks



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


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

 
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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


RE: No stream could be opened

2003-07-09 Thread sriram
The file is present.

In fact I have two files
1. validation-rules.xml
2. validations.xml

The error is occurring only for the first one.
The second file is being read without any problem.

I even removed all the code in validation-rules.xml and left only the following code:
form-validation
 global
  /global
/form-validation

Still the error persists!!!




-Original Message-
From: Jamie M. Guillemette [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 7:00 PM
To: Struts Users Mailing List
Subject: Re: No stream could be opened


First i would recomend double checking that the file exists at /WEB-INF/ remember to 
be careful about capitalization.

The error message would lead to the conclusion the file is either not there is is not 
readable.


- Original Message -
From: sriram [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 9:13 AM
Subject: No stream could be opened


 I'm facing this problem for the past 2 days - unable to fix this...Any
help is very much appreciated...

 Did anyone face the following problem while loading 
 validation-rules.xml?

 The following message is displayed during deployment and so I'm unable 
 to
use validator framework:

 13:08:42,913 INFO  [Engine] validator: Loading validation rules file 
 from
'/WEB- INF/validation-rules.xml' 13:08:42,923 INFO  [Engine] validator: Skipping 
validation rules file from '/WEB -INF/validation-rules.xml'.  No stream could be 
opened.




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


RE: Login Form

2003-07-09 Thread Erez Efrati
Sean,

many thanks for keeping up with my questions - appreciate it. And yes
you are correct. I am using JBoss 3.0.7 / Tomcat 4.1.24. By the way have
you got any idea if this issue is about to be resolved at the Servlet
Container Spec ? 

Thanks,
Erez



-Original Message-
From: Sean Radford [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 11:19 AM
To: Struts Users Mailing List
Subject: RE: Login Form

On Tue, 2003-07-08 at 20:34, Erez Efrati wrote:
 Thanks Sean, 
 
 I looked at it and it does avoid the BIG limitation posed by the
 standard spec in fact. Still I cannot use it since it disables the
 passing of the principal identity through calls to EJB methods.
 
That's what it says in the introductory documentation, but...

You're using JBoss/Tomcat right? Well give me a day and I'll email you a
class that should do all you want... It's a RealmAdaptor for
securityfilter/Jboss that uses the JBoss security extension and so
correctly instantiates the Principal for the EJB layer. It works for me
with JBoss4/Jetty, so you should give it a try. (I'm waiting on some
code from another guy whose done similar and so just want to compare -
if his stuff doesn't arrive shortly, I'll send mine as it)


 Now, I am new to the web development and it amazes me that such a
basic
 feature is missing from the Servlet spec and is not addressed. Why is
it
 that way? Is it so unusual to want to have the login fields on the
start
 page??

Not unusual at all... And many Java sites have it that way, but they
don't necessarily use container authentication and they probably don't
use EJB's (many people steer clear - deep seated reservations from 1.0
are still abound).

If I get time I'm going to try and get the Jetty guys to 'surface' their
web Authenticators to allow developers to roll their own... I've looked
at the code and shouldn't be too difficult - one or two areas I'm not
sure about, but...


 
 Thanks,
 Erez 
 
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 08, 2003 8:21 PM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 Have a look at this (you may find what you want):
 
 http://sourceforge.net/projects/securityfilter/
 
 Sean
 
 
  -Original Message-
  From: Erez Efrati [mailto:[EMAIL PROTECTED] 
  Sent: July 8, 2003 10:11 AM
  To: 'Struts Users Mailing List'
  Subject: Login Form
  
  
  Hi,
  
  My question is a bit off Struts but still since I am using Struts
and
  it's too urgent for me I thought to try my luck here, maybe someone
 had
  stumbled on this issue too.
  
  I am running JBoss/Tomcat/Struts using the JAAS for handling the
  application security aspects. I have used the
  auth-methodFORM/auth-method clauses inside the Web.xml file.
  
  In my web site I want to have the site home page to have also a
small
  login form where the user could enter username and password and
login
 to
  the site. The home page, contains other links as well, which lead to
  other parts of the site or even to external pages on other sites.
  
  From what I've read so far, it seems to me that the FORM method is
  activated only when the web user tries to access a protected page.
 Then
  the Web Server (Tomcat in my case) returns the loginPage stated in
the
  Web.xml file, and only after the login is performed
(j_security_check)
  the Tomcat then redirects the web user to the original portected
page.
  
  Is it possible to have the site home page as the login page still
 using
  mechanisms of FORM and JAAS? If so I would really appreciate any
help
 on
  how to do it, and what are the configurations required. 
  
  Thanks,
  Erez
  
  
  
 
-
  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]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



When the Struts webapp is not at the root of the server

2003-07-09 Thread Doyle, Michael J
Hi,

I have been working on a Struts based web application. Things have been
going fine developing on http://localhost:7001/myStrutsApp
http://localhost:7001/myStrutsApp . I've discovered a problem when I
deploy to http://www.somehost.com/somepath/myStrutsApp
http://www.somehost.com/somepath/myStrutsApp . 

Struts gets confused with the paths it generates to Actions and rewritten
URLs. It seems that Struts assumes the web application is always at the root
of the server, e.g. http://www.somehost.com/myStrutsApp
http://www.somehost.com/myStrutsApp . 

It produces 
form action=/myStrutsApp/myaction.do

when what I need is 
form action=/somepath/myStrutsApp/myaction.do

Thus, the html:form html:base and any other tag that rewrites the URL
don't work properly in this configuration.

Is there a workaround for this? Perhaps something to do with module
configuration? The web server is Netscape 3.5.1 and the app server is
Weblogic 5.10 sp13.

Thanks for any help,
- Mike




[OT] JSTL

2003-07-09 Thread Kamholz, Keith (corp-staff) USX
I apologize if this is a bit off topic, and if it is a bit of a newbie
question.
I've never used JSTL before, and I'm not sure exactly what it is.  Is it
built into standard JSP technology (thus usable without any add-ons), or is
it a tag lib that you have to download and put in your project?

- Keith


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



Re: Cancel button not working?

2003-07-09 Thread Adam Hardy
Try logging what is in this cancel parameter 
(org.apache.struts.taglib.html.CANCEL) in the same place where you are 
calling isCancelled()

Actually I've just realised I'm suffering the same problem. I'll try it 
myself. Let me know what you find as well!

Adam

Sashi Ravipati wrote:
HTML is as shown below

  input type=submit name=org.apache.struts.taglib.html.CANCEL
value=Cancel onclick=bCancel=true;
[EMAIL PROTECTED] 07/09/03 09:21AM 
Sashi, what HTML does the tag produce?

Adam

Sashi Ravipati wrote:

I am trying this on Struts 1.1 final. Will this make any difference..




[EMAIL PROTECTED] 07/08/03 05:11PM 
Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.
m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:


This is how I have my cancel tag.

html:cancel
  bean:message key=button.cancel/
/html:cancel
[EMAIL PROTECTED] 07/08/03 02:27PM 
The complete content of your html:cancel tag is
probably key to solving this problem.
m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:


isCancelled(request) is always returning false
(Even when cancel button
is clicked)
Need some help...

Thanks




[EMAIL PROTECTED] 07/08/03 09:10AM 
I have a html:cancel in my jsp page. and in my
action I have
if(isCancelled(request)){
return mapping.findForward(index); 
}

But it is not working. What am I doing wrong here.
I


am using Struts 1.1
final
Thanks



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-


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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
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: When the Struts webapp is not at the root of the server

2003-07-09 Thread Jamie M. Guillemette
Hi Mike,

Your webapp would be built as if it was running from root/weapp/yourlinks
how is it that when deployed it is now got an extra piece to the addressing
?

JMG


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



Re: [OT] JSTL

2003-07-09 Thread David Graham
--- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 I apologize if this is a bit off topic, and if it is a bit of a newbie
 question.
 I've never used JSTL before, and I'm not sure exactly what it is.  Is it
 built into standard JSP technology (thus usable without any add-ons), or
 is
 it a tag lib that you have to download and put in your project?

It's a taglib specification that vendors can implement.  Apache has an
implementation available here:
http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

David

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: When the Struts webapp is not at the root of the server

2003-07-09 Thread Doyle, Michael J
The web server fronts the app server. Locally, during development, I call
directly against the app server. For deployment, I must go through a web
server. It sends requests to root/somepath to the root path of my app
server. Thus, the actual path to my resources is
root/somepath/myWebApp/whateverresource. (FWIW, I deploy as an expanded
war, though I can change that if it fixes this problem.)

Works ok until you get the Struts url rewriting which doesn't know about
somepath. I'm hoping there's a way to make Struts know about somepath.

Thanks,
- Mike
 
-Original Message-
From: Jamie M. Guillemette [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 10:00 AM
To: Struts Users Mailing List
Subject: Re: When the Struts webapp is not at the root of the server


Hi Mike,

Your webapp would be built as if it was running from root/weapp/yourlinks
how is it that when deployed it is now got an extra piece to the addressing
?

JMG


-
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: PAC pattern (Presentation-Abstraction-Controller)

2003-07-09 Thread Dos Santos
I think you're right Navjot. That's exactly the way
that I see it.

The thing is that I wanted to know how well Struts can
adapt to this architecture. Any ideas? Can it adapt?

Thanks for your input.

--- Navjot Singh [EMAIL PROTECTED] wrote:
 correct me if i am wrong but here are my $ 0.02 --
 
 In PAC - presentation is dumb. It can't make
 callbacks to model layer.
 Responsibility of controller is higher to prepare
 the entire presentation
 and then throw back.
 In MVC - presentation has accces to model.
 
 -navjot
 
 |-Original Message-
 |From: Dos Santos [mailto:[EMAIL PROTECTED]
 |Sent: Tuesday, July 08, 2003 11:01 PM
 |To: Struts Users Mailing List
 |Subject: Re: PAC pattern
 (Presentation-Abstraction-Controller)
 |
 |
 |Are you sure? I've read papers published by the
 author
 |of PAC and she states that they are different.
 |
 |PAC has a controller between the abstraction and
 the
 |interface (presentation). MVC has 2 interfaces
 (View
 |and Controller) both of which interact with the
 |abstraction (Model). I think that conceptually they
 |are different.
 |
 |What do you think?
 |
 |--- Carlos Duque [EMAIL PROTECTED] wrote:
 | Aren't these synonymous?  Back in the day when
 MVC
 | was intended to model a
 | GUI there might have been a real distinction, but
 | the two have morphed into
 | one pattern usually under the MVC label.  But
 they
 | are one and the same today.
 |
 | Carlos
 |
 | At 10:17 AM 7/8/2003, you wrote:
 | Hi! I was wondering if anybody has info
 regarding
 | the
 | PAC pattern being implemented using Struts.
 | 
 | I know Struts is oriented towards the MVC
 pattern
 | but
 | I would like to know what you think about using
 it
 | for
 | PAC purposes.
 | 
 | I truly appreciate your help.
 | 
 | Regards.
 | 
 | __
 | Do you Yahoo!?
 | SBC Yahoo! DSL - Now only $29.95 per month!
 | http://sbc.yahoo.com
 | 
 |

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

|-
 | To unsubscribe, e-mail:
 | [EMAIL PROTECTED]
 | For additional commands, e-mail:
 | [EMAIL PROTECTED]
 |
 |
 |
 |__
 |Do you Yahoo!?
 |SBC Yahoo! DSL - Now only $29.95 per month!
 |http://sbc.yahoo.com
 |

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

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [SCAFFOLD] StorageBeanBase feature request

2003-07-09 Thread Ted Husted
I'm not using the SQL parts of Scaffold in new development. For new 
development, I'm now using Hiberate.

I'm away next week, but later this month, I'll apply some outstanding 
patches to Scaffold, and look at providing a direct alternative to the 
SQL package using either Commons SQL/Dynabeans, the new Mapping package 
in the Jakarta Commons sandbox, or Ibatis. There are just too many other 
likely alternatives now to keep this package alive.

Of course, you can always check-out the code yourself and use as part of 
in-house development.

The Access paradigm is not strongly linked to the StorageBeans. 
Essentially, it's just a facade, and you could use anything you like 
behind the facade. (Say Hibernate, for example.)

-Ted.

Umberto Nicoletti wrote:
I am in the middle of the process of defining the data access layer to 
be used for a new Struts-based application, for which we already use 
Scaffold's ProcessBeans.

We decided not to go with Hibernate as a persistence layer (to my 
disappointment) and to choose Scaffold Access/StorageBean approach instead.
Reading on this list I found an email by Ted Husted saying that he was 
(maybe still is?) not happy with the StorageBean deployment.

So my question is what should I do? I quite like the Scaffold data 
access layer and more importantly my DBA trusts it too.
I'd prefer to go with StorageBeanBase, but in this case I should make 
minor modifications to the Scaffold code (which I will give back to the 
community of course). The other option is the Access approach, but it is 
deprecated and it is not nice to compile an application with lots of 
warnings.

The modifications I have to introduce in the StorageBeanBase are:

replace all calls to

StatementUtils.executeUpdate(null,etc);

with:

StatementUtils.executeUpdate(getResource(),etc);

and add a static String resource=null; with getters and setters
that can be overriden by subclasses. This is motivated by tha fact that 
I have tables located in many different schemas/db hosts and want 
ConnectionAdaptor to return the right connection for that schema/db host.

Thank you,
Umberto


--
Ted Husted,
Struts in Action http://husted.com/struts/book.html


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


problem with dbcp and database restart

2003-07-09 Thread meissa . Sakho

hi all,

I have a problem with my configured datasource using dbcp. 
I have posted this question to tomcat user list in vain...
Maybe some struts user could help.

I've configured my dbcp connection pool  in Tomcat 4.1.18
server.xml file.

here is an extract of it
ResourceParams name=jdbc/intranetMail
 parameternameusername/namevalueXXX/value/parameter
 parameternamepassword/namevalueXXX/value/parameter
parameternamedriverClassName/name
  valuecom.sybase.jdbc2.jdbc.SybDriver/value/parameter
parameternameurl/name
 valuejdbc:sybase:Tds:s198000SGD1:5000/intranet_mail/value/parameter 
 
parameter
  nameremoveAbandoned/name
  valuetrue/value
/parameter
parameter
  nameremoveAbandonedTimeout/name
  value60/value
/parameter
Everything works fine. But
when our database server is restarted, I have to restart Tomcat
in order to aquire connection to my defined pool.

I wonder if there is a manner to avoid restarting Tomcat when
the database server is restarted.

I have added the parameters below to my pool config.

parameter
  nameremoveAbandoned/name
  valuetrue/value
/parameter
parameter
  nameremoveAbandonedTimeout/name
  value60/value
/parameter
 
 I recognize ,I've added that quite blindly. 
 Can someone confirm me if this is a cure to my problem ?
 
 any suggestion is greatly appreciated.
 
 
 Meissa 

L'integrite de ce message n'etant pas assuree sur internet, Natexis
Banques Populaires ne peut etre tenu responsable de
son contenu. Toute utilisation ou diffusion non autorisee est
interdite. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur.

The integrity of this message cannot be guaranteed
on the Internet. Natexis Banques Populaires can not therefore be
considered responsible for the contents.Any unauthorized use or dissemination is 
prohibited.
If you are not the intended recipient of this message, then please delete it and 
notify the sender.

Include response in the JSP page

2003-07-09 Thread Affan Qureshi
Hi,
I have a JSP page which needs to dynamically include response from actions
(or servlets) which are actually images streamed over the response. I tried
to use jsp:include href=/someAction.do / but I guess it has some problem
for extensions other than jsp and html. (I saw a similar bug for Tomcat
bugzilla). I have tried to define a mime-type for 'do' in web.xml but does
not help. I guess I cannot use bean:include  for the purpose.

Any suggestions?

Also another question, can I get request Attributes set in this page in the
action/servlet that I call thru jsp:include /?


Thanks,
Affan




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



RE: problem with dbcp and database restart

2003-07-09 Thread Ed Yu
Try the validationQuery tag so that the pool validates the connection
before returning it to your code.

^^ 
Ed Yu, Senior Solutions Architect (IBM Certified AIX Administrator), 
Advanced Solutions Group, Physics Dept., University of South Carolina,
Columbia, SC 29208 
Office (803)777-8831, FAX (803)777-8833, Email [EMAIL PROTECTED]


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 09, 2003 10:36 AM
 To: [EMAIL PROTECTED]
 Subject: problem with dbcp and database restart
 
 
 
 hi all,
 
 I have a problem with my configured datasource using dbcp. 
 I have posted this question to tomcat user list in vain... 
 Maybe some struts user could help.
 
 I've configured my dbcp connection pool  in Tomcat 4.1.18 
 server.xml file.
 
 here is an extract of it
 ResourceParams name=jdbc/intranetMail  
 parameternameusername/namevalueXXX/value/parameter
  parameternamepassword/namevalueXXX/value/parameter
 parameternamedriverClassName/name
   
 valuecom.sybase.jdbc2.jdbc.SybDriver/value/parameter
 parameternameurl/name  
 valuejdbc:sybase:Tds:s198000SGD1:5000/intranet_mail/value
 /parameter 
  
 parameter
   nameremoveAbandoned/name
   valuetrue/value
 /parameter
 parameter
   nameremoveAbandonedTimeout/name
   value60/value
 /parameter
 Everything works fine. But
 when our database server is restarted, I have to restart 
 Tomcat in order to aquire connection to my defined pool.
 
 I wonder if there is a manner to avoid restarting Tomcat when 
 the database server is restarted.
 
 I have added the parameters below to my pool config.
 
 parameter
   nameremoveAbandoned/name
   valuetrue/value
 /parameter
 parameter
   nameremoveAbandonedTimeout/name
   value60/value
 /parameter
  
  I recognize ,I've added that quite blindly. 
  Can someone confirm me if this is a cure to my problem ?
  
  any suggestion is greatly appreciated.
  
  
  Meissa 
 
 L'integrite de ce message n'etant pas assuree sur internet, 
 Natexis Banques Populaires ne peut etre tenu responsable de 
 son contenu. Toute utilisation ou diffusion non autorisee est 
 interdite. Si vous n'etes pas destinataire de ce message, 
 merci de le detruire et d'avertir l'expediteur.
 
 The integrity of this message cannot be guaranteed
 on the Internet. Natexis Banques Populaires can not therefore 
 be considered responsible for the contents.Any unauthorized 
 use or dissemination is prohibited. If you are not the 
 intended recipient of this message, then please delete it and 
 notify the sender.
 

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



RE: NestedIterateTag won't let go of collection

2003-07-09 Thread Sri Sankaran
Disabled pooling.  No cigar :(

Sri

-Original Message-
From: Edgar Dollin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 7:06 AM
To: Sri Sankaran; '[EMAIL PROTECTED]'
Subject: RE: NestedIterateTag won't let go of collection

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

Edgar

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

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



Re: [SCAFFOLD] StorageBeanBase feature request

2003-07-09 Thread Umberto Nicoletti
Thanks Ted,
I already generated an in-house version of Scaffold with my patch, but 
got into another trouble.

I got my StorageBeanBase working, but get ResourceExcptions when 
executing findCollection(), which in turns call getCollection.
What I see is that the prepared statement is closed before the 
collection is populated from the ResultSet.
So when ResultSetUtils call getMetaData() the resultSet throws 
SQLException: connection closed.

What am I missing? Please bear with me, even though I am posting on the 
wrong ml (but I knew you were here).

Code snippet from StatementUtils:

public static final ResultSet executeQuery(
Connection connection,
String command,
Object[] parameters)
throws SQLException {
Statement statement = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
try {

if ((parameters==null) || (parameters.length==0)) {
statement = connection.createStatement();
resultSet = statement.executeQuery(command);
}
else {
preparedStatement = connection.prepareStatement(command);
for (int i=0; iparameters.length; i++) {
preparedStatement.setObject(i+1, parameters[i]);
}
resultSet = preparedStatement.executeQuery();
}
}

finally {
try {
//
//   WHY ARE YOU CLOSING THE STATEMENT HERE
//   CLOSING THE STATEMENT HERE RELEASE THE RESULTSET TOO...
//
if (statement != null) statement.close();
if (preparedStatement != null) preparedStatement.close();
}
catch (SQLException sqle) {}
}
return resultSet;

} // end executeQuery

Thank you in advance,
Umberto
Ted Husted wrote:
I'm not using the SQL parts of Scaffold in new development. For new 
development, I'm now using Hiberate.

I'm away next week, but later this month, I'll apply some outstanding 
patches to Scaffold, and look at providing a direct alternative to the 
SQL package using either Commons SQL/Dynabeans, the new Mapping package 
in the Jakarta Commons sandbox, or Ibatis. There are just too many other 
likely alternatives now to keep this package alive.

Of course, you can always check-out the code yourself and use as part of 
in-house development.

The Access paradigm is not strongly linked to the StorageBeans. 
Essentially, it's just a facade, and you could use anything you like 
behind the facade. (Say Hibernate, for example.)

-Ted.

Umberto Nicoletti wrote:

I am in the middle of the process of defining the data access layer to 
be used for a new Struts-based application, for which we already use 
Scaffold's ProcessBeans.

We decided not to go with Hibernate as a persistence layer (to my 
disappointment) and to choose Scaffold Access/StorageBean approach 
instead.
Reading on this list I found an email by Ted Husted saying that he was 
(maybe still is?) not happy with the StorageBean deployment.

So my question is what should I do? I quite like the Scaffold data 
access layer and more importantly my DBA trusts it too.
I'd prefer to go with StorageBeanBase, but in this case I should make 
minor modifications to the Scaffold code (which I will give back to 
the community of course). The other option is the Access approach, but 
it is deprecated and it is not nice to compile an application with 
lots of warnings.

The modifications I have to introduce in the StorageBeanBase are:

replace all calls to

StatementUtils.executeUpdate(null,etc);

with:

StatementUtils.executeUpdate(getResource(),etc);

and add a static String resource=null; with getters and setters
that can be overriden by subclasses. This is motivated by tha fact 
that I have tables located in many different schemas/db hosts and want 
ConnectionAdaptor to return the right connection for that schema/db host.

Thank you,
Umberto





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


Re: Bread crumb trail

2003-07-09 Thread Curtney Jacobs
Thank you Cal, sending the code would be great. I am interested in looking at 
the two different ways of implementing the breadcrumbs.

_CJ


On Wednesday 09 July 2003 7:57 am, Navjot Singh wrote:
 no better documentation than code itself ;-)
 can you post it?

 |-Original Message-
 |From: Holman, Cal [mailto:[EMAIL PROTECTED]
 |Sent: Wednesday, July 09, 2003 4:44 PM
 |To: Struts Users Mailing List
 |Subject: RE: Bread crumb trail
 |
 |
 |I have created breadcrumbs two ways one using a TilesAction to
 |read the tiles definitions and a simpler tag that access the tiles
 |definitions.  I can send you the code if you are interested.  I
 |have not created a tutorial.
 |
 |Cal
 |
 |http://www.calandva.com/
 |
 |-Original Message-
 |From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
 |Sent: Tuesday, July 01, 2003 16:25
 |To: Struts Users Mailing List
 |Subject: Bread crumb trail
 |
 |Greetings!!
 |
 |Does anyone know of a bread crumb trail implemenation using Struts
 |and Tiles?
 |A link to a tutorial/info would be helpful.
 |
 |Thanks inadvance,
 |
 |Curtney Jacobs
 |
 |
 |-
 |To unsubscribe, e-mail: [EMAIL PROTECTED]
 |For additional commands, e-mail: [EMAIL PROTECTED]
 |
 |
 |Learn more about Paymentech's payment processing services at

 www.paymentech.com
 THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are
 proprietary and confidential information intended only for the use of the
 recipient(s) named above.  If you are not the intended recipient, you may
 not print, distribute, or copy this message or any attachments.  If you
 have received this communication in error, please notify the sender by
 return e-mail and delete this message and any attachments from your
 computer.

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

-- 
U-Interface.com

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



Struts and inter-application messaging

2003-07-09 Thread douglas reames
Good morning,

BACKGROUND:
I have a struts application that needs to:
[a] Process a request within its own context.  Output:-  string to add 
parameters to URI path:  SQL=SELECT no, product,   vendor_no FROM table 
WHERE no=103,

[b] Append parameters string from [a] to URI - that forwards control for 
future processing outside of Struts app.  Output:-  
http://same-server:8080/cocoon/excel-reports?SQL=SELECT no, product, 
vendor_no FROM table WHERE no=103, and  finally

[c] Forward request to external application to complete processing sequence.

PROBLEM:
[a] and [b] are no problem.
But when I attempt to Forward the result with a mapping.findForward(URI 
string), I get an illegal argument  exception -  
java.lang.IllegalArgumentException: Path 
http://same-server:8080/cocoon/excel-reports?SQL=SELECT no, product,   
vendor_no FROM table WHERE no=103 does not start with a / character.  
This method, as I now understand it, restricts forwarding to 
intra-application.

I get the same result when using org.apache.struts.actions.ForwardAction.

QUESTION:
What is the Struts way to handle forwarding a request to an external 
application?

Best regards,
Douglas Reames
919 929 3465
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


RE: [OT] JSTL

2003-07-09 Thread Davidson, Glenn
I too am a bit of a newbie and have the same question plus where can we find
good documentation on JSTL?

Thanks

Glenn

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 9:48 AM
To: Struts (E-mail)
Subject: [OT] JSTL


I apologize if this is a bit off topic, and if it is a bit of a newbie
question.
I've never used JSTL before, and I'm not sure exactly what it is.  Is it
built into standard JSP technology (thus usable without any add-ons), or is
it a tag lib that you have to download and put in your project?

- Keith


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


Re: Cancel button not working?

2003-07-09 Thread Sashi Ravipati
it says - Cancel 

I don't know what I am missing which is making this tag not work..

Thanks



 [EMAIL PROTECTED] 07/09/03 09:50AM 
Try logging what is in this cancel parameter 
(org.apache.struts.taglib.html.CANCEL) in the same place where you are 
calling isCancelled()

Actually I've just realised I'm suffering the same problem. I'll try it 
myself. Let me know what you find as well!

Adam

Sashi Ravipati wrote:
 HTML is as shown below
 
   input type=submit name=org.apache.struts.taglib.html.CANCEL
 value=Cancel onclick=bCancel=true;
 
[EMAIL PROTECTED] 07/09/03 09:21AM 
 
 Sashi, what HTML does the tag produce?
 
 Adam
 
 Sashi Ravipati wrote:
 
I am trying this on Struts 1.1 final. Will this make any difference..




[EMAIL PROTECTED] 07/08/03 05:11PM 

Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.

m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:


This is how I have my cancel tag.

html:cancel
   bean:message key=button.cancel/
 /html:cancel

[EMAIL PROTECTED] 07/08/03 02:27PM 

The complete content of your html:cancel tag is
probably key to solving this problem.

m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:


isCancelled(request) is always returning false
(Even when cancel button
is clicked)

Need some help...

Thanks




[EMAIL PROTECTED] 07/08/03 09:10AM 

I have a html:cancel in my jsp page. and in my
action I have

if(isCancelled(request)){
 return mapping.findForward(index); 
}


But it is not working. What am I doing wrong here.

I


am using Struts 1.1
final

Thanks



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



-


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




__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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

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

2003-07-09 Thread Alex Shneyderman
Did you try www.javasoft.com ?

 -Original Message-
 From: Davidson, Glenn [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 11:08 AM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] JSTL
 
 I too am a bit of a newbie and have the same question plus where can
we
 find
 good documentation on JSTL?
 
 Thanks
 
 Glenn
 
 -Original Message-
 From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 9:48 AM
 To: Struts (E-mail)
 Subject: [OT] JSTL
 
 
 I apologize if this is a bit off topic, and if it is a bit of a newbie
 question.
 I've never used JSTL before, and I'm not sure exactly what it is.  Is
it
 built into standard JSP technology (thus usable without any add-ons),
or
 is
 it a tag lib that you have to download and put in your project?
 
 - Keith
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: Struts and inter-application messaging

2003-07-09 Thread Navjot Singh
think simple.

+ Struts does the job with in 1 context so when you forward for same
application, it works.
+ to forward to external app, use response.sendRedirect(externalURI).

encode the url before redirecting

HTH
-navjot
PS - it's almost 9pm here.


|-Original Message-
|From: douglas reames [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, July 09, 2003 8:36 PM
|To: [EMAIL PROTECTED]
|Cc: [EMAIL PROTECTED]
|Subject: Struts and inter-application messaging
|
|
|Good morning,
|
|BACKGROUND:
|I have a struts application that needs to:
|
|[a] Process a request within its own context.  Output:-  string to add
|parameters to URI path:  SQL=SELECT no, product,   vendor_no FROM table
|WHERE no=103,
|
|[b] Append parameters string from [a] to URI - that forwards control for
|future processing outside of Struts app.  Output:-
|http://same-server:8080/cocoon/excel-reports?SQL=SELECT no, product,
|vendor_no FROM table WHERE no=103, and  finally
|
|[c] Forward request to external application to complete processing
|sequence.
|
|PROBLEM:
|[a] and [b] are no problem.
|
|But when I attempt to Forward the result with a mapping.findForward(URI
|string), I get an illegal argument  exception -
|java.lang.IllegalArgumentException: Path
|http://same-server:8080/cocoon/excel-reports?SQL=SELECT no, product,
|vendor_no FROM table WHERE no=103 does not start with a / character.
|This method, as I now understand it, restricts forwarding to
|intra-application.
|
|I get the same result when using org.apache.struts.actions.ForwardAction.
|
|QUESTION:
|What is the Struts way to handle forwarding a request to an external
|application?
|
|Best regards,
|Douglas Reames
|919 929 3465
|
|_
|Help STOP SPAM with the new MSN 8 and get 2 months FREE*
|http://join.msn.com/?page=features/junkmail
|
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|


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



remmeber the URL design question

2003-07-09 Thread Ashish Kulkarni
Hi,
I have to work on web application where i need for the
user to logon with userid and password for some
functions. So it will be some thing like the user
clicks submit after entering the data on a screen, but
then i want to show a page for the user to login, and
if the login is successfull then call the original URL
with the data entered from the user and update the
database,
but how do i keep track of the URL and data which was
originially submitted.

Ashish

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Cancel button not working?

2003-07-09 Thread Adam Hardy
I've solved my problem. Now you've checked the parameter, check to see 
if the request.attribute is set with
request.getAttribute(Globals.CANCEL_KEY);

For some reason in the RequestProcessor it sets this attribute to true 
when the request.parameter is present. Check it out. This is the one 
that the Action.isCancelled() checks. It has to be not null.

Adam

Sashi Ravipati wrote:
it says - Cancel 

I don't know what I am missing which is making this tag not work..

Thanks




[EMAIL PROTECTED] 07/09/03 09:50AM 
Try logging what is in this cancel parameter 
(org.apache.struts.taglib.html.CANCEL) in the same place where you are 
calling isCancelled()

Actually I've just realised I'm suffering the same problem. I'll try it 
myself. Let me know what you find as well!

Adam

Sashi Ravipati wrote:

HTML is as shown below

 input type=submit name=org.apache.struts.taglib.html.CANCEL
value=Cancel onclick=bCancel=true;
[EMAIL PROTECTED] 07/09/03 09:21AM 
Sashi, what HTML does the tag produce?

Adam

Sashi Ravipati wrote:


I am trying this on Struts 1.1 final. Will this make any difference..





[EMAIL PROTECTED] 07/08/03 05:11PM 
Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.
m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:



This is how I have my cancel tag.

html:cancel
 bean:message key=button.cancel/
/html:cancel
[EMAIL PROTECTED] 07/08/03 02:27PM 
The complete content of your html:cancel tag is
probably key to solving this problem.
m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:



isCancelled(request) is always returning false
(Even when cancel button
is clicked)
Need some help...

Thanks





[EMAIL PROTECTED] 07/08/03 09:10AM 
I have a html:cancel in my jsp page. and in my
action I have
if(isCancelled(request)){
   return mapping.findForward(index); 
}

But it is not working. What am I doing wrong here.
I



am using Struts 1.1
final
Thanks



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-



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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


[OT] Use of Static Methods

2003-07-09 Thread Jerry Jalenak
One of my programmers asked me whether or not it is OK to define helper
methods as 'static' - and I realized that I didn't know the answer.  So I
guess the question is, in a web application, can common code be factored out
to a helper class and marked as 'static'?  Are there any major problems with
doing this?  I should know the answer, but just can't put my thumb on it
right now 8)

TIA!

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: Cancel button not working?

2003-07-09 Thread Sashi Ravipati
request.getAttribute(Globals.CANCEL_KEY) is returning null, so can I set
it to not null and where Should I do this..

Can u explain how u solved ur problem..

Thanks

 [EMAIL PROTECTED] 07/09/03 11:22AM 
I've solved my problem. Now you've checked the parameter, check to see 
if the request.attribute is set with
request.getAttribute(Globals.CANCEL_KEY);

For some reason in the RequestProcessor it sets this attribute to true 
when the request.parameter is present. Check it out. This is the one 
that the Action.isCancelled() checks. It has to be not null.


Adam

Sashi Ravipati wrote:
 it says - Cancel 
 
 I don't know what I am missing which is making this tag not work..
 
 Thanks
 
 
 
 
[EMAIL PROTECTED] 07/09/03 09:50AM 
 
 Try logging what is in this cancel parameter 
 (org.apache.struts.taglib.html.CANCEL) in the same place where you are

 calling isCancelled()
 
 Actually I've just realised I'm suffering the same problem. I'll try
it 
 myself. Let me know what you find as well!
 
 Adam
 
 Sashi Ravipati wrote:
 
HTML is as shown below

  input type=submit name=org.apache.struts.taglib.html.CANCEL
value=Cancel onclick=bCancel=true;

[EMAIL PROTECTED] 07/09/03 09:21AM 

Sashi, what HTML does the tag produce?

Adam

Sashi Ravipati wrote:


I am trying this on Struts 1.1 final. Will this make any difference..





[EMAIL PROTECTED] 07/08/03 05:11PM 

Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.

m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:



This is how I have my cancel tag.

html:cancel
  bean:message key=button.cancel/
/html:cancel

[EMAIL PROTECTED] 07/08/03 02:27PM 

The complete content of your html:cancel tag is
probably key to solving this problem.

m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:



isCancelled(request) is always returning false
(Even when cancel button
is clicked)

Need some help...

Thanks





[EMAIL PROTECTED] 07/08/03 09:10AM 

I have a html:cancel in my jsp page. and in my
action I have

if(isCancelled(request)){
return mapping.findForward(index); 
}


But it is not working. What am I doing wrong here.

I



am using Struts 1.1
final

Thanks



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



-



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




__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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




-
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: problem with dbcp and database restart

2003-07-09 Thread Dan Tran
Meissa,

When your database restarts, all your dbcp connections (in the pool) become
staled connection.

In order to resolve this problem, dbcp needs to do a ping to database server
to make the connection is still up before giving to your app.

Looking into dbcp configuration doc, it should have a param you can setup
(something like QueryString) where
it should be a select statement to a database table.  You many need to setup
a dummy table just for this purpose.

Hope this helps.

-Dan
- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 7:36 AM
Subject: problem with dbcp and database restart



 hi all,

 I have a problem with my configured datasource using dbcp.
 I have posted this question to tomcat user list in vain...
 Maybe some struts user could help.

 I've configured my dbcp connection pool  in Tomcat 4.1.18
 server.xml file.

 here is an extract of it
 ResourceParams name=jdbc/intranetMail
  parameternameusername/namevalueXXX/value/parameter
  parameternamepassword/namevalueXXX/value/parameter
 parameternamedriverClassName/name
   valuecom.sybase.jdbc2.jdbc.SybDriver/value/parameter
 parameternameurl/name
  valuejdbc:sybase:Tds:s198000SGD1:5000/intranet_mail/value/parameter

 parameter
   nameremoveAbandoned/name
   valuetrue/value
 /parameter
 parameter
   nameremoveAbandonedTimeout/name
   value60/value
 /parameter
 Everything works fine. But
 when our database server is restarted, I have to restart Tomcat
 in order to aquire connection to my defined pool.

 I wonder if there is a manner to avoid restarting Tomcat when
 the database server is restarted.

 I have added the parameters below to my pool config.

 parameter
   nameremoveAbandoned/name
   valuetrue/value
 /parameter
 parameter
   nameremoveAbandonedTimeout/name
   value60/value
 /parameter

  I recognize ,I've added that quite blindly.
  Can someone confirm me if this is a cure to my problem ?

  any suggestion is greatly appreciated.


  Meissa

 L'integrite de ce message n'etant pas assuree sur internet, Natexis
 Banques Populaires ne peut etre tenu responsable de
 son contenu. Toute utilisation ou diffusion non autorisee est
 interdite. Si vous n'etes pas destinataire de ce message, merci de le
 detruire et d'avertir l'expediteur.

 The integrity of this message cannot be guaranteed
 on the Internet. Natexis Banques Populaires can not therefore be
 considered responsible for the contents.Any unauthorized use or
dissemination is prohibited.
 If you are not the intended recipient of this message, then please delete
it and
 notify the sender.

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



html:options

2003-07-09 Thread sjones
Good Morning Everyone.

I have a List object and i need my JSP page
to build a drop down list box using the List as the source
for the options.

I can do it with a scriplet but i need to one of the struts tags
html:options
html:optionsCollection

can anyone help me with use one of these tags.

I am looking at the java.docs but it doesn't really help me.

the List is also accessible from a classs name EqualityOperators

List o = EqualityOperators.getOperators();





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



RE: [OT] JSTL

2003-07-09 Thread Hohlen, John C
I found Shawn Bayern's book to be an excellent resource:

http://www.amazon.com/exec/obidos/tg/detail/-/1930110529/qid=1057764862/sr=8-1/ref=sr_8_1/002-6967439-7181617?v=glances=booksn=507846

JOHN

-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 10:08 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] JSTL


I too am a bit of a newbie and have the same question plus where can we find
good documentation on JSTL?

Thanks

Glenn

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 9:48 AM
To: Struts (E-mail)
Subject: [OT] JSTL


I apologize if this is a bit off topic, and if it is a bit of a newbie
question.
I've never used JSTL before, and I'm not sure exactly what it is.  Is it
built into standard JSP technology (thus usable without any add-ons), or is
it a tag lib that you have to download and put in your project?

- Keith


-
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: [SCAFFOLD] StorageBeanBase feature request

2003-07-09 Thread Ted Husted
Umberto Nicoletti wrote:
 So when ResultSetUtils call getMetaData() the resultSet throws
 SQLException: connection closed.
Yes, that's one of the patches I need to apply. The JDBC driver I was 
using is buggy and allowed it to be closed early than the specification 
permits.

-Ted.



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


RE: [OT] Use of Static Methods

2003-07-09 Thread Navjot Singh
There is nothing taboo about writing static methods. They are good in
solving purpose.

But there is an option -- Singleton.

That will keep you safe. As there is only 1 object of the class for which
you wish to invoke methods. so it's same as calling static methods. (well,
syntax is diff ;-)

You may change the behaviour of class in NO time if
you wish there should be more objects of that class.

makes sense?
-navjot


|-Original Message-
|From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, July 09, 2003 8:59 PM
|To: '[EMAIL PROTECTED]'
|Subject: [OT] Use of Static Methods
|
|
|One of my programmers asked me whether or not it is OK to define helper
|methods as 'static' - and I realized that I didn't know the answer.  So I
|guess the question is, in a web application, can common code be
|factored out
|to a helper class and marked as 'static'?  Are there any major
|problems with
|doing this?  I should know the answer, but just can't put my thumb on it
|right now 8)
|
|TIA!
|
|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]
|
|


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



RE: [OT] Use of Static Methods

2003-07-09 Thread Jerry Jalenak
I think so - I'm just concerned about the use of instance variables and
having multiple users stepping on each other...

Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 10:47 AM
To: Struts Users Mailing List
Subject: RE: [OT] Use of Static Methods


There is nothing taboo about writing static methods. They are good in
solving purpose.

But there is an option -- Singleton.

That will keep you safe. As there is only 1 object of the class for which
you wish to invoke methods. so it's same as calling static methods. (well,
syntax is diff ;-)

You may change the behaviour of class in NO time if
you wish there should be more objects of that class.

makes sense?
-navjot


|-Original Message-
|From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, July 09, 2003 8:59 PM
|To: '[EMAIL PROTECTED]'
|Subject: [OT] Use of Static Methods
|
|
|One of my programmers asked me whether or not it is OK to define helper
|methods as 'static' - and I realized that I didn't know the answer.  So I
|guess the question is, in a web application, can common code be
|factored out
|to a helper class and marked as 'static'?  Are there any major
|problems with
|doing this?  I should know the answer, but just can't put my thumb on it
|right now 8)
|
|TIA!
|
|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]
|
|


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [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: [OT] Use of Static Methods

2003-07-09 Thread Yansheng Lin
Depends on what you want to do. 'static' classes are loaded, not instantiated.
And you are saying you want to factor out common code and marked as 'static'.  I
cannot think of any reason not to.  Just make sure it's thread-safe.

Note there is a difference between Singleton and static.  Struts Action classes
are singleton.  

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED] 
Sent: July 9, 2003 9:29 AM
To: '[EMAIL PROTECTED]'
Subject: [OT] Use of Static Methods


One of my programmers asked me whether or not it is OK to define helper
methods as 'static' - and I realized that I didn't know the answer.  So I
guess the question is, in a web application, can common code be factored out
to a helper class and marked as 'static'?  Are there any major problems with
doing this?  I should know the answer, but just can't put my thumb on it
right now 8)

TIA!

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]


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



Re: Cancel button not working?

2003-07-09 Thread Adam Hardy
Via logging is basically how I solved it - by figuring out where in 
struts I was going wrong.

What it means now is that RequestProcessor is not setting that attribute 
- you don't need to set it by hand, struts should.

It's just one little if clause. According to your logging, 
request.getParameter(org.apache.struts.taglib.html.CANCEL) has a 
value, right? The parameter is not null?

If the parameter is not null but the attribute is null, that means that 
you have either not got the same struts code as me (1.1 final) or your 
RequestProcessor is not executing the processPopulate() method.

I would check 2 things:

that org.apache.struts.taglib.html.Constants.CANCEL_PROPERTY == 
org.apache.struts.taglib.html.CANCEL  (i.e. that the parameter name / 
cancel button name in your HTML is correct)

and that RequestProcessor.processPopulate() is executing. This method 
also puts the data into the action form, so you could use that as a 
check unless you can grab the source code and put some logging in there.

As you can tell I'm intrigued.
Adam
Sashi Ravipati wrote:
request.getAttribute(Globals.CANCEL_KEY) is returning null, so can I set
it to not null and where Should I do this..
Can u explain how u solved ur problem..

Thanks


[EMAIL PROTECTED] 07/09/03 11:22AM 
I've solved my problem. Now you've checked the parameter, check to see 
if the request.attribute is set with
request.getAttribute(Globals.CANCEL_KEY);

For some reason in the RequestProcessor it sets this attribute to true 
when the request.parameter is present. Check it out. This is the one 
that the Action.isCancelled() checks. It has to be not null.

Adam

Sashi Ravipati wrote:

it says - Cancel 

I don't know what I am missing which is making this tag not work..

Thanks





[EMAIL PROTECTED] 07/09/03 09:50AM 
Try logging what is in this cancel parameter 
(org.apache.struts.taglib.html.CANCEL) in the same place where you are


calling isCancelled()

Actually I've just realised I'm suffering the same problem. I'll try
it 

myself. Let me know what you find as well!

Adam

Sashi Ravipati wrote:


HTML is as shown below

input type=submit name=org.apache.struts.taglib.html.CANCEL
value=Cancel onclick=bCancel=true;
[EMAIL PROTECTED] 07/09/03 09:21AM 
Sashi, what HTML does the tag produce?

Adam

Sashi Ravipati wrote:



I am trying this on Struts 1.1 final. Will this make any difference..






[EMAIL PROTECTED] 07/08/03 05:11PM 
Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.
m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:




This is how I have my cancel tag.

html:cancel
bean:message key=button.cancel/
/html:cancel
[EMAIL PROTECTED] 07/08/03 02:27PM 
The complete content of your html:cancel tag is
probably key to solving this problem.
m

--- Sashi Ravipati [EMAIL PROTECTED] wrote:




isCancelled(request) is always returning false
(Even when cancel button
is clicked)
Need some help...

Thanks






[EMAIL PROTECTED] 07/08/03 09:10AM 
I have a html:cancel in my jsp page. and in my
action I have
if(isCancelled(request)){
  return mapping.findForward(index); 
}

But it is not working. What am I doing wrong here.
I




am using Struts 1.1
final
Thanks



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-




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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
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: Include response in the JSP page

2003-07-09 Thread Affan Qureshi
I can include the image response using simple img
src=myAction.do?param=myparams which is the action that returns the image
response. But this causes a new request to be made on the server after the
html page is downloaded. This way I cannot access request variables etc.

Affan

Affan Qureshi [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,
 I have a JSP page which needs to dynamically include response from actions
 (or servlets) which are actually images streamed over the response. I
tried
 to use jsp:include href=/someAction.do / but I guess it has some
problem
 for extensions other than jsp and html. (I saw a similar bug for Tomcat
 bugzilla). I have tried to define a mime-type for 'do' in web.xml but does
 not help. I guess I cannot use bean:include  for the purpose.

 Any suggestions?

 Also another question, can I get request Attributes set in this page in
the
 action/servlet that I call thru jsp:include /?


 Thanks,
 Affan




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



RE: [OT] JSTL

2003-07-09 Thread Micael
There are, of course, books (or at least a book) on the topic.

At 11:12 AM 7/9/03 -0400, you wrote:
Did you try www.javasoft.com ?

 -Original Message-
 From: Davidson, Glenn [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 11:08 AM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] JSTL

 I too am a bit of a newbie and have the same question plus where can
we
 find
 good documentation on JSTL?

 Thanks

 Glenn

 -Original Message-
 From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 9:48 AM
 To: Struts (E-mail)
 Subject: [OT] JSTL


 I apologize if this is a bit off topic, and if it is a bit of a newbie
 question.
 I've never used JSTL before, and I'm not sure exactly what it is.  Is
it
 built into standard JSP technology (thus usable without any add-ons),
or
 is
 it a tag lib that you have to download and put in your project?

 - Keith


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


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


Performance Question about Tiles Plugin

2003-07-09 Thread Axel Sachmann
Hi,

i am new in Tiles and i have some Questions!

After i use the tiles-plugin with a external tile-defs file - the start
of my frontpage (standard and colum layout) is very slow. It's about 3-4
times slower than with static - html. How can i improve performance with
the tiles plugin?
Thanks for your help!

Axel Sachmann







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


Re: Performance Question about Tiles Plugin

2003-07-09 Thread Adam Hardy
Do you mean just the first time when the servlet container is compiling 
the JSP, or do you mean every time you call the page?

Adam

Axel Sachmann wrote:
Hi,

i am new in Tiles and i have some Questions!

After i use the tiles-plugin with a external tile-defs file - the start
of my frontpage (standard and colum layout) is very slow. It's about 3-4
times slower than with static - html. How can i improve performance with
the tiles plugin?
Thanks for your help!

Axel Sachmann







-
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: remmeber the URL design question

2003-07-09 Thread Yansheng Lin
Use struts:).



-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] 
Sent: July 9, 2003 9:22 AM
To: [EMAIL PROTECTED]
Subject: remmeber the URL design question


Hi,
I have to work on web application where i need for the
user to logon with userid and password for some
functions. So it will be some thing like the user
clicks submit after entering the data on a screen, but
then i want to show a page for the user to login, and
if the login is successfull then call the original URL
with the data entered from the user and update the
database,
but how do i keep track of the URL and data which was
originially submitted.

Ashish

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


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



bean:write and c:out only takes proper javabeans?

2003-07-09 Thread henrik . bentel
Does the bean write tag and the c:out tag (JSTL) only accept object that
adhere to the Javabean specification?

I have objects with public fields(no getter or setter) and objects inside
objects all public(again no getter or setter).
But if I try to do somthing like(in JSTL) C:out value=
${resultBean.intMember}/ where intMember is just a public int field, I
get the following exception:
org.apache.jasper.JasperException: An error occurred while evaluating
custom action attribute value with value ${resultBean.intMember}:
Unable
to find a value for intMember in object of class beantest.testBean1
using
operator . (null)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)


Yes, idealy I should use proper javabeans, but in this case my struts app
is interfacing with a CORBA based backend, and all result-structures
comming back are IDLEntities with public fields(the backend is an old
C-based app with nothing but heavily nested enums and structs and whatnot.
).

So my assumption was that the tags used reflection on fields so I could
just write value=${result.innerResult.wayInnerResult.innerLong}
Are there any ways of doing this?

thanks
Henrik Bentel



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



Re: Performance Question about Tiles Plugin

2003-07-09 Thread Axel Sachmann
not only the first time! You mean just the compile time at the first 
request.

No it slow all the time.
Perhaps a memory problem?
Axel



Adam Hardy wrote:

Do you mean just the first time when the servlet container is compiling 
the JSP, or do you mean every time you call the page?

Adam

Axel Sachmann wrote:

Hi,

i am new in Tiles and i have some Questions!

After i use the tiles-plugin with a external tile-defs file - the start
of my frontpage (standard and colum layout) is very slow. It's about 3-4
times slower than with static - html. How can i improve performance with
the tiles plugin?
Thanks for your help!

Axel Sachmann







-
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: [OT] JSTL

2003-07-09 Thread Stephen Brown
There is the odvious spec doc, which is pretty good...

ftp://ftp.java.sun.com/pub/spec/jstl/enov1818/jstl-1_0-fr-spec.pdf

steve

 -Original Message-
 From: Micael [mailto:[EMAIL PROTECTED]
 Sent: July 9, 2003 12:01 PM
 To: Struts Users Mailing List
 Subject: RE: [OT] JSTL
 
 
 There are, of course, books (or at least a book) on the topic.
 
 At 11:12 AM 7/9/03 -0400, you wrote:
 Did you try www.javasoft.com ?
 
   -Original Message-
   From: Davidson, Glenn [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, July 09, 2003 11:08 AM
   To: 'Struts Users Mailing List'
   Subject: RE: [OT] JSTL
  
   I too am a bit of a newbie and have the same question 
 plus where can
 we
   find
   good documentation on JSTL?
  
   Thanks
  
   Glenn
  
   -Original Message-
   From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, July 09, 2003 9:48 AM
   To: Struts (E-mail)
   Subject: [OT] JSTL
  
  
   I apologize if this is a bit off topic, and if it is a 
 bit of a newbie
   question.
   I've never used JSTL before, and I'm not sure exactly 
 what it is.  Is
 it
   built into standard JSP technology (thus usable without 
 any add-ons),
 or
   is
   it a tag lib that you have to download and put in your project?
  
   - Keith
  
  
   
 -
   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]
 
 
 
 LEGAL NOTICE
 
 This electronic mail  transmission and any accompanying 
 documents contain 
 information belonging to the sender which may be confidential 
 and legally 
 privileged.  This information is intended only for the use of the 
 individual or entity to whom this electronic mail 
 transmission was sent as 
 indicated above. If you are not the intended recipient, any 
 disclosure, 
 copying, distribution, or action taken in reliance on the 
 contents of the 
 information contained in this transmission is strictly 
 prohibited.  If you 
 have received this transmission in error, please delete the 
 message.  Thank 
 you  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


RE: [OT] Use of Static Methods

2003-07-09 Thread David Graham
 
 One of my programmers asked me whether or not it is OK to define helper
 methods as 'static' - and I realized that I didn't know the answer.  So
 I
 guess the question is, in a web application, can common code be factored
 out
 to a helper class and marked as 'static'?  

Static methods are evil for many reasons including philosophical (they're
not OO) and practical (you can't override their behavior).  You should use
a Singleton class with non-static methods.

Struts' RequestUtils class is a good example of why you should never use
static methods.  Developers want to override their behavior but can't
because everything is static.

David

 Are there any major problems
 with
 doing this?  I should know the answer, but just can't put my thumb on it
 right now 8)
 
 TIA!
 
 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]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: tiles and tabs; post instead of link

2003-07-09 Thread Dudley Irish
I have just finished converting the example from the tiles examples
from links to submits.  It is a little more complex than just changing
the code that generates the links to generate submits, though you have
to do that too.

First let me describe what I was trying to do.  I have a form which
has a number of tabs each of which contains inputs.  So there is the
header of the form that has a few inputs, then several tabs that all
have inputs.  My idea was to use the formbean to carry all this
information around and repopulate fields as necessary.  Please note: I
am not sure this is the best way to do this and I haven't gotten all
of my functionality working, so I will happily take advice on how to
do it.  Given that, this is how I did it.

I started with tabsLayout.jsp from the examples.  Using a tiles
definition like the following:

definition name=.population.tabs path=/common/layouts/tabsLayout.jsp 
  put name=formaction  value=/Population.do /
  put name=focus  value=name /
  put name=selectedIndex  value=0 /
  put name=parameterName  value=selected /
  put name=tabbody   value=/Population.jsp /
  putList name=tabList 
item value=One   link=/filler1.jsp /
item value=Two   link=/filler2.jsp /
item value=Three link=/filler3.jsp /
item value=Four  link=/filler4.jsp /
  /putList
/definition

Notice the addition of formaction and focus.  You must also add
useAttribute takes for these like so:

  tiles:useAttribute name=formaction classname=java.lang.String/
  tiles:useAttribute name=focus classname=java.lang.String/

Then in tabsLayout.jsp you start the form with:

  html:form action=%=formaction% focus=%=focus%

Notice the use of formaction and focus, though I think that focus
might be better off as a form parameter rather than as a tile
attribute.

Next you add

  bean:define id=selected
   name=populationForm
   property=selected
   type=java.lang.String/

to give your Java code access to the form parameter that identifies
the selected tab.  I have not included the details of the ActionForm,
but you do need to add selected to your form.  We will get to how this
is set below.

The following snipet of code is used to check the value of selected.
It shows some modifications that have not been fully tested.  In
particular, I am in the process of removing the selectedIndex tile
attribute.

  %
String selectedColor=#98ABC7;
String notSelectedColor=#C0C0C0;

int index = 0; // Loop index
int selectedIndex = 0;

try {
  selectedIndex = Integer.parseInt(selected);
}
catch( java.lang.NumberFormatException ex ) {
 // do nothing
}
// Check selectedIndex bounds
if( selectedIndex  0 || selectedIndex = tabList.size() ) selectedIndex = 0;
String selectedBody = 
((org.apache.struts.tiles.beans.MenuItem)tabList.get(selectedIndex)).getLink(); // 
Selected body
  %

Then we insert the tabbody, or the header as per the tile
definition.  We have to do this here in order to keep it and all of
the tabs in the same html:form definition.

  %-- Insert the tab body --%
  tiles:insert attribute=tabbody flush=true/

Then we insert the tabs.

  %-- Insert the tab pages --%
  table border=0  cellspacing=0 cellpadding=0
%-- Draw tabs --%
  tr
td width=10nbsp;/td
td
  table border=0  cellspacing=0 cellpadding=5
tr
  logic:iterate id=tab name=tabList type=org.apache.struts.tiles.beans.MenuItem 

  %
String color = notSelectedColor;
if( index == selectedIndex )
  {
  selectedBody = tab.getLink();
  color = selectedColor;
  } // enf if
index++;
  %
td bgcolor=%=color%
input type=submit value=%=tab.getValue()% name=tab/
/td
td width=1 /td

  /logic:iterate
/tr
  /table
/td
td width=10 nbsp;/td
  /tr

This is actually a little simpler than the tiles example.

Next we insert the selected tab:

  %-- Draw body --%
  tiles:insert name=%=selectedBody% flush=true /

And close the form:

  %-- End the form --%
  /html:form

All of this will make more sense when you are looking at the
tabsLayout.jsp from the examples.  Now the final piece the Action.
Here is the code that I have been testing with:

  public ActionForward executeAction(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws ClientException, Exception {
String tab = request.getParameter(tab);
PopulationForm popForm = (PopulationForm) form;

try {
  if (tab == null) {
popForm.setSelected(0);
  } else if (tab.equals(One)) {
popForm.setSelected(0);
  } else if (tab.equals(Two)) {
popForm.setSelected(1);
  } else if (tab.equals(Three)) {
popForm.setSelected(2);
  } else if (tab.equals(Four)) {
 

RE: html:options

2003-07-09 Thread Mathew, Manoj

div id=xxx
html:select property=property styleClass=%=myStyle% tabindex=100 
html:options collection=collection of possible values property=key 
labelProperty=value/ 
/html:select
/div
-Original Message-
From: sjones [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 10:43 AM
To: [EMAIL PROTECTED]
Subject: html:options


Good Morning Everyone.

I have a List object and i need my JSP page
to build a drop down list box using the List as the source
for the options.

I can do it with a scriplet but i need to one of the struts tags
html:options
html:optionsCollection

can anyone help me with use one of these tags.

I am looking at the java.docs but it doesn't really help me.

the List is also accessible from a classs name EqualityOperators

List o = EqualityOperators.getOperators();





-
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] Use of Static Methods

2003-07-09 Thread Erik Price


David Graham wrote:

Static methods are evil for many reasons including philosophical (they're
not OO) and practical (you can't override their behavior).  You should use
a Singleton class with non-static methods.
And the generally accepted way to get a reference to the singleton is 
with a static getInstance method, right?  Is there any way to make an 
anonymous subclass of a Singleton that uses a static method to get the 
instance?  For example:

public class SubclassSingleton {

  public static void main(String[] args) {
MySingleton ms = new MySingleton() {
  int doSomething() {
return 42;
  }
}
MySingleton inst = ms.getInstance();
System.out.println(ms.doSomething());
  }
}
class MySingleton {

  static MySingleton me;

  static getInstance() {
if (MySingleton.me == null)
  MySingleton.me = new MySingleton();
return MySingleton.me;
  }
  int doSomething() {
return 8;
  }
}


This simple code doesn't work, because even if you subclass the 
singleton and override one of the methods, the getInstance() method will 
create a base-class MySingleton.  And since this method is static, it 
can't be overridden.  So while singletons are useful, you can't use them 
in anonymous subclasses (as far as I can tell), which makes them 
difficult to use with mock object unit testing.

Please someone point out the flaw in my reasoning, it has bothered me 
for quite a while and I'd love to be proven wrong.



Erik

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


validator validwhen not working?

2003-07-09 Thread Poon, Johnny
Hi,

I'm trying to use validwhen, so that it's only valid when either all three
related fields are empty or are filled, it's valid; otherwise not.  ssn_1,
ssn_2, and ssn_3 are the field names.  For some reason, when I put this in,
none of the validation takes place, not even required, minlength, maxlength,
nor mask, which all worked before I put validwhen in there.  Did I do
anything wrong?

Here's the one of the fields in my validation.xml file:

field property=ssn_1 depends=validwhen, required, minlength, maxlength,
mask
msg name=required key=errors.required.enter /
msg name=minlength key=errors.minlength.digit /
msg name=maxlength key=errors.maxlength.digit /
msg name=mask key=errors.mask.numeric /
arg0 key=ssn_1.displayName /
arg1 name=minlength key=${var:minlength} resource=false /
arg1 name=maxlength key=${var:maxlength} resource=false /
var
var-nametest/var-name
var-value( (*this* == null) and (ssn_2 == null) and (ssn_3
== null) )/var-value
/var
var
var-nameminlength/var-name
var-value3/var-value
/var
var
var-namemaxlength/var-name
var-value3/var-value
/var
var
var-namemask/var-name
var-value^\d*$/var-value
/var
/field

Thanks.

JP.


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


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



RE: [OT] Use of Static Methods

2003-07-09 Thread Yansheng Lin
I gave this a bit of thought before.  I felt in some situations, static methods
and instances are preferred.  For example, if you want to synchronize a query
method.  Or in some situations where overriding is rare, i.e.,
java.util.Calendar.  


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: July 9, 2003 10:22 AM
To: Struts Users Mailing List
Subject: RE: [OT] Use of Static Methods


 
 One of my programmers asked me whether or not it is OK to define helper
 methods as 'static' - and I realized that I didn't know the answer.  So
 I
 guess the question is, in a web application, can common code be factored
 out
 to a helper class and marked as 'static'?  

Static methods are evil for many reasons including philosophical (they're
not OO) and practical (you can't override their behavior).  You should use
a Singleton class with non-static methods.

Struts' RequestUtils class is a good example of why you should never use
static methods.  Developers want to override their behavior but can't
because everything is static.

David

 Are there any major problems
 with
 doing this?  I should know the answer, but just can't put my thumb on it
 right now 8)
 
 TIA!
 
 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]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


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



Re: Reusable Components

2003-07-09 Thread Craig R. McClanahan


On Wed, 9 Jul 2003, Frédéric Dreier wrote:

 Date: Wed, 9 Jul 2003 10:13:02 +0200
 From: Frédéric Dreier [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: struts user [EMAIL PROTECTED]
 Subject: Reusable Components

 Hi,

 I really need your help and hints... I was not able to found something
 related on internet.

 how can i make reusable 'high-level' components? taglib seems to be useless
 for such components (that already use JSP's and actions). Tiles is exactly
 what i need but it does not seems to work if sub-component JSPs are packed
 in a JAR library..

 Does anyone has some link or other resources about it? or even has another
 solution?


Reusable user interface components is what JavaServer Faces is all about,
and it can be used with Struts:

  http://java.sun.com/j2ee/javaserverfaces/

One of the features is exactly what you're asking for -- the ability to
package up components, renderers, and the corresponding tags into a JAR
file that auto-configures itself when you drop it into /WEB-INF/lib.

 Thanks in advance,

 Frederic

Craig

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



RE: [OT] Use of Static Methods

2003-07-09 Thread David Graham
--- Yansheng Lin [EMAIL PROTECTED] wrote:
 I gave this a bit of thought before.  I felt in some situations, static
 methods
 and instances are preferred.  For example, if you want to synchronize a
 query
 method.  Or in some situations where overriding is rare, i.e.,
 java.util.Calendar.  

How do you know overriding is rare for any particular class?  Widely used
code such as Java and Struts cannot assume anything about how developers
will want to use the classes so you should always (even for internal code)
make classes as flexible as possible.

David

 
 
 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: July 9, 2003 10:22 AM
 To: Struts Users Mailing List
 Subject: RE: [OT] Use of Static Methods
 
 
  
  One of my programmers asked me whether or not it is OK to define
 helper
  methods as 'static' - and I realized that I didn't know the answer. 
 So
  I
  guess the question is, in a web application, can common code be
 factored
  out
  to a helper class and marked as 'static'?  
 
 Static methods are evil for many reasons including philosophical
 (they're
 not OO) and practical (you can't override their behavior).  You should
 use
 a Singleton class with non-static methods.
 
 Struts' RequestUtils class is a good example of why you should never use
 static methods.  Developers want to override their behavior but can't
 because everything is static.
 
 David
 
  Are there any major problems
  with
  doing this?  I should know the answer, but just can't put my thumb on
 it
  right now 8)
  
  TIA!
  
  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]
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



  1   2   3   >