java - Why my included JSP file won't get processed correctly? -


I am trying to create Java web framework (and learning), and on the basis of 'Code Generator In the process of making the material view of the database in the process of development, I stumbled into a difficulty, which I do not know how to solve it.

First of all, I want the following index.jsp :

  & lt; Body & gt; Use all pages to be created. & Lt;% @ include file = "header.jsp"% & gt; & Lt; Hours / & gt; & Lt;% @ included file = "body.jsp"%> & Lt; Hours / & gt; & Lt;% @ include file = "footer.jsp"% & gt; & Lt; / Body & gt;   

And, in body.jsp , I should have it like this:

  & lt; Jsp: include page = "$ {Application_modul}"%>   

Where application_modul is an attribute defined in its controller:

  request.setAttribute ("application_modul", "USER_ACCOUNT \\ ' View_user_account.jsp ");   

This file can be found properly, but the processed JSP does not expect me. Here:

  and <: c: forEach items = "[application.models.UserAccountModel@18a49e0, application.models.UserAccountModel@1f82982]" var = "item" varStatus = "status" & Gt; & Lt; TR & gt; ....   

You can see the jstl item attributes for each, its variable name (toString ()) was found ...

Any ideas what The problem is

I hope that I will describe my problem correctly

Many thanks!

PS: I'm already making a quick fix for this, but I do not want it, however GeneratedView_User_Count.JP, I do this like this:

  & Lt; Body & gt; & Lt;% @ include file = "header.jsp"% & gt; & Lt; Hours / & gt; & Lt; C: forEach item = "$ {row}" var = "item" varStatus = "status" & gt; & Lt; TR & gt; .... & lt; Hour / & gt; & Lt;% @ include file = "footer.jsp"% & gt; & Lt; / Body & gt;   

You can see that I am creating the complete file here ...

Edit: PS: $ {row} a ArrayList Popup is some data from table with

So, in a sentence to summarize your problem Are not JSTL tags parsed and ended up in plain HTML output generated?

You have to declare JSTL taglib above the JSP page where you are using the JSTL tag to run them. For this, it will be

  & lt;% @ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"% & gt;    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -