i want to use JavaFunctions.java into login.jsp file. my plan is to store all my java functions in one file and i can use them later. ex check for string or number etc functions...

first my folder tree.

webside_01
    >.settings
    >build
    >src
         >newServlet
              JavaFunctions.java
              website_01_Servlet.java
    >WebContent
        >META-INF
        >WEB-INF
        index.jsp
        login.jsp

JavaFunctions.java

public class JavaFunctions {
    /*** test to see if its a number ***/
    public static boolean isNumber(String str){
        try{
            int num = Integer.parseInt(str);
        }
        catch(NumberFormatException e){
            return false;
        }
        return true;
    }/*** End of isnumber Method***/
}

Know in this login.jsp file i want to use 'isNumber()' method. but iam getting error on:
<%@ include file="JavaFunctions.java" %>

login.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 <%@ include file="JavaFunctions.java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head></head>
<body>

    .....
</body>
....

not .. learn how to use servlets, and write your code as such that your jsp files communicate with those servlets.
I can recommend the "Head First Servlets & Jsp - 2nd edition"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.