Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Requested resource not available.

 
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]
 
Sheriff
Posts: 4645
300
IntelliJ IDE Clojure 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
Sheriff
Posts: 4645
300
IntelliJ IDE Clojure 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
Sheriff
Posts: 4645
300
IntelliJ IDE Clojure 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

 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!