You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Amit Soni <am...@netcore.co.in> on 2004/10/25 16:16:48 UTC
problem to call Bean in jsp page
Hi all,
Here i have already added one simple jsp page in jetspeed portlet
using admin-->portlet browser tool which contain simple output. But i
have problem when i call the simple bean in this page. so if i want call
the Java Bean with this jsp file then it gives me error.
The content of my jsp file is ::
<jsp:useBean id="bean" scope="session" class="MyClass"/>
<%
out.println("From Bean " + bean.getMessage());
%>
The content of MyClass.java is ::
public class MyClass {
public String getMessage() {
return "Hello World";
}
}
then in portlet that i have added it gives me error like this ::
Error encountered processing a template:
/portlets/html/HelloWorlds.jsporg.apache.jasper.JasperException:
/WEB-INF/templates/jsp/portlets/html/HelloWorlds.jsp(1,1) The value for
the useBean class attribute MyClass is invalid. at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39) at
so any one of u have idea reagarding this then pls help me
Regards,
Amit Soni
----------------------------------------------------------
Netcore's New Website
http://www.netcore.co.in
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
Re: problem to call Bean in jsp page
Posted by Dan Moore <mo...@yahoo.com>.
Hi,
I'm not all that familiar with JSP and beans, but I thought there were
two things you should look at:
1. importing the bean (using <%@page import=... syntax) into the jsp
2. having the bean class in the default package. couldn't find
anything solid about this, but I thought I remembered reading somewhere
that this was an issue.
Dan
--- Amit Soni <am...@netcore.co.in> wrote:
> Hi all,
>
> Here i have already added one simple jsp page in jetspeed portlet
> using admin-->portlet browser tool which contain simple output. But i
> have problem when i call the simple bean in this page. so if i want
> call
> the Java Bean with this jsp file then it gives me error.
>
> The content of my jsp file is ::
>
> <jsp:useBean id="bean" scope="session" class="MyClass"/>
> <%
> out.println("From Bean " + bean.getMessage());
> %>
>
> The content of MyClass.java is ::
> public class MyClass {
> public String getMessage() {
> return "Hello World";
> }
> }
>
> then in portlet that i have added it gives me error like this ::
>
> Error encountered processing a template:
> /portlets/html/HelloWorlds.jsporg.apache.jasper.JasperException:
> /WEB-INF/templates/jsp/portlets/html/HelloWorlds.jsp(1,1) The value
> for
> the useBean class attribute MyClass is invalid. at
>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
> at
>
> so any one of u have idea reagarding this then pls help me
>
> Regards,
> Amit Soni
>
>
> ----------------------------------------------------------
> Netcore's New Website
> http://www.netcore.co.in
> ----------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jetspeed-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org