• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Displaying Static content in JSP page in Spring MVC

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to display static contents in the Webpage: But getting the error as below: Can any one of you please help me out?
I got this error especially after adding the <annotation driven > in application-context.xml


1) web.xml



2) Application Context.xml


3) Folder structure:

Webcontent
meta-inf
resources
images
sample.jsp

web-inf

[b]4)Homepage.jsp


<body>
<img src="<c:url value="/resources/images/sribala.jpg" />"/>

<table class="ex" cellspacing=10 cellpadding=10 width="100%">
<tr>
<td width="40%">
:
:
</body>


[/b]
 
meera harikrishna
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Additional Information:

if i remove the <annotation-driven> tag, then i get the 404 error



Folder structure: ( was not properly aligned in the previous message)



Thanks in advance!
 
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has nothing to do with displaying static content in a page. It has everything to do with the fact that <mvc:annotation-driven> turns on, among other things, JSR-303 validation support in Spring MVC. To support that, you need a JSR-303 implementation such as Hibernate's validation in the classpath. If you read the error, that's what it's saying.

When you remove <mvc:annotation-driven> you turn off Spring MVC's ability to map requests to controllers using annotations. Thus, the request you submit is not tied to any controller and you get a 404.

 
reply
    Bookmark Topic Watch Topic
  • New Topic