Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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: 4864
317
IntelliJ IDE Python Java Linux
  • 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: 4864
317
IntelliJ IDE Python Java Linux
  • 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: 4864
317
IntelliJ IDE Python Java Linux
  • 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

 
moose poop looks like football shaped elk poop. About the size of this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic