You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Antony Paul <an...@hotmail.com> on 2004/09/23 13:59:24 UTC

Re: small but complex problem -jsp.error.badaction when accessing a bean from a jsp

The problem is at line number 5. org.apache.jasper.JasperException:
/idcard.jsp(5,5) jsp.error.badaction
You forgot to put % sign.
<body>
////<@page import="com.dinesh.idcard" >
<% @page import="com.dinesh.idcard" %>
<jsp:usebean id="myidcard" scope="page" class="com.dinesh.idcard">

rgds
Antony Paul

----- Original Message -----
From: "Dinesh Keesara" <kd...@hotmail.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, September 23, 2004 4:42 PM
Subject: small but complex problem -jsp.error.badaction when accessing a
bean from a jsp


>
>
>
> Hey can anyone solve this ......
>
> I am using Tomcat 4.1.30 on IE
> I am Getting following error :
>
> HTTP Status 500 -
> --------------------------------------------------------------------------
------
> type Exception report
> message description
> The server encountered an internal error () that prevented it from
> fulfilling this request.
> exception
> org.apache.jasper.JasperException: /idcard.jsp(5,5) jsp.error.badaction
> at
>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:94)
> at
>
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428
)
> at
>
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126
)
> at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671)
> at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
>
> and  blah blah blah ..........
>
> the jsp file looks as follows:
>
> <html>
> <head>
> </head>
> <body>
> <@page import="com.dinesh.idcard" >
> <jsp:usebean id="myidcard" scope="page" class="com.dinesh.idcard">
> <jsp:setProperty name="myidcard" property="RollNo" value="123" />
> <jsp:setProperty name="myidcard" property="Name" value="Harikiran" />
> </jsp:usebean>
> <%=myidcard.getName()%>
> <br>
> <%=myidcard.getRollNo()%>
> </body>
> </html>
>
> and the bean file looks as follows:
>
> package com.dinesh;
> public class idcard{
> private int RollNo;
> private String Name;
> public void setRollNo(int num){
> this.RollNo=num;
> }
> public int getRollNo(){
> return RollNo;
> }
> public void setName(String Name)
> {
> this.Name=Name;
>
> _________________________________________________________________
> The new MSN toolbar! Your shortcut to the internet!
> http://toolbar.msn.co.in/ Access a world of convenience!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org