python的作用域 gbel_(急~~~!)EL表达式怎么取动态作用域变量

package com.struts;

import org.apache.struts.action.ActionMapping;

import org.apache.struts.action.ActionForm;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForward;

import org.apache.struts.action.Action;

import java.util.*;

import com.dao.*;

import com.bean.*;

public class detailsAction extends Action {

public ActionForward execute(ActionMapping mapping, ActionForm form,

HttpServletRequest request,

HttpServletResponse response) {

detailsForm detailsForm = (detailsForm) form;

String type = request.getParameter("type");//执行类型

String id = request.getParameter("infoid");//取得的参数变化

String typediv = "";//根据这个值确定一个页面显示的内容

if (type.equals("indexnotice")) {//显示所点击的公告信息

//调用方法返回结果List

List notPGroups = DAO_ParentGroups.doSelectParentGroups

(" and Pg_Topic=(select Ct_Id from Topic where Ct_Name='产品中心')");

List notInfo = DAO_DetailsInfo.doSelectDetailsInfo(" and di_Id=" + id);//显示点击的产品详细信息

for (int i=0; i

int j = i + 1;

Vo_ParentGroups pgroups = (Vo_ParentGroups)notPGroups.get(i);//类型转换为一个数据Bean类

int diId = pgroups.getPgId();//取得Bean的一个编号

List subGroups = DAO_Groups.doSelectGroups(" and Cg_Parent=" + diId);//根据Id查找

request.setAttribute("subgroups"+j,subGroups);//动态的设置作用域

}

request.setAttribute("notgroupslist",notPGroups);

request.setAttribute("notinfo",notInfo);

typediv = "indextopic";

}

if (type.equals("indexsovle")) {//显示所点击的解决方案

typediv = "indexsovle";

}

if (type.equals("indexnews")) {//显示所点击的新闻信息

typediv = "indexnews";

}

if (type.equals("indexproduct")) {//显示所点击的产品信息

typediv = "indexproduct";

}

if (type.equals("indexsuccase")) {//显示所点击的成功案例

typediv = "indexsuccase";

}

request.setAttribute("typediv",typediv);

return mapping.findForward("topic");

}

}

<%@ page contentType="text/html; charset=GB2312" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

 

${parentgroups.pgName}

${gnum.count}

暂无分类!

 

请教各位大侠~!在JSP中怎么取得在action中动态设置的request作用域变量~!急啊~!

分享到:

sina.jpg

tec.jpg

2009-02-14 11:42

浏览 1016

论坛回复 / 浏览 (0 / 1368)

评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值