- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHello. I am developing an app for my employer, and I am encountering an error due to coercion somewhere in one of my pages. I am having trouble locating it. I hope someone can provide me with a bit of assistance.
exception
javax.servlet.ServletExcep
org.apache.jasper.runtime.
org.apache.jasper.runtime.
org.apache.jsp.jsp.process
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
javax.servlet.jsp.el.ELExc
org.apache.commons.el.Logg
org.apache.commons.el.Logg
org.apache.commons.el.Logg
org.apache.commons.el.Coer
org.apache.commons.el.Coer
org.apache.commons.el.Arit
org.apache.commons.el.Bina
org.apache.commons.el.Expr
org.apache.commons.el.Expr
org.apache.jasper.runtime.
org.apache.jsp.jsp.process
org.apache.jsp.jsp.process
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.
The code which causes it is:
<%@ taglib prefix="c" uri="http://java.sun.com/j
<%@ taglib prefix="fn" uri="http://java.sun.com/j
<%@ taglib prefix="sql" uri="http://java.sun.com/j
<%!String firstname;
String lastname;
%>
<%-- Check for valid session --%>
<c:if test="${validUser == null}">
<jsp:forward page="../login.jsp">
<jsp:param name="error" value="4" />
</jsp:forward>
</c:if>
<%-- ****************Address Stuff *********** --%>
<%-- Check if address/location exists --%>
<sql:query var="add_exists">
SELECT
*
FROM
address_table
WHERE
(address_1 = ?)
<sql:param value="${param.add_1}" />
</sql:query>
<%-- if a record is returned, get the address id --%>
<c:if test="${add_exists.rowCoun
<c:forEach items="${add_exists.rows}"
<c:set var="add_id" value="${add_row.add_id}" />
</c:forEach>
</c:if>
<%-- If 1 record is not returned from query, add the address--%>
<c:if test="${add_exists.rowCoun
<sql:update var="insert_address">INSER
<sql:param value="${param.Company}" />
<sql:param value="${param.Store_num}"
<sql:param value="${param.add_1}" />
<sql:param value="${param.add_2}" />
<sql:param value="${param.city}" />
<sql:param value="${param.province}" />
<sql:param value="${param.country}" />
<sql:param value="${param.phone}" />
</sql:update>
<%--now get the address id.... --%>
<sql:query var="add_exists">
SELECT
add_id
FROM
address_table
WHERE
(address_1 = ?)
<sql:param value="${param.add_1}" />
</sql:query>
<c:forEach items="${add_exists.rows}"
<c:set var="add_id" value="${row.add_id}" />
</c:forEach>
</c:if>
<%-- ************ check if crew member1 exists, and get id# ****************--%>
<c:if test="${not empty param.Crew1_name}">
<c:out value="testing to see if c1 exists " />
<sql:query var="crew1_exists">
SELECT
*
FROM
crew_map
WHERE
(last_name = ?) AND (first_name = ?)
<sql:param
value='<%= com.acps.takedown.NamePars
.getParameter("Crew1_name"
<sql:param
value='<%= com.acps.takedown.NamePars
.getParameter("Crew1_name"
</sql:query>
<c:if test="${crew1_exists.rowCo
<c:forEach items="${crew1_exists.rows
<c:set var="c1id" value="${crew1_row.person_
</c:forEach>
</c:if>
<%-- if not, add him --%>
<c:if test="${crew1_exists.rowCo
<c:out value="c1 does not exist, adding him" />
<sql:update var="add_crew1">
INSERT INTO crew_map VALUES
(0, ?, ? )
<sql:param
value='<%= com.acps.takedown.NamePars
.getParameter("Crew1_name"
<sql:param
value='<%= com.acps.takedown.NamePars
.getParameter("Crew1_name"
</sql:update>
<%-- and then get the id --%>
<sql:query var="crew1_get_id">
SELECT
*
FROM
crew_map
WHERE
(last_name = ?) AND (first_name = ?)
<sql:param
value='<%= com.acps.takedown.NamePars
.getParameter("Crew1_name"
<sql:param
value='<%= com.acps.takedown.NamePars
.getParameter("Crew1_name"
</sql:query>
<c:forEach items="${crew1_get_id.rows
<c:set var="c1id" value="${crew1_row.person_
</c:forEach>
</c:if>
</c:if>
<sql:update var="insert_job">INSERT INTO job_table VALUES ( 0, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
<sql:param value="${param.Date}" />
<sql:param value="${add_id}" />
<sql:param value="${c1id}" />
<sql:param value="${c2id}" />
<sql:param value="${c3id}" />
<sql:param value="${c4id}" />
<sql:param value="${c5id}" />
<sql:param value="${c6id}" />
<sql:param value="${param.travel_time
<sql:param value="${param.start_time}
<sql:param value="${param.end_time}" />
<sql:param value="${param.delay_time}
<sql:param value="${param.Comments}" />
</sql:update>
<sql:query var="job_id_check">
SELECT max(job_id) AS max_job_id FROM job_table
</sql:query>
<c:forEach items="${job_id_check.rows
<c:set var="job_id" value="${job_row.max_job_i
</c:forEach>
Thank you for any and all help/suggestions/ideas. It is really appreciated!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: bloodredsunPosted on 2006-06-05 at 11:42:24ID: 16835658
It might be because you have nested <c:if> statements
unt == 1}"> }" var="crew1_row"> id}" />
ost\<your appname>\\org\apache\jsp
<c:if test="${not empty param.Crew1_name}">
...
<c:if test="${crew1_exists.rowCo
<c:forEach items="${crew1_exists.rows
<c:set var="c1id" value="${crew1_row.person_
</c:forEach>
</c:if>
...
</c:if>
Your jsp design would really benefit from having a backing action or servlet to do all this logic in rather than having in all in your presentation jsp. If this is not the root cause then I suggest that you fall back on the fairly basic tactic of commentating out large portions of your code until you find the relevent section.
To find out what exactly it is, you should look at the process_jsp.java file on line 2207. This can be found in <tomcat home>\work\Catalina\localh