• 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

database connectivity and Beans on Java Web Server

 
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 trying to run a JSP site on Java Web Server-- The jsp support is available. But the JSP files which require JDBC connectivity are not running --they give an error as follows:
************
500 Internal Server Error
Java Server Page Translation Error
Error during compilation :
check.java:96: Method setAttribute(java.lang.String, java.lang.String) not found in interface javax.servlet.http.HttpSession.
***********
Also, my beans(java class files) that are stored under 'servlet' directory on the Java Web Server are not working, the beans used to establish a database connection and fetch some data are not able to do so.
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
With version 2.1 of Servlet API, you may have to use
putValue(String name, Object obj) instead of
setAttribute(String name, Object obj) and getValue(String name) instead of getAttribute(String name).
Regards,
Suresh Selvaraj
 
Is this the real life? Is this just fantasy? Is this 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