Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Servlets and the fly likes Message box in my JSP. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Message box in my JSP." Watch "Message box in my JSP." New topic

Message box in my JSP.

Jeff Dube
Ranch Hand

Joined: Jun 14, 2001
Posts: 44
I made a form and i need to have a message box that inform the user if one or more field are empty.
I tried with the following:
if (" field is null.....")
this.showMessageDialog(null,"You need to enter a value...");
<%@ include file="Response.jsp" %>
But it does'nt work. Do i have to insert the showMessageDialog inside my bean with the parent.showMesageDialog()?
I know that i can do it with javascript but i prefer java.
Is it possible??
Thank you very much
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

JSP is *server side*. All JSP code is run on the server, and then sent back to the client. So even if you got it to work, where would it show up?
g2 bhai

Joined: Jul 11, 2001
Posts: 2
Please use Javascript for the validation since it runs on the Client side.
Remember JSP code runs at the web server...and not at the client!!!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Message box in my JSP.
Similar Threads
Struts Validation Problem
Message box
Need help with Validation.xml
won't create tables with jaws.xml
CMR configuration confusion