• Post Reply Bookmark Topic Watch Topic
  • New Topic

problems with embedding java in jsp

 
i o brien
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having difficulty running java files from my jsp. I have compiled my two java classes and inserted them onto my server in the webapps/WEB-INF/classes/scripting directory and have imported scripting.* into my jsp page. The files both compiled ok before the class files were loaded onto the server but when I try to run the jsp from the server, I keep getting a compiler error. Thanks in advance
Iob
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming the error you get is a class not found, and assuming you spelled the class names right and used the right format in the import,
the next thing to look at is how you try to use them in the code. Are these being use with useBean?
Bill
 
Curt Combar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are the classes referenced as being within a "scripting" package - as in "import scripting.foobar"? If so, .java files should have "package scripting;" at the top of them.
Curt
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!