> -----Original Message-----
> From: Edward King [mailto:[EMAIL PROTECTED]
>
> In classes directory,I put a java class named hello.class,and
> I put a JSP file in test directory,named index.jsp ,and In
> index.jsp called hello class,but I don't use "import",I think
> JSP can find it.
> /*hello.java*/
> public class hello{
>     String a;
>     public hello(String a){
>        this.a=a;
>     }
>     public String getValue(
>        return a;
>     }
> }
>
> But when I run index.jsp,it raised error:
>     cannot resolve symbol : class hello
> Then I copy hello class into test directory,it still raise
> above errors.
>
> My questions are:
> 1.I want to know what default path which JSP use class
> 2.I don't want to use "package" in hello.java, If I use
> import in JSP,how to write this import statement?

The default packages that are available to JSPs are not available to add
new classes to.  Any classes you write that you want to use in your JSP
pages have to be specifically imported (the packages at least).

You can't use the default package, so you'll need to define a package.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to