Skip to content

Register the Param tag plugin in the sample tagPlugins.xml - #1254

Open
arturobernalg wants to merge 1 commit into
apache:mainfrom
arturobernalg:jasper-tagplugins-param
Open

arturobernalg wants to merge 1 commit into
apache:mainfrom
arturobernalg:jasper-tagplugins-param

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

With the sample tagPlugins.xml (the one jasper-howto points to), any <c:import> or <c:url> with a nested <c:param> fails with HTTP 500: JspTagException: <param> outside <import>.

The Import plugin generates its parameters through the Param plugin, but the sample does not register Param, so the standard <c:param> handler runs inside the inlined <c:import> and finds no enclosing import handler.

TestImport now uses the sample configuration (it used its own file that already registered Param, which is why this was not caught), and that file is removed. Without the fix testParams and testParamKeepsUserAttribute return 500.

Checked on a running Tomcat against JSTL 3.0.1: with the fix the plugin output matches the standard tags.

The Import plugin generates the parameters in its body through the Param
plugin. The sample configuration did not register Param, so the standard
<c:param> handler ran inside the inlined <c:import>, found no enclosing
import handler and failed with a JspTagException (HTTP 500).

Test the Import plugin with the sample configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant