| Author |
how to use java class in jsp or servlet
|
mohan cheepu
Ranch Hand
Joined: Nov 15, 2007
Posts: 49
|
|
|
i some java class.i want use those class at serverside in tomcat server. how using jsp or servlets calling those java class.please give me advice.what is dirctory structure.
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
mohan, Welcome to the ranch. If you're new to servlets or JSP, I's suggest picking up a good book or finding a good web tutorial. Your question doesn't make a lot of sense because servlets are Java classes. JSPs eventually become Java classes as well. If you follow current best practices your JSP is the end result of a chain of Java classes that are invoked and referenced by one another. As to directory structure, class files go under {webapp}/WEB-INF/classes/{package structure}/{.class files} If you bundle your Java classes into jar files, the jars go under WEB-INF/lib.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: how to use java class in jsp or servlet
|
|
|