Home > Back-end >  In the JSP page add
In the JSP page add

Time:11-27

I need added in the Java variables in your business & lt; % % & gt; , say & lt; %
Out. Print (request. GetAttribute (" ABC "));
% & gt;
The ABC and contains a lot of Java identifier as & lt; % @ % & gt; <% % & gt; <%=% & gt; I found these are unable to identify, but HTML code can be identified,, ask ace to give advice or comments

CodePudding user response:

Do you want to understand the JSP compile time and runtime
Compile time is to compile JSP servlet, which is to put & lt; % % & gt; This HTML parsing the information into the Java code and compiled into. Class
Runtime is running. The class files, if the operation period of the value of a variable contains & lt; % % & gt; It can only be the same output, because the run-time won't put & lt; % % & gt; Such information compiled,
So you should be prepared in advance of the corresponding JSP, depending on the value of the variable import different JSP, such as


In short don't in variable & lt; % % & gt; , because it is already translated JSP runtime good, again & lt; % % & gt; It will not help you to translate again

CodePudding user response:

But now the business is all of my form is stored in a database, I want to find him out, and then, according to which want to use of EL expression and & lt; % % & gt; Why Java code, and stored in a database? History because I want to save the form data so can only be converted into two classifications stored in the database, can help to solve this problem?

CodePudding user response:

Is actually a form of JSP code stored in the database, and then to complete it now display problem, don't know how to show,
  • Related