You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Romualdo Rubens de Freitas <ro...@sercomtel.com.br> on 2003/04/14 01:00:10 UTC
* * * Exception on JSP execution * * *
Hi Folks,
When a JSP page is called, before it's displayed, the following exception happens:
* * * * *
org.apache.jasper.JasperException: Cannot find ActionMappings or ActionFormBeans
collection
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
.
.
.
root cause
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans
collection
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)
at org.apache.jsp.proprietarios_jsp._jspService(proprietarios_jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
.
.
.
* * * * *
and the following is my JSP page:
* * * * *
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html locale="true">
<body>
<html:form action="/proprietarios.do">
Nome:<html:text property="propNome" size="40" maxlength="40"/>
</html:form>
</body>
</html:html>
* * * * *
Any help would be appreciated.
TIA,
Romualdo Rubens de Freitas
mailto:romualdo@sercomtel.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: How to use ApplicationResources.properties in a JavaBean
Posted by Buics <rb...@pc.ntep.nec.co.jp>.
Thank you Phil, I think this is best solution to implement.
--buics
Phil Steitz wrote:
> Buics wrote:
> > I have a java bean called SampleBean.class
> >
> > I have this code to access my EJB stuff
> >
> > oEnv.put(Context.INITIAL_CONTEXT_FACTORY,
> > "com.sybase.ejb.InitialContextFactory");
> > oEnv.put(Context.PROVIDER_URL, "server_url");
> > oEnv.put(javax.naming.Context.SECURITY_PRINCIPAL, "username");
> > oEnv.put(javax.naming.Context.SECURITY_CREDENTIALS, "password");
> >
> > Is it possible to use the struts ApplicationResources.properties to make those
> > context properties dynamic?
>
> You can use the MessageResources.getMessage() to retrieve the property
> values from ApplicationResources.properties at run time.
>
> For example, if you have
> initialContextFactory=com.sybase.ejb.InitialContextFactory
> in your ApplicationResources.properties, you can use
>
> MessageResources messages =
> MessageResources.getMessageResources("ApplicationResources");
> oEnv.put(Context.INITIAL_CONTEXT_FACTORY,
> messages.getMessage("initialContextFactory"));
>
> see
> http://jakarta.apache.org/struts/api/org/apache/struts/util/MessageResources.html
>
> >
> > or any suggestions may help.
> >
> > TIA,
> > Buics
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: How to use ApplicationResources.properties in a JavaBean
Posted by Phil Steitz <ph...@steitz.com>.
Buics wrote:
> I have a java bean called SampleBean.class
>
> I have this code to access my EJB stuff
>
> oEnv.put(Context.INITIAL_CONTEXT_FACTORY,
> "com.sybase.ejb.InitialContextFactory");
> oEnv.put(Context.PROVIDER_URL, "server_url");
> oEnv.put(javax.naming.Context.SECURITY_PRINCIPAL, "username");
> oEnv.put(javax.naming.Context.SECURITY_CREDENTIALS, "password");
>
> Is it possible to use the struts ApplicationResources.properties to make those
> context properties dynamic?
You can use the MessageResources.getMessage() to retrieve the property
values from ApplicationResources.properties at run time.
For example, if you have
initialContextFactory=com.sybase.ejb.InitialContextFactory
in your ApplicationResources.properties, you can use
MessageResources messages =
MessageResources.getMessageResources("ApplicationResources");
oEnv.put(Context.INITIAL_CONTEXT_FACTORY,
messages.getMessage("initialContextFactory"));
see
http://jakarta.apache.org/struts/api/org/apache/struts/util/MessageResources.html
>
> or any suggestions may help.
>
> TIA,
> Buics
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
How to use ApplicationResources.properties in a JavaBean
Posted by Buics <rb...@pc.ntep.nec.co.jp>.
I have a java bean called SampleBean.class
I have this code to access my EJB stuff
oEnv.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sybase.ejb.InitialContextFactory");
oEnv.put(Context.PROVIDER_URL, "server_url");
oEnv.put(javax.naming.Context.SECURITY_PRINCIPAL, "username");
oEnv.put(javax.naming.Context.SECURITY_CREDENTIALS, "password");
Is it possible to use the struts ApplicationResources.properties to make those
context properties dynamic?
or any suggestions may help.
TIA,
Buics
Re: * * * Exception on JSP execution * * *
Posted by Sachin Pandey <sa...@bigpond.net>.
I think you have to supply the name of the form bean in the html:text tag to
refer to the form instance.
<html:text name="someForm" property="propNome" size="40" maxlength="40"/>
Cheers
Sachin
----- Original Message -----
From: "Romualdo Rubens de Freitas" <ro...@sercomtel.com.br>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, April 14, 2003 9:39 AM
Subject: Re: * * * Exception on JSP execution * * *
> Sachin,
>
> I don't think so. Looking at "struts-example" in "registration.jsp" there
isn't
> a "name" attribute too and it works well.
>
> Romualdo Rubens de Freitas
> mailto:romualdo@sercomtel.com.br
>
>
> Sachin Pandey escreveu:
> > Don't you have to give the name of the form to find the appropriate
mapping
> > to the Form instance.
> >
> > <html:form name="someForm" action="/something.do"/>
> >
> > Cheers
> > Sachin
> >
> > ----- Original Message -----
> > From: "Romualdo Rubens de Freitas" <ro...@sercomtel.com.br>
> > To: <st...@jakarta.apache.org>
> > Sent: Monday, April 14, 2003 9:00 AM
> > Subject: * * * Exception on JSP execution * * *
> >
> >
> >
> >>Hi Folks,
> >>
> >>When a JSP page is called, before it's displayed, the following
exception
> >
> > happens:
> >
> >>* * * * *
> >>org.apache.jasper.JasperException: Cannot find ActionMappings or
> >
> > ActionFormBeans
> >
> >>collection
> >>at
> >
> >
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> > 48)
> >
> >>at
> >
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> >
> >>at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> >>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >> .
> >> .
> >> .
> >>root cause
> >>
> >>javax.servlet.ServletException: Cannot find ActionMappings or
> >
> > ActionFormBeans
> >
> >>collection
> >>at
> >>
> >
> >
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> > l.java:494)
> >
> >>at
org.apache.jsp.proprietarios_jsp._jspService(proprietarios_jsp.java:66)
> >>at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
> >>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >> .
> >> .
> >> .
> >>* * * * *
> >>
> >>and the following is my JSP page:
> >>* * * * *
> >><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
> >>
> >><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> >>
> >><html:html locale="true">
> >> <body>
> >> <html:form action="/proprietarios.do">
> >> Nome:<html:text property="propNome" size="40" maxlength="40"/>
> >> </html:form>
> >> </body>
> >></html:html>
> >>* * * * *
> >>
> >>Any help would be appreciated.
> >>
> >>TIA,
> >>Romualdo Rubens de Freitas
> >>mailto:romualdo@sercomtel.com.br
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: * * * Exception on JSP execution * * *
Posted by Romualdo Rubens de Freitas <ro...@sercomtel.com.br>.
Sachin,
I don't think so. Looking at "struts-example" in "registration.jsp" there isn't
a "name" attribute too and it works well.
Romualdo Rubens de Freitas
mailto:romualdo@sercomtel.com.br
Sachin Pandey escreveu:
> Don't you have to give the name of the form to find the appropriate mapping
> to the Form instance.
>
> <html:form name="someForm" action="/something.do"/>
>
> Cheers
> Sachin
>
> ----- Original Message -----
> From: "Romualdo Rubens de Freitas" <ro...@sercomtel.com.br>
> To: <st...@jakarta.apache.org>
> Sent: Monday, April 14, 2003 9:00 AM
> Subject: * * * Exception on JSP execution * * *
>
>
>
>>Hi Folks,
>>
>>When a JSP page is called, before it's displayed, the following exception
>
> happens:
>
>>* * * * *
>>org.apache.jasper.JasperException: Cannot find ActionMappings or
>
> ActionFormBeans
>
>>collection
>>at
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> 48)
>
>>at
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>
>>at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> .
>> .
>> .
>>root cause
>>
>>javax.servlet.ServletException: Cannot find ActionMappings or
>
> ActionFormBeans
>
>>collection
>>at
>>
>
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:494)
>
>>at org.apache.jsp.proprietarios_jsp._jspService(proprietarios_jsp.java:66)
>>at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> .
>> .
>> .
>>* * * * *
>>
>>and the following is my JSP page:
>>* * * * *
>><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
>>
>><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>>
>><html:html locale="true">
>> <body>
>> <html:form action="/proprietarios.do">
>> Nome:<html:text property="propNome" size="40" maxlength="40"/>
>> </html:form>
>> </body>
>></html:html>
>>* * * * *
>>
>>Any help would be appreciated.
>>
>>TIA,
>>Romualdo Rubens de Freitas
>>mailto:romualdo@sercomtel.com.br
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: * * * Exception on JSP execution * * *
Posted by Sachin Pandey <sa...@bigpond.net>.
Don't you have to give the name of the form to find the appropriate mapping
to the Form instance.
<html:form name="someForm" action="/something.do"/>
Cheers
Sachin
----- Original Message -----
From: "Romualdo Rubens de Freitas" <ro...@sercomtel.com.br>
To: <st...@jakarta.apache.org>
Sent: Monday, April 14, 2003 9:00 AM
Subject: * * * Exception on JSP execution * * *
> Hi Folks,
>
> When a JSP page is called, before it's displayed, the following exception
happens:
> * * * * *
> org.apache.jasper.JasperException: Cannot find ActionMappings or
ActionFormBeans
> collection
> at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
> at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> .
> .
> .
> root cause
>
> javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans
> collection
> at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:494)
> at org.apache.jsp.proprietarios_jsp._jspService(proprietarios_jsp.java:66)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> .
> .
> .
> * * * * *
>
> and the following is my JSP page:
> * * * * *
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
> <html:html locale="true">
> <body>
> <html:form action="/proprietarios.do">
> Nome:<html:text property="propNome" size="40" maxlength="40"/>
> </html:form>
> </body>
> </html:html>
> * * * * *
>
> Any help would be appreciated.
>
> TIA,
> Romualdo Rubens de Freitas
> mailto:romualdo@sercomtel.com.br
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org