You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "BAYSSE Vincent (EURIWARE)" <vi...@euriware.fr> on 2002/08/23 10:02:12 UTC

Cannot retrieve definition for form bean null


I have this exception when i try to include a jsp file into a tile.

ApplicationDispatcher[/siquael]: 
Servlet.service() for servlet debugjsp threw exception
javax.servlet.ServletException: 

Cannot retrieve definition for form bean null 	

at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:463) 	
at org.apache.jsp.ecbbody$jsp._jspService(ecbbody$jsp.java:654)


Does anyone know about it ? 

Thanks.

here is my jsp , config, action and tile files.


------------------------------------
FIRST CALL jsp def.technique.ecb.ecbwindow define in the tile xml file.
Then a bug appears when i include jsp ecbbody.jsp
It'works fine when i change the action of the jsp file ecbbody.jsp with any
other action mapping.
------------------------------------
ecbbody.jsp


<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-layout.tld" prefix="layout" %>

<layout:form align="center" action="/technique/ecb/ecb.do" styleClass="FORM"
key="Sélection des ECB (Liste)">
</layout:form>

----------------------------------


    <action path="/technique/ecb/ecb" parameter="reqCode"
type="com.rte.siquael.technic.struts.action.ECBActions">
            <forward name="createEQF" path="def.technique.ecb.eqfwindow" />
        </action>



-----------------------------------

public class ECBActions extends DispatchAction {

  public ActionForward createEQF(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
			throws Exception {

			return
mapping.findForward(IConstants.CREATE_EQF_KEY);
  }



}
---------------------------------------

   <!-- -->
  <definition name="def.technique.ecb.ecbwindow"
path="/layout/mainlayout.jsp">
	  <put name="header" value="/common/header.jsp" />
	  <put name="menubar" value="/common/menubar.jsp" />
	  <put name="footer" value="/common/footer.jsp" />
	  <put name="body" value="/technique/ecb/ecbbody.jsp" />
  </definition>

  <!-- -->
  <definition name="def.technique.ecb.eqfwindow"
path="/layout/mainlayout.jsp">
	  <put name="header" value="/common/header.jsp" />
	  <put name="menubar" value="/common/menubar.jsp" />
	  <put name="footer" value="/common/footer.jsp" />
	  <put name="body" value="/technique/ecb/eqfbody.jsp" />
  </definition>


ATTENTION : Si vous n'êtes pas destinataire de ce message, vous n'êtes pas
autorisé à copier, retransmettre, distribuer, révéler ou conserver le
contenu de ce message.
WARNING : If you are not the intended recipient, you are not authorised to
copy, disclose, distribute or retain in this e-mail. 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Cannot retrieve definition for form bean null

Posted by Parveen Kumar Hooda <ph...@ggn.aithent.com>.
Hi
what i think that your ecbbody.jsp will be having some controls which are
expecting
some values from the formbean.but in the your definition u have directly
included ecbbody.jsp.
So by this configuration u r not going to the controller so it is throwing
the null bean exception.
if u configure it like this it should work

<put name="body" value="someAction.do" />
and make this someAction.do to forwarsd ecbbody.jsp

Also ensure that u have this mapping in web.xml
<servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class
>

hope it will help u



regards

Pary









----- Original Message -----
From: "BAYSSE Vincent (EURIWARE)" <vi...@euriware.fr>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, August 23, 2002 1:32 PM
Subject: Cannot retrieve definition for form bean null




I have this exception when i try to include a jsp file into a tile.

ApplicationDispatcher[/siquael]:
Servlet.service() for servlet debugjsp threw exception
javax.servlet.ServletException:

Cannot retrieve definition for form bean null

at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:463)
at org.apache.jsp.ecbbody$jsp._jspService(ecbbody$jsp.java:654)


Does anyone know about it ?

Thanks.

here is my jsp , config, action and tile files.


------------------------------------
FIRST CALL jsp def.technique.ecb.ecbwindow define in the tile xml file.
Then a bug appears when i include jsp ecbbody.jsp
It'works fine when i change the action of the jsp file ecbbody.jsp with any
other action mapping.
------------------------------------
ecbbody.jsp


<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-layout.tld" prefix="layout" %>

<layout:form align="center" action="/technique/ecb/ecb.do" styleClass="FORM"
key="S�lection des ECB (Liste)">
</layout:form>

----------------------------------


    <action path="/technique/ecb/ecb" parameter="reqCode"
type="com.rte.siquael.technic.struts.action.ECBActions">
            <forward name="createEQF" path="def.technique.ecb.eqfwindow" />
        </action>



-----------------------------------

public class ECBActions extends DispatchAction {

  public ActionForward createEQF(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {

return
mapping.findForward(IConstants.CREATE_EQF_KEY);
  }



}
---------------------------------------

   <!-- -->
  <definition name="def.technique.ecb.ecbwindow"
path="/layout/mainlayout.jsp">
  <put name="header" value="/common/header.jsp" />
  <put name="menubar" value="/common/menubar.jsp" />
  <put name="footer" value="/common/footer.jsp" />
  <put name="body" value="/technique/ecb/ecbbody.jsp" />
  </definition>

  <!-- -->
  <definition name="def.technique.ecb.eqfwindow"
path="/layout/mainlayout.jsp">
  <put name="header" value="/common/header.jsp" />
  <put name="menubar" value="/common/menubar.jsp" />
  <put name="footer" value="/common/footer.jsp" />
  <put name="body" value="/technique/ecb/eqfbody.jsp" />
  </definition>


ATTENTION : Si vous n'�tes pas destinataire de ce message, vous n'�tes pas
autoris� � copier, retransmettre, distribuer, r�v�ler ou conserver le
contenu de ce message.
WARNING : If you are not the intended recipient, you are not authorised to
copy, disclose, distribute or retain in this e-mail.



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>