How does one document JSP code, since javadoc doesn't really work?

swarraj kulkarni

The javadoc syntax expects class or interface declaration in the sourse file. In JSP files (before compiling) these syntaxes are not present so javadoc does not work.

The best way to document the jsp code is by using hidden comment syntax. In this case whatever comments you put for the jsp code remain there as it is, means they are not seen by the user, even if user tries to see it through view sourse.

The synatx for the hidden comment is:

<%-- JSP Code related comment --%>

Hope this helps.