Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ajax¡¢strutsÎÊÌâ - Java / Web ¿ª·¢

Çó¶Îjsp½Å±¾ÓÃajaxÌøµ½actionÖÐ ²éѯÍêÒÔºó ÔÚ´Óaction·µ»ØajaxÏêϸ´úÂë ¾ÍÊÇÒªÇóÒ³Ã治ˢÐÂ
Ò³Ã涨ÒåÒ»¸ödiv£¬¼ÙÉèidΪtest¡£»Øµ÷º¯ÊýÀïÃæÖ±½Ó document.getElementById('test').innerHTML=responsetext;
struts2µÄºóÃæµÄ£º

package com.vmkid.iplug.busserver.action;

import java.io.PrintWriter;
import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

import com.opensymphony.xwork2.ActionSupport;
import com.vmkid.iplug.busserver.common.OptionBean;
import com.vmkid.iplug.busserver.dao.OptionBeanDAO;

public class AjaxGetTypeAction extends ActionSupport implements
ServletRequestAware, ServletResponseAware {

private static final long serialVersionUID = -7935648568639117966L;

private HttpServletRequest request;

private HttpServletResponse response;

public void setServletRequest(HttpServletRequest request) {
this.request = request;
}

public void setServletResponse(HttpServletResponse response) {
this.response = response;
}

public String execute() {
String pTypeId = request.getParameter("pTypeId");
ArrayList<OptionBean> lst;
try {
lst = OptionBeanDAO.getTypeLst(pTypeId);


Ïà¹ØÎÊ´ð£º

JAVAµç×Ӵʵ䣿 - Java / Java SE

¸÷·´óÏÀ¸ø¸ö˼·£¬²»ÊÇÔÚÏßµÄÄÇÖÖ£¬¾ÍÊÇÒ»¸ö×öÆÕͨµÄÓ¦ÓóÌÐò¡£


´Ê¿âÔõôÉú³ÉÄØ£¿

²»»á¡£

ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
ÕÒ±¾×Öµä

ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
Êý¾Ý¿â ºÇºÇ

ÓÃmap ¼üÖµ¶ÔÓ¦

Èç¹ûÓÃÊý¾Ý¿ ......

FCKÉÏ´«Îļþµ½linux·þÎñÆ÷ÎÊÌâ - Java / Java EE

ÇëÎÒÓÃFCKÉÏ´«Îļþ,ÔÚ±¾µØµÄwindows»úÉϲâÊÔ¿ÉÒÔ£¬µ«²¿Êðµ½linux·þÎñÆ÷ÉϾÍÉÏ´«²»ÁËÎļþ£¬ÉÏ´«Îļþʱһֱ¿¨ÔÚÄÇÀï¡£Íû¸÷λ´óϺָµã£¬Ð»Ð»£¡
·¹ý£¬°ïÄ㶥һÏ¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£

ÉÏ´«ÎļþµÄ·¾¶ÎÊÌ⣬ ......

jspÐÂÊÖ,Çë½Ì¸÷λ? - Java / Web ¿ª·¢

³ÌÐòÈçÏÂ:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page language="java" %>
<%@ page import="com.mysql.jdbc.Driver" %>
<%@ page import ......

javaÖд«Öµ - Java / Web ¿ª·¢

¾ÍÊǼòµ¥µÄ´«ÖµºÍÈ¡Öµ
ÇëÎÊÂ¥Ö÷ÏëÎÊʲô£¿

jspÒ³Ãæ²ÉÓÃ±íµ¥»òÕßjavabean´«Öµ¶¼¿ÉÒÔ£¬Ê¹ÓÃrequest.getParameter()»ñµÃʹÓÃ±íµ¥´«¹ýÀ´µÄÖµ¡£

ÎÊÎÊÌ⣬ÏÈ°ÑÎÊÌâ˵Çå³þµã£¡£¡ ÎÊÌâÌ«Ä£ºý£¡£¡

ÎÊÎÊÌ⣬ÏÈ°ÑÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ