Aleksey
Aleksey

Reputation: 487

Eclipse reports HTML warning for correct (as I assume) code

I have a servlet in my application which has its mapping, say “/hello”. Then I have a reference to this servlet in html page: <a href=”hello”>Hello</a>. Eclipse gives a warning for “hello” in html page, saying: “Resource not found: hello”. Anyway, when I start project, everything works. My project has standard Web project configuration. Why Eclipse gives such a warning?

Upvotes: 1

Views: 169

Answers (2)

user5456558
user5456558

Reputation:

If "hello" is a folder, is there a index.xy-file inside? If not, you have to add the suffix to your link. I assume that the hello folder/file is in the directory where the html-file is

Upvotes: 0

Jigar Joshi
Jigar Joshi

Reputation: 240928

Try replacing

<a href=”hello”>Hello</a>

with

<a href="/hello">Hello</a>

Note: change in quotes

Upvotes: 3

Related Questions