JavaServer Pages (.jsp) indexer plugin for CodeMap (https://github.com/qxbyte/codemap)
Project description
codemap-jsp
A JavaServer Pages (
.jsp) indexer for CodeMap, distributed as an independent PyPI package. Targets legacy Java web projects that still ship.jspviews.
What it captures
JSP files are HTML containers with embedded Java. The indexer scans five top-level constructs:
| JSP construct | Captured as |
|---|---|
<%@ page import="..." %> |
extra.jsp_imports on the page symbol |
<%@ include file="..." %> |
extra.jsp_includes on the page symbol |
<%! ... %> (declaration block) |
Java members parsed by tree-sitter-java; methods → method, fields → variable, nested classes → class |
<% ... %> (scriptlet) |
Skipped — scriptlet locals are per-request state, not a stable interface |
<form action="..." method="..."/> and <a href="..."> |
extra.http_client_calls on the page symbol — consumed by the host's http_route bridge to link the page to its server controller |
Every JSP file produces one page-level pseudo-class symbol plus
zero or more member symbols from any <%! ... %> blocks. The page
name is derived from the file basename (UserList.jsp → UserList).
Why this matters for AI agents on legacy projects
A typical Spring MVC + JSP project has:
src/main/java/com/example/UserController.java
@PostMapping("/api/users") void create(User u) { ... }
src/main/webapp/WEB-INF/views/users.jsp
<form action="/api/users" method="POST"> ... </form>
The http_route bridge ships in codemap-core. Once both files are
indexed, the bridge sees:
- the server route
(POST, /api/users)exposed byUserController.create - the client call
(POST, /api/users)advertised byusers.jsp
…and adds a calls edge from the page to the controller. AI agents
can now answer "what JSP pages submit to this controller?" with a
single codemap callers query — no grepping HTML for URLs.
Install
pip install codemap-jsp
tree-sitter-java is a hard dependency (used to parse declaration
blocks). No tree-sitter-jsp grammar is needed.
SymbolID encoding
scip-jsp . . . src/main/webapp/views/UserList.jsp/UserList#tag().
└──────┘ └──────────────────────────────────────────────────┘
scheme path / page pseudo-class / member
Tests
pip install -e ".[dev]"
pytest
Limits / next steps
- Scriptlet (
<% ... %>) bodies are not indexed for symbol extraction — they would surface per-request locals as noise. A future v0.2.x could optionally extract control-flow shape from scriptlets to support cross-page navigation. - JSTL tags (
<c:if>,<c:forEach>) and EL expressions (${...}) are not parsed. Acodemap-jstlcompanion plugin could surface declared<c:set var="..."/>variables if there's demand. - Tag files (
.tag/.tagx) are supported on the same code path as pages but their unique<%@ attribute name="..." %>directives are not yet surfaced as individual symbols.
License
MIT — same as the host project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codemap_jsp-0.4.3.tar.gz.
File metadata
- Download URL: codemap_jsp-0.4.3.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51af08809402e923eaa8161f3d0289dc34f0a928767fbf334a3981feb8991e12
|
|
| MD5 |
fc66ccf6855c652c29fdcec17b9faf69
|
|
| BLAKE2b-256 |
da7228c8c0549354581accbc3676b0470bb086cf43f6b48e75dc59693d9bfecc
|
Provenance
The following attestation bundles were made for codemap_jsp-0.4.3.tar.gz:
Publisher:
publish.yml on qxbyte/codemap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codemap_jsp-0.4.3.tar.gz -
Subject digest:
51af08809402e923eaa8161f3d0289dc34f0a928767fbf334a3981feb8991e12 - Sigstore transparency entry: 1980927225
- Sigstore integration time:
-
Permalink:
qxbyte/codemap@b07cd344a0e31960e95dbd538c15e1c1ab683c27 -
Branch / Tag:
refs/tags/v0.4.3 - Owner: https://github.com/qxbyte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b07cd344a0e31960e95dbd538c15e1c1ab683c27 -
Trigger Event:
push
-
Statement type:
File details
Details for the file codemap_jsp-0.4.3-py3-none-any.whl.
File metadata
- Download URL: codemap_jsp-0.4.3-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
074ea7f0c1f4bbbbcc40584975693c4dd48e19acf4ce855d3c190002bf8ae81d
|
|
| MD5 |
422f4c6eecec3ef9364624302792bd1c
|
|
| BLAKE2b-256 |
9d36dd6555f97b8d0bcea52322045d59ffe64cdc564c2c5476d4d56ee5124987
|
Provenance
The following attestation bundles were made for codemap_jsp-0.4.3-py3-none-any.whl:
Publisher:
publish.yml on qxbyte/codemap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codemap_jsp-0.4.3-py3-none-any.whl -
Subject digest:
074ea7f0c1f4bbbbcc40584975693c4dd48e19acf4ce855d3c190002bf8ae81d - Sigstore transparency entry: 1980927293
- Sigstore integration time:
-
Permalink:
qxbyte/codemap@b07cd344a0e31960e95dbd538c15e1c1ab683c27 -
Branch / Tag:
refs/tags/v0.4.3 - Owner: https://github.com/qxbyte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b07cd344a0e31960e95dbd538c15e1c1ab683c27 -
Trigger Event:
push
-
Statement type: