I have created a text box in html and if the string entered by user is a alphabet it will not show any message ,else it should display a error message..These checking validations of textbox is done in java and called in jsp;
----------------------------------------------------------
a.html
<font size="4">Enter the search keyword:</font><input type="text" name="key" ><br>
and also submit button is there which goes to main.jsp
----------------------------------------------------------------------
main.jsp
<%@page import="gaveshan.checking;"%>
<%
checking ch=new checking();
String trans=request.getParameter("key");
out.println(ch.ParseClean(trans));
session.setAttribute( "trans", trans );
%>
--------------------------------------------------------------------------------------
checking.java
package gaveshan;
import java.awt.event.;
public class checking
{ public String ParseClean(String str)
{
if(str.length()==100||str.length()==0)
{
return "Enter String Properly";
}
for(int i=0;i<str.length();i++)
{
if(!(str.charAt(i)>65&&str.charAt(i)<122))
{
return "Enter String Properly";
}
}
it is not givng any message when user enters the input in textbox
*it is not showing any error