tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Hanik" <Filip.Ha...@evant.com>
Subject RE: jsp:useBean error
Date Mon, 03 Feb 2003 21:21:50 GMT
okey dokey,
here we go
http://java.sun.com/docs/books/tutorial/java/interpack/packages.html

example: (look at the package statement)

//--source of java file-----------
package com.filip.test;

public class Data implements java.io.Serializable
{
    private String data;
    public Data(String data) { this.data = data;}
    public String toString() { return data; }
}
//--end of java file--------------


This file now exists in a "package" called com.filip.test;
when you compile this file you can do this:
 "javac -d . Data.java"

this will compile the file Data.java into Data.class and place this file in a folder in the
following way
./com/filip/test/Data.class

This file, should now be placed under /yourwebapp/WEB-INF/classes/com/filip/test/ 

Using JBuilder, when you say "New Class" it asks you to specify a package. 
When referencing this class from other classes you can use the "import" statement.

This is the short version, so let me know if you have any direct questions.
Packages are not specific to Tomcat, it is a part of the Java language.

Filip



-----Original Message-----
From: Steve Burrus [mailto:burrus1@swbell.net]
Sent: Monday, February 03, 2003 1:14 PM
To: Tomcat Users List
Subject: RE: jsp:useBean error


Hi Filip, I just now read yer little email msg. to me, and I understand that there should
be little or even nothing that I need to do "special" to get the jsp/servlet to work in JBuilder!!
However, I have no experience at all in "packaging up" a .java file! Would u please "humor
me" and explain the process to me?! I have been told that I need to create something like
"org.burrus.[name of file]" or something similiar. I know that you possess a "massive" amount
of knowledge about Tomcat, so please give a "newbie" like me just a little piece of that knowledge.
:) I thank you very much.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message