• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

The origin server did not find a current representation for the target resource

 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear experts,

I run into this error which I have been solving for hours but to no avail.

Hope someone can give m a clue how to diagnose on this problem and how to go about resolve the error.

The error is :

HTTP Status 404 - Not Found
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

This is the first time I got this error.  Please help.
Tks.
 
Saloon Keeper
Posts: 5573
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems you forgot to tell us anything at all about the context in which you saw this message.
 
author & internet detective
Posts: 39343
755
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
404 means page not found. So you have the wrong URL, your page isn't up, your app isn't started. It could be anything. We will need more info to be helpful.
 
tangara goh
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:It seems you forgot to tell us anything at all about the context in which you saw this message.



Sorry but here's the infor :

Eclipse Neon 3
Java 8
Java EE 3.0
Tomcat 8.0.25

Here's my web.xml :


jsp :

<form name="tutorRegister" method="POST" action="${pageContext.request.contextPath}/addTutor" id="contactForm" novalidate>

Sevlet ;


@WebServlet("/tutorController")
public class tutorController extends HttpServlet {


Hope you could tell me where have I gone wrong.

Tks.  
 
Tim Moores
Saloon Keeper
Posts: 5573
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which URL are you trying to access? What is the name of the web app?
 
Sheriff
Posts: 21759
102
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your form action is /addTutor but you haven't defined it anywhere. Your servlet is mapped to /tutorController, and you don't have any servlets in your web.xml file.
 
tangara goh
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Rob Spoor wrote:Your form action is /addTutor but you haven't defined it anywhere. Your servlet is mapped to /tutorController, and you don't have any servlets in your web.xml file.



Hi Rob,

From my understanding, if Java EE 3.0 and above is used, as in my case, then there is no need to define servlet in web.xml.

Can you tell me where about should I put /addTutor in the web.xml ?

Hope to hear from you soon.

 
Tim Moores
Saloon Keeper
Posts: 5573
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to add anything, but you do need to have matching names - either "addTutor" or "tutorController", but not declaring one and then using the other.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!