This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat 5 giving error on commented out JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 5 giving error on commented out JSP page" Watch "Tomcat 5 giving error on commented out JSP page" New topic
Author

Tomcat 5 giving error on commented out JSP page

Ali Ekber
Ranch Hand

Joined: Jun 12, 2005
Posts: 41
I am running Tomcat 5.5 on Linux, and it started acting very wierd. I have a commented out piece of Java code somewhere in my JSP, and I am getting an error.

The actual error is an SQL exception, but the code is commented out, so it shouldn't be executed. This is very strange. Any ideas?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

Perhaps it's not as commented out as you think it is?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
IM Mahesh
Greenhorn

Joined: Mar 09, 2006
Posts: 18
Syntax for JSP comments is: <% comments %>
If you are using the tag <!-- --> to comment out your java code then it will not work because it is html syntax.


Mahesh
IM Mahesh
Greenhorn

Joined: Mar 09, 2006
Posts: 18
Sorry for a little type mistake.
jsp comments tag is: <%-- comments --%> and not <% comments %> which i mentioned in previous reply.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tomcat 5 giving error on commented out JSP page
 
Similar Threads
Can I view my .jsp files from outside of my Tomcat directory?
Reference static var of static nested from Outer
Exception creating bean of class
Tomcat 6.0.26: Manager with DIGEST authentication
JSP sessions under Websphere