Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Jersey » Conflict between @FormParam and ${param}
Conflict between @FormParam and ${param} [message #1826816] Fri, 01 May 2020 09:25
Álvaro González is currently offline Álvaro GonzálezFriend
Messages: 1
Registered: May 2020
Junior Member
I'm using Jersey/1.17 together with JSP on Java/6 (that's the stack the client uses, I can't afford to make major upgrades). I'm learning both techs from scratch.

In JSP, I can use Expression Language to print data from the body of an incoming POST request:

<%@ taglib prefix="c" uri="http ://" %>
<c:out value = "${param.fooName}"/>

However, ${param.fooName} no longer exists whenever use @FormParam to grab the value in the controller:

public Response saveNew(
    @FormParam("fooName") String fooName
) {
    // ...

There's no issue though when I grab the value from javax.servlet.http.HttpServletRequest rather than using @FormParam:

public Response saveNew() {
    String fooName = request.getParameter("fooName");
    // ...

Is this a known/documented behaviour in @FormParam or just an unexpected conflict between two libraries from different authors? Is there a workaround to be able to use @FormParam and ${param.fooName} simultaneously?
Previous Topic:jersey endpoint throwing an exception org.glassfish.jersey.server.internal.process.MappableException
Next Topic:ResourceFilter and ResourceFilterFactory Interfaces were Removed
Goto Forum:

Current Time: Mon May 23 14:09:39 GMT 2022

Powered by FUDForum. Page generated in 0.01700 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top