Onload can fire early when using jsp dynamic includes?

南楼画角 提交于 2019-12-12 01:31:04

问题


When a jsp page includes jsp dynamic includes...

<jsp:include page=”filename.jsp” /> 

...is it possible that the document onload event (or prototype's dom:loaded event) could get fired too early? (i.e. before the included filename.jsp has fully loaded)

The reason I suspect this may be the case is that the included file is compiled separately and only included by directive at runtime. The parent jsp might assume that loading of the directive itself is sufficient to consider the DOM is loaded - the includes page is loaded asynchronously and its loading is might not be monitored by the document.

Is this a valid concern?

Thanks in advance


回答1:


This is included serverside, not clientside. It's certainly not asynchronously. The client receives one response. Rightclick page and view source. It's all plain HTML.

If you have problems with onload, it lies somewhere else. Verify/validate the generated HTML output.



来源:https://stackoverflow.com/questions/2702780/onload-can-fire-early-when-using-jsp-dynamic-includes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!