Home > Back-end >  The JSP include problems of new help
The JSP include problems of new help

Time:09-28

Originally the page y.j sp in & lt; % @ the include file="/com/a. sp "% & gt; Running
Change

After open the page console error: userName always be resolved to a variable

/com/a. sp code


y.j sp

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Try to put the & lt; % @ the include file="/com/a. sp "% & gt; Replace
/com/a. sp "flush=" true "/& gt;
Will report the same error, JSP compile loading sequence might be the problem?

CodePudding user response:

The JSP now nobody use, & lt; % %=userName & gt; For this kind of writing try ${userName}, check the userName parameter from anyway, have a definition?

CodePudding user response:

Can you send the complete code?

CodePudding user response:

reference 1st floor weixin_42406618 response:
JSP now nobody use, & lt; % %=userName & gt; For this kind of writing try ${userName}, check the userName parameter from anyway, have a definition?


Companies still use the old project,
In el expression is not an error, but take less than the value,
I just put & lt; % @ the include file="/com/a. sp" % & gt; Replace & lt; The JSP: include page="/com/a. sp" flush="true"/& gt; Will be an error,

CodePudding user response:

Only according to its fault, one by one to check information, or in writing, change the idea to write, JSP caching, easily modified more clear the cache to recompile,
  • Related