Currently i am using ecllipse galileo 3.5.2 , Java-Open-JDK-1.6, Tomcat 6.0.29 as app server,Oracle 10g XE DB in Ubuntu 10.10. I am running a sample servlet to list the employee details from the DB.I have set the configuration parameters in Deployment Descriptor for the connection str,user id and password to access the DB.
I am accessing these parameters through the following code in the servlet .
But i am getting the following Exceptions in the Console on executing the Servlet -
I tried checking out the Marked errors in Markers window in eclipse and tried again . Then also the same above exceptions are coming but the output is getting printed to the browser.
-> And also another point that i wanted to know is -> How to get sample data for tables like EMPLOYEE in Oracle 10G XE as there is no sample data present for it when i searched for data in the DB?
Isn't the ServletContext where one gets the initialization parameters?
So you would do:
Joined: Aug 27, 2010
Sorry , being a newbie i have not got much idea what to post where, Anyways - I have resolved that issue by giving the url,user-id,password in <init-param> section of the servlet in web.xml but still need to know why setting the same values in context-param section dint work . Will check that out in servlet forum .