ok, so I tried it again an now I put my class in import:
<%@page import="hasp_demo"%>
and I can use it, I did:
document.write(<%=hasp_demo.main(new
String[1]) %>); just for a
test - it autocompletes the methods in hasp_demo,
so I understand that it recognizes this class.
the problem is that in the import line, it red underlines the "hasp_demo" and when I pass the mouse over the red line, it
writes: "The import hasp_demo cannot be resolved". Moreover - when I run my jsp file, I get exception:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 6 in the generated
java file
The import hasp_demo cannot be resolved
An error occurred at line: 11 in the jsp file: /test.jsp
hasp_demo cannot be resolved
8: <title>Insert title here</title>
9: </head>
10: <body>
11: document.write(<%=hasp_demo.main(new String[1]) %>);
12: cat
13: </body>
14: </html>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
I hope that I suplied all the required data to help me.
Thanks a lot.