Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Spring Basics Creating Controllers and Views Using Thymeleaf to Serve HTML

Blake Larson
Blake Larson
13,014 Points

localhost refused to connect

What does this error usually? I got it after creating a new resources package for the home.html for Thymeleaf to render.

1 Answer

Alexander Nikiforov
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 Points

Could you push your project on GitHub?

It is very hard to say where the error see without seeing your code ...

Because this way I can find the error very fast.

The easiest way to do it:

I. Register on GitHub. If you don't have account there, today is a good day to create one :)

II. Login to GitHub account in Intellijidea. You basically should enter your credentials in GitHub Intellijidea dialog. Check this link:

https://www.jetbrains.com/help/idea/2016.2/registering-github-account-in-intellij-idea.html

III. 'Share project on GitHub'. One click, check here:

https://www.jetbrains.com/help/idea/2016.2/publishing-a-project-on-github.html

And just in case, here also one helpful page:

https://www.jetbrains.com/help/idea/2016.2/using-github-integration.html

Coming back to your error after googling gives nothing, other than may be you haven't started the server at all, or port number is wrong. Again hard to say need to see the files. Error is saying that there is no server or app or anything on localhost, or your app is not running ...

Also please type exactly what page are you loading. By default with port 8080, should be :

http://localhost:8080

Or just

localhost:8080

should work if Spring bootRun is working

Hope you are running the same command ...

It may also be that port 8080 is busy, but that you should see in your log, that you haven't show...

So it could be nice if print log file here...

But again, the best option is for you to push project on GitHub, so that I can download it and say whether it works on my machine ...