Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

database connectivity and Beans on Java Web Server

 
Advait Chitalia
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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.
 
Suresh Selvaraj
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic