Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6666933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:52:50+00:00 2026-05-26T02:52:50+00:00

Given an existing JSP project, I would like to get a feel for the

  • 0

Given an existing JSP project, I would like to get a feel for the complexity/size of the “view” portion of the project. Here’s what I’ve done so far:

  • Pulled the list of JSP’s that have been compiled from the production server within the last x months (that eliminates ‘dead’ jsps).
  • Wrote a quick scanner to find the JSP fragment files that are imported into the compiled pages.
  • Pulled the size of the file and the timestamp off the file system.

So now I have a list of pages and the fragments imported into those pages, along with their size, and the last time they were compiled and changed.

But what I really need to know is how complicated the page is; some of these pages have a whole lot of Java code on them. It’s a big project, so to go through each page and size it would be tedious and probably not that accurate.

I was going to write another scanner that measured the code between <% and %>, but I wondered if there was some kind of metrics generator out there that could already do that. I would like it to output how “big” the page was and how “big” the code on the page was. The point is to segregate the small, medium, big, and huge pages, so the absolute measurement is less important than the relative.

EDIT:
Wrote another scanner to count number of JavaScript lines, Java (Scriptlet) lines, HTML lines, and instances of taglib useage. So by using the results of the scanner, I have some parameters that would indicate ‘complexity’. Not real clean, but it’s ok for now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:52:50+00:00Added an answer on May 26, 2026 at 2:52 am

    So the issue is that you have smatterings of Java code interspersed with the html, so no standard metrics tool will work.

    Not quite off the shelf, but our Source Code Search Engine might come pretty close. This is a tool for searching large code bases by indexing the source code using langauge-accurate lexical extraction. The relevance here is that it computes SLOC, comment counts, Halstead and Cyclomatic measures of the files it indexes, so you get metrics if you simply ignore the search feature. The metrics are generated to an XML file (with one “record” per source file) so you can do whatever further processing you want on them. See the metrics discussion on the linked web page.

    While we do have a JSP lexer, it hasn’t been tested with the Search Engine yet. We’ve built dozens of lexers so this should be pretty easy for us to do (and we’d be happy to do it). That would produce the answer you want directly.

    If you didn’t want to go down that path, you could follow through with your simple idea of extracting the code between <% and %>, dump it into files parallel to the original JSP files,
    and hand that code to the search engine through its (production) Java lexeme extractor for the Search Engine, and get your metrics that way. The lexers are very robust in the fact of malformed files, so the fact that the Java fragments extracted might not collectively be quite legal wont bother it a bit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given an absolute or relative path (in a Unix-like system), I would like to
I am trying to implement hoptoad in my existing maven project. I ve given
I've followed the instructions given here for introducing an existing SQLite database to your
Given a column of strings I would like to find the number of search
Given an existing valid SVG document, what's the best way to create informational popups,
I have been given the task of adding functionality to an existing IIS 6.0
Given a specific DateTime value, how do I display relative time, like: 2 hours
Given a Python object of any kind, is there an easy way to get
Given 2 rgb colors and a rectangular area, I'd like to generate a basic
I'm integrating coredata into my existing application as given in http://wiresareobsolete.com/wordpress/2009/12/adding-core-data-existing-iphone-projects/ . I'm facing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.