• Post Reply Bookmark Topic Watch Topic
  • New Topic

setting up a jsp page that imports a java class under tomcat

 
adekoya adekunle
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want a step by step guide on setting up a java class , jsp page under tomcat.

i want the jsp page to instantiate the java class and invoke a method in the java class.

i tried that but what i get is that the import statement in my jsp page cant resolve the java class name

i suspect i am not storing the java class file in the appropriate location under tomcat ?

any help ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are trying to put Java code into a JSP, you are over 8 years behind the times!

Java code should be in controllers and beans, and not in JSPs.

Perhaps this article might be a good place to start coming up to speed.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the above article carefully before proceeding with this post.
adekoya adekunle wrote:

i want the jsp page to instantiate the java class and invoke a method in the java class.

So that class is supposed to be a bean, i think .
adekoya adekunle wrote:
i tried that but what i get is that the import statement in my jsp page cant resolve the java class name

Take a look at Tomcat deployment .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!