Can any body tell how to call a java method from jsp. i am pasting my program here


<%@page contentType="text/html"%>
<td><input name="name" value="" size="40"/></td>
<tr><td><input type="SUBMIT" value="Submit" /> </td>
<jsp:useBean id="link" scope="application" class = "CheckValue" />
<jsp:setProperty name="link" property="*" />


import java.util.*;
import java.awt.*;
import javax.swing.*;
import java.sql.*;
import java.lang.*;

class overload
// For checking the null values
void CheckValue(String FieldValue)
System.out.println(" check for the field value null");
// To check the error message for date,character, number
void CheckValue(String LvValue1 ,String LvValue2)
String LvFieldMessage1;
String LvFieldMessage2;
System.out.println("This part is used to check for the error message");
// This part is used to compare the operators with the vlues.
void CheckValue(String FieldName, String LvOperator, String LvValue1, String LvValue2, String LvCheckForNull, String FieldValue)
System.out.println("This part is used to compare the two values using operators");
class CheckValue
public static void main(String args[])
overload ob = new overload();

ob.CheckValue("10", "20");
}catch(Exception e){
System.out.println("Error in the main" +e);

When i am executing the jsp file it is saying : The value for the useBean class attribute CheckValue is invalid.
this error is coming.

Can anybody tell me how to solve this.