i'am working on an application with springmvc, i was wondering how can i inject a sping service in my jsp page.i've tried somethings but its doesn't seem to work
my service look like that :
@Service
@Transactional
public class CompteMarcheService {
@Autowired
private Compte_ProjetRep service;
public int test()
{
return 10;
}
and what i've added in my root-context
<bean class="
org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="exposedContextBeanNames">
<list>
<value>CompteMarcheService</value>
</list>
</property>
</bean>
and finaly , the jsp page
<c:set var="clients" scope="request" value="${CompteMarcheService.test()}"/>
but when i try to display the clients var like that : ${clients} i get empty field , any help please i need to know how to inject correctly my service
thanks.