您的当前位置:首页正文

Jquery+ajax+JAVA(servlet)实现下拉菜单异步取值_jquery

2020-11-27 来源:好走旅游网
首先来看工程结构图:

项目所需要的包,如下所示:

JSP代码:

<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
 String path = request.getContextPath();
 String basePath = request.getScheme() + "://"
 + request.getServerName() + ":" + request.getServerPort()
 + path + "/";
 System.out.println("basePath="+basePath);
%>



JsonCase

关于servlet的web.xml配置:

<?xml version="1.0" encoding="UTF-8"?>

 
 This is the description of my J2EE component
 This is the display name of my J2EE component
 ValueGetController
 servlet.ValueGetController
 

 
 ValueGetController
 /ValueGetController
 
 
 
 
 
 index.jsp
 

显示全文