Struts DynaForms (bylo: Struts tiles)

Jiří Mareš Jiri.Mares na svt.cz
Úterý Srpen 5 10:59:03 CEST 2003


No ja se domnivam, ze ta action musi mit odkaz na formular, takze:

  <action name="loginForm"
	      input="/nejake.jmeno.odkud.se.jde.na.tuto.stranku"
               path="/Login"
               type="cz.chalu.struts.LoginForm">
           <forward name="success" path="/pages/ok.jsp" />
         </action>


Jiri Chaloupka wrote:
> Nemate nekdo link na nejakou rozumnou dokumentaci k dynaforms?
> 
> udelal jsem si sablonu s nejakym formularem, tak jak ji vygeneroval 
> eclipse:
> <%@ page language="java"%>
> 
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
> <%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
>    <html:form action="/Login.do" method="post" focus="loginForm">
>      <table border="0">
>        <tr>
>          <td>Login:</td>
>          <td><html:text property="username" /></td>
>        </tr>
>        <tr>
>          <td>Password:</td>
>          <td><html:password property="password" /></td>
>        </tr>
>        <tr>
>          <td colspan="2" align="center"><html:submit /></td>
>        </tr>
>      </table>
>    </html:form>
> 
> do struts-config sekce action-mapping jsem dal
> <action
>              path="/Login"
>              type="cz.chalu.struts.LoginForm">
>          <forward name="success" path="/pages/ok.jsp" />
>        </action>
> 
> do form-beans:
> <form-bean
>            name="loginForm"
>            type="org.apache.struts.action.DynaActionForm">
>            <form-property name="username" type="java.lang.String"/>
>            <form-property name="password" type="java.lang.String"/>
>        </form-bean>
> 
> a dostavam:
> Cannot retrieve definition for form bean null' 
> javax.servlet.ServletException: Cannot retrieve definition for form bean 
> null
> 
> Obecne - co by jste doporucili za dokumentaci ke strutsum?
> 
> Dik Jirka
> 
> 
> 

-- 
Jiří Mareš (mailto:Jiri.Mares na svt.cz)
ČSAD SVT Praha, s.r.o. (http://www.svt.cz)
Czech Republic



Další informace o konferenci Konference