For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > November 2004 > Re : JSP cannot find class









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re : JSP cannot find class
Manu Mahendru

2004-11-21, 8:56 pm

The TimeFormatterBean class you are using must be in a package created
by you. I believe that's a requirement beginning with JDK 1.4.

1.. Add the first line : "package myPack;" in the TimeFormatterBean
class.
2.. Save it in a directory/folder called "myPack".
3.. Compile it.
4.. Copy the compiled "TimeFormatterBean.class" file to the directory
"/WEB-INF/classes/myPack/"

Then,
5.. In your JSP, change the line :
"<jsp:useBean id="formatter" class="TimeFormatterBean"/>"
to
"<jsp:useBean id="formatter" class="myPack.TimeFormatterBean"/>"

Should work!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com