views:

244

answers:

1

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

+2  A: 

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.

BalusC
yeah you're right - I didn't think my question through before I wrote it
plodder