开发者

AJAX Call before jsp:include in same jsp

I need know to execute one ajax function before than one jsp:include puts in s开发者_JAVA技巧ame jsp.

I try put one session parameter with this ajax function, this parameter is used for include, but first jsp execute include and parameter is not put and imposible to use.

Someone know fix my problem?, thanks guys!


AJAX and JSP are completely different technologies and are run on different systems and at different times.

JSP processors are executed when the page is generated, i.e. on the server side. AJAX functions are triggered in the browser by Javascript (hence AJAX) which is available after the page has been generated (using JSP) and delivered.

If the AJAX function triggers a JSP on the server side, the JSP or Servlet should read the needed parameter from the request first (the AJAX call would put it there), e.g. by accessing the implicit request object in an expression within the <jsp:include> tag.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜