Re: Question about buttons

2003-06-04 Thread Nagendra Kumar O V S








  hi,
  
  u can obviously give any no of submit buttons with the property 
  name in the action form. and u can get the value and go accordingly
  
  another intersting feature in struts is that , if u extend ur action 
  class with DispatchAction (instead of Action) u can implement n number of 
  execute methods, with a value based on the request parameter.
  pl go thro' struts docs u have all the answers to ur questions
  
  --nagi
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Tuesday, June 03, 
  2003 06:07:12 PM
  To: [EMAIL PROTECTED]
  Subject: Question about 
  buttons
  Hello everyone,if I want to have a button in my 
  form that would be a second submit button,can I give it it's own 
  action-class? I guess not, but I thought I'd ask.Also, how can I check 
  in my form bean which button has been pressed?The reason why I am 
  asking all of this: I want to have a third button in myform, next to 
  the general submit and cancel buttons. If that button ispressed, some 
  extra info is being displayed but the data in the form shouldbe 
  validated. I thought, it'd be nicer to use a button for this than 
  anormal 
  link...Greetings,Nadja-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



JavaScript and text field

2003-06-04 Thread Juraj . Lenharcik
Hi, 

I have some problems to access a text field.

I have this JSP code:

html:form action=criteria.do method=post onsubmit=javascript:check()
html:text property=item size=40 /

And want to access the value of the item field:

function check(){
var inputvalue = document.all.item.value;
alert(inputvalue);
var inputvalue = document.forms[0].item.value;
alert(inputvalue);
}

No of these variant runs. In an another application I have the 2 solution and it 
works. Are there any depedencies between struts and JS?

Juraj

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



Re: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Jeff Kyser
No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file
So you might have 40 definitions in your tiles config + 40 body content 
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

Hi ,
	In my application there may be around 40 forms . I am using the
classic layout for the application .
the body changes for every page , I mean I have a different JSP's for 
these
forms .
Each form is submitted and a result page is desplayed .
Now my question is if I have 40 forms , so do I need to create total 
of 80
JSP (Excluding the result page) ??
I mean one JSP having the body content and the other one to integrate 
all
tiles .
The second option could be using one JSP having all the insert Tags 
with the
Body content .

Is there any better option available ??
This question is not for the results page as I know the result page 
can be
directly called from the action .

Nimish


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


RE: JavaScript and text field

2003-06-04 Thread Mike Jasnowski
I would check the HTML source and see what the Name attribute for the
textfield you are trying to access is set to.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:53 AM
To: [EMAIL PROTECTED]
Subject: JavaScript and text field


Hi,

I have some problems to access a text field.

I have this JSP code:

html:form action=criteria.do method=post onsubmit=javascript:check()
html:text property=item size=40 /

And want to access the value of the item field:

function check(){
var inputvalue = document.all.item.value;
alert(inputvalue);
var inputvalue = document.forms[0].item.value;
alert(inputvalue);
}

No of these variant runs. In an another application I have the 2 solution
and it works. Are there any depedencies between struts and JS?

Juraj

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



Posted Again: Build Navigation based on action mapping

2003-06-04 Thread Haytham Samad

Sorry for reposting but wanted to get some feedback on this as I am sure
everyone here had to deal with this at some point.  I am trying to find a
way to have navigation built based on the struts-config.xml's action
mappings.  Since all my use cases are enabled through action listed under
action mapping, this seemed like a good place to start.  Anyone done this
before or has other robust ideas to build a navigation that can update as my
site's features change?

Thanks,

Haytham

Below is my first posting:

I am trying to build a navigation component that basically runs of the
struts config file's action mappings.  Anyone ever done this before or has
ideas on ways to build navigation from the struts config xml file?  I would
like it to dynamically update with changes to my site's navaigation/flow and
use the role information included with the mappings.

Thanks.

Haytham


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



html:select : update bean field only if values are selected

2003-06-04 Thread Ionel Gardais
Hi,

I have two select lists that I use a swaping selections (transfert one 
item from a list to another and remove it from the first)

the problem is that Struts doesn't update a bean field when a list is 
not empty but when there are selected values inside.

how to tell Struts that I need an on-presence update and not an 
on-selection as by now ?

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


AW: JavaScript and text field

2003-06-04 Thread Juraj . Lenharcik
It is: item

html:text property=item size=40 /

is:

input type=text name=item size=40 value=


-Ursprüngliche Nachricht-
Von: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 3. Juni 2003 14:56
An: Struts Users Mailing List
Betreff: RE: JavaScript and text field


I would check the HTML source and see what the Name attribute for the
textfield you are trying to access is set to.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:53 AM
To: [EMAIL PROTECTED]
Subject: JavaScript and text field


Hi,

I have some problems to access a text field.

I have this JSP code:

html:form action=criteria.do method=post onsubmit=javascript:check()
html:text property=item size=40 /

And want to access the value of the item field:

function check(){
var inputvalue = document.all.item.value;
alert(inputvalue);
var inputvalue = document.forms[0].item.value;
alert(inputvalue);
}

No of these variant runs. In an another application I have the 2 solution
and it works. Are there any depedencies between struts and JS?

Juraj

-
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: JavaScript and text field

2003-06-04 Thread Jeff Kyser
well, your check() function ought to return a boolean for starters.

	function check() {

if (tests fail)
return false;
else
return true;
}
then,

	onsubmit = return check()

-jeff

On Tuesday, June 3, 2003, at 07:53  AM, [EMAIL PROTECTED] 
wrote:

Hi,

I have some problems to access a text field.

I have this JSP code:

html:form action=criteria.do method=post 
onsubmit=javascript:check()
html:text property=item size=40 /

And want to access the value of the item field:

function check(){
var inputvalue = document.all.item.value;
alert(inputvalue);
var inputvalue = document.forms[0].item.value;
alert(inputvalue);
}
No of these variant runs. In an another application I have the 2 
solution and it works. Are there any depedencies between struts and  JS?

Juraj

-
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: Storing the Output of a Servlet to Database

2003-06-04 Thread Rajesh P
Hi,
The option 2 is what i am looking at. The API for generating the PDF writes to the 
servlet outputstream directly. So for the time being forget PDF, say, I need to 
capture the output of any servlet, say a html content, and store that to a db or file, 
how do I do that?
Thanks for the response.
Rajesh

-Original Message-
From: J, Sadhasivam (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 5:40 PM
To: Struts Users Mailing List
Subject: RE: Storing the Output of a Servlet to Database


Hi
There are various ways u can do this.

approach 1:
simple and best approach.. create a PDF file in the weblocaiton and compose 
the path and store it. when ever u want u can make use of it.

appraoch 2
Create a CLob column once the PDF is generated push to a DA method before 
giving it to Servlet.

apprach 3
Create a BFIle useit.

-Original Message-
From: Rajesh P [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 5:28 PM
To: Struts Users Mailing List
Subject: Storing the Output of a Servlet to Database


Hello Everyone,
I have a requirement wherein a Servlet class is used to generate a PDF document. This 
output should be stored into a database table for future retrieval. Can somebody tell 
me how this output of the Servlet can be captured and stored into a database table? Or 
rather, how to capture the response outputstream, convert it to bytes so that it can 
be persisted in the datbase. Please note that we are not allowed to write to a File 
and then upload it.  
Thanks, 
Rajesh 

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


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



Re: JavaScript and text field

2003-06-04 Thread Sergey Smirnov
Try the folowing:

html:form action=criteria.do method=post onsubmit=return check(this)
html:text property=item size=40 /



function check(formId){
var inputvalue = formId.item.value;
alert(inputvalue);
return true;
}

Regards,
Sergey Smirnov
-
Exadel Struts Studio - IDE for Struts
http://www.exadel.com/strutsStudio
-


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 5:53 AM
Subject: JavaScript and text field


 Hi,

 I have some problems to access a text field.

 I have this JSP code:

 html:form action=criteria.do method=post
onsubmit=javascript:check()
 html:text property=item size=40 /

 And want to access the value of the item field:

 function check(){
 var inputvalue = document.all.item.value;
 alert(inputvalue);
 var inputvalue = document.forms[0].item.value;
 alert(inputvalue);
 }

 No of these variant runs. In an another application I have the 2 solution
and it works. Are there any depedencies between struts and JS?

 Juraj

 -
 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 Two JSP's for Displaying One Form .

2003-06-04 Thread Nimish Chourey , Tidel Park - Chennai
And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??

Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file . 
But then I require another JSP which actually inserts that definition ...


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content 
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi ,
   In my application there may be around 40 forms . I am using the
 classic layout for the application .
 the body changes for every page , I mean I have a different JSP's for 
 these
 forms .
 Each form is submitted and a result page is desplayed .
 Now my question is if I have 40 forms , so do I need to create total 
 of 80
 JSP (Excluding the result page) ??
 I mean one JSP having the body content and the other one to integrate 
 all
 tiles .
 The second option could be using one JSP having all the insert Tags 
 with the
 Body content .

 Is there any better option available ??
 This question is not for the results page as I know the result page 
 can be
 directly called from the action .

 Nimish


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


RE: Storing the Output of a Servlet to Database

2003-06-04 Thread J, Sadhasivam (Cognizant)
As per my guess. PDF generator accepts a Stream or writer of nature 
Servletoutputstream.. 

so u can create Impl of that and send it to PDF generator and get the stream . 
serilzie to the DB and then use the same stream to write it to servlet if u required..

-Original Message-
From: Rajesh P [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 5:51 PM
To: Struts Users Mailing List
Subject: RE: Storing the Output of a Servlet to Database


Hi,
The option 2 is what i am looking at. The API for generating the PDF writes to the 
servlet outputstream directly. So for the time being forget PDF, say, I need to 
capture the output of any servlet, say a html content, and store that to a db or file, 
how do I do that?
Thanks for the response.
Rajesh

-Original Message-
From: J, Sadhasivam (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 5:40 PM
To: Struts Users Mailing List
Subject: RE: Storing the Output of a Servlet to Database


Hi
There are various ways u can do this.

approach 1:
simple and best approach.. create a PDF file in the weblocaiton and compose 
the path and store it. when ever u want u can make use of it.

appraoch 2
Create a CLob column once the PDF is generated push to a DA method before 
giving it to Servlet.

apprach 3
Create a BFIle useit.

-Original Message-
From: Rajesh P [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 5:28 PM
To: Struts Users Mailing List
Subject: Storing the Output of a Servlet to Database


Hello Everyone,
I have a requirement wherein a Servlet class is used to generate a PDF document. This 
output should be stored into a database table for future retrieval. Can somebody tell 
me how this output of the Servlet can be captured and stored into a database table? Or 
rather, how to capture the response outputstream, convert it to bytes so that it can 
be persisted in the datbase. Please note that we are not allowed to write to a File 
and then upload it.  
Thanks, 
Rajesh 

-
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 e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

Visit us at http://www.cognizant.com


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

newbie : Initial value to a property in dynaacttion form

2003-06-04 Thread graghupathy
Hi,
Firt to let you know that i am quite new to this struts 

Can you let me know of how to give an initial value to a property in
struts-config.xml 
The initial value is a arraylist from a bean..


Thanks 
Guru

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



[OT - Design] Business Logic and JavaBeans

2003-06-04 Thread Jerry Jalenak
I'm considering placing specific business logic methods in the JavaBean that
has the business elements used by these methods.  In other words, something
like this - 

public class User
{
private String userID;
.

public User() {}

... getters / setters for attributes ...

public Object validateUserID()
{
... business logic ...
}
}

The validateUserID method would call appropriate DAO's, etc. as needed.  My
struts action would instantiate the bean, then call the validateUserID
method.  Is this an OK approach to encapsulating related business 'stuff'
together?  Any obvious problems that I am completely overlooking?

Thanks!

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]



changing tiles-config.xml from within an app?

2003-06-04 Thread Witbeck, Shane
Does anyone have any experience with changing a tiles-config.xml file from
within an app? I have an app that has different themes based on resource
bundles and a variable which changes bundles (and therefore themes).
Currently, I have this variable defined in the tiles-config.xml and I change
this variable and reload tiles each time I change themes. This is done
strictly on an admin level and anyone using the app would be affected by the
theme change.

Would it be a good idea to create a class to read/write the variable in the
tiles-config.xml or should I just make this variable a Singleton?

TIA, 

Shane

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



RE: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread shirishchandra.sakhare
Hi Nilesh,
Better approach is use tiles definitions..

So u have those 40 jsps for 40 page contents..And one tiles definition xml file which 
assembles those..

HTH.
regards,
Shirish

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 3:15 PM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .


And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??

Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file . 
But then I require another JSP which actually inserts that definition ...


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content 
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi ,
   In my application there may be around 40 forms . I am using the
 classic layout for the application .
 the body changes for every page , I mean I have a different JSP's for 
 these
 forms .
 Each form is submitted and a result page is desplayed .
 Now my question is if I have 40 forms , so do I need to create total 
 of 80
 JSP (Excluding the result page) ??
 I mean one JSP having the body content and the other one to integrate 
 all
 tiles .
 The second option could be using one JSP having all the insert Tags 
 with the
 Body content .

 Is there any better option available ??
 This question is not for the results page as I know the result page 
 can be
 directly called from the action .

 Nimish


-
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 Two JSP's for Displaying One Form .

2003-06-04 Thread Bailey, Shane C.


  Content of tiles-defs.xml:
  !-- ===  --
  !-- View page Templates  --
  !-- ===  --
  definition name=doc.Layout1 path=/view/main/plain_layout.jsp
  put name=title  value=ACINT21 /
  put name=header value=/view/main/header.jsp /
  put name=body   value=/view/main/body.jsp /
  put name=footer value=/view/main/footer.jsp /
  /definition

  !-- ===  --
  !-- View page definitions--
  !-- ===  --
  !-- Login Page --
  definition name=doc.login extends=doc.Layout1
  put name=title  value=Login /
  put name=body   value=/view/login/login.jsp /
  /definition
  !-- Welcome (after successful login) Page --
  definition name=doc.welcome extends=doc.Layout1
  put name=title  value=Welcome Here /
  put name=body   value=/view/main/welcome.jsp /
  /definition
  definition name=doc.welcome2 extends=doc.Layout1
  put name=title  value=Welcome Here2 /
  put name=body   value=/view/main/welcome2.jsp /
  /definition
  definition name=doc.welcome3 extends=doc.Layout1
  put name=title  value=Welcome Here3 /
  put name=body   value=/view/main/welcome3.jsp /
  /definition

Then in the action mapping in struts config you forward to doc.login etc.

With a few extra pages, for the layout, header, footer; I only need a single
page (the body) for every new def.  So the overhead may be two or 3
Pages at first but then it grows by one for ever new def.  This is just one
way and it works for me.  I'm sure there are more efficient (less pages) but
this way seems to be easy to understand and small after the original
overhead.

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 9:15 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .

And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??

Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file . 
But then I require another JSP which actually inserts that definition ...


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content 
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi ,
   In my application there may be around 40 forms . I am using the
 classic layout for the application .
 the body changes for every page , I mean I have a different JSP's for 
 these
 forms .
 Each form is submitted and a result page is desplayed .
 Now my question is if I have 40 forms , so do I need to create total 
 of 80
 JSP (Excluding the result page) ??
 I mean one JSP having the body content and the other one to integrate 
 all
 tiles .
 The second option could be using one JSP having all the insert Tags 
 with the
 Body content .

 Is there any better option available ??
 This question is not for the results page as I know the result page 
 can be
 directly called from the action .

 Nimish


-
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

2003-06-04 Thread sjones
there is no default value for loginID

I am trying to re-display the LoginID the user entered after a failed login attempt. 
 

return mapping.findForward(failed) -  maps back to login.jsp

as far as naming conventions. i am aware of it.  

i was just trying anything and every thing to get the stupid thing working.



  Nagendra Kumar O V S [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
hi,
first, i don't understand why u put bean:write .. in the html:text.. , i 
guess for the value. but if the form has a value prepopulated (for UID), struts will 
get the value in to the text field automatically.
second, as far as possible pl. follow the javabean convention for naming ur 
form variables

--nagi
---Original Message---

From: Struts Users Mailing List
Date: Tuesday, June 03, 2003 03:07:17 AM
To: [EMAIL PROTECTED]
Subject: bean-write

my form-bean is com.ubs.directory.yp.formbeans.SubmitLogin
the property is UID
with get and sets

String getUID()
void setUID()

I am getting errors
[6/2/03 17:20:06:190 EDT] 6f1fc760 WebGroup E SRVE0026E: [Servlet
Error]-[Cannot find bean SubmitLogin in any scope]:
javax.servlet.jsp.JspException: Cannot find bean SubmitLogin in any scope

html:errors/
html:form action=/submit.do
table cellspacing=0 cellpadding=0
trtdUser ID :/tdtdhtml:text property=UID
bean:write
name=SubmitLogin property=UID/
/html:text
/td/tr
trtdPassword :/tdtdhtml:password property=PWD//td/tr
trtdnbsp;/td/tr
tr
td colspan=2
html:submit value=Login property=login /html:reset
value=Clear Form property=clear/
/td
/tr
/table
/html:form






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


. 
   
   
  
IncrediMail - Email has finally evolved - Click Here 


Re: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Jeff Kyser
I don't think so, but here's an example from my tiles-config file:

Master Page - the layout
inserts a 'header' containing a logo/image
has 'empty' slots for menu, body
definition name=order_entry.masterPage
path=/WEB-INF/pages/layout/torchHeaderLayout.jsp
put name=title  value= /
put name=header value=/WEB-INF/pages/tiles/header.jsp /
put name=menu   value=/WEB-INF/pages/layout/emptyTile.jsp 
/
put name=body   value=/WEB-INF/pages/layout/emptyTile.jsp 
/
put name=body-background 
value=../../../images/background.gif /
/definition

'masterMenu' - just inserts the menu, to be used subsequently as a 
template
for other pages that want a menu on them

definition name=order_entry.masterMenu 
extends=order_entry.masterPage
put name=menu   value=/WEB-INF/pages/tiles/menu.jsp /
/definition

A typical page - extends the master Menu - only adds 1 jsp

definition name=order_entry.accession.SearchByAccession 
extends=order_entry.masterMenu
put name=title  value=Search By Accession Number /
put name=body   
value=/WEB-INF/pages/accession/SearchByAccessionNumber.jsp /
/definition

Sure, I had a few 'helper' JSP pages, but from now on, as long as they
just use the master or menu Master, they just need to add 1 JSP + an 
entry
in this tiles-config.xml file.

-jeff

On Tuesday, June 3, 2003, at 08:15  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??
Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file .
But then I require another JSP which actually inserts that definition 
...

-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .
No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a 
definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content
JSPs,
but certainly not 80 JSPs.
or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park -
Chennai wrote:
Hi ,
In my application there may be around 40 forms . I am using the
classic layout for the application .
the body changes for every page , I mean I have a different JSP's for
these
forms .
Each form is submitted and a result page is desplayed .
Now my question is if I have 40 forms , so do I need to create total
of 80
JSP (Excluding the result page) ??
I mean one JSP having the body content and the other one to integrate
all
tiles .
The second option could be using one JSP having all the insert Tags
with the
Body content .
Is there any better option available ??
This question is not for the results page as I know the result page
can be
directly called from the action .
Nimish


-
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

2003-06-04 Thread Bailey, Shane C.

Then you have other problems because that should be a freebie with struts.


-Original Message-
From: sjones [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 9:47 AM
To: [EMAIL PROTECTED]
Subject: Re: bean-write

there is no default value for loginID

I am trying to re-display the LoginID the user entered after a failed
login attempt.  

return mapping.findForward(failed) -  maps back to login.jsp

as far as naming conventions. i am aware of it.  

i was just trying anything and every thing to get the stupid thing working.



  Nagendra Kumar O V S [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
hi,
first, i don't understand why u put bean:write .. in the
html:text.. , i guess for the value. but if the form has a value
prepopulated (for UID), struts will get the value in to the text field
automatically.
second, as far as possible pl. follow the javabean convention for
naming ur form variables

--nagi
---Original Message---

From: Struts Users Mailing List
Date: Tuesday, June 03, 2003 03:07:17 AM
To: [EMAIL PROTECTED]
Subject: bean-write

my form-bean is com.ubs.directory.yp.formbeans.SubmitLogin
the property is UID
with get and sets

String getUID()
void setUID()

I am getting errors
[6/2/03 17:20:06:190 EDT] 6f1fc760 WebGroup E SRVE0026E: [Servlet
Error]-[Cannot find bean SubmitLogin in any scope]:
javax.servlet.jsp.JspException: Cannot find bean SubmitLogin in any
scope

html:errors/
html:form action=/submit.do
table cellspacing=0 cellpadding=0
trtdUser ID :/tdtdhtml:text property=UID
bean:write
name=SubmitLogin property=UID/
/html:text
/td/tr
trtdPassword :/tdtdhtml:password property=PWD//td/tr
trtdnbsp;/td/tr
tr
td colspan=2
html:submit value=Login property=login /html:reset
value=Clear Form property=clear/
/td
/tr
/table
/html:form






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


. 
   
   
  
IncrediMail - Email has finally evolved - Click Here 

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



TR : Disable

2003-06-04 Thread Legoff, Yoann
Title: Message



Hi,I wan't to parameter my html:text tag with a 
properties' file.Switching between true and false, but with my 
properties.The problem was i don't know how to write a messageRessource 
into a Bean:tag ...The same probleme than Vangelis Konstantinis this 
morning.I don't know if it was possible.If it is, how to 
?Yoann

 Ce message, ainsi que tous les fichiers joints est destin aux seules personnes dont le nom est mentionn comme destinataire. Il peut contenir des informations sensibles ne devant pas tre divulgues et est protg contre toute violation par les dispositions pnales de la loi relative au secret des correspondances. Si vous recevez ce message par erreur, nous vous remercions de le renvoyer  son expditeur, sans en conserver trace ou copie, et de ne pas utiliser, reproduire, rvler, modifier ou diffuser de manire directe ou indirecte les informations qu'il contient   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: ArrayList as an element of DynaActionForm

2003-06-04 Thread Dan Tran
Mark, my ArrayList is a list of another value object beans which has few
string properties.

In my JSP I use c:foreach and display all fields in the array, of course I
make them editable.

When I submit the button, I would think struts is smart enought to move the
form in HttpServletRequest back to the DynaActionForm.  am I wrong?

-Dan
- Original Message - 
From: Mark Lowe [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 2:32 AM
Subject: Re: ArrayList as an element of DynaActionForm



 How/where do you populate your ArrayList?

 On Tuesday, Jun 3, 2003, at 08:58 Europe/London, Dan Tran wrote:

  Hello, I define an ArrayList as an element of my DynaActionForm.
 
  I set up my form and load it up on my jsp using c:foreach
 
  But when I submit the form back to the server, my ArrayList always
  empty.
 
  What did I do wrong?
 
  Thanks
 
  -Dan


 -
 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 Two JSP's for Displaying One Form .

2003-06-04 Thread Nimish Chourey , Tidel Park - Chennai
Hi I agree with you .. But see ..below you have created a definition
doc.login .. So your content (body) JSP is login.jsp .
Count this as one . 
Now You need a JSP to insert this definition . .. Say index.jsp ..
My index.jsp will look something like this ..

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

tiles:insert definition=doc.login flush=true /

Now Count this JSP as number 2 .. 


Hence to build the whole page I m using Two JSP ..
Hope I have made my question clear ..

And If still I m missing some thing .. Let me know ..






-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:07 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles Two JSP's for Displaying One Form .




  Content of tiles-defs.xml:
  !-- ===  --
  !-- View page Templates  --
  !-- ===  --
  definition name=doc.Layout1 path=/view/main/plain_layout.jsp
  put name=title  value=ACINT21 /
  put name=header value=/view/main/header.jsp /
  put name=body   value=/view/main/body.jsp /
  put name=footer value=/view/main/footer.jsp /
  /definition

  !-- ===  --
  !-- View page definitions--
  !-- ===  --
  !-- Login Page --
  definition name=doc.login extends=doc.Layout1
  put name=title  value=Login /
  put name=body   value=/view/login/login.jsp /
  /definition
  !-- Welcome (after successful login) Page --
  definition name=doc.welcome extends=doc.Layout1
  put name=title  value=Welcome Here /
  put name=body   value=/view/main/welcome.jsp /
  /definition
  definition name=doc.welcome2 extends=doc.Layout1
  put name=title  value=Welcome Here2 /
  put name=body   value=/view/main/welcome2.jsp /
  /definition
  definition name=doc.welcome3 extends=doc.Layout1
  put name=title  value=Welcome Here3 /
  put name=body   value=/view/main/welcome3.jsp /
  /definition

Then in the action mapping in struts config you forward to doc.login etc.

With a few extra pages, for the layout, header, footer; I only need a single
page (the body) for every new def.  So the overhead may be two or 3
Pages at first but then it grows by one for ever new def.  This is just one
way and it works for me.  I'm sure there are more efficient (less pages) but
this way seems to be easy to understand and small after the original
overhead.

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 9:15 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .

And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??

Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file . 
But then I require another JSP which actually inserts that definition ...


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content 
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi ,
   In my application there may be around 40 forms . I am using the
 classic layout for the application .
 the body changes for every page , I mean I have a different JSP's for 
 these
 forms .
 Each form is submitted and a result page is desplayed .
 Now my question is if I have 40 forms , so do I need to create total 
 of 80
 JSP (Excluding the result page) ??
 I mean one JSP having the body content and the other one to integrate 
 all
 tiles .
 The second option could be using one JSP having all the insert Tags 
 with the
 Body content .

 Is there any better option available ??
 This question is not for the results page as I know the result page 
 can be
 directly called from the action .

 Nimish


-
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 

RE: changing tiles-config.xml from within an app?

2003-06-04 Thread Chen, Gin
I think this question was asked before and (one of) the answer was to add a
listener to your config so that the application can reload it. But if its
something that might change often then having it in a class with
getter/setters makes more sense.

-Tim

-Original Message-
From: Witbeck, Shane [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 9:38 AM
To: [EMAIL PROTECTED]
Subject: changing tiles-config.xml from within an app?


Does anyone have any experience with changing a tiles-config.xml file from
within an app? I have an app that has different themes based on resource
bundles and a variable which changes bundles (and therefore themes).
Currently, I have this variable defined in the tiles-config.xml and I change
this variable and reload tiles each time I change themes. This is done
strictly on an admin level and anyone using the app would be affected by the
theme change.

Would it be a good idea to create a class to read/write the variable in the
tiles-config.xml or should I just make this variable a Singleton?

TIA, 

Shane

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



using struts tag libraries outside of struts

2003-06-04 Thread Remco Gerlich
Hello. I have to evaluate what we're going to use, Struts, OpenCMS,
some other system... I don't have much experience with JSP etc yet.

The Struts tag libraries look cool. Is it possible to use them outside
of Struts, say by dropping them into a OpenCMS project? Or do they
depend on having the Struts framework present?

Thanks for your time.

Remco Gerlich

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



Struts 1.1 on z/OS with WebSphere Application Server 4.0

2003-06-04 Thread Markus Holzem
Does anyone have experiences with Struts running on an IBM mainframe?
I'm particularly interested in WebSphere 4.0 (z/OS, *not* z/Linux).
I've tried to find anything in the archive, but I only found
references on WebSphere running on Wintel, Linux or Solaris. Since
WebSphere on z/OS is only 99.9% compatible to the other platforms
I'm a bit anxious about giving it a try.
I'd be very much obliged, if anyone could give some hints for running
Struts 1.1 on this platform.
Markus



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


Re: List sorting with struts tags

2003-06-04 Thread Chris Hatton
Check Arron's NeXt tutorials at KeyboardMonkey.

-- http://www.keyboardmonkey.com/pilotlight/index.jsp?content=yesplease

Chris Hatton

On Mon, 2 Jun 2003 17:08:48 -0400, Franck Lefebure [EMAIL PROTECTED] 
wrote:

Hi,
I've a sorted ArrayList of beans eg : Foo {key, country, town}
1 - USA - NewYork
2 - USA - Washington
3 - France - Paris
4 - England - London
5 - England - Manchester
Is there a smart way with html/beans tags to output something like that
:
USA
-NewYork-WashingtonFrance
-ParisEngland
-London -Manchester
Any Idea ?

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




--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Building a site navigation using Struts mappings

2003-06-04 Thread Chen, Gin
Don't use Strut-Config for this.
Look at Tiles instead. As for dynamically update you can combine Tiles with
Logic to show and display what you want.
-Tim

-Original Message-
From: Haytham Samad [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 5:01 PM
To: Struts Users Mailing List
Subject: Building a site navigation using Struts mappings


hi all,

I am trying to build a navigation component that basically runs of the
struts config file's action mappings.  Anyone ever done this before or has
ideas on ways to build navigation from the struts config xml file?  I would
like it to dynamically update with changes to my site's navaigation/flow and
use the role information included with the mappings.

Thanks.

Haytham


-
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] data layer, try-catch-finally, connections

2003-06-04 Thread Mike Whittaker
I guess you've all been here, so can you answer this?

you have do a 'finally' to ensure you close the connection/release it back
to the pool.

In the controller tier this is easy, get the connection in the
Filter/RequestProcessor/Action when whatever returns you can finally close
it.

However this ties it to the controller layer.  I want my connections
instigated from the business layer.  But because so many processes require a
connection I will have identical try,catch,finally block all over the place.

Any one got a solution to this?

Thankyou
--
Mike W


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



[OT] What layer does an XSL transform belong to

2003-06-04 Thread Jeff Kyser
Hey all,

A bit philisophical I suppose, but we've integrated some
legacy apps into a Struts application, and they return their
data as an XML document.
In a previous version of the app, the JSP made the legacy
call (gakk!), and then performed an XSL transform to display
the info to the user. (I didn't write it :)
I'm trying to migrate things towards their proper places, and
my question is where (if anywhere) the XSL transform belongs.
Ideally, I would either call the legacy app from within a
Action, or pushed down yet another  layer behind some
model call.
But if I did a model layer, then I'd probably transfer the data
from the XML document to a Java model object and then
transfer data from the model to a form via the Action and let
the tag libraries take it from there.
I don't have the luxury of a rewrite, so trying to incrementally
migrate and just not sure where the XSL transform should
land (or at least roost).
your insights would be appreciated

regards,

-jeff

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


out-of-memory exp

2003-06-04 Thread Nagendra Kumar O V S








  hi,
  i am using struts 1.1 with ejb on weblogic7.1
  
  i frequently get this error while working with the web 
  application
  
  Jun 3, 2003 7:42:03 PM IST Error HTTP 
  101017 
  [ServletContext(id=4550717,name=cwbweb,context-path=/cwbweb)] Root 
  cause of 
  ServletExceptionjava.lang.OutOfMemoryError 
  no stack trace available
  no idea why this comes
  
  any help TIA
  
  --nagi
  
  Nagendra Kumar O V S
  Member Technical Staff
  Ikigo India Private Ltd.
  470-B, Road No. 36,
  Jubilee Hills,
  Hyderabad 500033
  Contact(O): 23544671
  Cell: 98482-41789





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



RE: out-of-memory exp

2003-06-04 Thread Josh Rayls
You could raise the memory size of your VM via the -Xms128m -Xmx128m
arguments.
 
It's just Weblogic, the memory hog, telling you that it has run out of
memory.  It seems to me that there's some sort of memory leak when hot
deploying.
 
-Josh

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 10:15 AM
To: [EMAIL PROTECTED]
Subject: out-of-memory exp



hi,
i am using struts 1.1 with ejb on weblogic7.1
 
i  frequently get this error while working with the web application
 
Jun 3, 2003 7:42:03 PM IST Error HTTP 101017
[ServletContext(id=4550717,name=cwbweb,context-path=/cwbweb)] Root cause of
ServletException
java.lang.OutOfMemoryError
no stack trace available
no idea why this comes
 
any help TIA
 
--nagi
 
Nagendra Kumar O V S
Member Technical Staff
Ikigo India Private Ltd.
470-B, Road No. 36,
Jubilee Hills,
Hyderabad 500033
Contact(O): 23544671
Cell: 98482-41789



 http://www.incredimail.com/redir.asp?ad_id=309lang=9   IncrediMail -
Email has finally evolved -
http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here 



RE: Storing the Output of a Servlet to Database

2003-06-04 Thread Navjot Singh

Ideally, you should store the document on file system, the better place for
PDF BUT you may some weird requirement
Anyway, if you are adamant on doing this.

--first way--

0. create a field in your database with blob data type. (I have MySQL) but
oracle/ mssql7 all have this data type.
1. generated pdf document needs to converted into binary data. ( it is be
default ;-)
2. write it down to that field as normal query.

you may wish to see java.sql.Blob and java.sql.prepraedStatement.setBlob

--second way--
0. create a field in your database with varbinary type.
1. generated pdf document. read it as byte stream and get arrys of bytes.
2. write it down to that field as normal query.

see java.sql.prepraedStatement.setBytes

HTH
navjot



|-Original Message-
|From: Rajesh P [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, June 03, 2003 5:28 PM
|To: Struts Users Mailing List
|Subject: Storing the Output of a Servlet to Database
|
|
|Hello Everyone,
|I have a requirement wherein a Servlet class is used to generate a
|PDF document. This output should be stored into a database table
|for future retrieval. Can somebody tell me how this output of the
|Servlet can be captured and stored into a database table? Or
|rather, how to capture the response outputstream, convert it to
|bytes so that it can be persisted in the datbase. Please note that
|we are not allowed to write to a File and then upload it.
|Thanks,
|Rajesh
|
|-
|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 Two JSP's for Displaying One Form .

2003-06-04 Thread Keel, Christine C
Please send email to [EMAIL PROTECTED]

Thanks, 
Christine Keel
Marine Life Cycle and Solutions
Intergraph Corporation
170 Graphics Drive
Madison, AL 
Phone: 256-730-7194
Email: [EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: RE: Tiles Two JSP's for Displaying One Form .


Hi Nilesh,
Better approach is use tiles definitions..

So u have those 40 jsps for 40 page contents..And one tiles definition xml
file which assembles those..

HTH.
regards,
Shirish

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 3:15 PM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .


And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??

Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file . 
But then I require another JSP which actually inserts that definition ...


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content 
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi ,
   In my application there may be around 40 forms . I am using the
 classic layout for the application .
 the body changes for every page , I mean I have a different JSP's for 
 these
 forms .
 Each form is submitted and a result page is desplayed .
 Now my question is if I have 40 forms , so do I need to create total 
 of 80
 JSP (Excluding the result page) ??
 I mean one JSP having the body content and the other one to integrate 
 all
 tiles .
 The second option could be using one JSP having all the insert Tags 
 with the
 Body content .

 Is there any better option available ??
 This question is not for the results page as I know the result page 
 can be
 directly called from the action .

 Nimish


-
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: Intelligent Refresh/Reloading

2003-06-04 Thread Navjot Singh
hi jason,

try using pushlets. they may look odd in their use but they can solve your
purpose.

-navjot singh

|-Original Message-
|From: Jason Meredith [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, June 03, 2003 5:19 PM
|To: Struts Users Mailing List
|Subject: Intelligent Refresh/Reloading
|
|
|
|Chaps
|
|I have a list of records that are displayed on a web page, the database
|receives new records periodically, is there a way to determine when a new
|record is loaded into the dB and then using Struts reload that page when a
|new record is added?
|
|Regards
|
|Jason
|
|
|
|***
|The e-mail and any attachments are confidential. They may contain
|privileged information and are intended for the named addressee(s)
|only. If you are not the intended recipient, please notify us
|immediately and do not disclose, distribute, or retain this e-mail
|or any part of it.
|
|Unless expressly stated, opinions in this e-mail are those of the
|individual sender and not of the FIMAT Group. We believe but do not
|warrant that this e-mail and any attachments are virus free.
|You must therefore take full responsibility for virus checking.
|The FIMAT Group reserve the right to monitor e-mail communications
|through its networks.
|
|Where this communication constitutes a financial promotion it is issued
|and approved by Fimat International Banque S.A. (UK Branch) and is
|only intended for persons of a kind described in article 19(5) of the
|Financial Services and Markets Act 2000 (Financial Promotion) Order
|2001.  This information is not intended to be distributed to UK Private
|Customers (as defined by the Financial Services Authority).
|
|Fimat International Banque S.A. (UK Branch) whose registered branch
|in England is at SG House, 41 Tower Hill, London EC3N 4SG is authorised
|by the Commission Bancaire in France and by the UK Financial Services
|Authority; regulated by the Financial Services Authority for the conduct of
|UK Business and is entered in the Financial Services Authority's register
|(Register Number 183415), access to which can be gained via the following
|link: www.fsa.gov.uk/register/
|
|Member and a SETS Participant of the London Stock Exchange (LSE).
|Where this communication is confirming an on exchange transaction
|(as defined by the LSE),the transaction is subject to the rules of the LSE.
|Any information, opinions, estimates and forecasts contained in this
|document have been arrived at or obtained from public sources believed
|to be reliable and in good faith which has not been independently
|verified and no warranty, express or implied, is made as to their accuracy,
|completeness or correctness.
|
|This document is not an offer to sell or a solicitation to acquire
|or dispose
|of an interest in financial instruments.
|
|If you have received this transmission in error, please telephone
|+44 020 7676 8999 immediately so that we can arrange for its return.
|***
|
|
|-
|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: out-of-memory exp

2003-06-04 Thread Varun Garg
This comes when weblogic runs out of memory. 
 
If this happens often, then I would look at the code and check for any
bad looping thats going on.
 

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 9:15 AM
To: [EMAIL PROTECTED]
Subject: out-of-memory exp



hi,
i am using struts 1.1 with ejb on weblogic7.1
 
i  frequently get this error while working with the web application
 
Jun 3, 2003 7:42:03 PM IST Error HTTP 101017
[ServletContext(id=4550717,name=cwbweb,context-path=/cwbweb)] Root
cause of ServletException
java.lang.OutOfMemoryError
no stack trace available
no idea why this comes
 
any help TIA
 
--nagi
 
Nagendra Kumar O V S
Member Technical Staff
Ikigo India Private Ltd.
470-B, Road No. 36,
Jubilee Hills,
Hyderabad 500033
Contact(O): 23544671
Cell: 98482-41789



 http://www.incredimail.com/redir.asp?ad_id=309lang=9   IncrediMail -
Email has finally evolved -
http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here 



Re: [OT] data layer, try-catch-finally, connections

2003-06-04 Thread Ian Hunter
I have two routines in my data layer that close connections; one takes an
exception as a parameter and the other doesn't.  My data layer objects open
their own connections and close them when they're done.  (Actually, routines
that populate/read DTOs from/to the data layer make the calls)

public static void closeconn (java.sql.Connection conn,
java.sql.Statement s, java.sql.ResultSet rs) throws java.sql.SQLException {
try {
if (rs != null) {
rs.close();
rs = null;
}
if (s != null) {
s.close();
s = null;
}
if (conn != null) {
conn.close();
conn = null;
}
} catch (java.sql.SQLException e) {
closeconn(conn, s, rs, e);
}
}

and if THAT one throws an exception, it calls this:

public static void closeconn (java.sql.Connection conn,
java.sql.Statement s, java.sql.ResultSet rs,
java.sql.SQLException e) throws java.sql.SQLException {

if (rs != null) {
try {
rs.close();
rs = null;
} catch (java.sql.SQLException rse) {
e.setNextException (rse);
rs = null;
}
}
if (s != null) {
try {
s.close();
s = null;
} catch (java.sql.SQLException se) {
e.setNextException (se);
s = null;
}
}
if (conn != null) {
try {
conn.close();
conn = null;
} catch (java.sql.SQLException ce) {
e.setNextException (ce);
conn = null;
}
}
throw new java.sql.SQLException (e.getMessage(), e.getSQLState(),
e.getErrorCode());
}

Crazy, perhaps, but it works quite well.

- Original Message -
From: Mike Whittaker [EMAIL PROTECTED]
To: Struts List [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 10:14 AM
Subject: [OT] data layer, try-catch-finally, connections


 I guess you've all been here, so can you answer this?

 you have do a 'finally' to ensure you close the connection/release it back
 to the pool.

 In the controller tier this is easy, get the connection in the
 Filter/RequestProcessor/Action when whatever returns you can finally close
 it.

 However this ties it to the controller layer.  I want my connections
 instigated from the business layer.  But because so many processes require
a
 connection I will have identical try,catch,finally block all over the
place.

 Any one got a solution to this?

 Thankyou
 --
 Mike W


 -
 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 Two JSP's for Displaying One Form .

2003-06-04 Thread Bailey, Shane C.

Right, your index.jsp is my plain_layout.jsp.  You only see it once right?
And every page is built from that template.  So, like I said, at first you
have a few extra pages. 

Oh, looking closely I see...

You don't need to insert a definition in a page.  You use the definition in
the mappings.  Your index.jsp (I would name it better like I did) does the
insert of the JSPs which are declared in your defs (which ones to insert).

Your index.jsp should look like this:
%@ page session=false contentType=text/html;charset=UTF-8
language=java buffer=64kb autoFlush=true %
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

%-- Layout Tiles 
  This layout render a header, body and footer.
  @param title String use in page title
  @param header Header tile (jsp url or definition name)
  @param body Body
  @param footer Footer
--%

html
link href=/css/acint21.css type=text/css rel=stylesheet
table width='100%'

!-- Create a request scopt attribute --
tiles:useAttribute name=title scope=request/

!-- Insert page header into template --
trtd colspan='2' align='left'   
head
tiles:insert attribute='header' 
   !-- pass the title to the header --
   tiles:put name=title beanName=title beanScope=request/
/tiles:insert
/head
/td/tr


!-- Insert page title into template --
body bgcolor=#ff text=#00 link=#023264 alink=#023264 
vlink=#023264
tr
td class=pageTitle
strongtiles:getAsString name=title //strong
/td
/tr

trtd colspan='2' align='left' height='10'   
/td/tr

!-- Insert page content into template --
tr align=middletd
tiles:insert attribute='body' /
/td
/tr

!-- Insert page footer into template --
trtd colspan='2' align='middle' 
tiles:insert attribute='footer' /
/td/tr
/table

/body
/html

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:00 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .

Hi I agree with you .. But see ..below you have created a definition
doc.login .. So your content (body) JSP is login.jsp .
Count this as one . 
Now You need a JSP to insert this definition . .. Say index.jsp ..
My index.jsp will look something like this ..

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

tiles:insert definition=doc.login flush=true /

Now Count this JSP as number 2 .. 


Hence to build the whole page I m using Two JSP ..
Hope I have made my question clear ..

And If still I m missing some thing .. Let me know ..






-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:07 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles Two JSP's for Displaying One Form .




  Content of tiles-defs.xml:
  !-- ===  --
  !-- View page Templates  --
  !-- ===  --
  definition name=doc.Layout1 path=/view/main/plain_layout.jsp
  put name=title  value=21 /
  put name=header value=/view/main/header.jsp /
  put name=body   value=/view/main/body.jsp /
  put name=footer value=/view/main/footer.jsp /
  /definition

  !-- ===  --
  !-- View page definitions--
  !-- ===  --
  !-- Login Page --
  definition name=doc.login extends=doc.Layout1
  put name=title  value=Login /
  put name=body   value=/view/login/login.jsp /
  /definition
  !-- Welcome (after successful login) Page --
  definition name=doc.welcome extends=doc.Layout1
  put name=title  value=Welcome Here /
  put name=body   value=/view/main/welcome.jsp /
  /definition
  definition name=doc.welcome2 extends=doc.Layout1
  put name=title  value=Welcome Here2 /
  put name=body   value=/view/main/welcome2.jsp /
  /definition
  definition name=doc.welcome3 extends=doc.Layout1
  put name=title  value=Welcome Here3 /
  put name=body   value=/view/main/welcome3.jsp /
  /definition

Then in the action mapping in struts config you forward to doc.login etc.

With a few extra pages, for the layout, header, footer; I only need a single
page (the body) for every new def.  So the overhead may be two or 3
Pages at first but then it grows by one for ever new def.  This is just one
way and it works for me.  I'm sure there are more efficient (less pages) but
this way seems to be easy to understand and small after the original
overhead.

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 9:15 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .

And you need to have 40 

Re: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Jeff Kyser
politelyI think you're still missing something./politely

Now you have the tiles named in the tiles-config file,
you can name them as the input or forward in the struts-config
file. You don't have to have a page that does nothing but
include other pages. There may be some page generated
on your behalf, but you don't have to write it - just name the
appropriate content= (if that's what you called it in your
tiles-config file) and IT does the include for you.
-jeff

On Tuesday, June 3, 2003, at 09:00  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

Hi I agree with you .. But see ..below you have created a definition
doc.login .. So your content (body) JSP is login.jsp .
Count this as one .
Now You need a JSP to insert this definition . .. Say index.jsp ..
My index.jsp will look something like this ..
%@ page language=java %
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %
tiles:insert definition=doc.login flush=true /

Now Count this JSP as number 2 ..

Hence to build the whole page I m using Two JSP ..
Hope I have made my question clear ..
And If still I m missing some thing .. Let me know ..





-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:07 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles Two JSP's for Displaying One Form .


  Content of tiles-defs.xml:
  !-- ===  --
  !-- View page Templates   --
  !-- ===  --
  definition name=doc.Layout1 path=/view/main/plain_layout.jsp
  put name=title  value=ACINT21 /
  put name=header value=/view/main/header.jsp /
  put name=body   value=/view/main/body.jsp /
  put name=footer value=/view/main/footer.jsp /
  /definition
  !-- ===  --
  !-- View page definitions --
  !-- ===  --
  !-- Login Page --
  definition name=doc.login extends=doc.Layout1
  put name=title  value=Login /
  put name=body   value=/view/login/login.jsp /
  /definition
  !-- Welcome (after successful login) Page --
  definition name=doc.welcome extends=doc.Layout1
  put name=title  value=Welcome Here /
  put name=body   value=/view/main/welcome.jsp /
  /definition
  definition name=doc.welcome2 extends=doc.Layout1
  put name=title  value=Welcome Here2 /
  put name=body   value=/view/main/welcome2.jsp /
  /definition
  definition name=doc.welcome3 extends=doc.Layout1
  put name=title  value=Welcome Here3 /
  put name=body   value=/view/main/welcome3.jsp /
  /definition
Then in the action mapping in struts config you forward to doc.login 
etc.

With a few extra pages, for the layout, header, footer; I only need a 
single
page (the body) for every new def.  So the overhead may be two or 3
Pages at first but then it grows by one for ever new def.  This is 
just one
way and it works for me.  I'm sure there are more efficient (less 
pages) but
this way seems to be easy to understand and small after the original
overhead.

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 9:15 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .
And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??
Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file .
But then I require another JSP which actually inserts that definition 
...

-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .
No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a 
definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content
JSPs,
but certainly not 80 JSPs.
or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park -
Chennai wrote:
Hi ,
In my application there may be around 40 forms . I am using the
classic layout for the application .
the body changes for every page , I mean I have a different JSP's for
these
forms .
Each form is submitted and a result page is desplayed .
Now my question is if I have 40 forms , so do I need to create total
of 80
JSP (Excluding the result page) ??
I mean one JSP having the body content and the other one to integrate
all
tiles .
The second option could be using one JSP having all the 

RE: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Nimish Chourey , Tidel Park - Chennai
For ???

-Original Message-
From: Keel, Christine C [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:45 PM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .


Please send email to [EMAIL PROTECTED]

Thanks, 
Christine Keel
Marine Life Cycle and Solutions
Intergraph Corporation
170 Graphics Drive
Madison, AL 
Phone: 256-730-7194
Email: [EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: RE: Tiles Two JSP's for Displaying One Form .


Hi Nilesh,
Better approach is use tiles definitions..

So u have those 40 jsps for 40 page contents..And one tiles definition xml
file which assembles those..

HTH.
regards,
Shirish

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 3:15 PM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .


And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??

Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file . 
But then I require another JSP which actually inserts that definition ...


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content 
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi ,
   In my application there may be around 40 forms . I am using the
 classic layout for the application .
 the body changes for every page , I mean I have a different JSP's for 
 these
 forms .
 Each form is submitted and a result page is desplayed .
 Now my question is if I have 40 forms , so do I need to create total 
 of 80
 JSP (Excluding the result page) ??
 I mean one JSP having the body content and the other one to integrate 
 all
 tiles .
 The second option could be using one JSP having all the insert Tags 
 with the
 Body content .

 Is there any better option available ??
 This question is not for the results page as I know the result page 
 can be
 directly called from the action .

 Nimish


-
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] What layer does an XSL transform belong to

2003-06-04 Thread Navjot Singh
honestly, it depends upon your approach.

if you see transformation from callback perspectives, they should be part of
presentation later (may be as part of the taglibs) but if you have servlets
that does generates the XML as well as XSL then runs the
XMLTransformer.transform() (could be filtered) then it should be 1 layer
above presentation.correct me if i am wrong.

navjot

|-Original Message-
|From: Jeff Kyser [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, June 03, 2003 7:39 PM
|To: [EMAIL PROTECTED]
|Subject: [OT] What layer does an XSL transform belong to
|
|
|Hey all,
|
|A bit philisophical I suppose, but we've integrated some
|legacy apps into a Struts application, and they return their
|data as an XML document.
|
|In a previous version of the app, the JSP made the legacy
|call (gakk!), and then performed an XSL transform to display
|the info to the user. (I didn't write it :)
|
|I'm trying to migrate things towards their proper places, and
|my question is where (if anywhere) the XSL transform belongs.
|
|Ideally, I would either call the legacy app from within a
|Action, or pushed down yet another  layer behind some
|model call.
|
|But if I did a model layer, then I'd probably transfer the data
|from the XML document to a Java model object and then
|transfer data from the model to a form via the Action and let
|the tag libraries take it from there.
|
|I don't have the luxury of a rewrite, so trying to incrementally
|migrate and just not sure where the XSL transform should
|land (or at least roost).
|
|your insights would be appreciated
|
|regards,
|
|-jeff
|
|
|-
|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: using struts tag libraries outside of struts

2003-06-04 Thread David Graham
You should be using the JSTL for many of your custom tags anyways.  I think 
the Struts html taglib is only useful with Struts but I've never tried using 
it outside of Struts.

David

Hello. I have to evaluate what we're going to use, Struts, OpenCMS,
some other system... I don't have much experience with JSP etc yet.
The Struts tag libraries look cool. Is it possible to use them outside
of Struts, say by dropping them into a OpenCMS project? Or do they
depend on having the Struts framework present?
Thanks for your time.

Remco Gerlich

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


RE: isCancelled and LookupDispatchAction

2003-06-04 Thread Chen, Gin
I don't see that one the API anywhere.
As a matter of fact, it's been recommended several times on this list to
overwrite execute for just this reason. :-/
-Tim

-Original Message-
From: sjones [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 5:39 PM
To: [EMAIL PROTECTED]
Subject: Re: isCancelled and LookupDispatchAction


check the API

I believe it says not to overwrite the execute method.


Chen, Gin [EMAIL PROTECTED] wrote in message
news:[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] data layer, try-catch-finally, connections

2003-06-04 Thread David Graham
Setting the conn, rs, and s pointers to null in this method is pointless and 
confuses Java newbies.

David


public static void closeconn (java.sql.Connection conn,
java.sql.Statement s, java.sql.ResultSet rs) throws java.sql.SQLException {
try {
if (rs != null) {
rs.close();
rs = null;
}
if (s != null) {
s.close();
s = null;
}
if (conn != null) {
conn.close();
conn = null;
}
} catch (java.sql.SQLException e) {
closeconn(conn, s, rs, e);
}
}
and if THAT one throws an exception, it calls this:

public static void closeconn (java.sql.Connection conn,
java.sql.Statement s, java.sql.ResultSet rs,
java.sql.SQLException e) throws java.sql.SQLException {
if (rs != null) {
try {
rs.close();
rs = null;
} catch (java.sql.SQLException rse) {
e.setNextException (rse);
rs = null;
}
}
if (s != null) {
try {
s.close();
s = null;
} catch (java.sql.SQLException se) {
e.setNextException (se);
s = null;
}
}
if (conn != null) {
try {
conn.close();
conn = null;
} catch (java.sql.SQLException ce) {
e.setNextException (ce);
conn = null;
}
}
throw new java.sql.SQLException (e.getMessage(), e.getSQLState(),
e.getErrorCode());
}
Crazy, perhaps, but it works quite well.

- Original Message -
From: Mike Whittaker [EMAIL PROTECTED]
To: Struts List [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 10:14 AM
Subject: [OT] data layer, try-catch-finally, connections
 I guess you've all been here, so can you answer this?

 you have do a 'finally' to ensure you close the connection/release it 
back
 to the pool.

 In the controller tier this is easy, get the connection in the
 Filter/RequestProcessor/Action when whatever returns you can finally 
close
 it.

 However this ties it to the controller layer.  I want my connections
 instigated from the business layer.  But because so many processes 
require
a
 connection I will have identical try,catch,finally block all over the
place.

 Any one got a solution to this?

 Thankyou
 --
 Mike W


 -
 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]
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: out-of-memory exp

2003-06-04 Thread Nail, Evan Burke
nagi, 
 
Besides the previously mentioned errors, I sometimes get this error when I'm working 
in my development environment and I have changed a class and not restarted my server. 
 
I have not used 7.1 much so I don't know if this could be your error , we're on 6.1 
and see it occasionally although normally we get scope errors when using struts. There 
might be config methods to help the classloader out in these cases ..not sure. 
 
 
bn
 
 
 

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 9:15 AM
To: [EMAIL PROTECTED]
Subject: out-of-memory exp



hi,
i am using struts 1.1 with ejb on weblogic7.1
 
i  frequently get this error while working with the web application
 
Jun 3, 2003 7:42:03 PM IST Error HTTP 101017 
[ServletContext(id=4550717,name=cwbweb,context-path=/cwbweb)] Root cause of 
ServletException
java.lang.OutOfMemoryError
no stack trace available
no idea why this comes
 
any help TIA
 
--nagi
 
Nagendra Kumar O V S
Member Technical Staff
Ikigo India Private Ltd.
470-B, Road No. 36,
Jubilee Hills,
Hyderabad 500033
Contact(O): 23544671
Cell: 98482-41789



 http://www.incredimail.com/redir.asp?ad_id=309lang=9   IncrediMail - Email has 
finally evolved -  http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here 



**
This e-mail is the property of Enron Corp. and/or its relevant affiliate and may 
contain confidential and privileged material for the sole use of the intended 
recipient (s). Any review, use, distribution or disclosure by others is strictly 
prohibited. If you are not the intended recipient (or authorized to receive for the 
recipient), please contact the sender or reply to Enron Corp. at [EMAIL PROTECTED] and 
delete all copies of the message. This e-mail (and any attachments hereto) are not 
intended to be an offer (or an acceptance) and do not create or evidence a binding and 
enforceable contract between Enron Corp. (or any of its affiliates) and the intended 
recipient or any other party, and may not be relied on by anyone as the basis of a 
contract by estoppel or otherwise. Thank you. 
**



RE: JavaScript and text field

2003-06-04 Thread Chen, Gin
function check()
{
var inputvalue = document.getElementById(item).value;
alert( inputvalue );
}

dont worry that it says get element by id. it actually checks both name and
id.
another way to do it is:

function check()
{
var inputvalue = document.getElementsByName(item)[0].value;
alert( inputvalue );
}

-Tim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:53 AM
To: [EMAIL PROTECTED]
Subject: JavaScript and text field


Hi, 

I have some problems to access a text field.

I have this JSP code:

html:form action=criteria.do method=post onsubmit=javascript:check()
html:text property=item size=40 /

And want to access the value of the item field:

function check(){
var inputvalue = document.all.item.value;
alert(inputvalue);
var inputvalue = document.forms[0].item.value;
alert(inputvalue);
}

No of these variant runs. In an another application I have the 2 solution
and it works. Are there any depedencies between struts and JS?

Juraj

-
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 Two JSP's for Displaying One Form .

2003-06-04 Thread Bailey, Shane C.
OK, Im missing something. Doesn't matter.  Every time I want new page I only
create one JSP now that my template is set up.  That's all I care about.
And it works great. Usually people who are missing something don't have
their stuff working.  As far as I am concerned my stuff works.

Thanks for your help though in helping me figure out that I am missing
something!

-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:16 AM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .

politelyI think you're still missing something./politely

Now you have the tiles named in the tiles-config file,
you can name them as the input or forward in the struts-config
file. You don't have to have a page that does nothing but
include other pages. There may be some page generated
on your behalf, but you don't have to write it - just name the
appropriate content= (if that's what you called it in your
tiles-config file) and IT does the include for you.

-jeff

On Tuesday, June 3, 2003, at 09:00  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi I agree with you .. But see ..below you have created a definition
 doc.login .. So your content (body) JSP is login.jsp .
 Count this as one .
 Now You need a JSP to insert this definition . .. Say index.jsp ..
 My index.jsp will look something like this ..

 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

 tiles:insert definition=doc.login flush=true /

 Now Count this JSP as number 2 ..


 Hence to build the whole page I m using Two JSP ..
 Hope I have made my question clear ..

 And If still I m missing some thing .. Let me know ..






 -Original Message-
 From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 7:07 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Tiles Two JSP's for Displaying One Form .




   Content of tiles-defs.xml:
   !-- ===  --
   !-- View page Templates--
   !-- ===  --
   definition name=doc.Layout1 path=/view/main/plain_layout.jsp
 put name=title  value=ACINT21 /
 put name=header value=/view/main/header.jsp /
 put name=body   value=/view/main/body.jsp /
 put name=footer value=/view/main/footer.jsp /
   /definition

   !-- ===  --
   !-- View page definitions  --
   !-- ===  --
   !-- Login Page --
   definition name=doc.login extends=doc.Layout1
 put name=title  value=Login /
 put name=body   value=/view/login/login.jsp /
   /definition
   !-- Welcome (after successful login) Page --
   definition name=doc.welcome extends=doc.Layout1
 put name=title  value=Welcome Here /
 put name=body   value=/view/main/welcome.jsp /
   /definition
   definition name=doc.welcome2 extends=doc.Layout1
 put name=title  value=Welcome Here2 /
 put name=body   value=/view/main/welcome2.jsp /
   /definition
   definition name=doc.welcome3 extends=doc.Layout1
 put name=title  value=Welcome Here3 /
 put name=body   value=/view/main/welcome3.jsp /
   /definition

 Then in the action mapping in struts config you forward to doc.login 
 etc.

 With a few extra pages, for the layout, header, footer; I only need a 
 single
 page (the body) for every new def.  So the overhead may be two or 3
 Pages at first but then it grows by one for ever new def.  This is 
 just one
 way and it works for me.  I'm sure there are more efficient (less 
 pages) but
 this way seems to be easy to understand and small after the original
 overhead.

 -Original Message-
 From: Nimish Chourey , Tidel Park - Chennai
 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 9:15 AM
 To: Struts Users Mailing List
 Subject: RE: Tiles Two JSP's for Displaying One Form .

 And you need to have 40 JSP's  to insert those 40 Definintions ...
 Isnt it ??

 Fine You have one JSp for the Body content .. Then you extend from the
 master page to make a new definition in the XML file .
 But then I require another JSP which actually inserts that definition 
 ...


 -Original Message-
 From: Jeff Kyser [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 6:24 PM
 To: Struts Users Mailing List
 Subject: Re: Tiles Two JSP's for Displaying One Form .


 No, it should be more like 40 + 1 per re-usable tile component

 I set up a 'master page' with the basic layout,
 and perhaps a 'menu' include containing my menu buttons / links,
 and then the tiles definition just inserts the content into a 
 definition
 derived from the master page layout. And that is all done in
 the tiles-config.xml file

 So you might have 40 definitions in your tiles config + 40 body content
 JSPs,
 but certainly not 80 JSPs.

 or at 

RE: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Keel, Christine C
Sorry, sent to the wrong place.

Thanks, 
Christine Keel
Marine Life Cycle and Solutions
Intergraph Corporation
170 Graphics Drive
Madison, AL 
Phone: 256-730-7194
Email: [EMAIL PROTECTED]


-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 9:17 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .


For ???

-Original Message-
From: Keel, Christine C [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:45 PM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .


Please send email to [EMAIL PROTECTED]

Thanks, 
Christine Keel
Marine Life Cycle and Solutions
Intergraph Corporation
170 Graphics Drive
Madison, AL 
Phone: 256-730-7194
Email: [EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: RE: Tiles Two JSP's for Displaying One Form .


Hi Nilesh,
Better approach is use tiles definitions..

So u have those 40 jsps for 40 page contents..And one tiles definition xml
file which assembles those..

HTH.
regards,
Shirish

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 3:15 PM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .


And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??

Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file . 
But then I require another JSP which actually inserts that definition ...


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file

So you might have 40 definitions in your tiles config + 40 body content 
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi ,
   In my application there may be around 40 forms . I am using the
 classic layout for the application .
 the body changes for every page , I mean I have a different JSP's for 
 these
 forms .
 Each form is submitted and a result page is desplayed .
 Now my question is if I have 40 forms , so do I need to create total 
 of 80
 JSP (Excluding the result page) ??
 I mean one JSP having the body content and the other one to integrate 
 all
 tiles .
 The second option could be using one JSP having all the insert Tags 
 with the
 Body content .

 Is there any better option available ??
 This question is not for the results page as I know the result page 
 can be
 directly called from the action .

 Nimish


-
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: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Nimish Chourey , Tidel Park - Chennai
Yes .. now you exacly understand my problem ..
See these form pages are direct links from the Menu and not result of some
action .. 
I mean there is no form Submission and no action .. Just a link is clicked
.. 
Can you give an example for that .. if possible ..I mean how I can avoid
writing index.jsp ...

Thanks for being so polite :))
 


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:46 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


politelyI think you're still missing something./politely

Now you have the tiles named in the tiles-config file,
you can name them as the input or forward in the struts-config
file. You don't have to have a page that does nothing but
include other pages. There may be some page generated
on your behalf, but you don't have to write it - just name the
appropriate content= (if that's what you called it in your
tiles-config file) and IT does the include for you.

-jeff

On Tuesday, June 3, 2003, at 09:00  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi I agree with you .. But see ..below you have created a definition
 doc.login .. So your content (body) JSP is login.jsp .
 Count this as one .
 Now You need a JSP to insert this definition . .. Say index.jsp ..
 My index.jsp will look something like this ..

 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

 tiles:insert definition=doc.login flush=true /

 Now Count this JSP as number 2 ..


 Hence to build the whole page I m using Two JSP ..
 Hope I have made my question clear ..

 And If still I m missing some thing .. Let me know ..






 -Original Message-
 From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 7:07 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Tiles Two JSP's for Displaying One Form .




   Content of tiles-defs.xml:
   !-- ===  --
   !-- View page Templates--
   !-- ===  --
   definition name=doc.Layout1 path=/view/main/plain_layout.jsp
 put name=title  value=ACINT21 /
 put name=header value=/view/main/header.jsp /
 put name=body   value=/view/main/body.jsp /
 put name=footer value=/view/main/footer.jsp /
   /definition

   !-- ===  --
   !-- View page definitions  --
   !-- ===  --
   !-- Login Page --
   definition name=doc.login extends=doc.Layout1
 put name=title  value=Login /
 put name=body   value=/view/login/login.jsp /
   /definition
   !-- Welcome (after successful login) Page --
   definition name=doc.welcome extends=doc.Layout1
 put name=title  value=Welcome Here /
 put name=body   value=/view/main/welcome.jsp /
   /definition
   definition name=doc.welcome2 extends=doc.Layout1
 put name=title  value=Welcome Here2 /
 put name=body   value=/view/main/welcome2.jsp /
   /definition
   definition name=doc.welcome3 extends=doc.Layout1
 put name=title  value=Welcome Here3 /
 put name=body   value=/view/main/welcome3.jsp /
   /definition

 Then in the action mapping in struts config you forward to doc.login 
 etc.

 With a few extra pages, for the layout, header, footer; I only need a 
 single
 page (the body) for every new def.  So the overhead may be two or 3
 Pages at first but then it grows by one for ever new def.  This is 
 just one
 way and it works for me.  I'm sure there are more efficient (less 
 pages) but
 this way seems to be easy to understand and small after the original
 overhead.

 -Original Message-
 From: Nimish Chourey , Tidel Park - Chennai
 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 9:15 AM
 To: Struts Users Mailing List
 Subject: RE: Tiles Two JSP's for Displaying One Form .

 And you need to have 40 JSP's  to insert those 40 Definintions ...
 Isnt it ??

 Fine You have one JSp for the Body content .. Then you extend from the
 master page to make a new definition in the XML file .
 But then I require another JSP which actually inserts that definition 
 ...


 -Original Message-
 From: Jeff Kyser [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 6:24 PM
 To: Struts Users Mailing List
 Subject: Re: Tiles Two JSP's for Displaying One Form .


 No, it should be more like 40 + 1 per re-usable tile component

 I set up a 'master page' with the basic layout,
 and perhaps a 'menu' include containing my menu buttons / links,
 and then the tiles definition just inserts the content into a 
 definition
 derived from the master page layout. And that is all done in
 the tiles-config.xml file

 So you might have 40 definitions in your tiles config + 40 body content
 JSPs,
 but certainly not 80 JSPs.

 or at least that's my way of 

RE: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Nimish Chourey , Tidel Park - Chennai
Nope .. my index.jsp is not your plain_layout.jsp .. have a close look at it
again ..

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles Two JSP's for Displaying One Form .



Right, your index.jsp is my plain_layout.jsp.  You only see it once right?
And every page is built from that template.  So, like I said, at first you
have a few extra pages. 

Oh, looking closely I see...

You don't need to insert a definition in a page.  You use the definition in
the mappings.  Your index.jsp (I would name it better like I did) does the
insert of the JSPs which are declared in your defs (which ones to insert).

Your index.jsp should look like this:
%@ page session=false contentType=text/html;charset=UTF-8
language=java buffer=64kb autoFlush=true %
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

%-- Layout Tiles 
  This layout render a header, body and footer.
  @param title String use in page title
  @param header Header tile (jsp url or definition name)
  @param body Body
  @param footer Footer
--%

html
link href=/css/acint21.css type=text/css rel=stylesheet
table width='100%'

!-- Create a request scopt attribute --
tiles:useAttribute name=title scope=request/

!-- Insert page header into template --
trtd colspan='2' align='left'   
head
tiles:insert attribute='header' 
   !-- pass the title to the header --
   tiles:put name=title beanName=title beanScope=request/
/tiles:insert
/head
/td/tr


!-- Insert page title into template --
body bgcolor=#ff text=#00 link=#023264 alink=#023264 
vlink=#023264
tr
td class=pageTitle
strongtiles:getAsString name=title //strong
/td
/tr

trtd colspan='2' align='left' height='10'   
/td/tr

!-- Insert page content into template --
tr align=middletd
tiles:insert attribute='body' /
/td
/tr

!-- Insert page footer into template --
trtd colspan='2' align='middle' 
tiles:insert attribute='footer' /
/td/tr
/table

/body
/html

-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:00 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .

Hi I agree with you .. But see ..below you have created a definition
doc.login .. So your content (body) JSP is login.jsp .
Count this as one . 
Now You need a JSP to insert this definition . .. Say index.jsp ..
My index.jsp will look something like this ..

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

tiles:insert definition=doc.login flush=true /

Now Count this JSP as number 2 .. 


Hence to build the whole page I m using Two JSP ..
Hope I have made my question clear ..

And If still I m missing some thing .. Let me know ..






-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:07 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles Two JSP's for Displaying One Form .




  Content of tiles-defs.xml:
  !-- ===  --
  !-- View page Templates  --
  !-- ===  --
  definition name=doc.Layout1 path=/view/main/plain_layout.jsp
  put name=title  value=21 /
  put name=header value=/view/main/header.jsp /
  put name=body   value=/view/main/body.jsp /
  put name=footer value=/view/main/footer.jsp /
  /definition

  !-- ===  --
  !-- View page definitions--
  !-- ===  --
  !-- Login Page --
  definition name=doc.login extends=doc.Layout1
  put name=title  value=Login /
  put name=body   value=/view/login/login.jsp /
  /definition
  !-- Welcome (after successful login) Page --
  definition name=doc.welcome extends=doc.Layout1
  put name=title  value=Welcome Here /
  put name=body   value=/view/main/welcome.jsp /
  /definition
  definition name=doc.welcome2 extends=doc.Layout1
  put name=title  value=Welcome Here2 /
  put name=body   value=/view/main/welcome2.jsp /
  /definition
  definition name=doc.welcome3 extends=doc.Layout1
  put name=title  value=Welcome Here3 /
  put name=body   value=/view/main/welcome3.jsp /
  /definition

Then in the action mapping in struts config you forward to doc.login etc.

With a few extra pages, for the layout, header, footer; I only need a single
page (the body) for every new def.  So the overhead may be two or 3
Pages at first but then it grows by one for ever new def.  This is just one
way and it works for me.  I'm sure there are more efficient (less pages) but
this way seems to be easy to 

Re: [OT] data layer, try-catch-finally, connections

2003-06-04 Thread Ian Hunter
OK, so Java isn't my first language, busted...

- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 10:25 AM
Subject: Re: [OT] data layer, try-catch-finally, connections


 Setting the conn, rs, and s pointers to null in this method is pointless
and
 confuses Java newbies.

 David


  public static void closeconn (java.sql.Connection conn,
 java.sql.Statement s, java.sql.ResultSet rs) throws java.sql.SQLException
{
  try {
  if (rs != null) {
  rs.close();
  rs = null;
  }
  if (s != null) {
  s.close();
  s = null;
  }
  if (conn != null) {
  conn.close();
  conn = null;
  }
  } catch (java.sql.SQLException e) {
  closeconn(conn, s, rs, e);
  }
  }
 
 and if THAT one throws an exception, it calls this:
 
  public static void closeconn (java.sql.Connection conn,
 java.sql.Statement s, java.sql.ResultSet rs,
  java.sql.SQLException e) throws java.sql.SQLException {
 
  if (rs != null) {
  try {
  rs.close();
  rs = null;
  } catch (java.sql.SQLException rse) {
  e.setNextException (rse);
  rs = null;
  }
  }
  if (s != null) {
  try {
  s.close();
  s = null;
  } catch (java.sql.SQLException se) {
  e.setNextException (se);
  s = null;
  }
  }
  if (conn != null) {
  try {
  conn.close();
  conn = null;
  } catch (java.sql.SQLException ce) {
  e.setNextException (ce);
  conn = null;
  }
  }
  throw new java.sql.SQLException (e.getMessage(),
e.getSQLState(),
 e.getErrorCode());
  }
 
 Crazy, perhaps, but it works quite well.
 
 - Original Message -
 From: Mike Whittaker [EMAIL PROTECTED]
 To: Struts List [EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 10:14 AM
 Subject: [OT] data layer, try-catch-finally, connections
 
 
   I guess you've all been here, so can you answer this?
  
   you have do a 'finally' to ensure you close the connection/release it
 back
   to the pool.
  
   In the controller tier this is easy, get the connection in the
   Filter/RequestProcessor/Action when whatever returns you can finally
 close
   it.
  
   However this ties it to the controller layer.  I want my connections
   instigated from the business layer.  But because so many processes
 require
 a
   connection I will have identical try,catch,finally block all over the
 place.
  
   Any one got a solution to this?
  
   Thankyou
   --
   Mike W
  
  
   -
   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]
 

 _
 Protect your PC - get McAfee.com VirusScan Online
 http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



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



Re: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Jeff Kyser
No, Shane, not you! You're doing fine, or at least if not, then
we're both missing the same thing! Sorry, I guess I replied to
your e-mail rather than Nishish's
-jeff

On Tuesday, June 3, 2003, at 09:20  AM, Bailey, Shane C. wrote:

OK, Im missing something. Doesn't matter.  Every time I want new page 
I only
create one JSP now that my template is set up.  That's all I care 
about.
And it works great. Usually people who are missing something don't have
their stuff working.  As far as I am concerned my stuff works.

Thanks for your help though in helping me figure out that I am missing
something!
-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 10:16 AM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .
politelyI think you're still missing something./politely

Now you have the tiles named in the tiles-config file,
you can name them as the input or forward in the struts-config
file. You don't have to have a page that does nothing but
include other pages. There may be some page generated
on your behalf, but you don't have to write it - just name the
appropriate content= (if that's what you called it in your
tiles-config file) and IT does the include for you.
-jeff

On Tuesday, June 3, 2003, at 09:00  AM, Nimish Chourey , Tidel Park -
Chennai wrote:
Hi I agree with you .. But see ..below you have created a definition
doc.login .. So your content (body) JSP is login.jsp .
Count this as one .
Now You need a JSP to insert this definition . .. Say index.jsp ..
My index.jsp will look something like this ..
%@ page language=java %
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %
tiles:insert definition=doc.login flush=true /

Now Count this JSP as number 2 ..

Hence to build the whole page I m using Two JSP ..
Hope I have made my question clear ..
And If still I m missing some thing .. Let me know ..





-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:07 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles Two JSP's for Displaying One Form .


  Content of tiles-defs.xml:
  !-- ===  --
  !-- View page Templates   --
  !-- ===  --
  definition name=doc.Layout1 path=/view/main/plain_layout.jsp
  put name=title  value=ACINT21 /
  put name=header value=/view/main/header.jsp /
  put name=body   value=/view/main/body.jsp /
  put name=footer value=/view/main/footer.jsp /
  /definition
  !-- ===  --
  !-- View page definitions --
  !-- ===  --
  !-- Login Page --
  definition name=doc.login extends=doc.Layout1
  put name=title  value=Login /
  put name=body   value=/view/login/login.jsp /
  /definition
  !-- Welcome (after successful login) Page --
  definition name=doc.welcome extends=doc.Layout1
  put name=title  value=Welcome Here /
  put name=body   value=/view/main/welcome.jsp /
  /definition
  definition name=doc.welcome2 extends=doc.Layout1
  put name=title  value=Welcome Here2 /
  put name=body   value=/view/main/welcome2.jsp /
  /definition
  definition name=doc.welcome3 extends=doc.Layout1
  put name=title  value=Welcome Here3 /
  put name=body   value=/view/main/welcome3.jsp /
  /definition
Then in the action mapping in struts config you forward to doc.login
etc.
With a few extra pages, for the layout, header, footer; I only need a
single
page (the body) for every new def.  So the overhead may be two or 3
Pages at first but then it grows by one for ever new def.  This is
just one
way and it works for me.  I'm sure there are more efficient (less
pages) but
this way seems to be easy to understand and small after the original
overhead.
-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 9:15 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .
And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??
Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file .
But then I require another JSP which actually inserts that definition
...
-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .
No, it should be more like 40 + 1 per re-usable tile component

I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a
definition
derived from the master page layout. And that is all done 

validator with password fields

2003-06-04 Thread Brian McSweeney
Hi all,

when trying to make a password field required using the validator, the javascript 
doesn't seem to work. 
The server side validation does work. Strangely, the javascript validation works in 
the same form for text fields.

Anyone ever encountered this before?

Am I just doing something wrong?
brian

RE: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread shirishchandra.sakhare
Hi,
If you go by the tiles Definition approach, you just write one jsp per page and U dont 
need to write another jsp which will assemble all jsps together(in most of the cases).

And the task of assembling the various portions for the page(In case of a classic 
layout, the header,footer,menu and content)is done by definition.This definition is 
done in an xml file(tiles-defs.xml.)

And then from action mapping , u can directly call this definition as forward.
Following is example.


STEP 1:
I have classic layout.So i will have one definition for classic layout as follows(in 
tiles.defs.xml..). 

  !-- Master definition   
 --
  !-- Classic layout used as  root for other pages --
  !-- ===  --
  
  definition name=eq.base.classicLayout 
path=/WEB-INF/jsp/tiles/classicLayout_template.jsp
  put name=headervalue=/WEB-INF/jsp/tiles/header.jsp /
  put name=navigationvalue=/WEB-INF/jsp/tiles/sidebar.jsp /
  put name=content   value=specify content here./
  put name=footervalue=/WEB-INF/jsp/tiles/footer.jsp /
  /definition

STEP2:
Then i need to create myHomePAge which will have classic layout but only the content 
portion has to be different.So i will add another definition as follows.
definition name=eq.ps.homepage extends=eq.base.equateLayout
put name=content 
value=/WEB-INF/jsp/pages/ps/myhomepage.jsp/  
/definition

As u can see, i have just overridden what i need to.rest is taken from the super 
definition.

Step3:
In the struts configiguration file, while defining the action mapping, instead of 
using the jsp name in the forward,use the definition name as follows.

action
path=/openHomepage
type=HomepageOpenAction
name=homepageForm
scope=request
forwardname=homepage path= eq.ps.homepage /  
 
/action   

Thats it.So if i need another page, i will add another definition extending the 
classicLayout definition.And refere to it directly from struts config file.

Hope this clears al your doubts.

regards,
Shirish



-Original Message-
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 4:30 PM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .


Yes .. now you exacly understand my problem ..
See these form pages are direct links from the Menu and not result of some
action .. 
I mean there is no form Submission and no action .. Just a link is clicked
.. 
Can you give an example for that .. if possible ..I mean how I can avoid
writing index.jsp ...

Thanks for being so polite :))
 


-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:46 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


politelyI think you're still missing something./politely

Now you have the tiles named in the tiles-config file,
you can name them as the input or forward in the struts-config
file. You don't have to have a page that does nothing but
include other pages. There may be some page generated
on your behalf, but you don't have to write it - just name the
appropriate content= (if that's what you called it in your
tiles-config file) and IT does the include for you.

-jeff

On Tuesday, June 3, 2003, at 09:00  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Hi I agree with you .. But see ..below you have created a definition
 doc.login .. So your content (body) JSP is login.jsp .
 Count this as one .
 Now You need a JSP to insert this definition . .. Say index.jsp ..
 My index.jsp will look something like this ..

 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

 tiles:insert definition=doc.login flush=true /

 Now Count this JSP as number 2 ..


 Hence to build the whole page I m using Two JSP ..
 Hope I have made my question clear ..

 And If still I m missing some thing .. Let me know ..






 -Original Message-
 From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 7:07 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Tiles Two JSP's for Displaying One Form .




   Content of tiles-defs.xml:
   !-- ===  --
   !-- View page Templates--
   !-- ===  --
   definition name=doc.Layout1 path=/view/main/plain_layout.jsp
 put name=title  value=ACINT21 /
 put name=header value=/view/main/header.jsp /
 put name=body   value=/view/main/body.jsp /
 put name=footer 

Re: [OT] data layer, try-catch-finally, connections

2003-06-04 Thread David Graham
Everything is pass by value, even pointers :-).

David

OK, so Java isn't my first language, busted...



- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 10:25 AM
Subject: Re: [OT] data layer, try-catch-finally, connections
 Setting the conn, rs, and s pointers to null in this method is pointless
and
 confuses Java newbies.

 David


  public static void closeconn (java.sql.Connection conn,
 java.sql.Statement s, java.sql.ResultSet rs) throws 
java.sql.SQLException
{
  try {
  if (rs != null) {
  rs.close();
  rs = null;
  }
  if (s != null) {
  s.close();
  s = null;
  }
  if (conn != null) {
  conn.close();
  conn = null;
  }
  } catch (java.sql.SQLException e) {
  closeconn(conn, s, rs, e);
  }
  }
 
 and if THAT one throws an exception, it calls this:
 
  public static void closeconn (java.sql.Connection conn,
 java.sql.Statement s, java.sql.ResultSet rs,
  java.sql.SQLException e) throws java.sql.SQLException {
 
  if (rs != null) {
  try {
  rs.close();
  rs = null;
  } catch (java.sql.SQLException rse) {
  e.setNextException (rse);
  rs = null;
  }
  }
  if (s != null) {
  try {
  s.close();
  s = null;
  } catch (java.sql.SQLException se) {
  e.setNextException (se);
  s = null;
  }
  }
  if (conn != null) {
  try {
  conn.close();
  conn = null;
  } catch (java.sql.SQLException ce) {
  e.setNextException (ce);
  conn = null;
  }
  }
  throw new java.sql.SQLException (e.getMessage(),
e.getSQLState(),
 e.getErrorCode());
  }
 
 Crazy, perhaps, but it works quite well.
 
 - Original Message -
 From: Mike Whittaker [EMAIL PROTECTED]
 To: Struts List [EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 10:14 AM
 Subject: [OT] data layer, try-catch-finally, connections
 
 
   I guess you've all been here, so can you answer this?
  
   you have do a 'finally' to ensure you close the connection/release 
it
 back
   to the pool.
  
   In the controller tier this is easy, get the connection in the
   Filter/RequestProcessor/Action when whatever returns you can finally
 close
   it.
  
   However this ties it to the controller layer.  I want my connections
   instigated from the business layer.  But because so many processes
 require
 a
   connection I will have identical try,catch,finally block all over 
the
 place.
  
   Any one got a solution to this?
  
   Thankyou
   --
   Mike W
  
  
   
-
   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]
 

 _
 Protect your PC - get McAfee.com VirusScan Online
 http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


Re: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Jeff Kyser
So if it is just a link, can't you create a forward action that points
to a definition in your tiles-config.xml?
for example:

action path=/catalog/ChooseCategory
parameter=order_entry.catalog.ChooseCategory
type=org.apache.struts.actions.ForwardAction
/action
where order_entry.catalog.ChooseCategory is mapped to a JSP in my 
tile-config.xml

no?

i think I need to throw in the towel :)

-jeff

On Tuesday, June 3, 2003, at 09:30  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

Yes .. now you exacly understand my problem ..
See these form pages are direct links from the Menu and not result of 
some
action ..
I mean there is no form Submission and no action .. Just a link is 
clicked
..
Can you give an example for that .. if possible ..I mean how I can 
avoid
writing index.jsp ...



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


RE: Build Navigation based on action mapping

2003-06-04 Thread Hibbs, David
I'm guessing that what you really want is to be able to do either

a) some reverse engineering/documentation
or
b) a site map type function

because navigation in a Struts app is absolutely based on action mapping and
tiles config.

That said (and without a clearer question), I will give some very bland
advice... 

Both struts-config and tiles-defs end in .xml and reference a DTD.  So it
is quite easy to parse them and store the content in memory.  After all,
that's what Struts does!  What you do from there is up to you and your
intended goal.

David Hibbs
Staff Programmer / Analyst
Distributed Applications Development and Support
American National Insurance Company

 -Original Message-
 From: Haytham Samad [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 8:00 AM
 To: Struts Users Mailing List
 Subject: Posted Again: Build Navigation based on action mapping
 
 
 
 Sorry for reposting but wanted to get some feedback on this 
 as I am sure
 everyone here had to deal with this at some point.  I am 
 trying to find a
 way to have navigation built based on the struts-config.xml's action
 mappings.  Since all my use cases are enabled through action 
 listed under
 action mapping, this seemed like a good place to start.  
 Anyone done this
 before or has other robust ideas to build a navigation that 
 can update as my
 site's features change?
 
 Thanks,
 
 Haytham
 
 Below is my first posting:
 
 I am trying to build a navigation component that basically runs of the
 struts config file's action mappings.  Anyone ever done this 
 before or has
 ideas on ways to build navigation from the struts config xml 
 file?  I would
 like it to dynamically update with changes to my site's 
 navaigation/flow and
 use the role information included with the mappings.
 
 Thanks.
 
 Haytham
 
 

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



RE: validator with password fields

2003-06-04 Thread Raible, Matt
You're probably doing something wrong - it works fine for me.

Matt

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:42 AM
To: Struts Users Mailing List
Subject: validator with password fields


Hi all,

when trying to make a password field required using the validator, the
javascript doesn't seem to work. 
The server side validation does work. Strangely, the javascript
validation works in the same form for text fields.

Anyone ever encountered this before?

Am I just doing something wrong?
brian

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



Re: validator with password fields

2003-06-04 Thread David Graham
Javascript for password fields is intentionally limited for security 
reasons.  The only javascript validation that runs on password fields is the 
required check.  What version are you using?

David

Hi all,

when trying to make a password field required using the validator, the 
javascript doesn't seem to work.
The server side validation does work. Strangely, the javascript validation 
works in the same form for text fields.

Anyone ever encountered this before?

Am I just doing something wrong?
brian
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

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


Re: Question about buttons

2003-06-04 Thread sjones
there is also a class called HTMLButton that was suggested.

I haven't quite figured it out yet. maybe you will have better luck.

goto:   http://j2ee.lagnada.com/struts/html-buttons.htm


Nadja Senoucci [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello everyone,

 if I want to have a button in my form that would be a second submit
button,
 can I give it it's own action-class? I guess not, but I thought I'd ask.
 Also, how can I check in my form bean which button has been pressed?

 The reason why I am asking all of this: I want to have a third button in
my
 form, next to the general submit and cancel buttons. If that button is
 pressed, some extra info is being displayed but the data in the form
should
 be validated. I thought, it'd be nicer to use a button for this than a
 normal link...

 Greetings,
 Nadja




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



RE: out-of-memory exp

2003-06-04 Thread Doug Bryant
it's weblogic, not struts.  it appears that hot-deploy does not free up
resources upon redeploying an application.  

we are working with a fairly large application.  Most of the developers
here have resorted to restarting the server between redeploys because it
is almost guaranteed to hose up after a couple of minutes of running on
a redeployed app.

Doug



On Tue, 2003-06-03 at 10:26, Nail, Evan Burke wrote:
 nagi, 
  
 Besides the previously mentioned errors, I sometimes get this error when
 I'm working in my development environment and I have changed a class and
 not restarted my server. 
  
 I have not used 7.1 much so I don't know if this could be your error ,
 we're on 6.1 and see it occasionally although normally we get scope
 errors when using struts. There might be config methods to help the
 classloader out in these cases ..not sure. 
  
 
 bn
  
 
 
 
 -Original Message-
 From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 9:15 AM
 To: [EMAIL PROTECTED]
 Subject: out-of-memory exp
 
 
 
 hi,
 i am using struts 1.1 with ejb on weblogic7.1
  
 i  frequently get this error while working with the web application
  
 Jun 3, 2003 7:42:03 PM IST Error HTTP 101017
 [ServletContext(id=4550717,name=cwbweb,context-path=/cwbweb)] Root
 cause of ServletException
 java.lang.OutOfMemoryError
 no stack trace available
 no idea why this comes
  
 any help TIA
  
 --nagi
  
 Nagendra Kumar O V S
 Member Technical Staff
 Ikigo India Private Ltd.
 470-B, Road No. 36,
 Jubilee Hills,
 Hyderabad 500033
 Contact(O): 23544671
 Cell: 98482-41789
 
   
 
  http://www.incredimail.com/redir.asp?ad_id=309lang=9   IncrediMail -
 Email has finally evolved -
 http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here 
 
 
 
 **
 This e-mail is the property of Enron Corp. and/or its relevant affiliate
 and may contain confidential and privileged material for the sole use of
 the intended recipient (s). Any review, use, distribution or disclosure
 by others is strictly prohibited. If you are not the intended recipient
 (or authorized to receive for the recipient), please contact the sender
 or reply to Enron Corp. at [EMAIL PROTECTED] and
 delete all copies of the message. This e-mail (and any attachments
 hereto) are not intended to be an offer (or an acceptance) and do not
 create or evidence a binding and enforceable contract between Enron
 Corp. (or any of its affiliates) and the intended recipient or any other
 party, and may not be relied on by anyone as the basis of a contract by
 estoppel or otherwise. Thank you. 
 **
-- 
Doug Bryant
ICF Consulting
Software Engineer

phone: 843.760.3635
  fax: 843.207.5444
email:  [EMAIL PROTECTED]
[EMAIL PROTECTED]


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



Validation : Can't validate integer fields...

2003-06-04 Thread Eirik Kjølsrud
Hi,

I'm new to this group. I'm a java developer working currently on projects
for the Norwegian National Lottery.

In an input form, I'm trying to validate user input on the client, making
sure that the values are integers. My problem is that no message is
presented for errors.integer, only for errors.required. I have tried to
list out some information in the javascript for integer validation in
'validation-rules.xml', and the field is validated correctly. I also cannot
submit the form unless all values are integers, but there is no messagebox
telling the user what is wrong as it is when the field is empty.

Any help would be appreciated : )

Best Regards
Eirik Kjølsrud, Norway

Here are some details :

I am using a DynaValidatorForm :
form-bean name=globalgameparamDynaValForm
type=org.apache.struts.validator.DynaValidatorForm

form-property name=psp type=java.lang.Integer/

form-property name=fsp type=java.lang.Integer/

form-property name=postal0 type=java.lang.Integer/

form-property name=postal1 type=java.lang.Integer/

form-property name=postal2 type=java.lang.Integer/

form-property name=postal3 type=java.lang.Integer/

form-property name=module type=java.lang.String/

/form-bean

The part for the formset in the validation.xml file :

formset

form name=globalgameparamDynaValForm

field property=psp

depends=required,integer

arg0 key=globalgameparamForm.psp.displayname/

/field

field property=fsp

depends=required,integer

arg0 key=globalgameparamForm.fsp.displayname/

/field

field property=postal0

depends=required,integer

arg0 key=globalgameparamForm.postal0.displayname/

/field

field property=postal1

depends=required,integer

arg0 key=globalgameparamForm.fpostal1.displayname/

/field

field property=postal2

depends=required,integer

arg0 key=globalgameparamForm.postal2.displayname/

/field

field property=postal3

depends=required,integer

arg0 key=globalgameparamForm.postal3.displayname/

/field

/form

/formset

And finally the ApplicationResources where the messages are stored. As
mentioned, the required message is presented, but not the integer :

# Validator errormessages

errors.required={0} må fylles ut.

errors.integer={0} må være et heltall.








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



Html Buttons and Struts

2003-06-04 Thread sjones
has any body used this class,  can you please

give you please explain it more in depth  than the author.




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



RE: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread shirishchandra.sakhare
U can do that..
Create a globel forward(Because if you are using forwards with links, they have to be 
global forwards.)

forward name=myLinkl path=/MyDefinitionAction.do/

Then create a action mapping for the path.
action
path=/MyDefinitionAction
type=aa.ScreenForwardingAction
name=SomeForm
forward name=success path=tiles.definition/
/action

Here the screen forwarding action does nothing but just does a forward to 
successTHis can be used any where just by defining different success forward.


And that solves the problem.

regards,
Shirish
-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 4:48 PM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .


So if it is just a link, can't you create a forward action that points
to a definition in your tiles-config.xml?

for example:

 action path=/catalog/ChooseCategory
 parameter=order_entry.catalog.ChooseCategory
 type=org.apache.struts.actions.ForwardAction
 /action

where order_entry.catalog.ChooseCategory is mapped to a JSP in my 
tile-config.xml

no?

i think I need to throw in the towel :)

-jeff

On Tuesday, June 3, 2003, at 09:30  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Yes .. now you exacly understand my problem ..
 See these form pages are direct links from the Menu and not result of 
 some
 action ..
 I mean there is no form Submission and no action .. Just a link is 
 clicked
 ..
 Can you give an example for that .. if possible ..I mean how I can 
 avoid
 writing index.jsp ...



-
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: Html Buttons and Struts

2003-06-04 Thread James Mitchell
What class?


--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org



- Original Message - 
From: sjones [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:05 AM
Subject: Html Buttons and Struts


 has any body used this class,  can you please
 
 give you please explain it more in depth  than the author.
 
 
 
 
 -
 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]



Very simple and URGENT Tag question - Please Help

2003-06-04 Thread Renato Romano
I have a bean with an indexed property, that is myBean.getItem(int i). I
can't find a way to access that property, using struts, struts-el nor
jstl. I tried the following:

c:out value=${mybean.item[ind]}/

Where ind is the indexId attribute of an ordinary logic:iterate struts
tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
Where Am I wrong ?
Thanks

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



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



Re: How to prevent access to pdf files

2003-06-04 Thread John Brayton
I am on a page. There are a list of pdf files on the page. If a user
clicks on a pdf file, I want him to be redirected to a login page if he
is not logged in.
However this doesnt seem to be happening even with filters. Does the
click on a pdf file not recognized as a request?
Verify that the PDF is part of the webapp, and is being served by 
Tomcat.  Also verify that the web.xml file specifies that the 
filter should be processing requests for the .pdf suffix.  Often 
filters are configured to only process requests routed to servlets or 
JSP's.

John

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


Redirect and request attributes

2003-06-04 Thread Michael Ruppin
I'm setting redirect=true on an ActionForward to
remove the request parameters which do not correspond
to the form named in the mapping for the path.  This
works nicely, but it appears as if anything I need to
get into the new form needs to be a request parameter,
as a result.  Is this true?  If I create a new form,
populate it, and make it a request attribute with the
name specified in the mapping, it's used when
redirect=false, but it's ignored when redirect=true.

m

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Possible Bug in FieldChecks.validateRequiredIf(...)

2003-06-04 Thread Bradley M. Handy
I sent this once before, but with the wrong email account.  If this gets
posted twice, I'm sorry.



I have a validation that should be failing (under certain conditions),
but is not.  I've double checked and triple checked to make sure the
setup is correct, and it's still not working correctly.

So, I took a look at the code for validateRequiredIf in the
org.apache.struts.validator.FieldChecks class.  At the end of the
method I found this segment of code:

if (required) {
if ((value != null)  (value.length()  0)) {
return true;
} else {
errors.add(field.getKey(), Resources.getActionError(request, va,
field));
return false;
}
}

Am I correct in assuming that the following condition ((value != null)
 (value.length()  0)) should be
(!GenericValidator.isBlankOrNull(value)).  The reason my check is
failing is due to the fact the value I'm checking is all white space (at
certain times), and is selected from a select box.

Brad Handy


-
Bradley M. Handy| Office: 517 750 6675
Programmer/Analyst  | Email: [EMAIL PROTECTED]
Spring Arbor University |
-
Sun Certified Programmer for the Java 2 Platform
-



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



RE: Tiles Two JSP's for Displaying One Form .

2003-06-04 Thread Bailey, Shane C.

Jeff,

I see we are in agreement.  :)

Anyway, if the guy thinks of a def as a JSP (which it is completed) then he
shouldn't go to it directly from another JSP.  It is Model 1 to do such
things.  So I just thought about how Tiles almost forces Model 2!!



-Original Message-
From: Jeff Kyser [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:48 AM
To: Struts Users Mailing List
Subject: Re: Tiles Two JSP's for Displaying One Form .

So if it is just a link, can't you create a forward action that points
to a definition in your tiles-config.xml?

for example:

 action path=/catalog/ChooseCategory
 parameter=order_entry.catalog.ChooseCategory
 type=org.apache.struts.actions.ForwardAction
 /action

where order_entry.catalog.ChooseCategory is mapped to a JSP in my 
tile-config.xml

no?

i think I need to throw in the towel :)

-jeff

On Tuesday, June 3, 2003, at 09:30  AM, Nimish Chourey , Tidel Park - 
Chennai wrote:

 Yes .. now you exacly understand my problem ..
 See these form pages are direct links from the Menu and not result of 
 some
 action ..
 I mean there is no form Submission and no action .. Just a link is 
 clicked
 ..
 Can you give an example for that .. if possible ..I mean how I can 
 avoid
 writing index.jsp ...



-
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: Very simple and URGENT Tag question - Please Help

2003-06-04 Thread Chen, Gin
since the collection in your case is not accessible except via a method that
requires a parameter you can not do this using just jstl or even struts.
the best way to do it is to expose your collection with a getXXX method.
That way the syntax you used will work.
JSP 2.0 *should* solve your problem though. It will allow for you to invoke
methods.
-Tim

-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:33 AM
To: 'Struts Users Mailing List'
Subject: Very simple and URGENT Tag question - Please Help


I have a bean with an indexed property, that is myBean.getItem(int i). I
can't find a way to access that property, using struts, struts-el nor
jstl. I tried the following:

c:out value=${mybean.item[ind]}/

Where ind is the indexId attribute of an ordinary logic:iterate struts
tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
Where Am I wrong ?
Thanks

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



-
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: validator with password fields

2003-06-04 Thread Brian McSweeney
yep, that's it. I see that the required field is the only one that works.
Can you tell me why this is?

- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 4:02 PM
Subject: Re: validator with password fields


 Javascript for password fields is intentionally limited for security
 reasons.  The only javascript validation that runs on password fields is
the
 required check.  What version are you using?

 David

 
 Hi all,
 
 when trying to make a password field required using the validator, the
 javascript doesn't seem to work.
 The server side validation does work. Strangely, the javascript
validation
 works in the same form for text fields.
 
 Anyone ever encountered this before?
 
 Am I just doing something wrong?
 brian

 _
 MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
 http://join.msn.com/?page=features/virus


 -
 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: Html Buttons and Struts

2003-06-04 Thread sjones
this class

/**
 * Copyright 2001-2003 Antonio W. Lagnada.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. The name Antonio W. Lagnada must not be used to endorse or
 *promote products derived from this software without prior
 *written permission. For written permission,
 *please contact [EMAIL PROTECTED]
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL ANTONIO W. LAGNADA OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */
package com.lagnada.j2ee.struts.htmlbutton;

import java.io.Serializable;

/**
 * HtmlButton
 */
public class HtmlButton implements Serializable {

private String m_name = null;

private Integer m_x = null;

private Integer m_y = null;

/**
 * Default Constructor
 */
public HtmlButton() {
}

/**
 * Button Pressed
 * @return boolean
 */
public boolean pressed() {
return !(m_name == null || m_name.trim().length() = 0)
|| (m_x != null || m_y != null);
}

/**
 * @return String
 */
public String getName() {
return m_name;
}

/**
 * @return Integer
 */
public Integer getX() {
return m_x;
}

/**
 * @return Integer
 */
public Integer getY() {
return m_y;
}

/**
 * Sets the name.
 * @param name The name to set
 */
public void setName(String name) {
m_name = name;
}

/**
 * Sets the x.
 * @param x The x to set
 */
public void setX(Integer x) {
m_x = x;
}

/**
 * Sets the y.
 * @param y The y to set
 */
public void setY(Integer y) {
m_y = y;
}

}


sjones [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 has any body used this class,  can you please

 give you please explain it more in depth  than the author.




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



RE: Very simple and URGENT Tag question - Please Help

2003-06-04 Thread Kazda Juraj
Hi Renato,

hard to say when you don't write what kind of error you got. Exception?
Or nothing shown?

Dont't you forget to add bean to context (session, request,...)?

And, maybe it's typo, but... don't you forget quotes in value attribute?
c:out value=${mybean.item[ind]}/


-juraj.



-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 5:33 PM
To: 'Struts Users Mailing List'
Subject: Very simple and URGENT Tag question - Please Help

I have a bean with an indexed property, that is myBean.getItem(int i). I
can't find a way to access that property, using struts, struts-el nor
jstl. I tried the following:

c:out value=${mybean.item[ind]}/

Where ind is the indexId attribute of an ordinary logic:iterate struts
tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
Where Am I wrong ?
Thanks

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



-
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: Possible Bug in FieldChecks.validateRequiredIf(...)

2003-06-04 Thread David Graham
Thanks for catching this!  Please file a bug report so we don't forget to 
fix it.

Thanks,
David
I have a validation that should be failing (under certain conditions),
but is not.  I've double checked and triple checked to make sure the
setup is correct, and it's still not working correctly.
So, I took a look at the code for validateRequiredIf in the
org.apache.struts.validator.FieldChecks class.  At the end of the
method I found this segment of code:
if (required) {
if ((value != null)  (value.length()  0)) {
return true;
} else {
errors.add(field.getKey(), Resources.getActionError(request, va,
field));
return false;
}
}
Am I correct in assuming that the following condition ((value != null)
 (value.length()  0)) should be
(!GenericValidator.isBlankOrNull(value)).  The reason my check is
failing is due to the fact the value I'm checking is all white space (at
certain times), and is selected from a select box.
Brad Handy

-
Bradley M. Handy| Office: 517 750 6675
Programmer/Analyst  | Email: [EMAIL PROTECTED]
Spring Arbor University |
-
Sun Certified Programmer for the Java 2 Platform
-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: changing tiles-config.xml from within an app?

2003-06-04 Thread Joris Docx
there's some ReloadDefinitions class in the API

-Oorspronkelijk bericht-
Van: Witbeck, Shane [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 3 juni 2003 15:38
Aan: [EMAIL PROTECTED]
Onderwerp: changing tiles-config.xml from within an app?


Does anyone have any experience with changing a tiles-config.xml file from
within an app? I have an app that has different themes based on resource
bundles and a variable which changes bundles (and therefore themes).
Currently, I have this variable defined in the tiles-config.xml and I change
this variable and reload tiles each time I change themes. This is done
strictly on an admin level and anyone using the app would be affected by the
theme change.

Would it be a good idea to create a class to read/write the variable in the
tiles-config.xml or should I just make this variable a Singleton?

TIA, 

Shane

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




*** DISCLAIMER *** Dit e-mailbericht en alle bijgevoegde bestanden zijn vertrouwelijk, 
kunnen informatie bevatten die beschermd zijn door intellectuele eigendomsrechten, 
zijn gecontroleerd op computervirussen (wat niet garandeert dat deze bestanden er 
volledig vrij van zijn) en zijn uitsluitend bestemd voor gebruik door de 
geadresseerde.  Elk gebruik van deze informatie (waaronder de geheel of gedeeltelijke 
reproductie of verspreiding onder elke vorm) door andere personen dan de 
geadresseerde(n) is verboden. Indien deze e-mail verkeerdelijk bij u terechtkomt, 
gelieve de afzender te verwittigen en deze bestanden van uw computer te verwijderen.
Deze e-mail kan op geen enkele wijze een invloed hebben op de contractuele relaties 
tussen de VLM en de betrokken partij. De inhoud van deze e-mail en zijn bestanden zijn 
afkomstig van de auteur en verbindt niet noodzakelijk de VLM tenzij dit bevestigd 
wordt door middel van een terzake geldig ondertekend document van de VLM. Gelieve de 
afzender er zonder onnodig uitstel ervan te verwittigen indien u een bevestiging in 
origineel van dit bericht wenst te ontvangen.

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



RE: How to prevent access to pdf files

2003-06-04 Thread Varun Garg
The way I have handled the problem in the past is to create a servlet
streaming out the pdf and then I have complete control over
authorizations. I would set the mime types to the pdf and then browser
will treat it properly.



-Original Message-
From: John Brayton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:24 AM
To: Struts Users Mailing List
Subject: Re: How to prevent access to pdf files


I am on a page. There are a list of pdf files on the page. If a user 
clicks on a pdf file, I want him to be redirected to a login page if he

is not logged in. However this doesnt seem to be happening even with 
filters. Does the click on a pdf file not recognized as a request?

Verify that the PDF is part of the webapp, and is being served by 
Tomcat.  Also verify that the web.xml file specifies that the 
filter should be processing requests for the .pdf suffix.  Often 
filters are configured to only process requests routed to servlets or 
JSP's.

John

-
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: Very simple and URGENT Tag question - Please Help

2003-06-04 Thread Chen, Gin
btw this question was answered on the JSTL (Taglibs) list.
I just gave a recap of the answer. If you want a more thorough explanation
you can find it in the archives.
-Tim

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:35 AM
To: 'Struts Users Mailing List'
Subject: RE: Very simple and URGENT Tag question - Please Help


since the collection in your case is not accessible except via a method that
requires a parameter you can not do this using just jstl or even struts.
the best way to do it is to expose your collection with a getXXX method.
That way the syntax you used will work.
JSP 2.0 *should* solve your problem though. It will allow for you to invoke
methods.
-Tim

-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:33 AM
To: 'Struts Users Mailing List'
Subject: Very simple and URGENT Tag question - Please Help


I have a bean with an indexed property, that is myBean.getItem(int i). I
can't find a way to access that property, using struts, struts-el nor
jstl. I tried the following:

c:out value=${mybean.item[ind]}/

Where ind is the indexId attribute of an ordinary logic:iterate struts
tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
Where Am I wrong ?
Thanks

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



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



Application resources and java

2003-06-04 Thread Gregory F. March

I have an application where a user logs in and what is presented to
them depends on what organization they belong to.

Things like the web page title, labels, images, etc. are different for
different organizations.

I'm thinking that I'd like to create application resources from the
login action that can be referenced with the bean:message tag.  This
way, the key is always something like myapp.page.title rather than
having to use logic: tags or jsp to determine the appropriate
resource.

My questions are:

 * Is the the appropriate way to do this sort of thing?
 * Irrespective of the answer to the above, can one create / modify
   application resources from java? (Like in an action?)

Thanks,

/greg

--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

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



Re: Html Buttons and Struts

2003-06-04 Thread sjones
here is a link: http://j2ee.lagnada.com/struts/html-buttons.htm


sjones [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 has any body used this class,  can you please

 give you please explain it more in depth  than the author.




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



RE: validator with password fields

2003-06-04 Thread Chen, Gin
javascript is clientside. Therefore, any password you validate in javascript
can easily be seen by a person using view source.
Having:

function validatePassword()
{
return password == 'open sesame';
}

is not very good security.
-Tim

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:32 AM
To: Struts Users Mailing List
Subject: Re: validator with password fields


yep, that's it. I see that the required field is the only one that works.
Can you tell me why this is?

- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 4:02 PM
Subject: Re: validator with password fields


 Javascript for password fields is intentionally limited for security
 reasons.  The only javascript validation that runs on password fields is
the
 required check.  What version are you using?

 David

 
 Hi all,
 
 when trying to make a password field required using the validator, the
 javascript doesn't seem to work.
 The server side validation does work. Strangely, the javascript
validation
 works in the same form for text fields.
 
 Anyone ever encountered this before?
 
 Am I just doing something wrong?
 brian

 _
 MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
 http://join.msn.com/?page=features/virus


 -
 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: Very simple and URGENT Tag question - Please Help

2003-06-04 Thread Denis Avdic
If you are using jstl don't use logic-iterate;

rather use c:forEach items=${yourCollection} var=beanInCollection
then you can  have c:out value=${beanInCollection.property}/
or if it is straight string  you can have c:out 
value=${beanInCollection}/

Renato Romano wrote:

I have a bean with an indexed property, that is myBean.getItem(int i). I
can't find a way to access that property, using struts, struts-el nor
jstl. I tried the following:
c:out value=${mybean.item[ind]}/

Where ind is the indexId attribute of an ordinary logic:iterate struts
tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
Where Am I wrong ?
Thanks
Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_


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


taglibs - nonstatic javascript value

2003-06-04 Thread Alawadhi, Mona


yes, it worked.

I have one problem, though: passing dynamic value to the function I call in
javascript.

This is what I have:
logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link  href=javascript:setHiddenLetter('D');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate

I would like to replace that 'D' with something like %=choice%, for the
user to be able to select the letter (there are letter A through Z, and
'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()
script
function doInsert() {
 document.forms[0].submit();
}
/script

  html:form action=assetWorksheet.do method=post

a href=javascript:doInsert()
  html:img srcKey=image.button.createIncome/a
   /html:form

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth


*
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter. 
*


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



RE: Html Buttons and Struts

2003-06-04 Thread Chen, Gin
This is not a standard struts class.
Shouldn't you email the author directly?
-Tim

-Original Message-
From: sjones [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:36 AM
To: [EMAIL PROTECTED]
Subject: Re: Html Buttons and Struts


this class

/**
 * Copyright 2001-2003 Antonio W. Lagnada.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. The name Antonio W. Lagnada must not be used to endorse or
 *promote products derived from this software without prior
 *written permission. For written permission,
 *please contact [EMAIL PROTECTED]
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL ANTONIO W. LAGNADA OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */
package com.lagnada.j2ee.struts.htmlbutton;

import java.io.Serializable;

/**
 * HtmlButton
 */
public class HtmlButton implements Serializable {

private String m_name = null;

private Integer m_x = null;

private Integer m_y = null;

/**
 * Default Constructor
 */
public HtmlButton() {
}

/**
 * Button Pressed
 * @return boolean
 */
public boolean pressed() {
return !(m_name == null || m_name.trim().length() = 0)
|| (m_x != null || m_y != null);
}

/**
 * @return String
 */
public String getName() {
return m_name;
}

/**
 * @return Integer
 */
public Integer getX() {
return m_x;
}

/**
 * @return Integer
 */
public Integer getY() {
return m_y;
}

/**
 * Sets the name.
 * @param name The name to set
 */
public void setName(String name) {
m_name = name;
}

/**
 * Sets the x.
 * @param x The x to set
 */
public void setX(Integer x) {
m_x = x;
}

/**
 * Sets the y.
 * @param y The y to set
 */
public void setY(Integer y) {
m_y = y;
}

}


sjones [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 has any body used this class,  can you please

 give you please explain it more in depth  than the author.




-
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: Very simple and URGENT Tag question - Please Help

2003-06-04 Thread Renato Romano
OK, you're right!! Here are the first lines from stackTrace from tomcat
log:

javax.servlet.ServletException: An error occurred while evaluating
custom action attribute value with value
${bd.actionDescription[ind]}: Unable to find a value for
actionDescription in object of class BordereauRowWrapper
using operator . (null)   at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:530) at
org.apache.jsp.bordereau_jsp._jspService(bordereau_jsp.java:63)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:204) at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:684)   at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:432)at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:356)  at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav
a:1058) at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr
ocessor.java:451)   at
org.apache.struts.action.RequestProcessor.processActionForward(RequestPr
ocessor.java:401)   at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
279)at 

And here's the method definition:


public class BordereauRowWrapper
{
private B2BAction[] actions;



/**
 * @return java.lang.String
 */
public String getActionDescription(int i)
{
return actions[i].getDescription();
}
}

And the jsp call:

td vAlign=center class=tdc:out
value=${bd.actionDescription[ind]}//td

It seems there is no property actionDescription in my class, but as you
can see it IS there!!
Thanks again
Renato



Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_


-Original Message-
From: Kazda Juraj [mailto:[EMAIL PROTECTED] 
Sent: martedì 3 giugno 2003 17.38
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Very simple and URGENT Tag question - Please Help


Hi Renato,

hard to say when you don't write what kind of error you got. Exception?
Or nothing shown?

Dont't you forget to add bean to context (session, request,...)?

And, maybe it's typo, but... don't you forget quotes in value attribute?
c:out value=${mybean.item[ind]}/


-juraj.



-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 5:33 PM
To: 'Struts Users Mailing List'
Subject: Very simple and URGENT Tag question - Please Help

I have a bean with an indexed property, that is myBean.getItem(int i). I
can't find a way to access that property, using struts, struts-el nor
jstl. I tried the following:

c:out value=${mybean.item[ind]}/

Where ind is the indexId attribute of an ordinary logic:iterate struts
tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
Where Am I wrong ? Thanks

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



-
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 localized user input to typed value

2003-06-04 Thread David Tobey
Florian:
Is there a nice way? Well, that's a stretch. But you can create an
instance of java.text.NumberFormat for the user's specific locale (which
should be available in the session scope as
session.getAttribute(Action.LOCALE_KEY)). Then use the parse() method of
NumberFormat to convert Strings like the below into a Number, and use the
format() method to do the reverse. It's all in the api docs for
NumberFormat.

dave

 -Original Message-
 From: florian [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 02, 2003 4:03 AM
 To: [EMAIL PROTECTED]
 Subject: converting localized user input to typed value


 hi!

 im wondering if there is a nice way to for example convert
 a 1.000,12 string to an Money object with this amount for
 the formbean?

 or how do you generally handle localized user input?

 thanks alot!

 ciao!
 florian




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



RE: taglibs - nonstatic javascript value

2003-06-04 Thread Gandle, Panchasheel
This should work
html:link  href=javascript:setHiddenLetter('%=choice.toString()%');


logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link
href=javascript:setHiddenLetter('%=choice.toString()%');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate

Panchasheel



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call in
javascript.

This is what I have:
logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link
href=javascript:setHiddenLetter('%=choice.toString()%');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate

I would like to replace that 'D' with something like %=choice%, for the
user to be able to select the letter (there are letter A through Z, and
'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()
script
function doInsert() {
 document.forms[0].submit();
}
/script

  html:form action=assetWorksheet.do method=post

a href=javascript:doInsert()
  html:img srcKey=image.button.createIncome/a
   /html:form

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter. 

*


-
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: Very simple and URGENT Tag question - Please Help

2003-06-04 Thread James Norman
If you placed a Map in the context you can reference items in the Map by
the key.  Example would be to place a Map with a key of ID and some
value into context.  You can reference the value by calling 
c:out value=${reference.ID} /.  This is useful when you can't write
a bean.


On Tue, 2003-06-03 at 09:41, Chen, Gin wrote:
 btw this question was answered on the JSTL (Taglibs) list.
 I just gave a recap of the answer. If you want a more thorough explanation
 you can find it in the archives.
 -Tim
 
 -Original Message-
 From: Chen, Gin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 11:35 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Very simple and URGENT Tag question - Please Help
 
 
 since the collection in your case is not accessible except via a method that
 requires a parameter you can not do this using just jstl or even struts.
 the best way to do it is to expose your collection with a getXXX method.
 That way the syntax you used will work.
 JSP 2.0 *should* solve your problem though. It will allow for you to invoke
 methods.
 -Tim
 
 -Original Message-
 From: Renato Romano [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 11:33 AM
 To: 'Struts Users Mailing List'
 Subject: Very simple and URGENT Tag question - Please Help
 
 
 I have a bean with an indexed property, that is myBean.getItem(int i). I
 can't find a way to access that property, using struts, struts-el nor
 jstl. I tried the following:
 
 c:out value=${mybean.item[ind]}/
 
 Where ind is the indexId attribute of an ordinary logic:iterate struts
 tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
 Where Am I wrong ?
 Thanks
 
 Renato
 
 
 Renato Romano
 Sistemi e Telematica S.p.A.
 Calata Grazie - Vial Al Molo Giano
 16127 - GENOVA
 
 e-mail: [EMAIL PROTECTED]
 Tel.:   010 2712603
 _
 
 
 
 -
 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: taglibs - nonstatic javascript value

2003-06-04 Thread Varun Garg
I would just put a bean:write instead on the D.


logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link  href=javascript:setHiddenLetter('bean:write
name=choice property=labelStr/');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate
-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call
in javascript.

This is what I have:
logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link  href=javascript:setHiddenLetter('D');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate

I would like to replace that 'D' with something like %=choice%, for
the user to be able to select the letter (there are letter A through Z,
and 'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()
script
function doInsert() {
 document.forms[0].submit();
}
/script

  html:form action=assetWorksheet.do method=post

a href=javascript:doInsert()
  html:img srcKey=image.button.createIncome/a
   /html:form

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


-
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: validator with password fields

2003-06-04 Thread Brian McSweeney
Ah... I see.
thanks!

- Original Message -
From: Chen, Gin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 4:44 PM
Subject: RE: validator with password fields


 javascript is clientside. Therefore, any password you validate in
javascript
 can easily be seen by a person using view source.
 Having:

 function validatePassword()
 {
 return password == 'open sesame';
 }

 is not very good security.
 -Tim

 -Original Message-
 From: Brian McSweeney [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 11:32 AM
 To: Struts Users Mailing List
 Subject: Re: validator with password fields


 yep, that's it. I see that the required field is the only one that works.
 Can you tell me why this is?

 - Original Message -
 From: David Graham [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 4:02 PM
 Subject: Re: validator with password fields


  Javascript for password fields is intentionally limited for security
  reasons.  The only javascript validation that runs on password fields is
 the
  required check.  What version are you using?
 
  David
 
  
  Hi all,
  
  when trying to make a password field required using the validator, the
  javascript doesn't seem to work.
  The server side validation does work. Strangely, the javascript
 validation
  works in the same form for text fields.
  
  Anyone ever encountered this before?
  
  Am I just doing something wrong?
  brian
 
  _
  MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
  http://join.msn.com/?page=features/virus
 
 
  -
  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: Very simple and URGENT Tag question - Please Help

2003-06-04 Thread Chen, Gin
sorry my previous answer was based on method calling.
since this is an index called though it can be done via:

http://jakarta.apache.org/struts/faqs/indexedprops.html

-Tim

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:42 AM
To: 'Struts Users Mailing List'
Subject: RE: Very simple and URGENT Tag question - Please Help


btw this question was answered on the JSTL (Taglibs) list.
I just gave a recap of the answer. If you want a more thorough explanation
you can find it in the archives.
-Tim

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:35 AM
To: 'Struts Users Mailing List'
Subject: RE: Very simple and URGENT Tag question - Please Help


since the collection in your case is not accessible except via a method that
requires a parameter you can not do this using just jstl or even struts.
the best way to do it is to expose your collection with a getXXX method.
That way the syntax you used will work.
JSP 2.0 *should* solve your problem though. It will allow for you to invoke
methods.
-Tim

-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:33 AM
To: 'Struts Users Mailing List'
Subject: Very simple and URGENT Tag question - Please Help


I have a bean with an indexed property, that is myBean.getItem(int i). I
can't find a way to access that property, using struts, struts-el nor
jstl. I tried the following:

c:out value=${mybean.item[ind]}/

Where ind is the indexId attribute of an ordinary logic:iterate struts
tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
Where Am I wrong ?
Thanks

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



-
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: taglibs - nonstatic javascript value

2003-06-04 Thread Alawadhi, Mona
Panchasheel,

I've tried it. It doesn't work. It takes '%=choice.toString()%' as a whole
string, it does not replace it by the letter I want.

Actually, if you write this, and try to hover over the link, you will see:
'javascript:setHiddenletter('%choice.toString()%')' 
INSTEAD OF 
'javascript:setHiddenletter('D')' or
'javascript:setHiddenletter('A')' or something.

I am not sure how I can trick struts to capture the dynamic value, not
hardcode it.

Anyone can help?

Mona

-Original Message-
From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:02 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


This should work
html:link  href=javascript:setHiddenLetter('%=choice.toString()%');


logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link
href=javascript:setHiddenLetter('%=choice.toString()%');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate

Panchasheel



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call in
javascript.

This is what I have:
logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link
href=javascript:setHiddenLetter('%=choice.toString()%');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate

I would like to replace that 'D' with something like %=choice%, for the
user to be able to select the letter (there are letter A through Z, and
'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()
script
function doInsert() {
 document.forms[0].submit();
}
/script

  html:form action=assetWorksheet.do method=post

a href=javascript:doInsert()
  html:img srcKey=image.button.createIncome/a
   /html:form

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter. 

*


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


*
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter. 
*


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



Re: ValidatorUtil deprecated?

2003-06-04 Thread Rob Leland
Raible, Matt wrote:

I just downloaded and installed Struts from last night (6/02/2003).  Now I'm
getting deprecation errors for ValidationUtil, yet the API docs say nothing
about what it's been replaced with (http://tinyurl.com/dac9).  Any ideas?
Also, ValidatorResources has a couple deprecated methods too.

ValidatorResources.get(java.util.Locale,java.lang.Object)
 .getFieldMap()
Your probably talking about commons-validator ?
Struts 1.1 will ship with the 1.02 version of commons-validator not
the 1.1 version. So I would say this is a bug in the Validator docs,
they should point to the equivalent method in the new class.
There are two ways to keep up with this:
1) Subscribe to commons-dev to get the commit messages or
2) Look at an old example that uses ValidatorUtil method then see
   what new method is used.
3) Using the old source code take a section and do a global search
for that code.
David has been on a mission to reorganize the commons-validator
code, renaming forms to beans, changing method signatures
Thanks,

Matt



Sorry I couldn't be of more help.

-Rob

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


RE: Possible Bug in FieldChecks.validateRequiredIf(...)

2003-06-04 Thread Kruse, Matt
 Am I correct in assuming that the following condition 
 ((value != null)  (value.length()  0)) should be
 (!GenericValidator.isBlankOrNull(value)).  The reason my check is
 failing is due to the fact the value I'm checking is all 
 white space (at certain times), and is selected from 
 a select box.

I disagree with your assumption that   should fail a required check.
In some situations, that may be a valid value to be submitted. It exists,
and it has a value. A validation check for the field being required should
pass.

It sounds like what you want is a not blank validation, where a value
consisting of all whitespaces, tabs, or newlines would fail.

I think the two are not the same, but that's just my opinion :)

Matt Kruse


Re: [SOLUTION] RE: Default ActionError message...

2003-06-04 Thread John Nikolai
FYI for anyone interested:

-
MessageResources resources = getResources(request);
String message = resources.getMessage(error.verisign. + resultCode);
 if (message == null) {
// Use the default error text
message = resources.getMessage(error.verisign.default);
}
--
On Monday, June 2, 2003, at 04:35 PM, John Nikolai wrote:

I thought about using this method but we would like to have a more 
specific error message for some resultCode. For example, a resultCode 
of 24 is an Invalid expiration date which is something the user may 
be able to fix by resubmitting the form with an updated date.  I think 
that only showing the error code would confuse the user.

Thanks

On Monday, June 2, 2003, at 04:26 PM, Jivan, Rajiv wrote:

You can define a generic error message in ActionResources
error.verisign=Verisign has returned an error. Error code is {0}
and in your Action have the following
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.verisign, 
resultCode));

-Original Message-
From: John Nikolai [mailto:[EMAIL PROTECTED]
Sent: Mon 6/2/2003 7:10 PM
To: [EMAIL PROTECTED]
Cc:
Subject: Default ActionError message...


	Hi fellow Struts users!
	
	We are using Verisign to validate a users credit card. There are
	several error codes which can be returned but we don't wish to map
	every single one of these error code in the properties file. I would
	like to do something like the following where resultCode is what is
	returned from Verisign servers (at this point in the code, we know
	Verisign has returned an error so the resultCode will contain the 
error
	number) :
	
	String resultCode = result.getParameter(result.RESULT);
	errors.add(ActionErrors.GLOBAL_ERROR, new 
ActionError(resultCode));
	saveErrors(request, errors);
	
	This works fine if the resultCode is mapped in the properties file 
but
	breaks if the it is not there. What I would like to do is use a 
default
	error message if the resultCode is not contained in the properties
	file. This will allow us to add error codes to the properties file as
	needed...
	
	Short of creating a local properties object, reading in the 
properties
	and searching to see if it exists is there a better solution?
	
	Thank you for your help,
	   - John
	
	
	
	
	-
	To unsubscribe, e-mail: [EMAIL PROTECTED]
	For additional commands, e-mail: [EMAIL PROTECTED]
	
	

NOTICE:
This message is for the designated recipient only and may contain 
privileged or confidential information. If you have received it in 
error, please notify the sender immediately and delete the original. 
Any other use of this e-mail by you is 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: Struts 1.1 on z/OS with WebSphere Application Server 4.0

2003-06-04 Thread Rob Leland
Markus Holzem wrote:

Does anyone have experiences with Struts running on an IBM mainframe?
I'm particularly interested in WebSphere 4.0 (z/OS, *not* z/Linux).
I've tried to find anything in the archive, but I only found
references on WebSphere running on Wintel, Linux or Solaris. Since
WebSphere on z/OS is only 99.9% compatible to the other platforms
I'm a bit anxious about giving it a try.
I'd be very much obliged, if anyone could give some hints for running
Struts 1.1 on this platform.
Markus 
Check out Buziilla, I know there was a bug report files against zOs for
the commons-fileupload, so there is atleast one other person who is 
using it.

-Rob

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


RE: taglibs - nonstatic javascript value

2003-06-04 Thread Alawadhi, Mona
Varun,

I've tried to put that in, but it still doesn't work:

it cuts it when it comes to those double quotes, so, my href would be =
javascript:setHiddenLetter('.
So, it doesn't like those quotes.

I've tried removing them and putting them in single quotes, I'm back to that
same problem. It reads the whole thing as one string.

Please advice!

Mona

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:06 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I would just put a bean:write instead on the D.


logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link  href=javascript:setHiddenLetter('bean:write
name=choice property=labelStr/');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate
-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call
in javascript.

This is what I have:
logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link  href=javascript:setHiddenLetter('D');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate

I would like to replace that 'D' with something like %=choice%, for
the user to be able to select the letter (there are letter A through Z,
and 'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()
script
function doInsert() {
 document.forms[0].submit();
}
/script

  html:form action=assetWorksheet.do method=post

a href=javascript:doInsert()
  html:img srcKey=image.button.createIncome/a
   /html:form

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


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


*
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter. 
*


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



RE: taglibs - nonstatic javascript value

2003-06-04 Thread Varun Garg
Try this, this should work.
logic:iterate name=addressListFormBean id=choice
property=letterOptions
a  href=javascript:setHiddenLetter('bean:write
name=choice /'); document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/a
   /logic:iterate

-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 11:23 AM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Varun,

I've tried to put that in, but it still doesn't work:

it cuts it when it comes to those double quotes, so, my href would be =
javascript:setHiddenLetter('. So, it doesn't like those quotes.

I've tried removing them and putting them in single quotes, I'm back to
that same problem. It reads the whole thing as one string.

Please advice!

Mona

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:06 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I would just put a bean:write instead on the D.


logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link  href=javascript:setHiddenLetter('bean:write
name=choice property=labelStr/'); document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate
-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call
in javascript.

This is what I have:
logic:iterate name=addressListFormBean id=choice
property=letterOptions
html:link  href=javascript:setHiddenLetter('D');
document.forms[0].submit(); 
bean:write name=choice property=labelStr/
/html:link
   /logic:iterate

I would like to replace that 'D' with something like %=choice%, for
the user to be able to select the letter (there are letter A through Z,
and 'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()
script
function doInsert() {
 document.forms[0].submit();
}
/script

  html:form action=assetWorksheet.do method=post

a href=javascript:doInsert()
  html:img srcKey=image.button.createIncome/a
   /html:form

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


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



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


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



Map-backed action form and multibox problem (only 1st checked item detected)

2003-06-04 Thread C
I'm using a Map-backed action form to render dynamic pages. 
I'm having a problem with checkboxes, using the html:multibox
tag. If I display 3 choices and check two, only the first one is 
detected and sent to the back-end.  After pressing Submit, it appears 
that the ActionForm setter stores the field as a String, rather than 
String[] so I only get the first value.  (Please see code snippets 
below).  

If anyone can help me figure out how to make the multibox work with a 
Map-backed form, I'd really appreciate it.  I'm hoping that I
won't need to hardcode String[] properties in my ActionForm to
handle checkboxes as I'd like to make page rendering dynamic.

Thanks


- CODE SNIPPETS FOLLOW 

Note:  I posted a similar message previously but found out the reason 
behind my `No getter method available' error.  The code below 
corrected that problem.

= ACTION FORM =

public class MyDynaActionForm extends ActionForm {

   public MyDynaActionForm() {
super();
   }

   private final Map values = new HashMap();

   public void setValue(String key, Object value) {
  values.put(key, value);   
   }

   public Object getValue(String key) {
  return values.get(key);
   }
}

=== JSP =

[Assume that dispList, an ArrayList of DisplayItemBeans, exists in 
some scope and:
- has get/set methods for scrn_clmn (label to display), db_clmn 
(column name used as key in ActionForm map), options (ArrayList of 
LabelValueBeans containing choices for selection widgets)
- has helper methods such as isUITypeCheckbox() to identify what type 
of widget it is] 

logic:iterate id=dib name=dispList type=DisplayItemBean 

tr 
bean:define id=db_clmn value='%= value( + dib.getDb_clmn() 
+ ) %'/
  tdbean:write name=dib property=scrn_clmn //td
  td
  % if (dib.isUITypeCheckbox() ) { %
logic:iterate id=opt name=dib property=options 
type=org.apache.struts.util.LabelValueBean 
html:multibox  property=%=db_clmn% 
bean:write name=opt property=value /
/html:multibox
bean:write name=opt property=label /
/logic:iterate
  % } else if (dib.isUITypeRadiobutton() ) { %
... display using html:radio
  % } else if ...{ %
...handle other cases
  % } %
  /td
/tr
/logic:iterate



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



IE 6 timeout session

2003-06-04 Thread Billy Ng
Hi folks;
 
 I have a customer complains the IE 6 sp1 times out the session after he is logged in 
the app.  I tried to reproduce it but I can't.  Have anybody experienced this?
 
 Billy Ng
 



  1   2   3   >