0

In my code I am trying to forward my request by using below line

<jsp:forward page = "<%=request.getContextPath()%>/Welcome.do"/>

However its giving error below

org.apache.jasper.JasperException: /obajsp/OBAHeader.jsp(3,27) JBWEB004214: Error unquoting attribute value

Please someone help me to understand what is issue in my written code?

EDIT: this was currently working in production without any issue and giving issue in my local IDE

Philipp Sander
  • 10,139
  • 6
  • 45
  • 78
rampatel
  • 521
  • 3
  • 10
  • 17

2 Answers2

2

Have you tried using the expression language, rather than a scriptlet?

<jsp:forward page = "${pageContext.request.contextPath}/Welcome.do"/>
Stefan
  • 12,108
  • 5
  • 47
  • 66
  • Thanks Stefan for answer. But i need reason because this was currently working in production without any issue and giving issue in my local IDE. – rampatel Nov 04 '14 at 16:19
  • Did you change the underlying [jsp version](http://stackoverflow.com/questions/2013879/the-ultimate-java-version-table-j2ee-java-ee-servlet-jsp-jstl), maybe indirectly by upgrading to a newer server verison? – Stefan Nov 05 '14 at 14:41
0
<jsp:forward page = "${pageContext.request.contextPath}/Welcome.do"/>

you dont need inline java to get the context path. expressionlanguage is much more comfortable.

Philipp Sander
  • 10,139
  • 6
  • 45
  • 78