• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

Validate HTML

I can validate my HTML files using

http://validator.w3.org/

but how to validate the html in jsp files.

thanks
0
thomas908
Asked:
thomas908
  • 6
  • 3
  • 2
  • +4
4 Solutions
 
stuartMackCommented:
Copy the HTML out and paste it in a HTML file?
0
 
GrandSchtroumpfCommented:
you need to validate the generated html, not the jsp source files.
0
 
thomas908Author Commented:
>> Copy the HTML out and paste it in a HTML file?

That will be real pain. Since the JSP's are huge with lots of HTML in it. Is there a way which ignores JSP and just validates HTML.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
GrandSchtroumpfCommented:
> Is there a way which ignores JSP and just validates HTML.
No, there is no way!!!  You need to validate the generated HTML, not the source code.  How do you expect a validator to know what HTML will be generated by your jsp source file?
0
 
GrandSchtroumpfCommented:
Use this Firefox extension:  https://addons.mozilla.org/firefox/249/
And browse your site to detect errors.
0
 
CyberGhostCommented:
You can also use another Firefox extension called Web Developer (https://addons.mozilla.org/firefox/60/) that has an option to show generated source code. Just copy&paste that generated source code into W3C Validator.
I have used this successfully many times while developing a JavaScript web applications.
0
 
GrandSchtroumpfCommented:
CyberGhost, jsp is server-side!!!
And note that you can see the generated code (after javascript / xsl) in firefox just by doing select all (ctrl+a), then right click and choose "view selection source".  That's exactly what the webdev toolbar does.
0
 
CyberGhostCommented:
GrandSchtroumpf: you're right, I was probably trying to answer too many EE questions at once and thougt I'm back in the JS section :-)
Sorry about that.

thomas908: please, ignore my comments
0
 
GrandSchtroumpfCommented:
JS / JSP, the difference is just one letter :°)
0
 
Eternal_StudentCommented:
Why dont you preview the page in a browser and then copy the source code from there into w3.
0
 
siva350Commented:
Eternal_Student has a good point, thats what I would try
0
 
GrandSchtroumpfCommented:
> Eternal_Student has a good point, thats what I would try
that's a lot of copy/paste.  using the ff extension is easier.  also the webdev toolbar has shortcuts to validate html usin the w3c site.
0
 
Cem TürkSenior Software EngineerCommented:
0
 
thomas908Author Commented:
Thanks a lot everyone. Please give me day to close the question.
0
 
thomas908Author Commented:
Thanks everyone for helping.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 3
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now