aspose file tools*
The moose likes JSP and the fly likes Error Handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Error Handling" Watch "Error Handling" New topic
Author

Error Handling

gauravkkaul kaul
Greenhorn

Joined: Feb 29, 2008
Posts: 5
I receive the following ERROR Message:
Error(12): jsp:body can appear only inside standard or custom action.

What does this mean?How to correct it?
JSP Code is below:



[BPSouther: Added code tags]
[ February 29, 2008: Message edited by: Ben Souther ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Get rid of the jsp:body tag.

The jsp:body action is not a replacement, wrapper, or substitute for the HTML body tag. The two are not related.
To learn more about what a jsp:body action is, and when you would use it, see section JSP1.3.6 in the JSP spec (link in my signature).
[ February 29, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
gauravkkaul kaul
Greenhorn

Joined: Feb 29, 2008
Posts: 5
Originally posted by Ben Souther:
Get rid of the jsp:body tag.

The jsp:body action is not a replacement, wrapper, or substitute for the HTML body tag. The two are not related.
To learn more about what a jsp:body action is, and when you would use it, see section JSP1.3.6 in the JSP spec (link in my signature).

[ February 29, 2008: Message edited by: Ben Souther ]
gauravkkaul kaul
Greenhorn

Joined: Feb 29, 2008
Posts: 5
Thanks Ben for Replying.
I edited the JSP Page which 'builds/compiles' successfully but when I run the
page on the browser,it displays the following ERROR message..

500 Internal Server Error
java.sql.SQLException: Invalid column nameat oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240)at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:3201)at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1880)at oracle.jdbc.driver.ScrollableResultSet.findColumn(ScrollableResultSet.java:1308)at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1572)at _employees._jspService(_employees.java:58)[/employees.jsp]at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)at java.lang.Thread.run(Thread.java:595)


The Edited JSP Page is as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<table cellspacing="3" cellpadding="2" border="1" width="100%">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<%@ page contentType="text/html;charset=windows-1252"
import="java.sql.ResultSet"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<title>employees</title>
<link href="css/jdeveloper.css" rel="stylesheet" media="screen"/>
</head>
<body><p>
 
</p><p>
<u>
<font color="#0000a5">
<strong><font size="5">
ANYCO CORPORATION:     EMPLOYEES APPLICATION
</font></strong>
</font>
</u> 
</p><p>
 
</p><p>
 
</p><p>
<jsp:useBean id="empsbean" class="view.DataHandler" scope="session"/>
</p><p>
 
</p><p>
 
</p><p>
<%ResultSet rset; rset=empsbean.getAllEmployees();%>
</p><p>
 
</p><table cellspacing="2" cellpadding="3" border="1" width="100%">
<tr>
<td>First Name</td>
<td>Last Name</td>
<td>Email</td>
<td>Job</td>
<td>Phone</td>
<td>Salary</td>
</tr>
<%while (rset.next())
{
out.println("<tr>");
out.println("<td>"+rset.getString("firstname")+ "</td><td>"
+ rset.getString("last name")+"</td><td>"
+ rset.getString("email")+ "</td><td>"
+rset.getString("job_id")+ "</td><td>"
+rset.getString("phone")+ "</td><td>"
+rset.getDouble("salary")+"</td>" );
out.println("<tr>");
}%>
</table><p>
 
</p></body>
</html>

I AM ATTEMPTING TO DISPLAY THE DATA FROM THE ORACLE DATABASE ON THE JSP PAGE.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error Handling