• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Error Handling

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic