Results 1 to 9 of 9
  1. #1
    Devarajan is offline Member
    Join Date
    Jan 2011
    Posts
    5
    Rep Power
    0

    Default How to apply PMD for JSP,HTML

    Hi all,
    I have been working on PMD for checking coding standards.Anybody knows how PMD can be applied to JSP and HTML pages.
    Thanks in advance.

    Regards,
    Deva.

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    Hi. You can read about this question on the official site.
    see PMD - Rule Set: Basic JSP rules
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    Devarajan is offline Member
    Join Date
    Jan 2011
    Posts
    5
    Rep Power
    0

    Default

    Hi petr,
    Thanks for your help.

    I have some problem petr. In my eclipse, there is no option like PMD is displaying for JSP and html application.
    In the site you mentioned its given like from version PMD3.6,JSP and HTML rules are available.

    But when i see the rules by clicking
    windows--> preference--> PMD --> Rules configuration
    ,there is no rules for jsp and html.


    How can i resolve this problem ?


    Thanks in advance :):)

  4. #4
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    Did you read this topic? You need create new file, which consist of roles for jsp and html
    Use one of the current rulesets as an example. Copy and paste it into your new file, delete all the old rules from it, and change the name and description. Like this:
    Skype: petrarsentev
    http://TrackStudio.com

  5. #5
    Devarajan is offline Member
    Join Date
    Jan 2011
    Posts
    5
    Rep Power
    0

    Default

    Hi petr,

    Can u pls tell me in detail with some example...

    Do we need to delete all the existing rules ?

  6. #6
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

  7. #7
    Devarajan is offline Member
    Join Date
    Jan 2011
    Posts
    5
    Rep Power
    0

    Default

    Hi petr,

    I have uploaded the rules in the PMD.But still have a problem..


    Problem is for example when i do some simple java code,When i right click the file it displays one option called PMD..In that it shows check code with PMD.So i can check the coding standard for that particular file.

    But if i do some jsp or html application there is no option called PMD displayed when i right click on the html or jsp file.So i don't know how to check the coding standard for that html and jsp file.

    Can u pls check it and let me know?

  8. #8
    Devarajan is offline Member
    Join Date
    Jan 2011
    Posts
    5
    Rep Power
    0

    Default

    Hi petr,
    Can u pls check it and let me know?

  9. #9
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    Sorry. I not use Eclipse I use JetBrain IDEA. It is works fine. but you try use ant tools for this. In tutorial have full information how you can do it.
    PMD - Ant Task
    Skype: petrarsentev
    http://TrackStudio.com

Similar Threads

  1. How to apply a patch (Call Matlab from Java)
    By Niroshan in forum Advanced Java
    Replies: 6
    Last Post: 07-09-2011, 02:55 AM
  2. How to apply system cls in java...
    By cyzash in forum New To Java
    Replies: 1
    Last Post: 02-20-2010, 11:50 AM
  3. Java GUI app used to apply XSLT to XML's
    By fawkes711 in forum XML
    Replies: 1
    Last Post: 12-09-2009, 08:59 AM
  4. how to apply gravity in tossing an egg
    By santhoshnanjappa in forum New To Java
    Replies: 1
    Last Post: 07-01-2009, 02:26 PM
  5. Kindly Help me to apply Stylesheet
    By AMATYA-CHANAKYA in forum Advanced Java
    Replies: 0
    Last Post: 03-18-2008, 06:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •