2
$\begingroup$

Let me know if this should be posted on StackOverflow instead - I'm not quite sure where it belongs

When calling a page via the JSTL <c:import> tag or the JSP Include action, webMathematica gives results that are not consistent with the other components of the page. Consider the following example:

page1.jsp:

...
<c:url value="page2.jsp" var="x">
    <c:param name="a" value="4" />
</c:url>
<c:import url="${x}"/>
...

page2.jsp

1. ${param.a}

2. <%= request.getParameter("a")  %>

3. <msp:evaluate>MSPValueQ[$$a]</msp:evaluate>

4. <msp:evaluate>$ServletRequest@getParameter["a"]</msp:evaluate>

5. <%= request.getAttribute("javax.servlet.include.query_string") %>

6. <msp:evaluate>$ServletRequest@getAttribute["javax.servlet.include.query_string"]</msp:evaluate>

1 and 2 both return the correct value of 4. However, 3 and 4 both evaluate to the empty string. Furthermore, 5 gives the correct string "a=4", but 6 evaluates to the empty string.

My best guess is that webMathematica does not update it's parameters when the import is done, so $ServletRequest does not get updated with the new attribute and value of the new GET parameter is not set.

What is actually going on here?

$\endgroup$
1
  • $\begingroup$ It appears that this Question is too old to be migrated. Please post a new one on the site of your choosing. Sorry you didn't get any help around here. $\endgroup$
    – Mr.Wizard
    Oct 21, 2014 at 19:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.