Struts Action Issue

2009-04-08 Thread riya

Hi, 

Recently I observed that if in JSP input text I have entered special
characters, lets say: 

displayIDNumber:  #...@#%$!#$%!(*)&*()*(&

In the action I get displayIDNumber as "" i.e empty string. 

Nowhere in the code we are explicitly emptying the string whenever there are
special characters in the input string. 

I puzzled. Can someone please clarify? 

Thanks in advance!!
-- 
View this message in context: 
http://www.nabble.com/Struts-Action-Issue-tp22959505p22959505.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Struts Action Issue

2009-04-13 Thread riya

Hi, 

I followed the replies but could not resolve the issue. Another update I
have is this request is an Ajax.Request with method = 'get'. 

Can this cause any trouble? Changing get to post however does not help. 
Please advise. 

Thanks! 

mgainty wrote:
> 
> 
> agree with Rommel 
> a FieldValidationInterceptor would accomplish this objective
> http://struts.apache.org/2.0.14/docs/fieldexpression-validator.html
> HINT place validation logic in expression validator e.g.
>  Date: Thu, 9 Apr 2009 07:23:42 -0700
>> From: charlesmel1...@yahoo.com
>> Subject: Re: Struts Action Issue
>> To: user@struts.apache.org
>> CC: charlesmel1...@yahoo.com
>> 
>> Riya,
>> 
>> I'm sure that if you trace the request submission from JSP to your Action
>> class
>> by debugging it step by step you will find where the culprit will be. I
>> had one experience
>> before that took me hours to figure out whats wrong in our JSP page where
>> its not showing
>> block of data. After debugging step by step, the logic that checks for
>> the string to show the block of
>> data had a trailing empty character. That string was saved in the
>> database with the trailing space char.
>> and when we pulled it and check for the matching string, our JSP was
>> screwed up. So just a note
>> always trim the data(String) you push to your database.
>> 
>> Goodluck on the debugging spree :).
>> 
>> Rommel
>> 
>> 
>> 
>> 
>> From: Muthu Velappan 
>> To: Struts Users Mailing List 
>> Sent: Thursday, April 9, 2009 5:49:38 AM
>> Subject: RE: Struts Action Issue
>> 
>> Out of curiosity, I gave the same value in my application and tested, I
>> got
>> the exact junk back in my action not even a truncated one. So, please
>> check
>> whether ur action bypasses only this kind of string or even valid string
>> like "test" or "sample". If it doesn't show valid string then there is
>> problem with view file field name and action variable name. If valid
>> strings
>> are working fine and only this kind of string seems to be a problem then
>> please generate the issue in a small testcase and send it across. 
>> 
>> Thanks,
>> Muthu
>> 
>> -Original Message-
>> From: riya [mailto:rachan...@gmail.com] 
>> Sent: Thursday, April 09, 2009 2:33 AM
>> To: user@struts.apache.org
>> Subject: Struts Action Issue
>> 
>> 
>> Hi, 
>> 
>> Recently I observed that if in JSP input text I have entered special
>> characters, lets say: 
>> 
>> displayIDNumber:  #...@#%$!#$%!(*)&*()*(&
>> 
>> In the action I get displayIDNumber as "" i.e empty string. 
>> 
>> Nowhere in the code we are explicitly emptying the string whenever there
>> are
>> special characters in the input string. 
>> 
>> I puzzled. Can someone please clarify? 
>> 
>> Thanks in advance!!
>> -- 
>> View this message in context:
>> http://www.nabble.com/Struts-Action-Issue-tp22959505p22959505.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>> 
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
> 
> _
> Rediscover HotmailĀ®: Get e-mail storage that grows with you. 
> http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-Action-Issue-tp22959505p23026901.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



question

2009-06-18 Thread riya

Hi, 

I have this requirement where I have to get the URL from database and plug
this url in anchor from resource bundle. For eg: 

Database will give me:  URL = www.google.com
and the key in bundle:  search_key =  {0} Find it here 


Lets say n JSP 
<%  
url = "www.google.com" ;   --> This i'll get from database
%>



But this does not work. Link that I get in UI opens
http://localhost:8080/www.google.com. 

I even tried to return the content from java class only by using
MessageFormat class. But it behaves in similar manner. 

Please help to get it done. 

Thanks for reading the post! 



-- 
View this message in context: 
http://www.nabble.com/%3Cbean%3Amessage%3E-question-tp24095363p24095363.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts resources bundle question

2008-12-01 Thread riya

Hi, 
I am one month old to struts. I was curious to know if sth like below is
possible: 

I know for sure that following is correct:

label.xx.value = Selected xx product
label.yy.value = Does your product need an accessory 
label.zz.value = Want to return it? 

Please notice that messages are very different though key names differ on
only middle value (i.e. xx/yy/zz). 

IN JSP: 






Instead of writing so many lines, can I do something like this: 



I am not sure about the syntax though.  But what I intend to know here is,
can I pick label.xx.value/label.yy.value/label.zz.value based on
productType?  ProductType can be xx, yy or zz and can come as bean property.

Please clarify my doubt. Thanks in advance!!


-- 
View this message in context: 
http://www.nabble.com/Struts-resources-bundle-question-tp20780100p20780100.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



localization support for pt_PT and pt_BR

2008-12-18 Thread riya

Hi, 

Right now my application supports localization for portuguese. Resource
bundle name is MessageResources_pt.properties. As I know resource bundle
file must follow the same naming convention as the default properties file,
except that it must include the two-letter ISO language code of the language
that it represents

Now we are supposed to support the localization for Portuguese portuguese
(pt_PT) and Brazilian portuguese (pt_BR). I was wandering how will I name
the message properties file, I wanted to confirm if naming the file
MessageResources_pt_BR.properties is absolutely right? 

Can some one please advise? 

Thanks in advance!!
 
-- 
View this message in context: 
http://www.nabble.com/localization-support-for-pt_PT-and-pt_BR-tp21078834p21078834.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org