aspose file tools*
The moose likes Servlets and the fly likes tomcat return an error +mvc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "tomcat return an error +mvc" Watch "tomcat return an error +mvc" New topic
Author

tomcat return an error +mvc

Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

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

Joined: Jan 10, 2002
Posts: 61756
    
  67

HTTP Status 404 - /testing-cashier/cashierDetails

Where is cashierDetails mapped?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

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

Joined: Sep 14, 2009
Posts: 114

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

Joined: Jan 10, 2002
Posts: 61756
    
  67

You didn't answer my mapping question.
Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

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

Joined: Jan 10, 2002
Posts: 61756
    
  67

You keep answering every question except the one I am asking.

Where is the mapping?
Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

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

Joined: Jan 10, 2002
Posts: 61756
    
  67

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

Joined: Sep 14, 2009
Posts: 114

okay,but cashierDetails is not a servlet? right,
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

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

Joined: Sep 14, 2009
Posts: 114

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

Joined: May 07, 2008
Posts: 126


How does this compile?
Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

oh...by default given by IDE,'s ,i commented that lines then also its not working
Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat return an error +mvc