开发者

Missing HTML comments in JSP page

I am writing a web app using Spring Roo hosted in a Tomcat 6/7server.

I have added HTML comments into the *.jspx pages however they are not being sent to the client browser. It's as if they are being stripped out...

E.g.

<div><!-- com开发者_JAVA百科ment --></div>

Results in at the browser as an empty div.

Is there a setting in tomcat or jsp directive/spring to enable or disable HTML comments?

Thanks for any help here.


I would guess you use firebug, right? In firebug is on option to deactivate comments, I had the same problem.

If you activate the view of comments in firebug, you will see all comments like in the client view.


You have to use

       <!-- Output comment>

This is for hidden Comment which will not render in browser.

       <!-- Hidden comment -->
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜