在jsp中取到action中传来的值并修…

来源:互联网 发布:sql join union 编辑:程序博客网 时间:2024/04/29 12:22
<%
    Strings_course=      (String)ActionContext.getContext().getValueStack().findValue("course_introduction");
   if(s_course.length>10)
     s_course = s_course.subString(0,10);
   
   System.out.println("+++++++++++++++++++++++++     "+s_course);
%>

通过ActionContext.getContext()获得上下文对象,再通过getValueStack()获得值栈,在值栈中findValue("course_introduction")获得action中传来的值,之后就是你自己想要的操作了。
0 0
原创粉丝点击