• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • 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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic