• Post Reply Bookmark Topic Watch Topic
  • New Topic

can not figure out what is the problem

 
rakesh kadulkar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am trying to put the DSN nane in the web.xml as a context init param..ok my web.xml is

web.xml :

what o was doing is,
i am using a servlet context listener which will read the dsn and use it to create a database connection...
The listener class is:


and the DBConnect class is:

//DBConnect.java


and my servlet is
//student.java


My plan was to use the context initialization parameter to create the database connection.
Tha application compiles well..

and the form.html is


and the view.jsp is:


The application i have deployed in the webappa in the tomcat directory and when i try to invoke the form.html which in the student directory which is under webapps i get 404 error.

The command i use is http://localhost:8080/student/form.html

and when i went to manager i found that application running is false and when i try to start it again gives the same error

what is the problem...

i am attaching the entire application with the database try to resolve the problem because as SCWCD i am not able to solve the problem yet and thats hurting me....















 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i get 404 error

This means a resource is not found. So presumably you are serving nothing at /student/form.html. Have you configured your web app to use the root context?


Also, why are you using a DSN? Are you using Microsoft Access?

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too much unformatted code, won´t read closely. Please post only the relevant code in code tags.
rakesh kadulkar wrote:
i get 404 error.

Either the URL is wrong (it´s case sensitive!), or the resource actually isn´t there in the webapp structure where you think it is.
 
rakesh kadulkar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys the error is solved ..notice my web.xml last closing tag was not proper

well thanks for the concern
bye
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, since Paul Sturrock edited your message to add code tags, I can spot the fault in the web.xml.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!