java - Editing the jsp content from a taglib -


i have filter processes given servlet mapping , includes jsp holds structure of every page.

servletcontext.getrequestdispatcher( "/index.jsp" ).include( request, response ); 

inside jsp have custom jstl tag handles inclusion of jsp portion inside parent according series of rules (the inclusion done inside "body" tag:

pagecontext.include( processuri.getjsplocation( request.getrequesturi() ) ); 

inside latest included jsp want able write stylesheet , append response. using taglib that.

<taglib:head>     <link rel="stylesheet" href="some.css" > </taglib:head> 

since contents of last jsp included "body" tag need access "head" , insert html after last item (i cannot insert stylesheet inside "body" tag).

<head>     ...     <!-- want insert here -->     <link rel="stylesheet" href="some.css" > <head> <body>     ... 

how access processed response inside last taglib (taglib:head) can edit , insert body content first included jsp (/index.jsp)?

i suppose possible access response has been processed until given taglib call, correct?

i accept different ways of achieving same result using other techniques mentioned above.

i have solved creating 1 taglib load file page.jsp , 1 page-head.jsp. in way process data in proper order without doing crazy response manipulation.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -