Home > front end >  JSP dynamic and static separation technology
JSP dynamic and static separation technology

Time:12-03

Leadership gave me a demand let me set up a global parameters, the input 1, page displays dynamic data, input 2, page displays the static data, there are bosses know that how to implement?

CodePudding user response:

JSP didn't try, but before doing the vue, are in a JS file to define a variable, and the page reference this JS file, in the judgment of JS file variable is 1 or 2, then page initialization; This is general train of thought

CodePudding user response:

1/f, 123 reference soo min response:
JSP didn't try, but before doing the vue, are in a JS file to define a variable, and the page reference this JS file, judgment variables in JS file is 1 or 2, then page initialization; General train of thought is this
is how to realize the initialization code?

CodePudding user response:

Global variables can use ServletContextListener getServletContext (.) the setAttribute (" variable name "and" variables ");
All pages can be used,

Where is the input, where the data came from, all didn't say, I don't know how to answer,
  • Related