开发者

Why would JSP tags appear in HTML source code?

I'm a front-end web developer at a company using Java on their server. As a front-end developer, I'm concerned with the HTML structure that the server produces, but I don't have control over anything our back-end team produces. Rather than ask someone on that team, I would like to gather knowledge from the Stackoverflow community so I can communicate intelligently with the back-end team. So, I am curious as to what would cause certain JSP tags to appear in the rendered HTML that is sent to the browser. We have tags in our HTML source such as:

<flow:fileRef id="vfileColor" fileId="vfile.color"/>
<flow:fileRef id="StyleDir" fileId="StyleDir"/>
<flow:fileRef id="vfileStylesheet" fileId="vfile.stylesheet"/>

I am more interested in knowing why these appear, not as much about what they do. Is there a server setting for Tomcat/Apache/etc. that would hide these tags fr开发者_开发问答om the browser? Any information would be helpful. Thanks in advance.


They will appear in the generated HTML source if the associated taglib isn't declared or its URI is wrong.

In this particular case with <flow:xxx> tags, you should have a

<%@taglib uri="a/valid/uri" prefix="flow" %>

in top of the JSP page(s) in question (even if it's only to be used as an include file). If you can't figure the right URI, then you should consult the taglib's documentation for the right one or extract the JAR file of the taglib and read the tld file.

You should also ensure that the JAR file containing the taglib classes and the tld file is been placed in the runtime classpath of the webapplication, e.g. in /WEB-INF/lib.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜