Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ControllerServlet Not found

 
John Koe
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a website www.simbiz2010.com when I try to press the login button on the leftcol it shows 404 Not Found- The resource requested could not be found on this server!

Please help as I don't know what is going on.. i have the web.xml allright I think so I don't really know what I'm missing.

Thanks very much.

regards,
J
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please TellTheDetails. It's hard to know what's going on without any details, tell us what are the components involved, mappings, how you invoke the servlet etc..
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the relevant parts of the web.xml file, and tell us which URL you're trying to access, and the name of the web app context.
 
John Koe
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

website address is www.simbiz2010.com
The web is loading fine.. but when I click on the Login button it is said www.simbiz2010.com/ControllerServlet 404 NOT Found

I have public_html\WEB-INF\classes\ControllerServlet.class

This is my web.xml



Thank you.
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your WEB-INF should be directly inside the web application folder. And the web.xml should be directly inside the WEB-INF.
 
John Koe
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. I've already done that.

It works fine in my localhost:8080/

But when I deploy it in the actual web server it shows that 404 error.

Thank you.

Vijitha Kumara wrote:Your WEB-INF should be directly inside the web application folder. And the web.xml should be directly inside the WEB-INF.
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Koe wrote:Yes.. I've already done that.
It works fine in my localhost:8080/

public_html\WEB-INF\classes\ControllerServlet.class

What is the name of the context then?
 
John Koe
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://localhost:8080/Simbiz2010/ if I open it from my PC

as in the web server I just put it in the root (/public_html)

Thanks.

 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the application server you are running? I suggest you put the application as a separate one.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Koe wrote:as in the web server I just put it in the root (/public_html)

That's unlikely to be the right place for a web app. What kind of server is this - does it actually support Java web apps?
 
John Koe
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is UNIX apache with tomcat 5.5 installed.

But the jsp is loading fine.. so does this mean the server does not support the servlet ?
is the jsp and servlet are two different things ? ( if jsp is loading fine than the servlet should also be working ?)

sorry this is the first time I use jsp.

THank you.

 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Koe wrote:It is UNIX apache with tomcat 5.5 installed.
But the jsp is loading fine.. so does this mean the server does not support the servlet ?

As you are using Tomcat 5.5, It supports Servlet 2.4/JSP 2.0.
is the jsp and servlet are two different things ?

Well, JSP is actually converted in to a servlet eventually. You will find lots of information on that on our FAQ's section as well as on the web.
Now where exactly you have put your web app in the server (that should be under the "webapp" directory of Tomcat) ?
 
Mourouganandame Arunachalam
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
based on your web.xml, you should keep your ControllerServlet class under the package controller (ie., ..\WEB-INF\classes\controller)
 
azhar jodatti
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey john...

you are getting this problem becuase your directory structure is not following the spec....

you kept your class direclty in classes folder under web-inf... and in DD you are telling that your class is in controller package... if you have used package in your class then just keep your .class file in package name controller and your problem wil get solved...


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic