mardi 26 mai 2015

How to Update HTML Header section with new code in JAVA

I have few htmls where i want to Replace Header Section with my new Lines of code. ( My new code is - new CSS, new JS file imports and few scripts ).

I want to replace all existing Header section and to replace with new one. This changes should be permanent.

I know how to do it in JS or Jquery but it is not feasible as it will execute each time when html will load.

If i get a solution in java like i will run particular backend code only once and it updates my HTML file permanently.

<html>
<head>
    <script>Existing</script>
    <link rel="stylesheet" src="existing.css"/>
    <script type="text/javascript" src="existing.js"/>
</head>
</html>

To Replace with

<html>
    <head>
        <script>New Script code</script>
        <link rel="stylesheet" src="newCSS.css"/>
        <script type="text/javascript" src="newJavaScript.js"/>
    </head>
    </html>

Please help. :)

Aucun commentaire:

Enregistrer un commentaire