• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

calling a class from jsp: JWS

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ..
I'll check that out
 
Morning came much too soon and it brought along a friend named Margarita Hangover, and a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic