RE: How to find length of a string in a bean

2005-11-18 Thread Vishal Dalal

try
int lenth = beanId.StringName.length();

-Original Message-
From: rahul [mailto:[EMAIL PROTECTED]
Sent: Friday, November 18, 2005 2:19 PM
To: user@struts.apache.org
Subject: How to find length of a string in a bean


Hi All,

I have got a bean in my session scope. I want to find the length of a string
which is a member variable of that bean.

I tried  bean:size but this works only with collection.

Any help?


--RahulJoshi



Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life. 

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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



RE: Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-17 Thread Vishal Dalal

Hi, 
sorry for intervening. Actually my query is realted to the Caching part...
Actually i wanted to ask, do placing all these paramteres actually guarantee
that the page will be cached, because i think not.

I myself have tried writing all this code in the page. Then when you go
forward from this page and click back, then the same content is displayed as
was done before...
This clearly implies that the brower caches the page and displays that when
you click back...

Please point out in case i am going wrong or if my logic is incorrect..

Thanks for reading

-Vishal

-Original Message-
From: atta-ur rehman [mailto:[EMAIL PROTECTED]
Sent: Friday, November 18, 2005 12:39 PM
To: Struts Users Mailing List
Subject: Re: Action.execute() only being invoked the first time a url is
requested ??!!!


Hi,

Most probably your page is gettnig cached by the browser. try

head
META content=0 http-equiv=expires
META content=no-cache http-equiv=Pragma
META content=no-cache http-equiv=Cache-Control
META content=no-store http-equiv=Cache-Control
/head

or

%
response.setHeader(pragma, no-cache);
response.setHeader(Cache-Control, no-cache);
response.setHeader(Cache-Control, no-store);
response.setDateHeader(Expires, 0);
%

to keep your browser from caching the page and see if it works.

HTH.

ATTA

On 11/17/05, Mon Cab [EMAIL PROTECTED] wrote:


 For Example if I type in my browser address bar:

 http://127.0.0.1:8080/webapp/userSignup.do?action=whatever

 The first time, I type this in, this invokes the
 execute method of my Action class (I'm using
 System.out (Action execute Invoked) in Action
 execute to test this). If I then enter the exact same
 url, this method is not getting called.

 I am not using validator at all!!

 Can anyone explain what is going on with this?




 __
 Yahoo! FareChase: Search multiple travel sites in one click.
 http://farechase.yahoo.com

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



Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life. 

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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



RE: Is it Possible!

2005-11-15 Thread Vishal Dalal


hi,
sorry. forgot to mention that you would have to take path.lastIndexOf(/)
and then add your relative path

-Original Message-
From: Vishal Dalal
Sent: Wednesday, November 16, 2005 10:17 AM
To: 'Struts Users Mailing List'
Subject: RE: Is it Possible!


try using (className.class).getResource(NameOfResourceInFolder);
it returns a URL
get path from String path = URLName.getPath();
and then,
add your relative path to the path returned

-Original Message-
From: Shailesh Barde [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 16, 2005 9:51 AM
To: user@struts.apache.org
Subject: Is it Possible!


  
hi,
I want to access myMessegeResources.properties.However, if i try to access
it this way it throws an exception of FileNotFound.However if i give Disk
absolute path then it accesses that myMessegeResources.properties file.
  How to access the relative file in WEB-INF

1)Doesn't Works:-Here i have tried various relative paths to WEB-INF but not
worked!

public class showFilevalues {
public static void main(String args[])throws Exception
{
  FileReader fr=new FileReader
(/WEB-INF/classes/myMessegeResources.properties);
  BufferedReader br=new BufferedReader(fr);
  String s;
  while((s=br.readLine())!= null){
  System.out.println(s);}
fr.close();
  }
} 



This Works:-
public class showFilevalues {
public static void main(String args[])throws Exception
{
  FileReader fr=new FileReader
(C:/eclipse/workspace/shail/myProjectcontext/WEB-INF/classes/myMessegeResou
rces.properties);
  BufferedReader br=new BufferedReader(fr);
  String s;
  while((s=br.readLine())!= null){
  System.out.println(s);}
fr.close();
  }
} 
  Is it Possible to how to access the relative file?

Regards,
Shailesh

Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life.

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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



RE: Is it Possible!

2005-11-15 Thread Vishal Dalal

try using (className.class).getResource(NameOfResourceInFolder);
it returns a URL
get path from String path = URLName.getPath();
and then,
add your relative path to the path returned

-Original Message-
From: Shailesh Barde [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 16, 2005 9:51 AM
To: user@struts.apache.org
Subject: Is it Possible!


  
hi,
I want to access myMessegeResources.properties.However, if i try to access
it this way it throws an exception of FileNotFound.However if i give Disk
absolute path then it accesses that myMessegeResources.properties file.
  How to access the relative file in WEB-INF

1)Doesn't Works:-Here i have tried various relative paths to WEB-INF but not
worked!

public class showFilevalues {
public static void main(String args[])throws Exception
{
  FileReader fr=new FileReader
(/WEB-INF/classes/myMessegeResources.properties);
  BufferedReader br=new BufferedReader(fr);
  String s;
  while((s=br.readLine())!= null){
  System.out.println(s);}
fr.close();
  }
} 



This Works:-
public class showFilevalues {
public static void main(String args[])throws Exception
{
  FileReader fr=new FileReader
(C:/eclipse/workspace/shail/myProjectcontext/WEB-INF/classes/myMessegeResou
rces.properties);
  BufferedReader br=new BufferedReader(fr);
  String s;
  while((s=br.readLine())!= null){
  System.out.println(s);}
fr.close();
  }
} 
  Is it Possible to how to access the relative file?

Regards,
Shailesh

Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life.

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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



RE: Client Side Validator Fails When Submit from Javascript

2005-11-07 Thread Vishal Dalal

hi,
try to use onClick instead of onSubmit when you are using the javaScript
submit

Cheers,
Vishal



-Original Message-
From: Jim Reynolds [mailto:[EMAIL PROTECTED]
Sent: Friday, November 04, 2005 7:12 PM
To: user@struts.apache.org
Subject: Client Side Validator Fails When Submit from Javascript


I have been playing with the client-side validation, and ran into a
problem last night that I can docuemnt, but cannot figure out why it
fails.

The below file, shows a form and when you hit the submit, presents the
appropriate alert box with the proper message. All is good, and works
when the submit is pressed.

But if you try and use a javascript:document.form.submit(), the
document is submitted but the alert does NOT work. So basically the
validation fails.

I have tried multiple ideas, and all have not worked. But I really
need the ability to do submits from a javascript: Technically, I was
unare of any difference between a submit button, and a submit form
using the javascript:

Anyone?

Here is the jsp page, in case one sees something odd:

%@ include file=/tags.jsp %

html:html locale=true
head
titlefyi/title
html:base/
/head
body bgcolor=white
html:form action=/AddressJavascriptValidation method=post
onsubmit=return validateAddressForm(this);

td align=center colspan=2
font size=4bPlease Enter the Following Details/b/font
/tr
tr
td align=right
bName/b
/td
td align=left
html:text property=name size=30 maxlength=30/
/td
/tr
tr
td align=right
bAddress/b
/td
td align=left
html:text property=address size=30 maxlength=30/
/td
/tr


// HERE IS A LINK USING SIMPLE JAVASCRIPT TO SUBMIT THAT
//
FAILS.

a href=javascript:document.AddressForm.submit()doit/a

tr
td align=right
bE-mail address/b
/td
td align=left
html:text property=emailAddress size=30 maxlength=30/
/td
/tr

tr
td align=right
html:submitSave/html:submit
/td
td align=left
html:cancelCancel/html:cancel
/td
/tr
/table
/div

!-- Begin Validator Javascript Function--
html:javascript formName=AddressForm/
!-- End of Validator Javascript Function--

/html:form
/body
/html:html

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

Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life. 

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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



RE: TagSupport - how to get request attribute

2005-11-04 Thread Vishal Dalal

try request.getParameter(ParameterName);

-Original Message-
From: Andrzej Bengner [mailto:[EMAIL PROTECTED]
Sent: Friday, November 04, 2005 4:56 PM
To: user@struts.apache.org
Subject: TagSupport - how to get request attribute


Hello,

I have one problem with access to attribute in request in my class from 
TagSupport.
I send GET to my site (eg. http://localhost/app/site.jsp?Test=value). 
How to get this Test attribute in my class?

I tried:

TagUtils.getInstance().lookup(pageContext,Test, null);
pageContext.findAttribute(Test);

ServletRequest request = pageContext.getRequest();
request.getAttribute(Test);

... and all of this returns null.

Regards

-- 
Andy


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

Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life. 

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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



RE: bean:write tag within html:link tag

2005-09-28 Thread Vishal Dalal

hi catherine,
I am new to the struts framework so please ignore and correct if i am wrong
But when using jsp without struts, you experience the same problem while
passing parameters to javascript function.
I think a better way(which always works!!!) is to make that java variable as
a hidden variable of the jsp page and then access it in the script tag by
using document.formName.VaribleName.value tag.
Hope it works.
Do correct me if i am wrong.
Vishal

-Original Message-
From: Catherine [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 27, 2005 7:51 PM
To: user@struts.apache.org
Subject: Re:bean:write tag within html:link tag


I thought rahul wanted a href=/myapp/someAction.do?id=/foo/ to invoke
someAction and passing a parameter, id. What will happen if you click a
hred=/foo/?

I still can't figure out how to solve my problem, that is get bean:message
tag evaluated as the parameter of a javascript call. Like the following:

html:submit onclick=setSubmitAction(bean:message
key=MyPanel.theField.label/)bean:message
key=MyPanel.theField.label//htm:submit 

Some time I also need to pass a java variable as the parameter to a
javascript function, and I encounter the same problem. For example,
html:submit onclick=setSubmitAction(%= myVar %) 
myVar will not get evaluated.

Can someone shied some lights on this? 

Thanks a lot,
Catherine


-
a href=http://Struts_User_List.roomity.com;roomity.com/a
roomity.com is broadband internet. ~~1127830842502~~
-

Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life. 

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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