<jsp:include page="url" flush="true">
应该只能用相对url吧
就是说你应该把jsp container和IIS整合在一起
应该只能用相对url吧
就是说你应该把jsp container和IIS整合在一起
解决方案 »
- 怎样读取当前浏览器中已修改的网页内容(急,在线等),标题要长。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
- 新手入门.多多指教!!
- 如何在jsp页面中进行button按钮传参
- js问题,window.parent.XXX 为空或不是对象!
- JS 烦躁的错误!求助!
- 兄弟们谁遇见过这个一样?Can't create a new thread (errno 12)
- 各位仁兄 请问如何在网页中实现文件的下载,高分相送,谢谢啦。!
- 首次用到excell,poi还是jxl,哪个好呢?
- hibernate的问题
- javaBean编译小问题,我是菜鸟!
- 经测试,发现form传值中……
- public Object getAttribute(String name)这一API是做什么用的?
他这段文字说的意思是你用<%@include file="filename"%>只能是include一个文件,这个文件必须是静态的,例如html或txt;如果你使用<jsp:include page="./news.jsp" flush="true" />他include的是一个URL,也就是说是JSP或ASP执行的结果(其实也是一些HTML),只不过它是在JSP执行的时候才include,而前种方法是编译的时候就include的了,而且不能变了。
Includes a static file or the result from another web component. JSP Syntax
<jsp:include page="{relativeURL | <%= expression %>}"
flush="true| false" />or <jsp:include page="{relativeURL | <%= expression %>}"
flush="true| false" >
<jsp:param name="parameterName"
value="{parameterValue | <%= expression %>}" />+
</jsp:include>
看到了吗?
page="{relativeURL
整合你的IIS和jsp服务器到同一个ip:port吧
http://202.118.45.92/sendsms.asp
成功后才包涵到jsp里面
The <jsp:include> element allows you to include either a static or dynamic resource in a JSP page. The results of including static and dynamic resources are quite different. If the resource is static, its content is included in the calling JSP page. If the resource is dynamic, it acts on a request and sends back a result that is included in the JSP page. When the include action is finished, the JSP container continues processing the remainder of the JSP page.
(注:-->表示调用)
<jsp:include>-->JspRuntimeLibrary.include(request, response, url)-->
RequestDispatcher rd = request.getRequestDispatcher(resourcePath);
rd.include(request, new ServletResponseWrapperInclude(response, out));
request.getRequestDispathcher()返回的RequestDispatcher是来自ApplicationDispatcher的一个实例.注意到没有,实际上,include最终执行的是RequestDispatcher。
在tomcat中RequestDispathcher调用ApplicationDispatcher和include,好,重头戏到了这个,那么我们来看看ApplicationDispatcher是怎么执行的
include-->doinclude-->invoke-->
String jspFile = wrapper.getJspFile();
if(jspFile != null)
request.setAttribute("org.apache.catalina.jsp_file", jspFile);
else
request.removeAttribute("org.apache.catalina.jsp_file");
servlet.service(request, response);
最终还是对当前的web服务器提交了一个service请求,从上面可以看出用tomcat是实现不了的,如果你的web服务器在内部支持对asp的解析,那么servlet.service方法就可以成功执行,这样的话可以达到你的目标。
当然,不同的web服务器其具体的实现方式不同,但一般大同小异。
你所要求的目标从原理上讲可以,但现行的web服务器有没有支持的我就不清楚了。