I’m learning JSP these days, and really want to place some css files to the head during the body sequence. But I can’t figure out on Java codings.
If you want to load it in the middle of the page, you can use a javascript function that does the same as the first paragraph here, except it deletes the object that appears in the body, and appends it to the head object. I do that if I use ajax to update a page. external css in body of html file
I saw this answer on other question, and I’m curious how to do it? Also I found it on how to do it on Jquery, but is there anyway on “JAVA way”?
JSP is really just HTML by the time it reaches the browser. CSS should be imported in the
headelement of the HTML document, not thebody. CSS can be defined ‘on the run’ in thestyleattribute of an element of the body, but that is harder to maintain.