![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
Alex-xi
hey!
展开
-
如何在js中请求servlet
1.window.location.href="DeleteServlet?sid="+sid; 2. location.href="DeleteServlet?sid="+sid;原创 2018-08-04 13:50:03 · 4626 阅读 · 1 评论 -
${pagecontext.request.contextpath}绝对路径理解
${pageContext.request.contextPath}是JSP取得绝对路径的方法,等价于<%=request.getContextPath()%> 。 也就是取出部署的应用程序名或者是当前的项目名称 比如我的项目名称是demo1在浏览器中输入为http://localhost:8080/demo1/a.jsp ${pageContext.request.context...原创 2018-08-04 23:16:01 · 2251 阅读 · 0 评论 -
classpath指定的路径简单解释
一、classpath路径指什么 只知道把配置文件如:mybatis.xml、spring-web.xml、applicationContext.xml等放到src目录(就是存放代码.java文件的目录),然后使用“classpath:xxx.xml”来读取,都放到src目录准没错,那么到底classpath到底指的什么位置呢? src路径下的文件在编译后会放...原创 2018-08-04 23:36:34 · 1470 阅读 · 0 评论 -
从客户端向服务端发起请求,调用功能方式:
1_通过表单向服务端发起请求 2_通过链接向服务端发起请求 3_Ajax向服务端发起请求 <form action="/BaseServlet/ServletDemo?method=addStu" method="post"> 用户<input type="text" name="username"/><br>原创 2018-08-08 18:54:18 · 1023 阅读 · 0 评论 -
js方法从json对象中获取特定值
//从json中获得key指定值 function getJsonValue(obj,name){ var result = null; var value = null; for(var key in obj){ value = obj[key]; if(key == na...原创 2018-10-23 10:48:25 · 19008 阅读 · 2 评论