File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes problem in getting model data from  spring controller to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Other Application Frameworks
Reply Bookmark "problem in getting model data from  spring controller to jsp" Watch "problem in getting model data from  spring controller to jsp" New topic
Author

problem in getting model data from spring controller to jsp

ganesh pol
Ranch Hand

Joined: Apr 29, 2005
Posts: 151
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 ]
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1209

That sounds about right...why don't you upgrade to the latest version of Tomcat?


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
ganesh pol
Ranch Hand

Joined: Apr 29, 2005
Posts: 151
but what to do if i do'nt wants to change it and do'nt use any tag library?
 
IntelliJ Java IDE
 
subject: problem in getting model data from spring controller to jsp
 
Threads others viewed
how to tell MultiActionController Command Object is Of type com.dss.ems.model.User
iterate an object in struts-2
Unable to Redirect to the On submitting a form
Struts 2.0.9 - Problem in following a hyper link
Spring MVC : {beanName.property} not working
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture