• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling a class from jsp: JWS

 
Felix Devasia
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using Java WebServer. The problem is that I want to access a custom class and invoke a methord from it. I have put the class file in the same folder of my jsp files(public_html). But I get an error from the JSp page, as soon as it tried to instantiate the class. The error reads something like this:
Java server page translation error
Cannot resolve symbol:class<classname>
------
Is this a problem with classpath? Where shall I set the classpath for jws? Any help will be most appreciated.
Thanks in advance..
Regards,
Felix
 
Mat Robinson
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the standard web-app file structure.
<base> - HTML & JSP's
<base>/WEB-INF - config stuff (e.g. web.xml)
<base>/WEB-INF/classes - the java classes (*)
<base>/WEB-INF/lib - any library jars/zips
if you make sure that your class is properly packaged just drop it in the classes directory and it should be found.
Hope this helps,
Mat.
 
Khurram Shahood(SCJP2)
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi felix
plz read carefully this message when u r using a custom class u should make a context in java web server admin applet.in other case if u r using class in convention of java beans u will placed ur file in /sunexamples/beans/[Class File].
this is path and search sunexamples folder in ur JWS.
 
Felix Devasia
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ..
I'll check that out
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic