how to call user defined class from jsp

hanumanth reddy

Ranch Hand

Posts: 118

posted 17 years ago

my problem is the i want to create an instance of my own class as the java class obbject instance can be created by the placing <% Date dt= java.util.Date() %> but how to create the instance of my own class thanks in advance

When starting with JSP I found that it helped alot to look at the Java code the JSP engine turns out and compare it with the JSP code you wrote. The java.sun.com web site has a very handy JSP technology syntax document in .pdf form you can keep around to remind you of the syntax.

hanumanth reddy

Ranch Hand

Posts: 118

posted 17 years ago

Thank you william but where to set the path for the userdefined class Using the javawebserver2.0 i will be very glad if u can give the exact classpath to set

Where to put the class depends on how you set up the application directory - for example on my Tomcat installation, classes that are not in a package and are used by servlets in the default application are in: c:\tomcat\webapps\ROOT\WEB-INF\classes The WEB-INF\classes directory structure is required by the servlet 2.2 specifications - Sun is trying to standardize the directory structure for server applications. Given the confusing directory setup for JRun, I say more power to them. WBB