tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McGrady <m...@michaelmcgrady.com>
Subject Re: Simple But Irritating problem accesing beans from jsp
Date Fri, 24 Sep 2004 06:33:14 GMT
Sorry, I mean: useBean instead of usebean?  (My eyesight is not great.  
Nerd, you know!)

Michael McGrady

Dinesh Keesara wrote:

>the following code is working perfectly:
>
><%@page import="com.dinesh.*" %>
><% IdCard myidcard=new IdCard();%>
><%
>myidcard.setName("HariKiran");
>myidcard.setRollNo("123");
>%>
><%=myidcard.getName()%>
><br>
><%=myidcard.getRollNo()%>
>
>but if i replace it with jsp:usebean tag  like this :
>
><%@page import="com.dinesh.*" %>
><jsp:usebean id="myidcard"  class="com.dinesh.IdCard" scope="page">
><jsp:setProperty name="myidcard" property="rollNo" value="123" >
><jsp:setProperty name="myidcard" property="name" value="Harikiran" >
><%=myidcard.getName()%>
><br>
><%=myidcard.getRollNo()%>
></jsp:usebean>
>
>i am getting a jsp.error.badaction messsage here is complete stack trace :
>
>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: /idcard1.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)
>       at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
>       at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
>       at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
>       at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
>       at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
>       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
>       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>       at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>       at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
>       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>       at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>       at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>       at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
>       at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>       at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
>       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
>       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:711)
>       at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
>       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:687)
>       at java.lang.Thread.run(Thread.java:536)
>
>
>--
>Dinesh Keesara
>M.Tech(Software Engg.)
>School of IT, JNTU,
>Hyderabad
>
>
>
>
>  
>



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


Mime
View raw message