• Post Reply Bookmark Topic Watch Topic
  • New Topic

working in java not in jsp

 
meeraa pillaii
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

my program is working fine as stand alone java

i remove main function and same program is not working as jsp

why it is so

getting error of class not found exception

Regard
 
arun nohwar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might not have imported the class in top of JSP page.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And class paths are very different for web applications than for stand-alone applications. Make sure you move any JARs your class is dependent on to the WEB-INF/lib folder, and any package/class hierarchy to WEB-INF/classees/.
 
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
Better yet, follow accepted best practices and leave the Java in a Java class and out of the JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!