[OT] Gzip compression of script files

2007-08-14 Thread Vijay Venkataraman

Hi,
I have javascript/css files and looking at GZipping them and sending it 
to the browser. I am aware that i can do a GZip compression during 
runtime using a filters, by writing the content to GZipOutputStream. I 
am just wondering if it is possible to GZip these files during build 
time and then simply serve them during a request(run time) from the 
filter. I haven't seen any such example. Possibly i am missing some thing.


Can anyone let me know, if it is achievable? If not why? Any pointers 
would be great.


Cheers,
Vijay.

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



Re: [OT] Gzip compression of script files

2007-08-14 Thread Vijay Venkataraman

Sebastin,
Thanks for all the information and pointers. Hmm  i didn't realize that 
i meddled with another thread. Group i am very sorry for the mistake. I 
just accomplished what i wanted, it was more of a bug that is why i 
didn't get it to work.


I do understand that i can get it done this done at container / web 
server config level or at the code level. Nice link if others are think 
in these terms. http://www.seifi.org/?p=482


Thanks,
Vijay


Sebastian Kolbe wrote:

Hello,

First of all: You should open a new thread for new questions. Answering to
existing threads might conceal your message for most people.

Anyway:
Compressing javascript, css and other files is possible if the browser
supports this.
The simplest solution for this is to install a webserver (i.e. apache)
additional
to your application server so that a request goes through the web
server. This webserver
can be configured to compress content, probably also HTML files or other
content;
look for 'mod_deflate'.
If everything is right you should then have a transparent compression
for selected
filetypes w/o needing to compress anything manually.

An other approach is to use a javascript compressor like
http://compressor.ebiene.de/  which converts/eliminates white spaces and
word wrapping.

  



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



Re: [OT] Gzip compression of script files

2007-08-14 Thread Vijay Venkataraman

Hi Mike,
Thanks for letting me know about this. I will take care to test it on 
slow machines.


Vijay

Mike Baroukh wrote:

I had problems on IE where compression of gzip didn't works.
On the first page load, we had javascript error.
On the second page load, it works because the ungzipped file was in 
cache.

If we clear browser cache, we have the error again ...

It seems to happened It happend on slow machines.

so, be careful with it. I personally never gzip .js.

Mike


Sebastian Kolbe a écrit :

Hello,

First of all: You should open a new thread for new questions. 
Answering to

existing threads might conceal your message for most people.

Anyway:
Compressing javascript, css and other files is possible if the browser
supports this.
The simplest solution for this is to install a webserver (i.e. apache)
additional
to your application server so that a request goes through the web
server. This webserver
can be configured to compress content, probably also HTML files or other
content;
look for 'mod_deflate'.
If everything is right you should then have a transparent compression
for selected
filetypes w/o needing to compress anything manually.

An other approach is to use a javascript compressor like
http://compressor.ebiene.de/  which converts/eliminates white spaces and
word wrapping.






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



Re: Please help: Struts tags don't evaluate any expressions

2007-03-25 Thread Vijay Venkataraman

Irene,
Quick question, why can't you move to Servlet 2.4 since you are working 
with Tomcat 5.
There are lot of good things that come with JSP 2.0 which can be applied 
that will make developers more productive.


When i joined my project it was on Tomcat 5 and Struts 1.2.4. but on JSP 
1.2. I just converted the whole project to use Servlet 2.4 so it will be 
JSP 2.0 in just two days (Saturday and Sunday).


Thanks,
Vijay Venkataraman

irene wrote:

Hi Laurie,
It works! i'm not using servlet 2.4 specification.
Now it works (but i have to change the taglib declaration to %@ taglib
uri=http://java.sun.com/jstl/core_rt; prefix=c %)

Thanks a lot, I wanted to avoid the use of scriptlets.



Laurie Harper wrote:
  
You probably *don't* want the -el taglibs on Tomcat 5. You will need to 
make sure your web.xml uses the Servlet 2.4 style namespace declaration, 
though, to get EL working.


For scriptlets, your problem is invalid syntax. An attribute value can 
be either plain text, or an RT expression. You can't mix the two forms. 
Try this instead:


   html:text property=%='num_linea['+i+']% /

But I'd strongly suggest getting EL working and avoiding RT expressions 
and scriptlets altogether.


L.

Ed Griebel wrote:


I've done EL expressions like you want to do. Try using the -el
version of the html tag:

html-el:text property=num_linea[${i}]/

On 3/16/07, irene [EMAIL PROTECTED] wrote:
  

Hi,
I have a problem with Struts tags.
I can't use any expression (EL, runtime) in the tag attributes :

html:text property=num_linea[${i}] /

html:text property=num_linea[%=i%] /

The result is an error: Invalid argument looking up property:
num_linea[%=i%]

I suppose i have something wrong in my webapp configuration...

I use tomcat 5, struts 1.2.9

Please help!!!
--
View this message in context: 
http://www.nabble.com/Please-help%3A-Struts-tags-don%27t-evaluate-any-expressions-tf3413607.html#a9511739 


Sent from the Struts - User mailing list archive at Nabble.com.


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




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






  




Re: No taglib element in web.xml v2.4 ?

2006-12-18 Thread Vijay Venkataraman

Mikolaj Rydzewski wrote:

Thomas Thomas wrote:

Well how am I supposed to declare my Struts taglibs then ?
You don't. All tld files are present in META-INF directory of specific 
jars. Servlet container looks for those files in that location and it 
works ;-)


Of course you can still put tld files in WEB-INF, WEB-INF/tld and 
specify them in web.xml, but you don't have to.




Adding more information to what Mikolaj Rydzewski wrote:

As per 2.0 spec of JSP it is enough if the TLD is contained in jar any 
where with in its META-INF directory / subdirectory. This means it does 
not require any explicit URI mapping in the web.xml file. See JSP 2.0: 
Section JSP.7.3.0.  The container will identify the appropriate tlds 
from jars based on the uri declaration in the TLD file.



So if you look in your struts.jar with in META-INF/tlds you will find 
all the tld's defined.
So considering an Example of struts-logic.tld which is in 
struts.jar/META-INF/tlds

View the above mentioned file.
-
!DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd;

taglib
tlibversion1.2/tlibversion
jspversion1.1/jspversion
shortnamelogic/shortname
urihttp://struts.apache.org/tags-logic/uri -- Decalres uri element.
tag
nameforward/name

So in your jsp file you would just map to this uri. In above case to 
http://jakarta.apache.org/struts/tags-logic and use prefix as 
struts-logic or any other short name . Now you will refer to logic tags 
as usual in your jsp. So there is no necessity to specify any mapping in 
web.xml file and don't have to explicitly place the tld file in folder 
/WEB-INF/tld. The container does the hard work of resolving the correct 
tld based on the uri specified in your jsp to the appropriate tld in 
jars that are placed in WEB-INF/lib folder.


Hope this clarifies.

Thanks,
Vijay Venkataraman

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



[OT] Identify file type

2006-11-03 Thread Vijay Venkataraman

Hi,
I have requirement where uploaded files exists in database as blobs. Now 
i need to retrieve the file and push this to the browser.
I have no clue as to what the file type is. So i am not in a position to 
set the content type clearly. Does any one know of a utility which can 
identify the file type?


Thanks,
Vijay Venkataraman

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



Re: Select row from a Table

2006-10-25 Thread Vijay Venkataraman
I believe you will specify action/href or forward attribute - which will 
identify the action. So in the appropriate action class you should be 
able to pull the value from the HttpServletRequest (request ) object. 
request.getParameter(orderNum), plain servlet code.


Thanks,
Vijay Venkataraman

grifoxx wrote:

Thank you man.it worked but now I have another question, how can i get
the parameter and pass it to an action class.

Thank you again...


Laurie Harper wrote:
  

grifoxx wrote:


Hi, I created a table using the iterate tag from struts. What I want to
do is
to select a row from that table so I have an extra column that has a link
called Detail. If the user click on that link I want to display in other
page the detail of that row.

To do that I need to get the Order number which is one of the columns, so
How can I get that parameter when the user click on the link.
  

You don't, you encode it in the link when you render it. For example,

   html:link ...
 paramId=orderNum
 paramName=orderBean
 paramProperty=orderId/

See the documentation for the html:link tag [1] for the various way of 
specifying request parameters.


L.

[1] http://struts.apache.org/1.2.9/userGuide/struts-html.html#link


-
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-el:write use case

2006-08-11 Thread vijay venkataraman

See response inline.

[EMAIL PROTECTED] wrote:


The documentation says you don't need bean-el:write because of c:out,
but I think I have a valid use case for bean-el:write (Assuming
you want to avoid using % %).

Example:
I have a list of objects named results
each result contains a hashmap called 'translations'.

(1) render the results in a particular language (e.g. german)

c:forEach items=results var=result
   c:out value=${result.translations.de}/
/c:forEach

(2) render the results in ${language} (= language in the pageContext)?

c:out value=${result.translations(${language})}/ is of course invalid, but
I think we could do it with bean-el:write

(...)
bean-el:write name=result property=translations(${language})/
 


pageContext - Is implicit variable in jsp.

c:out value=${result.translations[pageContext.language]}/



What do you think?  Is there a way to do this without (the non-existant) 
bean-el:write that I overlooked?

Karel

 


Thanks,
Vijay Venkataraman

--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Displaying images from database.

2006-07-25 Thread vijay venkataraman
Say if all request for images will refer to the same action like 
image.do, then

So map this to a particular action.
Set the content type and write the image content to the ServletOutputStream
return null for ActionForward.

The snippet below should give you an idea.
Consider if resource.getResource() returns a byte[]  - (Some how you 
should be able to get a byte[] for the image stored in DB.)
If image is of type gif or jpg/jpeg - then you can do something like 
what is shown below.
  
   String imgType = gif or jpg/jpeg // for understanding.

   String contentType = image/;
   if(imgType.equalsIgnoreCase(gif)){
   contentType+=gif;
   }else if(imgType.equalsIgnoreCase(jpg)){
   contentType+=jpeg;
   }else {
   contentType = text/html;
   }
   response.setContentType(contentType);
   ServletOutputStream outStream = response.getOutputStream();
   outStream.write(resources.getResource());
   outStream.flush();
   return null;

Thanks,
Vijay Venkataraman

[EMAIL PROTECTED] wrote:


Hi All,




My application saves the images in database as BLOB. I now want to
display these images stored in my database. How can I do this in struts
2.0 ?




Thanks  Regards

Prerna




The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.


WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.


www.wipro.com
 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: displaytag , how display from a vector of beans ?

2006-07-18 Thread vijay venkataraman
If you are still having problems - Download the example source code or 
war file from
http://displaytag.sourceforge.net/m2repo/displaytag/displaytag-examples/1.1/. 
This should give you a clear idea.


Thanks,
Vijay Venkataraman

Michael Jouravlev wrote:


http://displaytag.sourceforge.net/11/tut_basic.html

On 7/18/06, A. Lotfi [EMAIL PROTECTED] wrote:


In the Acion I fill a vector with dynaForm(s)

  for(.) {
   vecInboxMessages.addElement(dynaForm);
 
  }
session.setAttribute(inboxList , vecInboxMessages);
saveToken(request);
getSubheaderDetails();
return mapping.findForward(forward);

  Please show me how to use displaytag in the jsp file, thank you 
your help is appreciated.



George Papandreou [EMAIL PROTECTED] wrote:
  Can you show your syntax?

Here is an example:

class=dataTable 
headerClass=hidden media=html /






Where wsUsers is a form bean method that takes a Vector.

Cheers,
/g

-Original Message-
From: A. Lotfi [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 4:52 PM
To: Struts Users Mailing List
Subject: displaytag , how display from a vector of beans ?


Hi,
I put in a seesion in the action a vector of beans, in the jsp file 
when I
use the displaytag to display the content of the beans, I always get 
this

message : Nothing found to display.

could you please help,
thank you


-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great 
rates

starting at 1¢/min.


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




-
Groups are talking. We're listening. Check out the handy changes to 
Yahoo! Groups.




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




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: How to create custom tag

2006-07-17 Thread vijay venkataraman
Font Tag is deprecated see 
http://www.w3.org/TR/html401/present/graphics.html#edef-FONT
If you are on JSP 2.0  it is very easy to write a Tag yourself. Just 
override doTag() method of SimpleTagSupport class.


See:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/SimpleTagSupport.html
http://www.sitepoint.com/print/jsp-2-simple-tags - very simple tutorial.

I think tomcat 5.x comes bundled with basic examples you should be able 
to find examples in webapp jsp-examples.
Look in folder TOMCAT_HOME\webapps\jsp-examples\jsp2\simpletag for  
HelloWorldSimpleTag.java.html


Thanks,
Vijay Venkataraman


Bart Busschots wrote:

Anything you can do with a font tag you can do with CSS. In this day 
and age no one should be using font tags anymore!


Bart.

Pankaj Gupta wrote:

I dont think CSS can work in this case as the CSS would be static. I 
want to display color of the font based on the value of severity of 
message i.e. if the message is critical it should be displayed in 
red, info in blue, etc. i.e. It would depend on the value of a form 
bean property.


Li wrote:


why not use CSS?

On 7/17/06, Pankaj Gupta [EMAIL PROTECTED] wrote:



Hi All,

I want to create a custom tag which wraps the plain html font tag in
such a way that it fetches the color of the font to be displayed on a
pre-configured severity level. Can anyone pl suggest how can I do 
that.


regards,
Pankaj

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




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Dynamic Sort depending on the field requested by user.

2006-07-17 Thread vijay venkataraman
You can handle sorting yourself or work with display tags. See 
http://displaytag.sourceforge.net/11/


Thanks,
Vijay Venkataraman

Lance wrote:


For arrays, use java.util.Arrays.sort(Object[], java.util.Comparator)

-Original Message-
From: Lance [mailto:[EMAIL PROTECTED] 
Sent: 17 July 2006 13:57

To: 'Struts Users Mailing List'
Subject: RE: Dynamic Sort depending on the field requested by user.

Ok... chances are your form has a java.util.List that you want sorted. You
can use java.util.Collections.sort(java.util.List, java.util.Comparator)
I think commons-collections or commons-lang has a BeanComparator that you
can use to sort beans by their properties. You can write your own custom
java.util.Comparator too.

-Original Message-
From: Anil Kumar T [mailto:[EMAIL PROTECTED] 
Sent: 17 July 2006 13:45

To: Struts Users Mailing List
Subject: RE: Dynamic Sort depending on the field requested by user.


But I need the dynamic sort logic ?

Anil.

-Original Message-
From: Lance [mailto:[EMAIL PROTECTED]

Sent: Monday, July 17, 2006 6:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Dynamic Sort depending on the field requested by user.

I don't store the sort column, I pass it in a parameter.
Eg your table heading may have a link similar to
a href=path/to/sortAction.do?sortColumn=namesortDirection=ascending



-Original Message-
From: Anil Kumar T [mailto:[EMAIL PROTECTED]

Sent: 17 July 2006 13:35
To: Struts Users Mailing List
Subject: RE: Dynamic Sort depending on the field requested by user.


Hi Lance,

Thanks for the response. I'm looking at some thing like this. But I'm
not getting how to store the values? When the user clicks on any column
how do we do the sorting..? can you send me sample piece of coding.

Regards,
Anil.

-Original Message-
From: Lance [mailto:[EMAIL PROTECTED]

Sent: Monday, July 17, 2006 4:22 PM
To: 'Struts Users Mailing List'
Subject: RE: Dynamic Sort depending on the field requested by user.

I do this with 2 actions which use the same form which has a scope of
session. The first (retrieve) action hits the db and populates a form.
The
second (sort) action just sorts the form (retrieved from the session).
On
your html table, the column headings link to your sort action.

-Original Message-
From: Anil Kumar T [mailto:[EMAIL PROTECTED]

Sent: 14 July 2006 08:11
To: Struts Users Mailing List
Subject: Dynamic Sort depending on the field requested by user.


Hi Group,




I have a requirement like I need to display a list containing Name,
Date, Department, Last update etc., after displaying the list the user
can select any field to sort the list display, but it should not query
again, only with the first time result we should be able to provide the
sort order as per user request. He can request the sort order on any
field. Can any one know how to achieve this with struts? Any help, links
would be appreciated highly.




Thanks in advance,

Anil.



Information transmitted by this e-mail is proprietary to Infinite
Computer
Solutions and / or its Customers and is intended for use only by the
individual or the entity to which it is addressed, and may contain
information that is privileged, confidential or exempt from disclosure
under
applicable law. If you are not the intended recipient or it appears that
this mail has been forwarded to you without proper authority, you are
notified that any use or dissemination of this information in any manner
is
strictly prohibited. In such cases, please notify us immediately at
[EMAIL PROTECTED] and delete this email from your records.



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


Information transmitted by this e-mail is proprietary to Infinite
Computer
Solutions and / or its Customers and is intended for use only by the
individual or the entity to which it is addressed, and may contain
information that is privileged, confidential or exempt from disclosure
under
applicable law. If you are not the intended recipient or it appears that
this mail has been forwarded to you without proper authority, you are
notified that any use or dissemination of this information in any manner
is
strictly prohibited. In such cases, please notify us immediately at
[EMAIL PROTECTED] and delete this email from your records.

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


Information transmitted by this e-mail is proprietary to Infinite Computer
Solutions and / or its Customers and is intended for use only by the
individual or the entity to which it is addressed, and may contain
information that is privileged, confidential

Re:[OT] calling js function with list backed form value

2006-05-04 Thread vijay venkataraman
In your JS function can you add 'this' as one of the parameter. Then in 
your js function you can get the value from the element.
Like input type=text onclick=return someFunction(this)/ which 
implies the element on which the event occured.
Note: I have never used bean:xxx tags and  don't know much about it.  
My thoughts.


Thanks,
Vijay Venkataraman

Shoukat, Faisal wrote:


Hi,

I have a list backed action form and want to call a javascript function with
one of the parameters to the function being a value from the list backed
action form. 


My js function is as such:

bean:define id=jsFunction
javascript:calculate('%=benefits[ + index.intValue() + ].value%',
   'bean:write name=benefit property=benMaxRange/',
   'bean:write name=benefit property=benMinRange/',
   'bean:write name=benefit property=benRange/',
   'bean:write name=benefit property=label/')
/bean:define

The value I want substituted into the function is %=benefits[ +
index.intValue() + ].value%

My input text tag is as such which calls the function:

input type=text name=%=benefit[+index.intValue()+].value%
value= size=20 onblur=%=jsFunction%/

Can anyone help with explaining how to get the value from the input text box
of the form and send it to the function. The text boxes name is dynamic thus
causes me problems.

The html source shows the following: benefit[0].value in the function and
not the actual value.

Thanks

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

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Radio button group

2006-04-18 Thread vijay venkataraman

Vidya,

Here is the basic concept and hope you can build on from that.
To make a radio button group, you have to have the names of  radio 
buttons in the group the same.

Say for row one on the table you have to render radio buttons of the form
input type=radio name=userChoice[0] value=A Accept
input type=radio name=userChoice[0] value=R  Reject
input type=radio name=userChoice[0] value=IIgnore
So above acts as a radio group. Note 'name' of all the input elements 
are the same(userChoice[0]).


So for the second row it will  have to be
input type=radio name=userChoice[1] value=A Accept
input type=radio name=userChoice[1] value=R  Reject
input type=radio name=userChoice[1] value=IIgnore

In JSP file it would look like
html-el:radio property=userChoice[${rowIndex}]
   value=A /
html-el:radio property=userChoice[${rowIndex}]
   value=R /
html-el:radio property=userChoice[${rowIndex}]
   value=I/

You will have to take care to render the appropriate value of A, R, 
I from the bean. So when the user selects the values will be populated 
in to the String[] userChoice


See indexed property usage of struts doc. 
http://struts.apache.org/struts-doc-1.2.x/faqs/indexedprops.html. This 
will give you a idea of how to setup your form bean.


Thanks,
Vijay Venkataraman



Vidya (Suvarna) Mahavadi wrote:


Guys,

I am still struggling to find a way out.. Any ideas how to get this
right!

Regards

-Original Message-
From: Vidya (Suvarna) Mahavadi [mailto:[EMAIL PROTECTED] 
Sent: Thursday 13 April 2006 16:37

To: Struts Users Mailing List
Subject: Radio button group

Hi,



I have a jsp with a table showing few records of data where each record
corresponds to an object of a bean. Beside the bean data I need to have
a radio button group with (Approve, Reject and Ignore).

Can any one help me to put the bean object and the radio button group
together.. in Jsp and action form.


Any help is much appreciated.


Thanks,
Vidya

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: referencing variable in onclick event of html:link tag

2006-04-18 Thread vijay venkataraman

Shoukat,
From the struts doc for iterate tag. The doc for id element of the 
logic tag is as given below


id - The name of a page scope JSP bean that will contain the current 
element of the collection on each iteration, if it is not |null|.  
(REQUIRED)

So you should be able to get the value from the pageScope and set it.

Thanks,
Vijay Venkataraman

Shoukat, Faisal wrote:


That was the first thing I tried but unfortunately does not work!

-Original Message-
From: Anil Kumar Pippalapalli [mailto:[EMAIL PROTECTED] 
Sent: 18 April 2006 10:49

To: Struts Users Mailing List
Subject: Re: referencing variable in onclick event of html:link tag

hi,
 may be you can try removing the double quotes from the 
 expression [%=count%].
 
 bye
 
 
 
 


Shoukat, Faisal [EMAIL PROTECTED] wrote:  Can anyone help
with explaining to me how to get a scriptlet into a
html:linl tag in the onclick event.



For example: I have two forms of the same name in my jsp page.  The way I am
submitting the forms is to call the onclick event within the html:link tag
as follows:




paramName=app paramProperty=appId
onclick='javascript:document.forms.applicationDetailsForm[0].submit();'[Sub
mit]



However where I have this:
document.forms.applicationDetailsForm[0].submit();  0 could be anything up
to 10.  I am within a logic:iterate tag so have declared the indexId as
index.  




The problem I am having is how do I get index into the square brackets of
the  document.forms.applicationDetailsForm[0].submit();  so what I want to
say is document.forms.applicationDetailsForm[index].submit();  




I have tried the following none of which work:



document.forms.applicationDetailsForm[%=index%].submit(); 


document.forms.applicationDetailsForm[%=index%].submit();

document.forms.applicationDetailsForm[%=index%].submit();



I also tried assigning it to a scriplet variable and using this but it did
not work.



%

 int count = index.intValue();

 


 %



  document.forms.applicationDetailsForm[%=count%].submit();



Can anyone advise on how to get the index variable into the square brackets.


Thanks



  





-
Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 




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

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Error reading tld listeners

2006-04-11 Thread vijay venkataraman

You don't have to replace all tld's. When did this error start creeping?
With JSP 2.0, you have to just drop the jar in the lib directory under 
WEB-INF. If it confirms to JSP 2.0 the tld file is expected to be in the 
META-INF directory or META-INF subdirectory of the jar. Make sure that 
tld it is there in the jar under META-INF directory or its 
subdirectories . Over and above the web.xml should refer to 2.4xsd, like 
what is given below.

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

See JSP 2.0 Spec 7.3.1 ... 7.3.x
Copy paste of TLD resoultion
JSP.7.3.1 Identifying Tag Library Descriptors
---
Tag library descriptor files have names that use the extension .tld, and the
extension indicates a tag library descriptor file. When deployed inside 
a JAR file,
the tag library descriptor files must be in the META-INF directory, or a 
subdirectory
of it. When deployed directly into a web application, the tag library 
descriptor
files must always be in the WEB-INF directory, or some subdirectory of 
it. TLD

files should not be placed in /WEB-INF/classes or /WEB-INF/lib.
The XML Schema for a TLD document is http://java.sun.com/xml/ns/j2ee/
web-jsptaglibrary_2_0.xsd. See Section JSP.C.1, “XML Schema for TLD, JSP
2.0”.
Note that tag files, which collectively form tag libraries, may or may 
not have
an explicitly defined TLD. In the case that they do not, the container 
generates an

implicit TLD that can be referenced using the tagdir attribute of the taglib
The Tag Library Descriptor 1-161
JavaServer Pages 2.0 Specification
directive. More details about identifying this implicit Tag Library 
Descriptor can

be found in Chapter JSP.8, “Tag Files”.

Thanks,
Vijay Venkataraman
Anuradha Vaidya wrote:

Hi 




I am using Tomcat/5.5.12 and java version 1.4.2_10 and am receiving
errors: the description follows...



SEVERE: Error reading tld listeners javax.servlet.ServletException:
Exception processing TLD at resource path /WEB-INF/s

n context /mycontext



javax.servlet.ServletException: Exception processing TLD at resource
path /WEB-INF/struts-logic.tld in context /mycontext  


at
org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:547)

   at
org.apache.catalina.startup.TldConfig.execute(TldConfig.java:300)

   at
org.apache.catalina.core.StandardContext.processTlds(StandardContext.jav
a:4216)

   at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4072
)

   at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

   at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

   at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

   at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)

   at
org.apache.catalina.core.StandardService.start(StandardService.java:450)

   at
org.apache.catalina.core.StandardServer.start(StandardServer.java:680)

   at org.apache.catalina.startup.Catalina.start(Catalina.java:536)

   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

   at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:324)

   at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)

   at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)



It seems to work by getting rid of the DOCTYPE declaration and using the
new taglib start 




taglib xmlns=http://java.sun.com/xml/ns/j2ee; 

 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 

 


xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_
0.xsd 




 version=2.0



but I cant replace all the tld's, besides the current set of tld's are
working fine for a colleague with similar environment. 




Please answer whatever you may think might be the best solution and if
someone is sure request you to send a reply asap...





Thanks

Anu



MASTEK 
Making a valuable difference

Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action

Re: Validation

2006-04-06 Thread vijay venkataraman

Gokul,
Why don't you just pull the source code and debug it. If you had done 
that, by now you would have found a solution to your problem.


Thanks,
Vijay Venkataraman

gokul balasubramanian wrote:

 
Guys,


I am yet to find a solution for this problem. I validate a form and if validation returned errors, which it does in this case y is the action still being called? even worse the errors are displayed on the action page than on the input page. baffles me. how do i tackle this problem? 



Gokul


 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Some questions

2006-04-05 Thread vijay venkataraman
You can also look at ADF Faces which in incubation now at 
http://myfaces.apache.org/. What is the incubation period and what it 
means i am not clear with that though. Probably Craig knows more about 
it. Give a try at ADF Faces and look at the demo pages.  It has around 
100 components which work fine with most browers. It internally uses 
AJAX for its components to do partial page rendering. JSF component 
developers will wire up javascript  in the component renderers such that 
end users don't bother about all the Javascript stuff. By the time you 
work, if there are more compoents that are being developed, i am sure 
you will be able to add them to the component pallette in JDEV or Java 
Studio Creator.  JDEV 10.3 like Java Studio Creator also has drag and 
drop features for ADF Faces and i believe it can pick My Faces tags too. 
I am not sure whether JDEV can pick up Sun RI components or if Java 
Studio Creator can pick up ADF Faces and My Faces components in its 
component pallete. Craig might have some information on these.


Thanks,
Vijay Venkataraman

Craig McClanahan wrote:


On 4/5/06, Mário Lopes [EMAIL PROTECTED] wrote:
 


And how easy is it to use AJAX along with JSF? I don't have any
experience with JSF but I've seen a friend of mine drag  dropping
like in .NET. I'm not an apologist of WebForms. But if JSF eases AJAX
I'll certainly consider it as a valid choice.
   




commercial
It's pretty easy.  If you install Java Studio Creator 2[1], you can also
download a library of AJAX-enabled sample components that encapsulate all
the JS/DHTML complexity, but leverage the drag-n-drop user experience
Creator provides for any other JSF component.

We're adding to this library with components that wrap widgets from the DOJO
toolkit (I don't want to write all that javascript code either :-), which is
a good strategy ... the JSF renderer can basically emit the code to create
the corresponding DOJO object and asking it to render itself, rather than
doing all the markup itself.
/commercial


Kind Regards,
 


Mário Lopes
   




Craig

[1] http://developers.sun.com/jscreator/

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


Tomcat SSL Enabled - Popup information on pages : Contains secure and non secure items

2006-03-31 Thread vijay venkataraman
I just enabled SSL  in  Tomcat Server 5.5.9 for my application. When i 
fetch a page i get a popup with message
This page contains both secure and non secure items. Do you want to 
display the non secure items.


When i did a view source on the page, there is a flash component which 
points to http url of macro media site, but when i click on a different 
link in the page which has no reference to the protocol (http or https) 
that navigates to another page, again i get the popup message. When i 
did a view source, i don't see any reference to http or there is no url 
in the page which starts with http/https. Can anyone let me know how to 
fix this or show me some leads to this problem.


Using Struts 1.2.4 and viewing on IE 6.0.2800.1106 + with latest patches.

Thanks,
Vijay Venkataraman

--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: html:multibox is not sending the checked checkboxes value

2006-03-31 Thread vijay venkataraman

The struts doc goes like this :

*Multibox:*
**

Renders an HTML input element of type |checkbox|, whose checked 
status is initialized based on whether the specified value matches one 
of the elements of the underlying property's array of current values. 
This element is useful when you have large numbers of checkboxes, and 
prefer to combine the values into a single array-valued property instead 
of multiple boolean properties. This tag is only valid when nested 
inside a form tag body.


*WARNING*: In order to correctly recognize cases where none of the 
associated checkboxes are selected, the |ActionForm| bean associated 
with this form must include a statement setting the corresponding *array 
to zero length in the |reset()| method.

*

See the rendered html and make sure that check boxes are rendered with 
the correct name.
I don't see you setting any value to the value attribute of multibox.  
It is the value you set that is posted back.


I don't know much about bean and iteration tag.

Regards,
Vijay Venkataraman


Tarun Reddy wrote:


Hi All,
I've been wasting my time on one issue pertaining to html:multibox tag.
I'm writing a code which should generate multiple checkboxes dynamically on
a JSP page. The JSP should send the checked checkboxes value to the Action
class. But it's not sending any values. I've tried many approaches like
1)initialized all the elements in the String[] to  in the reset() method
2)tried retrieving the checked values using String[] codes=
request.getParameterValues(denyCodes);
None of the above methods worked for me. I'm using Weblogic 8.1 and Struts
1.2.8. I've tried with Struts 1.1 too. Here's my code.
---
public class DenyForm extends ActionForm {
   private String[] denyCodes= new String[80];
   public String[] getDenyCodes(){
   return denyCodes;
   }
   public void setDenyCodes(String[] denycodes){
   this.denyCodes = denycodes;
   }
   public void reset(ActionMapping mapping, HttpServletRequest request) {
   for(int i=0;i80;i++){
   denyCodes[i] = ;
   }
   }
}
denycodes.jsp page is like this,
html:form action=deny
   table
   tr align=centerhtml:submit //tr
   logic:iterate name=denialCodes id=code
   tr
   html:multibox  property=denyCodes 
   bean:write name=code /
   /html:multiboxbean:write name=code/
   /tr
   /logic:iterate
   /tablebr
/html:form
---Action Class is
public class DenyAction extends Action {
   public ActionForward execute(ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response) throws
Exception{

   HttpSession session = request.getSession();
   DenyForm denyForm = (DenyForm)form;
   String[] codes = denyForm.getDenyCodes();
//String[] codes = request.getParameterValues(denyCodes);
log.debug(codes array length is:+codes.length);
   session.setAttribute(denyCodes,codes);
   return mapping.findForward(success);
   }
}
--struts-config.xml entry is
like this

form-bean name=denyForm type=tars.form.DenyForm /

   action path=/deny type=tars.action.DenyAction name=denyForm
   forward name=success path=/query.jsp /
   /action
--

codes.length is always returning 0 as the length. I've added some debug
statements in the ActionForm's set method to see whether it's being called
or not. To my surprise it was never called. That's what baffling me. This is
really urgent. I would really appreciate if someone  could help me out.

Thanks,
Tarun.
 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Tomcat SSL Enabled - Popup information on pages : Contains secure and non secure items

2006-03-31 Thread vijay venkataraman

I am stuck - Any pointers would be really helpful.

Vijay

vijay venkataraman wrote:

I just enabled SSL  in  Tomcat Server 5.5.9 for my application. When i 
fetch a page i get a popup with message
This page contains both secure and non secure items. Do you want to 
display the non secure items.


When i did a view source on the page, there is a flash component which 
points to http url of macro media site, but when i click on a 
different link in the page which has no reference to the protocol 
(http or https) that navigates to another page, again i get the popup 
message. When i did a view source, i don't see any reference to http 
or there is no url in the page which starts with http/https. Can 
anyone let me know how to fix this or show me some leads to this problem.


Using Struts 1.2.4 and viewing on IE 6.0.2800.1106 + with latest patches.

Thanks,
Vijay Venkataraman

--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No

confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, 
disclose, distribute, print, or copy any part of this message if you 
are not the intended recipient.
Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks.
Any views expressed in this message are those of the individual 
sender, except where the message states otherwise and the sender is 
authorized to state them to be the views of any such entity.


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




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: html:multibox is not sending the checked checkboxes value

2006-03-31 Thread vijay venkataraman

Tarun,
If the value in being rendered is in string array pointed by the 
property it will be rendered with checked attribute set. I know it works.
It is bit weired that the set method is not being called i am not able 
to find what is happening. Do you see the values coming fine in the 
HttpRequest?
If you debug and view your HttpRequest - If you have *selected* some 
checkboxes then you should see a parameter by name denyCodes and to that 
there will be a array containing the selected values in the array. Sorry 
i am stuck with something deep and cannot probe any further now. Pulling 
the bean util source code along with Struts source code and seeing what 
happens will give you a clear idea.


Vijay Venkataraman

Tarun Reddy wrote:


Hi Vijay,
Thanks for the reply! I had a look at the HTML source generated by JSP page
which contains multibox tag. Here are some sample entries,

form name=denyForm method=post action=/testingtool/deny.do
   table
   tr align=centerinput type=submit value=Submit/tr
   tr input type=checkbox name=denyCodes
value=216216/tr
  tr  input type=checkbox name=denyCodes
value=415415/tr
   tr input type=checkbox name=denyCodes value=0505/tr

Let me tell you, bean:write tag nested in the html:multibox tag takes
care of setting this value attirbute to the same as label. The HTML source
also proved that this problem is not related to setting value attribute.
Second point is, yeah there's a slight confusion in the use of multibox tag.
In the specs they say that you can make ur checkboxes checked based on the
values present in, string array in the ActionForm. But can you tell me
whether we can make selections among multiple checkboxes and then send the
values of the checked checkboxes to the Action class? I'm surprised to see
that the setter method was never called while submitting the form to the
action class. Please suggest me.


On 3/31/06, vijay venkataraman [EMAIL PROTECTED] wrote:
 


The struts doc goes like this :

*Multibox:*
**

Renders an HTML input element of type |checkbox|, whose checked
status is initialized based on whether the specified value matches one
of the elements of the underlying property's array of current values.
This element is useful when you have large numbers of checkboxes, and
prefer to combine the values into a single array-valued property instead
of multiple boolean properties. This tag is only valid when nested
inside a form tag body.

*WARNING*: In order to correctly recognize cases where none of the
associated checkboxes are selected, the |ActionForm| bean associated
with this form must include a statement setting the corresponding *array
to zero length in the |reset()| method.
*

See the rendered html and make sure that check boxes are rendered with
the correct name.
I don't see you setting any value to the value attribute of multibox.
It is the value you set that is posted back.

I don't know much about bean and iteration tag.

Regards,
Vijay Venkataraman


Tarun Reddy wrote:

   


Hi All,
I've been wasting my time on one issue pertaining to html:multibox tag.
I'm writing a code which should generate multiple checkboxes dynamically
 


on
   


a JSP page. The JSP should send the checked checkboxes value to the
 


Action
   


class. But it's not sending any values. I've tried many approaches like
1)initialized all the elements in the String[] to  in the reset()
 


method
   


2)tried retrieving the checked values using String[] codes=
request.getParameterValues(denyCodes);
None of the above methods worked for me. I'm using Weblogic 8.1 and
 


Struts
   


1.2.8. I've tried with Struts 1.1 too. Here's my code.
---
public class DenyForm extends ActionForm {
  private String[] denyCodes= new String[80];
  public String[] getDenyCodes(){
  return denyCodes;
  }
  public void setDenyCodes(String[] denycodes){
  this.denyCodes = denycodes;
  }
  public void reset(ActionMapping mapping, HttpServletRequest request)
 


{
   


  for(int i=0;i80;i++){
  denyCodes[i] = ;
  }
  }
}
denycodes.jsp page is like this,
html:form action=deny
  table
  tr align=centerhtml:submit //tr
  logic:iterate name=denialCodes id=code
  tr
  html:multibox  property=denyCodes 
  bean:write name=code /
  /html:multiboxbean:write name=code/
  /tr
  /logic:iterate
  /tablebr
/html:form
---Action Class is
public class DenyAction extends Action {
  public ActionForward execute(ActionMapping mapping, ActionForm form,
  HttpServletRequest request, HttpServletResponse response)
 


throws
   


Exception{

  HttpSession session = request.getSession();
  DenyForm denyForm = (DenyForm)form;
  String[] codes = denyForm.getDenyCodes();
//String[] codes = request.getParameterValues(denyCodes);
   log.debug(codes array length

Re: Tomcat SSL Enabled - Popup information on pages : Contains secure and non secure items

2006-03-31 Thread vijay venkataraman

Dave,
Thanks for your input. Yes i have links without an http or https coded 
directly in it. But the underlying protocol the page uses is https and i 
don't see where the problem is. The pages work fine with fire fox and 
Mozilla. I want to know, what makes IE think that the pages have mixed 
content and figure out a work around, such that it doesn't throw nasty 
popups. Unfortunately the app is mainly certified to run with IE.


Thanks,
Vijay Venkataraman

Dave Newton wrote:


vijay venkataraman wrote:
 


I am stuck - Any pointers would be really helpful.
   



If you navigate using a link without an http or https coded directly it
will use the protocol of the page you're navigating from.

Dave



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

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Tomcat SSL Enabled - Popup information on pages : Contains se cure and non secure items

2006-03-31 Thread vijay venkataraman
Richard thanks for information. This happens only with IE. There is no 
content in the page, which refers to a http request. Pages come fine 
with Firefox and Mozilla. I understand that the server will be strained, 
if i use https for all the pages.


-Vijay Venkataraman

Yee, Richard K CTR DMDC wrote:


The behavior you describe is a feature of the browser. You cannot prevent
the browser from displaying it when there are non-secure links when viewing
a secure page. One think you could do is make everything https, but then
your server may be strained by the extra use of https.

-Richard


-Original Message-
From: vijay venkataraman [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 31, 2006 6:42 AM

To: Struts Users Mailing List
Subject: Tomcat SSL Enabled - Popup information on pages : Contains secure
and non secure items


I just enabled SSL  in  Tomcat Server 5.5.9 for my application. When i 
fetch a page i get a popup with message
This page contains both secure and non secure items. Do you want to 
display the non secure items.


When i did a view source on the page, there is a flash component which 
points to http url of macro media site, but when i click on a different 
link in the page which has no reference to the protocol (http or https) 
that navigates to another page, again i get the popup message. When i 
did a view source, i don't see any reference to http or there is no url 
in the page which starts with http/https. Can anyone let me know how to 
fix this or show me some leads to this problem.


Using Struts 1.2.4 and viewing on IE 6.0.2800.1106 + with latest patches.

Thanks,
Vijay Venkataraman
 



--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Tomcat SSL Enabled - Popup information on pages : Contains se cure and non secure items

2006-03-31 Thread vijay venkataraman

Quinn,
I checked all files. js, css, jsp and other files. There is debug 
statements and all request go through a specific filter. There is not 
even a single http request.
I am looking for something like live http header for IE. I  found 
something by name ieHTTPHeaders - but doesn't seem to work.


Thanks,
Vijay Venkataraman

Quinn Stone wrote:


Vijay:

Did you check for references to other resources, not just links? I think that
if you have images, external javascript, stylesheets, etc. that are referenced
with http you'll get that message.

Q

-Original Message-
From: vijay venkataraman [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 31, 2006 9:57 AM

To: Struts Users Mailing List
Subject: Re: Tomcat SSL Enabled - Popup information on pages : Contains se cure
and non secure items


Richard thanks for information. This happens only with IE. There is no 
content in the page, which refers to a http request. Pages come fine 
with Firefox and Mozilla. I understand that the server will be strained, 
if i use https for all the pages.


-Vijay Venkataraman

Yee, Richard K CTR DMDC wrote:

 


The behavior you describe is a feature of the browser. You cannot prevent
the browser from displaying it when there are non-secure links when viewing
a secure page. One think you could do is make everything https, but then
your server may be strained by the extra use of https.

-Richard


-Original Message-
From: vijay venkataraman [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 31, 2006 6:42 AM

To: Struts Users Mailing List
Subject: Tomcat SSL Enabled - Popup information on pages : Contains secure
and non secure items


I just enabled SSL  in  Tomcat Server 5.5.9 for my application. When i 
fetch a page i get a popup with message
This page contains both secure and non secure items. Do you want to 
display the non secure items.


When i did a view source on the page, there is a flash component which 
points to http url of macro media site, but when i click on a different 
link in the page which has no reference to the protocol (http or https) 
that navigates to another page, again i get the popup message. When i 
did a view source, i don't see any reference to http or there is no url 
in the page which starts with http/https. Can anyone let me know how to 
fix this or show me some leads to this problem.


Using Struts 1.2.4 and viewing on IE 6.0.2800.1106 + with latest patches.

Thanks,
Vijay Venkataraman


   




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: [OT] Re: Tomcat SSL Enabled - Popup information on pages : Contains se cure and non secure items

2006-03-31 Thread vijay venkataraman
Thanks to everyone who offered help. I just figured out the problem is 
with IE 6 + SSL + flash. IE Doesn't work fine when specific headers are 
set.

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=fdc7b5c

Thanks,
Vijay Venkataraman

Dave Newton wrote:


vijay venkataraman wrote:
 


I checked all files. js, css, jsp and other files. There is debug
statements and all request go through a specific filter. There is not
even a single http request.
I am looking for something like live http header for IE. I  found
something by name ieHTTPHeaders - but doesn't seem to work.
   



You could always use a proxy or sniffer to look at the requests.

But really, this should be quick to deal with by looking at the HTML/JSP
source; just look at every external resource.

Dave



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

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: How i can check an string to be a correct web site format?

2006-03-28 Thread vijay venkataraman

See Java doc of java.util.regexp.Pattern

A compiled representation of a regular expression.

A regular expression, specified as a string, must first be compiled into 
an instance of this class. The resulting pattern can then be used to 
create a |Matcher| object that can match arbitrary _||_character 
sequences_||_ against the regular expression. All of the state involved 
in performing a match resides in the matcher, so many matchers can share 
the same pattern.


A typical invocation sequence is thus

Pattern p = Pattern.|compile|(a*b);
Matcher m = p.|matcher|(ab);
boolean b = m.|matches|();

if b == flase - then it does not match.

You can use above mechanism to check for regexp.

Thanks,
Vijay Venkataraman


Legolas Woodland wrote:


Jitendra Kumar wrote:


I assume you are using form to submit the string.

Are you using commons Validator framework ?? If yes, then in
validator-rules.xml , there is validation of type url.
Use that. or you can use mask if you want to customize it.

Jitendra

  


Thank you for your reply.
can you tell me how i can do this in java code ?
for example by creating a regular expression object and  ?

Thanks



-Original Message-
From: Legolas Woodland [mailto:[EMAIL PROTECTED] Sent: 29 March, 
2006 2:09 AM

To: Struts Users Mailing List
Subject: How i can check an string to be a correct web site format?


Hi
Thank you for reading my post.
i want to check an string to see whether it is a correct web site 
name or not.
I know that i should use regular expression , but i do not know how i 
should do this , can some one help me with this ?


Thanks

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


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


  




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




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Populate Collection values

2006-03-27 Thread vijay venkataraman
In case you missed to see this in the docs... See the Struts doc: 
Building View Components and See in Struts Validator.


Note: If your required form property is one of the Java object 
representations of primitive types (ie. java.lang.Integer), you must set 
the ActionServlet's *convertNull* init parameter to true. Failing to do 
this will result in the required validation not being performed on that 
field because it will default to zero


Thanks,
Vijay Venkataraman

Angelo zerr wrote:


Hello homas,
To avoid this problem, I use String type in my getter/setter in my Struts
form for any type (Integer, Date,...).
So, you could do that :

public class User {
  String age;
  public String getAge(){
  return age;
  }
  public void setAge(String age){
 this.age=age;
}
}

After you must convert String age into Integer age in your action struts
(after validation), to get values of  list of ages.
Regards
Angelo

2006/3/27, Thomas Otto [EMAIL PROTECTED]:
 


Hello,
I have the following problem.

I have an struts form with an Collection getter and want to let set
struts the input values of an submit.

public class UserForm extends ActionForm {
 // returns a collection of user beans
  Collection getUsers(){
  ...
}
}

public class User {
  Integer age;
  public Integer getAge(){
  return age;
  }
  public void setAge(Integer age){
 this.age=age;
}
}

In the jsp- Page I use layout:collection with layout:text to show the
input fields in a table.
layout:form action=/save
  layout:collection property=users indexId=index
 layout:collectionItem title=Age 
  layout:text property=users[${index}].age
layout=false/
 /layout:collectionItem
  /layout:collection
/layout:form


On submit struts fill also all values in the user bean, but struts set
0 into the age-Field and not null if the value is empty.
How can I modify this?

Regards
Tom

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


   



 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: [java.util.Map] How can I alter a java.util.Map while I am iterating it

2006-03-24 Thread vijay venkataraman

Yes as said, you should not be doing this. Probably fix it at source.
But you can certaing look at this.
public class CapsKeyMap
{
   public static void main(String[] args)
   {
  
   MapString, String lcMap = new HashMapString,String();

   lcMap.put(one,ONE);
   lcMap.put(two,TWO);
   lcMap.put(three,THREE);
  
   System.out.println(bef  + lcMap);
  
   SetString keySet = lcMap.keySet();

   String[] it = keySet.toArray(new String[keySet.size()]);
  
   for(String key : it)

   {
   Object obj = lcMap.get(key);
   lcMap.remove(key);
   lcMap.put(key.toUpperCase(), (String)obj);
  
   }  
   System.out.println(Aft  + lcMap);  
   }

}

You need to take care of the types.

Thanks,
Vijay Venkataraman

Antonio Petrelli wrote:


temp temp ha scritto:

I get this Map from a collection and collection might have 1000 or 
more  Maps so I first iterate over this  collection retrieve the map 
and  then iterate over this map  so creating a new Map for each  
iteration  is this a good design ?
  



Surely it is not a good design, but that is up to you. You asked a 
thing and I answered. Maybe you have to turn your question inside-out: 
Why are you putting keys as non-uppercase strings, when you need it?
Maybe you could implement a java.util.Map in a case-insensitive way, 
where the key must be a string, and it does not matter what its keys 
case is. But again this is up to you, I cannot do your homework :-P

Ciao
Antonio


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




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Invalidating a session using JAVASCRIPT

2006-03-21 Thread vijay venkataraman

Think the best way is call a sumit and do the clean up at the server.
What if cookies are used for maintaining session? - Then i belive we can 
destory session at the client side by setting the time expiry on the 
cookie. I am not sure though. If cookies are disabled, then session 
maintenance happens with the jsessionId, then what happens in that case? 
In that case i think the user can later, type in the URL with the 
jsession id and access the page and he could get back to the session, if 
it has not expired.

Can anyone clarify?

Thanks,
Vijay

[EMAIL PROTECTED] wrote:

Use 
body onUnload=callAMethod() 

...
/body
script 
 function callAMethod(){
submit to server(may be a servlet);
 }
/script

I have not tested this by summiting to a servlet.But, I am sure
onUnload() works when you click on browser 'X;

Chandra

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Tuesday, March 21, 2006 4:08 PM
To: Struts Users Mailing List
Subject: Re: Invalidating a session using JAVASCRIPT

Hi Sahil,
   I believe this can be done by implementing the
HttpSessionBindingListenerInterface.The HttpSessionBindingListener
interface is implemented by the classes whose objects need to receive
notifications whenever they are added to or removed from a session. We
do not have to inform the container about such objects explicitly via
the deployment descriptor. Whenever an object is added to or removed
from any session, the container introspects the interfaces implemented
by that object. If the object implements the HttpSessionBindingListener
interface, the container calls the corresponding notification methods

Rajasekhar Cherukuri
Tata Consultancy Services Limited
Air-India Building 11th Floor,
Nariman Point ,
Mumbai - 400 021,Maharashtra
India
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com




Sahil Gupta [EMAIL PROTECTED]
03/21/2006 04:08 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
user@struts.apache.org
cc

Subject
Invalidating a session using JAVASCRIPT






Hi,

Can anyone tell me how to  logout a user (invalidate his Session) when a
user directly closes his browser window. 


Thanks.

Regards,

Sahil Gupta

Extn : 233
Email : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
**
NetEdge Computing Global Solutions Private Limited. 
A-14, Sector-7, NOIDA U.P. 201-301
Tel #  91-120-2423281, 2423282 
Fax #  91-120-2423279 
URL  http//www.netedgecomputing.com 
**

This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose or take any action based on
this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation. 



ForwardSourceID:NT0001060A 



Notice: The information contained in this e-mail message and/or
attachments to it may contain confidential or privileged information. If
you are not the intended recipient, any dissemination, use, review,
distribution, printing or copying of the information contained in this
e-mail message and/or attachments to it are strictly prohibited. If you
have received this communication in error, please notify us by reply
e-mail or telephone and immediately and permanently delete the message
and any attachments. Thank you

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

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Invalidating a session using JAVASCRIPT

2006-03-21 Thread vijay venkataraman

Craig,
Thanks for clarifying.

Vijay

Craig McClanahan wrote:


On 3/21/06, vijay venkataraman [EMAIL PROTECTED] wrote:
 


Think the best way is call a sumit and do the clean up at the server.
   




You'll likely want to do this in an onunload handler for the body
element.

What if cookies are used for maintaining session? - Then i belive we can
 


destory session at the client side by setting the time expiry on the
cookie. I am not sure though. If cookies are disabled, then session
maintenance happens with the jsessionId, then what happens in that case?
   




If the handler your submit invokes calls session.invalidate(), then it will
not matter whether cookies or URL rewriting are used to maintain the session
state.  It will be removed from the server at that point, so any attempt to
come in later will fail.


 


In that case i think the user can later, type in the URL with the
jsession id and access the page and he could get back to the session, if
it has not expired.
Can anyone clarify?
   




That is why you will want to explicitly invalidate the session.

Thanks,
 


Vijay
   




Craig

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: *** 50-100 *** text fields in JSP

2006-03-17 Thread vijay venkataraman

See http://struts.apache.org//struts-doc-1.1/faqs/indexedprops.html.

Vijay Venkataraman

Sony Thomas wrote:


Hi Friends,

I would like to have some guidance to solve my problem. I have a 
struts application. In one of the JSP's I have to display more than 50 
editable text fields. So when I submit I don't want to submit the 
fields separately and get the values in the Action by using getters of 
ActionForm. Is there is any way to submit as an ArrayList or in any 
other way so that in my Action I will get List which contains values 
and the variable names.


If anyone has any idea please give me some guidance and any code 
examples is welcome.


Thanks in advance,


Sony Thomas

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




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Map backed actionForm and pushing multiselect value in the map - No response :-(

2006-03-16 Thread vijay venkataraman

Struts Group,
Is it such a dumb question that i am not getting any response? or is it 
a bug. If someone can let me know, that it is ok to tweak the bean util 
code i will. I am not sure whether it has other side effects. I just 
want to make sure that it does not cause obvious side effects.


Struts gurus - Any pointers will be very helpful.

Thanks,
Vijay

vijay venkataraman wrote:


Can someone take time to answer this question.

Thanks,
Vijay

vijay venkataraman wrote:


Hi,

Sorry if you receive this twice. I didn't see this mail for more than 
4 hours after sending it.


I have a Form bean backed by a Map.
I want to capture the responses of the input fields in the jsp in to 
this Map.


When the selected values results into Array(String[]) in case of 
Multiselect only the first value in the array gets in to this map as 
a value. This is the case with radio buttons fields having same names.


My action form bean is a copy of the bean given in struts document.

public FooForm extends ActionForm {

   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);
   }

}

Here is the JSP fragment
html-el:select multiple=true property=value('5')
 html-el:option value=oneONE/html-el:option
 html-el:option value=twoTWO/html-el:option
/html-el:select


When the JPS page is rendered i am able to see the value as ONE and 
TWO for my multiselect. Now in the UI when i select ONE and TWO, only 
one value that is the first one in index zero is part

of the map.

I debugged it and found that this is handled by ||setProperty(Object 
bean, String name, Object value)|| in bean util class
I have cut and pasted the code at the end of mail for quick reference 
and using that as context to explain the problem.

The obtained descriptor is instanceof MappedPropertyDescriptor.|
|Look for the comments HERE - From this point all idenfitcation 
for setting up the value takes place.
At this point the type.isArray fails, the obtained value is: type = 
java.lang.ObjectT (The return type for getValue)

value = String[ONE, TWO] - This comes out fine.

The code skips condition :  HERE1 and goes through HERE3

I am not sure whether my coding of form bean is wrong or if the jsp 
is wrong, i thought i could generically add objects in to the map.


I am working with dynamic form fields, which can be of any type,
(html radio,checkbox, input, multiselect), hence i thought i can
get it resolved using map based ActionForms, but the problem is that 
only the first item in the array gets into the map. Can anyone let

me know what the mistake is?

Using struts 1.2.4 Note : I tried with the latest version of bean 
utils and the bean utils that comes with 1.2.4.

Any pointers will be higly appreciated. Kindly cc to me:
vijay [EMAIL PROTECTED] since i am not member of the users list.


The code:
-

public void setProperty(Object bean, String name, Object value)
   throws IllegalAccessException, InvocationTargetException {

   // Trace logging (if enabled)
   if (log.isTraceEnabled()) {
   StringBuffer sb = new StringBuffer(  setProperty();
   sb.append(bean);
   sb.append(, );
   sb.append(name);
   sb.append(, );
   if (value == null) {
   sb.append(NULL);
   } else if (value instanceof String) {
   sb.append((String) value);
   } else if (value instanceof String[]) {
   String values[] = (String[]) value;
   sb.append('[');
   for (int i = 0; i  values.length; i++) {
   if (i  0) {
   sb.append(',');
   }
   sb.append(values[i]);
   }
   sb.append(']');
   } else {
   sb.append(value.toString());
   }
   sb.append(')');
   log.trace(sb.toString());
   }

   // Resolve any nested expression to get the actual target bean
   Object target = bean;
   int delim = findLastNestedIndex(name);
   if (delim = 0) {
   try {
   target =
   getPropertyUtils().getProperty(bean, 
name.substring(0, delim));

   } catch (NoSuchMethodException e) {
   return; // Skip this property setter
   }
   name = name.substring(delim + 1);
   if (log.isTraceEnabled()) {
   log.trace(Target bean =  + target);
   log.trace(Target name =  + name);
   }
   }

   // Declare local variables we will require
   String propName = null;  // Simple name of target 
property

   Class type = null;   // Java type of target property
   int index = -1;  // Indexed subscript value 
(if any)

   String key = null;   // Mapped key value (if any)

   // Calculate

Re: newbie guestion: JSTL Expression language

2006-03-16 Thread vijay venkataraman

The text as is from JSP 2.0 Spec

Point 1.
EL expression An element in a JSP page representing an expression to be 
parsed

and evaluated via the JSP Expression Language. Syntactically it is delimited
by the ${ and } characters.

Point 2.
JSP.2.3.5.5 Relational Operators
The relational operators are:
== and eq
!= and ne
 and lt
 and gt
= and le
= and ge

Point 3
JSP.2.3.5.7 A {==,!=,eq,ne} B
If A==B, apply operator
If A is null or B is null return false for == or eq, true for != or ne.
If A or B is BigDecimal, coerce both A and B to BigDecimal and then:
If operator is == or eq, return A.equals( B )
If  operator is != or ne, return !A.equals( B )
If A or B is Float or Double coerce both A and B to Double, apply operator
...

Your code

c:if test=${role}==editor
  The role is editor
/c:if

c:if test=${role}=='editor'
  The role is editor
/c:if

So from point 1 and point 2

c:if test=${role=='editor'}  (See the expression is with in ${} point 1)
  The role is editor
/c:if
will work . See Point 2 bulleted points  . == and eq and Point 3 how the 
relational operator is evaluated. You can look for more information in 
the spec.


So
c:if test=${role=='editor'}
  The role is editor
/c:if
is same as
c:if test=${role eq 'editor'}
  The role is editor
/c:if

Thanks,
Vijay Venkataraman

Rahul Akolkar wrote:


On 3/16/06, Morten Andersen [EMAIL PROTECTED] wrote:
 


I want to use JSTL to check the role of the user (it can be one of many)

I'm new to JSTL so even the simplest things gives me problems:

I've set the role using request.setAttribute(role , role);

This tag:
c:out value=${role}/

Prints out the role fine

While the following statements are newer true:

c:if test=${role}==editor
   


snip/

Expression must be contained in ${ and } in its entirety i.e.

${role eq 'editor'}


 


  The role is editor
/c:if

c:if test=${role}=='editor'
   


snap/

${role ne 'editor'}

-Rahul


 


  The role is editor
/c:if

Where do I go wrong?

Morten


   



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

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


Re: Map backed actionForm and pushing multiselect value in the map

2006-03-15 Thread vijay venkataraman

Can someone take time to answer this question.

Thanks,
Vijay

vijay venkataraman wrote:


|Hi,

Sorry if you receive this twice. I didn't see this mail for more than 4 hours 
after sending it.

I have a Form bean backed by a Map.
I want to capture the responses of the input fields in the jsp in to this Map.

When the selected values results into Array(String[]) in case of Multiselect only the first 
value in the array gets in to this map as a value. This is the case with radio buttons fields having same names.


My action form bean is a copy of the bean given in struts document.

public FooForm extends ActionForm {

   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);
   }

}

Here is the JSP fragment
html-el:select multiple=true property=value('5')
 html-el:option value=oneONE/html-el:option
 html-el:option value=twoTWO/html-el:option
/html-el:select


When the JPS page is rendered i am able to see the value 
as ONE and TWO for my multiselect. Now in the UI when i select ONE and TWO, 
only one value that is the first one in index zero is part

of the map.

I debugged it and found that this is handled by ||setProperty(Object bean, 
String name, Object value)|| in bean util class
I have cut and pasted the code at the end of mail for quick reference and using that as context to explain the problem. 
||

The obtained descriptor is|| instanceof MappedPropertyDescriptor.|
|Look for the comments HERE - From this point all idenfitcation for setting 
up the value takes place.
At this point the type.isArray fails, the obtained value is: type = 
java.lang.ObjectT (The return type for getValue)
||value = String[ONE, TWO] - This comes out fine.

The code skips condition :  HERE1 and goes through HERE3

I am not sure whether my coding of form bean is wrong or if the 
jsp is wrong, i thought i could generically add objects in to the map.

||
||I am working with dynamic form fields, which can be of any type,
(html radio,checkbox, input, multiselect), hence i thought i can
get it resolved using map based ActionForms, but the problem is 
that only the first item in the array gets into the map. Can anyone let

me know what the mistake is?

Using struts 1.2.4 
Note : I tried with the latest version of bean utils and 
the bean utils that comes with 1.2.4. 


Any pointers will be higly appreciated. Kindly cc to me:
vijay [EMAIL PROTECTED] since i am not member of the users list.


The code:
-
||
public void setProperty(Object bean, String name, Object value)
   throws IllegalAccessException, InvocationTargetException {

   // Trace logging (if enabled)
   if (log.isTraceEnabled()) {
   StringBuffer sb = new StringBuffer(  setProperty();
   sb.append(bean);
   sb.append(, );
   sb.append(name);
   sb.append(, );
   if (value == null) {
   sb.append(NULL);
   } else if (value instanceof String) {
   sb.append((String) value);
   } else if (value instanceof String[]) {
   String values[] = (String[]) value;
   sb.append('[');
   for (int i = 0; i  values.length; i++) {
   if (i  0) {
   sb.append(',');
   }
   sb.append(values[i]);
   }
   sb.append(']');
   } else {
   sb.append(value.toString());
   }
   sb.append(')');
   log.trace(sb.toString());
   }

   // Resolve any nested expression to get the actual target bean
   Object target = bean;
   int delim = findLastNestedIndex(name);
   if (delim = 0) {
   try {
   target =
   getPropertyUtils().getProperty(bean, name.substring(0, 
delim));
   } catch (NoSuchMethodException e) {
   return; // Skip this property setter
   }
   name = name.substring(delim + 1);
   if (log.isTraceEnabled()) {
   log.trace(Target bean =  + target);
   log.trace(Target name =  + name);
   }
   }

   // Declare local variables we will require
   String propName = null;  // Simple name of target property
   Class type = null;   // Java type of target property
   int index = -1;  // Indexed subscript value (if any)
   String key = null;   // Mapped key value (if any)

   // Calculate the property name, index, and key values
   propName = name;
   int i = propName.indexOf(PropertyUtils.INDEXED_DELIM);
   if (i = 0) {
   int k = propName.indexOf(PropertyUtils.INDEXED_DELIM2);
   try {
   index =
   Integer.parseInt(propName.substring(i + 1, k));
   } catch (NumberFormatException e

Map backed actionForm and pushing multiselect value in the map

2006-03-14 Thread vijay venkataraman

|Hi,

I have a Form bean backed by a Map.
I want to capture the responses of the input fields in the jsp in to this Map.

When the selected values results into Array(String[]) in case of Multiselect only the first 
value in the array gets in to this map as a value. This is the case with radio buttons having same names.


My action form bean is a copy of the bean given in struts document.

public FooForm extends ActionForm {

   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);
   }

}

Here is the JSP fragment
html-el:select multiple=true property=value('5')
 html-el:option value=oneONE/html-el:option
 html-el:option value=twoTWO/html-el:option
/html-el:select


When the JPS page is rendered i am able to see the value 
as ONE and TWO for my multiselect. Now in the UI when i select ONE and TWO, 
only one value that is the first one in index zero is part

of the map.

I debugged it and found that this is handled by ||setProperty(Object bean, 
String name, Object value)|| in bean util class. I have cut, pasted the 
code at the end of mail for quick reference and using that as 
context to explain the problem. 
||

Starting from the point ||HERESTART (Look for it in code below)
The obtained descriptor is|| instanceof MappedPropertyDescriptor.|
|
Now look for the comments HERE - From this point all 
idenfitcation for setting up the value takes place.
At this point the type.isArray fails, the obtained value is: 
type = java.lang.ObjectT (The return type for getValue)

||value = String[ONE, TWO] - This comes out fine.

The code skips condition :  HERE1 (||if (type.isArray()  (index  0))||) 
and goes through to HERE3  (||if ((value instanceof String) || (value == null))||)


||If it is a instance of MappedPropertyDescriptor then why cant 
the value be pushed as is? Why do we need the check for 
type.isArray()? for the case of MappedPropertyDescriptor|

|
I am not sure whether my coding of form bean is wrong or if the 
jsp is wrong, i thought i could generically add objects in to the map.

||
||I am working with dynamic form fields, which can be of any type,
(html radio,checkbox, input, multiselect), hence i thought i can
get it resolved using map based ActionForms, but the problem is 
that only the first item in the array gets into the map. Can anyone let

me know what the mistake is?

I have gone through different posts where user have said use bean method
of the form String[] getValue() and setValue(index, String[]). I am not
convinced. If bean utils can be tweaked, the problem can be resolved.

Using struts 1.2.4 
Note : I tried with the latest version of bean utils and the bean utils that comes with 1.2.4. 

||Is there a better way to address my requirements. 
||Any pointers will be higly appreciated.


The code:
-
||
public void setProperty(Object bean, String name, Object value)
   throws IllegalAccessException, InvocationTargetException {

   // Trace logging (if enabled)
   if (log.isTraceEnabled()) {
   StringBuffer sb = new StringBuffer(  setProperty();
   sb.append(bean);
   sb.append(, );
   sb.append(name);
   sb.append(, );
   if (value == null) {
   sb.append(NULL);
   } else if (value instanceof String) {
   sb.append((String) value);
   } else if (value instanceof String[]) {
   String values[] = (String[]) value;
   sb.append('[');
   for (int i = 0; i  values.length; i++) {
   if (i  0) {
   sb.append(',');
   }
   sb.append(values[i]);
   }
   sb.append(']');
   } else {
   sb.append(value.toString());
   }
   sb.append(')');
   log.trace(sb.toString());
   }

   // Resolve any nested expression to get the actual target bean
   Object target = bean;
   int delim = findLastNestedIndex(name);
   if (delim = 0) {
   try {
   target =
   getPropertyUtils().getProperty(bean, name.substring(0, 
delim));
   } catch (NoSuchMethodException e) {
   return; // Skip this property setter
   }
   name = name.substring(delim + 1);
   if (log.isTraceEnabled()) {
   log.trace(Target bean =  + target);
   log.trace(Target name =  + name);
   }
   }

   // Declare local variables we will require
   String propName = null;  // Simple name of target property
   Class type = null;   // Java type of target property
   int index = -1;  // Indexed subscript value (if any)
   String key = null;   // Mapped key value (if any)

   // Calculate the property name, index, and key