directive « Include « JSP-Servlet Q&A





1. How to include jsp include directive in JspWriter    stackoverflow.com

I have my requirement like this

buffer.append("<table width="+tableWidth+" height="+tableHeight+">" +
"<tr>" +
"<td class="+cssTableBackGround+">" +
NBSP2+
"" +
"<img id='"+ID+"' border="+0+" src="+imageDown+" name='toggleImage'/> (\"javascript:simpleToggle('"+ADVANCED+"',) " +
NBSP2+
"<font class="+cssClass+"> "+
"Edit ChairPerson" +
"</td></tr></table>" +
"<div id='"+ADVANCED+"' style='background-color:#cccccc;display:none; overflow:hidden;height:95px;width:75%'>"+
"<%@ include file=\"advancedEpanded.jsp\" %>" ...

3. jsp include directive    coderanch.com

4. include file directive, how the included jsp file is built?    coderanch.com

Hi, I have 2 jsp files where one is included in the other: MAIN FILE: Test1.jsp Test1
Request URI: <%=request.getRequestURI()%>
Context Path: <%=request.getContextPath()%>
Servlet Path: <%=request.getServletPath()%>
Querry String: <%=request.getQueryString()%>
<%request.setAttribute("Current Date",new java.util.Date());%> [B]<%@ include file="/paramRequest.jsp"%>[/B] Included File aramRequest.jsp
Parameters in this request
<% java.util.Enumeration e = request.getParameterNames(); while (e.hasMoreElements()) { String paramName=(String)e.nextElement(); String [] paramValues=request.getParameterValues(paramName); %> ...

5. Difference between include directive and jsp:include    coderanch.com

can anyone explain how include directive and jsp:include work , 1)include directive will include page statically,ie if any change done to including page later will not reflect in including page . 2)jsp:include includes a page dynamically . ie whatever changes made in included page will reflect in including page . has this concept changed according to new specifications . has anybody ...

6. include directive in JSP    coderanch.com

8. more difference jsp:include vs. include directive    coderanch.com

Hi, I am having a hard time to use EL in include directive: <%@ include file="static/files/${obj.directory}/page.html" %> but using jsp:include works fine. Is that because include directive does not support EL in its argument? The following is fine with jsp:include. Further, I also noticed that the directory where the container starts to search for the included file is ...

9. JSP include vs include directive    coderanch.com

Filling a drop-down list with data dynamically SELECTED from a database doesn't imply the *need* to use an include of either type. Can you explain why you think you need one? I use including to break pages into logical pieces and to reuse sections on multiple pages. How do you choose between the two kinds of includes? One difference that everyone ...





10. Regarding Include directive element    coderanch.com

11. include directive vs jsp:include    coderanch.com

12. Directive : include file    coderanch.com

13. include Directive    coderanch.com

15. Doubt in Include Directive    coderanch.com

16. jsp:include vs include directive    coderanch.com

Hi, I've done some reading on the difference between jsp:include and the include directive and I've seen examples where they can be different, but I'm still a little confused. I have a site where each page includes an a file that checks if the user is logged in: <%if(!"yes".equals(request.getSession().getAttribute("loggedin")) {%> <%}%> This redirects the user to the login page ...





17. doubts realted to include directive    coderanch.com

Hi All, 1> 2><@include file="secondpage.jsp"@> I read in a site that if the content of included page is not changing frequently then it is a better idea to use include directive and if it is changing then we should use include action. my doubt is :- for a jsp to get displayed it is first compiled (just for once) and ...

18. include directive doesn't work    coderanch.com