Entry
How do i create a package in order to import it using: <%@ page import="package.class" %>.
Jan 26th, 2003 15:14
Wet Dog, Mark Murphy, WetDog
/* Put this in it's own file */
package yourpackage;
public class className
{
// Whatever you need.
}
/* End Class */
Then save it as: className.java
Then, you compile it:
javac -d . className.java
What this means:
javac: compile this file using the java compiler.
-d: create a directory for this file's package.
.: put the directory in the current directory (where this file is
currently located).
className.java: This is the file you want compiled.
Now you want to reference it in your jsp page:
<%@ page import = "yourpackage.className"%>
That is it. You are done.
-WetDog