Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Requested resource not available.  RSS feed

 
Shubham Semwal
Ranch Hand
Posts: 176
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
index.jsp


HelloWorldController.java


web.xml


spring-servlet.xml


hellopage.jsp


The request is going to url - http://localhost:10025/SpringMVC/hello.html >> resource not available.
It should go to HelloWorldController.java .

Please suggest.
Thanks

Selection_005.png
[Thumbnail for Selection_005.png]
 
Tim Cooke
Marshal
Posts: 3872
233
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you spot the difference?

<a href="hello.html">Click here

@RequestMapping("/hello")
 
Shubham Semwal
Ranch Hand
Posts: 176
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:Can you spot the difference?

<a href="hello.html">Click here

@RequestMapping("/hello")


So should I change hello.html to hello ? it's still not working. I already tried that.
new url - http://localhost:10025/SpringMVC/hello

I'm learning from this example - javatpoint
 
Tim Cooke
Marshal
Posts: 3872
233
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh yes, ignore my previous suggestion. It's wrong.

You have a spelling mistake in your controller. Can you see it?
 
Shubham Semwal
Ranch Hand
Posts: 176
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes.. corrected. Still of no use.
 
Tim Cooke
Marshal
Posts: 3872
233
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You haven't provided all of the controller class so can you say what package it is in?
 
Shubham Semwal
Ranch Hand
Posts: 176
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the attached directory structure.
Controller -> inside src.
index.jsp -> inside webContent.
xml files -> inside webContent/web-inf
hellopage -> inside webContent/web-inf/jsp

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!