File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes error message. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "error message." Watch "error message." New topic
Author

error message.

pappitha swaminathan
Greenhorn

Joined: Aug 16, 2011
Posts: 9
Hi all,
In struts, i want to display an error message in message box by getting values from the actionform as if account number and the amount we deposited are same. Could you help me in doing this.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

Are you talking about doing a client-side validation before submitting a form or are you talking about loading a page and setting values on it?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
pappitha swaminathan
Greenhorn

Joined: Aug 16, 2011
Posts: 9
after loading the page and setting values on it..
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

You could set JavaScript variables with JSP tags so the error, if it exists, gets sent to the browser. Something like this (not tested, will probably need tweaking):

pappitha swaminathan
Greenhorn

Joined: Aug 16, 2011
Posts: 9
Joe Ess wrote:You could set JavaScript variables with JSP tags so the error, if it exists, gets sent to the browser. Something like this (not tested, will probably need tweaking):




yeah i have also used the same.. instead of onload.. i have specified onsubmit.. it shows tag lib is not available... is der any issue of using onsubmit ???
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

pappitha swaminathan wrote:
yeah i have also used the same.. instead of onload.. i have specified onsubmit.. it shows tag lib is not available... is der any issue of using onsubmit ???


I think we are talking about two different things. Per your previous response, I am talking about loading a page and based on the values loaded, displaying a dialog. I think you are talking about client-side validation of values the user puts on the page.
What shows "tag lib is not available"?
Why aren't you using the built-in Struts client-side validation?
pappitha swaminathan
Greenhorn

Joined: Aug 16, 2011
Posts: 9
Joe Ess wrote:
pappitha swaminathan wrote:
yeah i have also used the same.. instead of onload.. i have specified onsubmit.. it shows tag lib is not available... is der any issue of using onsubmit ???


I think we are talking about two different things. Per your previous response, I am talking about loading a page and based on the values loaded, displaying a dialog. I think you are talking about client-side validation of values the user puts on the page.
What shows "tag lib is not available"?
Why aren't you using the built-in Struts client-side validation?



ya fine, i tried with the way you have given, its working good. thanks for your kind reply
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error message.
 
Similar Threads
q from overalltesting.com
how to configure Weblogic 6.1 with JSTL?
going to previous page which contains frames
A Generic Question
How to print content of frame?