• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

problem in getting model data from spring controller to jsp

 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new to spring
in following class i added java.util.Date to ModelAndView

but it displays like as follows

this is the result
$(date)


my spring controller is as follows

public class SimpleControllerextends AbstractController{

public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception{
//here welcome is view name
ModelAndViewmav= new ModelAndView("welcome");
mav.addObject("date",new Date());
return mav;
}
}

my welcome.jsp file as follows

<HTML>
<HEAD>

</HEAD>
<BODY>
<H1>this is the result</h1>
<H4>${date}</H4>



</BODY>
</HTML>

whay do jsp page give me this error result
whaen i want actual Date should be Display
but it gives me

${date}

i think this is a EL expression
and i think the problem is because i am using tomcat 4.1 and it does not
support jsp 2.0 specifications

please help me in solving this problem


[ December 01, 2005: Message edited by: ganesh pol ]
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds about right...why don't you upgrade to the latest version of Tomcat?
 
ganesh pol
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but what to do if i do'nt wants to change it and do'nt use any tag library?
 
    Bookmark Topic Watch Topic
  • New Topic