在前台要调用一个函数(该函数属于后台的类),框架是spring 。

解决方案 »

  1.   

    ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
    TextTable tt=(TextTable)context.getBean("frame");
    tt.showMesg();
      

  2.   

    该类是否受到Spring管理?
    如果是的话,很简单,调用Spring提供的API。
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
    UserService userService = (UserService) ac.getBean("userService");这样就可以获取到你的Service类。
    没分了,大哥请给点分吧。