Analytics code preventing values entered in jsp to reflect in Struts 2 action class

I am in a serious problem. My JSP worked fine up till yesterday i.e. the values entered in the text fields reflected appropriately in the action class. However, for testing purposes I inserted an analytics code into the JSP.

However, after this, any value I entered in the text fields returned as a blank string in the back end. This has halted my progress completely. I do not know how this is happening. I debugged the application 10 times but with the same result.

Here is the analytics code I inserted:

<!-- Analytics code start-->    
<s:hidden id="uid" value="Step1"></s:hidden>
<s:if test="%{#session.cust != null}">
<s:hidden id="Type" value="%{#session.cust.Type}"/>
<s:hidden id="idCode" value="%{#session.cust.IDCode}"/>
</s:if>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/js/as/analytics.js"></script>   
<script type="text/javascript" src="https://nexus.ensighten.com/gecrb/AO_dev/Bootstrap.js">
</script>
<!-- Analytics code end-->

Does anyone have a solution?

The problem persists even after removing the code, clearing the browser cache and cleaning the eclipse project.


Source: jsp

Leave a Reply