importing a package.

hi!

I dont know if this is possible with JSP, so I should explain first.

I have created a package that contains utitlity functions written in j2SE. What I would like to do, is include that package in my jsp page! I set the classpath to my class file, and imported it, however it never seems to run, although I do get slightly differing errors when I change the code around (showing me that at least my classpath is correct).

my package is called testThis.test

the test is an empty object, but contains the utility functions that I would like access to. So for example

test.MultiplyBy3(int x)

would be the way i would like to use test.

at the top of my jsp file I have

<%@page import="testThis.*"%>

and later i have this

test x = new test();

int iM3 = x.MultiplyBy3(54);

the error that I am getting is that "test could not reolve to a type" (see below). My question is, is it a simple mistake? or even possible to make this work?

Thanks!!!

An error occurred at line: 7 in the jsp file: /purchase/fileupload.jsp

Generated servlet error:

test cannot be resolved to a type

An error occurred at line: 7 in the jsp file: /purchase/fileupload.jsp

Generated servlet error:

test cannot be resolved to a type

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

[2185 byte] By [adamorna] at [2007-10-2 22:24:31]
# 1
Some application servers ignore the system class path and look for class files under WEB-INF/classes. Put your package under that directory, stop/start your server and try again.
tolmanka at 2007-7-14 1:41:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...