Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Mr.Wizard 16 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.