what is it giving a nullpointer on?
if it's on the dbUrl, try with
("dbURL"), since in your call you use lowercase letters, but in your xml uppercases.
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
i am using net beans 6.8 and in that there is no file named web.xml rather it has sun-web.xml, also its content are not same as like in net beans' earlier versions. iit don't have init parameter like and i want to use filter and i have to make changes web.xml but it not work when i make changes own my own in it. why this difference will overcome?
That will be down to the fact that you are using NetBeans that is coming with GlassFish as default Java container(server) instead of Tomcat. Take my advise, relay more on knowledge then your IDE.
@anand01 do you think you could create ZIP file of your project and attach it here? If you have git/bitbucket or similar account just post link to source. Also you may want to check your project folder structure and names. (Looks like you reused MVC tutorial in JSP section and made mistake somewhere, otherwise you would be getting these values)
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
Sorry for delay.
My MVC tutorial was written long time ago before I become friend with IntelliJ so I did direct development in Tomcat webapps where I created project folder there.
Trying to solve your issue through IDE and folder structure you have, I had to change web.xml servlet-class definition to
<servlet-class>Servlet.LoginServlet</servlet-class>
and removed anotation from LoginServlet
@WebServlet("/Controller/Login")
after that I was able to read data from config. Let me know if you still have some problems. (If I get more time I may try to create this tutorial with Hibernate)
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902