?
Solved

interpolated runtime values error

Posted on 2005-04-29
6
Medium Priority
?
770 Views
Last Modified: 2008-01-09
Anyone know what this JSP error message means?

Stack = com.caucho.jsp.JspParseException: /admin/grantReport/displayReport.jsp:12: interpolated runtime values are forbidden by the JSP spec at `reportByVolunteer.jsp?grantNumber=&certificateNumber=' at com.caucho.jsp.JspGenerator.error(JspGenerator.java:1577) at com.caucho.jsp.JspGenerator.hasRuntimeAttribute(JspGenerator.java:1397) at ...

The error is occurring on the following "<jsp:forward..." lines.

The objectionable code follows:

<body>
<%
      String grantNumber = request.getParameter("grantNumber");
      String position = request.getParameter("position");

      if (position == null || position.equals("")) { %>
          <jsp:forward page="reportByVolunteer.jsp?grantNumber=<%= grantNumber %>&certificateNumber=<%= request.getParameter('certificateNumber') %>" />
<%      } else { %>
          <jsp:forward page="reportByPosition.jsp?grantNumber=<%= grantNumber %>&position=<%= position %>" />
<%      } %>
</body>

If I replace the variables with constants, the page works. I can see in the URL address bar that the variables are being passed correctly. ie ...?grantNumber=grant4&certificateNumber=&position=Webmaster&Submit=Submit
0
Comment
Question by:softechnics
  • 4
6 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 1000 total points
ID: 13897070
what happens if you do as such:

String s = "reportByVolunteer.jsp?grantNumber=<%= grantNumber %>&certificateNumber=<%= request.getParameter('certificateNumber') %>";

     if (position == null || position.equals("")) { %>
         <jsp:forward page="<% s %>" />
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 13897073
oops,  <jsp:forward page="<%= s %>" />
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 13897088
oops again,

String s = "reportByVolunteer.jsp?grantNumber=" + grantNumber + "&certificateNumber=" + request.getParameter('certificateNumber');
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:softechnics
ID: 13897572
Damned! It worked!! Why?????

I'm doing something very similar in another application and my original approach above works there!
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 13897592
as far as I know jsp never liked tags inside <jsp:forward..
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 13897636
yeah, i've noticed the same... that request.getParameter(..) in the jsp:forward tag is what made me suggest the solution i did.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am posting this in case anyone runs into similar issues that I did, this may save you a lot of grief: Condition: 1. Your NetBIOS domain name contains an ampersand " & " character.  (e.g. AT&T) 2. You've tried to run any Microsoft installation…
A quick solution showing how to control and open a POS Cash Register Drawer using VBA with MS Access.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question