<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JSP Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/jsp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/jsp/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:09:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Sonar Support with JSP &#038; HTML</title>
		<link>https://www.scmgalaxy.com/tutorials/sonar-support-with-jsp-html-2/</link>
					<comments>https://www.scmgalaxy.com/tutorials/sonar-support-with-jsp-html-2/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 08 Jan 2018 11:48:37 +0000</pubDate>
				<category><![CDATA[Release, News & Updates]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[Sonar]]></category>
		<category><![CDATA[Sonar Support with JSP & HTML]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4535</guid>

					<description><![CDATA[<p>JSP/HTML land, usefull tests could be done via some regexp, ie check if style/css are used (to avoid dirty colors/fonts [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/sonar-support-with-jsp-html-2/">Sonar Support with JSP &#038; HTML</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>JSP/HTML land, usefull tests could be done via some regexp, ie check if style/css are used (to avoid dirty colors/fonts hard-coded for example).</p>
<p>If we want to build something pretty robust and extensible, I think we should integrate a java library which is able to transform a XHTML or badly formatted HTML document into a DOM :</p>
<p><a href="http://htmlparser.sourceforge.net/" rel="nofollow">http://htmlparser.sourceforge.net/</a><br />
<a href="http://jtidy.sourceforge.net/" rel="nofollow">http://jtidy.sourceforge.net/</a><br />
<a href="http://sourceforge.net/projects/nekohtml/" rel="nofollow">http://sourceforge.net/projects/nekohtml/</a></p>
<p>a complete list of available libraries is available here : <a href="http://java-source.net/open-source/html-parsers" rel="nofollow">http://java-source.net/open-source/html-parsers</a></p>
<p>With a DOM we could then imagine to implement a visitor pattern in order to let users create new rules.</p>
<p><strong>Some very simple rules in order to start.</strong><br />
Rule 1: disallow scriptlets<br />
Rule 2: disallow some taglibs (JSTL SQL comes to mind). Could be parametrized by Taglib URL to list all disallowed taglibs.<br />
Rule 3: enforce JSP style (XML syntax)<br />
Rule 4: disallow hard coded labels<br />
Rule 5: disallow dynamic JSP includes (&lt;jsp:include&gt;)<br />
Rule 6: disallow external file in page attribute of dynamic JSP include<br />
Rule 7: disallow TLD location for URI in taglib declaration<br />
For HTML<br />
Rule 8: enforce &lt;script&gt; at the end of the body<br />
Rule 9: disallow &lt;style&gt;<br />
Rule 10: disallow non empty &lt;script&gt; content<br />
Rule 11: enforce a limit on the number of called external files (js and css)</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/sonar-support-with-jsp-html-2/">Sonar Support with JSP &#038; HTML</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/sonar-support-with-jsp-html-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
