File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tomcat return an error +mvc

 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends I am developing simple mvc using request dispatcher ,here what i am going to do is I am developing Inventory Management system using mvc and jsp as view servlet as controller and beans as model,I have written a few class file and got the following error
Error

these are my codes
Database.java

cashierDetails.java

cashierServlet.java

web.xml

cashierRegistration.sjp


any idea ..
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP Status 404 - /testing-cashier/cashierDetails

Where is cashierDetails mapped?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. Generating HTML in a servlet? This is no longer 1997. Why are you not using a JSP for the view?
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your replyy cashierDetails contains methods to insert user entered parameters like username,password into user table and it will insert user_id into cashier table
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You didn't answer my mapping question.
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my servler file i have create new object for cashierDetails and i called some methods like AddcashierUser and Addcashier(correct me if i am wrong)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You keep answering every question except the one I am asking.

Where is the mapping?
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may be i can say sorry before asking this ..i am not getting what you are asking for? mapped means ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A servlet must be mapped before it can be addressed. You already have one mapping in your deployment descriptor -- any servlet you wish to directly address must have a mapping.
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay,but cashierDetails is not a servlet? right,
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then why would you be trying to address it via URL?

You've provided a lot of code, but not any detail on what you are trying to accomplish or how.
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually servlet is calling that class and methods( i have written in cashierServlet) here what i am trying to do is i want to insert into a data into a table named user(tables are already created in mysql) and cashier_details by using entered parameters( like username,password), in servlet i am using request.getParameter("username") and request.gerParameter("password") by using this i am calling AddcashierUser and Addcashier from cashierDetails class(i have written mysql statements to insert data into user and cashier_details tables) todo mysql quiries
 
Nick Potter
Ranch Hand
Posts: 126
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


How does this compile?
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh...by default given by IDE,'s ,i commented that lines then also its not working
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i did some modification to my codes and got the error which says
Error

here is the source-code for cashierDetails.java

hee is code for cashierServlet.java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic