• Post Reply Bookmark Topic Watch Topic
  • New Topic

Does anyone know how to import or call a standalone java class in a jsp page

 
L John
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to use a standalone java class in my JSP page, but I keep getting an error message below.

C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\gcssDataSource\datasourceList_jsp.java:7: '.' expected import DatasourceMonitor;

I have DatasourceMonitor.class in my WEB-INF/classes directory. If anyone knows how to import or call a standalone java class in a JSP page, please let me know. Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
 
L John
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The class is not in a package. Could you tell me what do I need to do so that the class loader would find it? Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put it in a package. That's just good Java style in general, and required to work in the web app environment.
[ June 14, 2004: Message edited by: Bear Bibeault ]
 
L John
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see. Thank you so much for your help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!