apache / apache/netbeans

Sequence of compilation wrong in jsp

Open
#6,556 0 comments 0 reactions 0 assignees View on GitHub
kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 19

### What happened

I embedded one line of code in a jsp with the referenced bean "util" declared afterwards. Netbeans did not report an error, but Tomcat 10 reported it, but only when the jsp was invoked.

<%
String mainjsp=util.getActmedium();
%>

This is a time consuming bug, because I had to invoke a lot of jsp pages manually to find the bugs, Netbeans did not report.

### How to reproduce

Create a jsp and embed similar code. Netbeans does not find the bug. It only is found by Tomcat when invoking the jsp.

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Win10

### JDK

17.02

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

_No response_

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Create the JSP reproduction described in the issue, using a reference to the util bean before its jsp:useBean declaration, and compare NetBeans diagnostics with Tomcat 10 invocation. Done means NetBeans reports the invalid declaration order before the page is run.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.