• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

HTTP Status 404

 
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know what is HTTP Status 404 but I have an  xhtml page into my Spring Boot project, when I click play button in my Netbeans to run project the browser is opened with this error. I don't see message error in tomcat log.
Tomcat log:

Thanks in advanced.
 
Bartender
Posts: 15737
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cezar Apulchro wrote:I don't see message error in tomcat log.


I do.
 
Cezar Apulchro
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know why I chose thymeleaf when I generated my spring boot project, now after remove thymeleaf dependency from pom file I am getting the following error:
 
Stephan van Hulst
Bartender
Posts: 15737
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Listen Cezar, you need to make it more easy for us to help you. The error message says that your main class can't be found. Obviously, without knowing anything about your application, I'm going to ask you where your main class is, what it looks like, and what command you are using to run the application. You could have given this information without me asking for it.

Please don't forget that YOU must do your research and solve your own problem. We're just here to help you on your way. Right now it feels we are doing all your work for you.
 
Cezar Apulchro
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To execute my application I click play button in my Netbeans below is my class:
 
Cezar Apulchro
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solution for last problem was, delete the project, uninstall Apache Netbeans 12.6, install Apache Netbeans 13, create new Spring Boot project but Status 404 still continue.
Class entity:

Repository:

Controller:

html:

Thanks.
 
Cezar Apulchro
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Execution of project:
 
Cezar Apulchro
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is last alteration of my controller and I still receiving whitelabel error page status=404, where am I wronging?
Controller:

Log:

I appreciate any assistance.
 
Saloon Keeper
Posts: 28424
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What URL are you using?
 
Cezar Apulchro
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Stephan van Hulst
Bartender
Posts: 15737
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears that you want to use JSF in your application. Did you configure a servlet mapping, i.e. which URLs are handled by FacesServlet?
 
Tim Holloway
Saloon Keeper
Posts: 28424
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a horrible mish-mash. Yes, the early stuff is JSF, and the URL is JSF-like, but the later code is Web Services and there's no way that particular bean is mapping to the JSF-like URL.
 
Cezar Apulchro
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem still the same.
xml file:
 
Cezar Apulchro
Ranch Hand
Posts: 698
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I accept that this is a mish-mash, tell me where are my error.
 
Stephan van Hulst
Bartender
Posts: 15737
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let's start from the beginning. It's best if you discard your project and start from scratch.

You have to make a very important decision at the start of your project, because it influences all aspects of how you develop your application:

  • Do you want Spring to manage your beans, and use a Spring provided EL resolver in your page templates, or
  • do you want JSF to manage your beans, and use Spring only to bundle a servlet container with your application?

  • If you don't know the answer to this question, you don't know enough about either Spring or JSF.
     
    Tim Holloway
    Saloon Keeper
    Posts: 28424
    210
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    -- Deleted text - posting for an unrelated thread was misfiled. Sorry about any confusion. --
     
    Cezar Apulchro
    Ranch Hand
    Posts: 698
    3
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi thank you by contact, really you're right, I'm really lost with my project, because in all the definitions I made I got 404 status, there were already three or four projects created, persistence in netbeans, spring boot in netbeans, dynamic web in eclipse, spring boot in eclipse and I don't remember anymore. I simply want to take a mysql table and load it into a primefaces table to load in the browser.
     
    Tim Holloway
    Saloon Keeper
    Posts: 28424
    210
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    And in every one of those attempts, you depended on an IDE to do your thinking for you.

    An IDE cannot replace an Intelligent Developer. When you don't know what you're doing with the IDE, then the IDE isn't an assistant, it's a crutch. And not a very good crutch, either.

    You really need to sit down and learn servlets, Tomcat, JavaServer Faces, Spring, Spring Data just to start with. That would give you enough to design, understand and diagnose a webapp that would run in a basic JEE server such as Tomcat.

    Putting it in Spring Boot is yet another level of nightmare, and until you can understand a webapp that runs outside of Spring Boot, you will be hopelessly lost making it run inside Spring Boot,
     
    Cezar Apulchro
    Ranch Hand
    Posts: 698
    3
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Ok I understand and I'll change my project.
     
    You got style baby! More than this tiny ad:
    Smokeless wood heat with a rocket mass heater
    https://woodheat.net
    reply
      Bookmark Topic Watch Topic
    • New Topic