Link to home
Start Free TrialLog in
Avatar of thomas908
thomas908

asked on

Validate HTML

I can validate my HTML files using

http://validator.w3.org/

but how to validate the html in jsp files.

thanks
SOLUTION
Avatar of stuartMack
stuartMack

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GrandSchtroumpf
GrandSchtroumpf

you need to validate the generated html, not the jsp source files.
Avatar of thomas908

ASKER

>> 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.
> 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?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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.
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
JS / JSP, the difference is just one letter :°)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Eternal_Student has a good point, thats what I would try
> 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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot everyone. Please give me day to close the question.
Thanks everyone for helping.