Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-6 of 6 total  RSS 

struts with hibernate (Eclipse)

Can any one tell me how to use this site to get struts with hibernate related code
thanks in advance

Pass multiple params to html:link

// The only way i found

<bean:define id="param1" name="record" property="id"/>
<bean:define id="param2" name="record" property="language_id" />
<%
	java.util.HashMap params = new java.util.HashMap();
	params.put("record_id", param1);
	params.put("language_id", param2);
	pageContext.setAttribute("tempParams", params);
%>
<html:link action="PDPSelectTabs" name="tempParams">
	Hoja
</html:link>

Pass more than one parameter to struts action using html:link tag

<bean:define id="param1" name="record" property="id"/>
<bean:define id="param2" name="record" property="language_id" />
<%
	java.util.HashMap params = new java.util.HashMap();
	params.put("record_id", param1);
	params.put("language_id", param2);
	pageContext.setAttribute("tempParams", params);
%>
<html:link action="PDPSelectTabs" name="tempParams">
	Hoja
</html:link>

struts-config.xml: Global Forward

<global-forwards>
	<forward name="error" path="/WEB-INF/jsp/error.jsp"/>
</global-forwards>

struts-config.xml: Basic Plugin

<plug-in className="listin.plugins.ListinPlugin">
	<set-property property="config_file" value="/WEB-INF/config/Listin.properties"/>
</plug-in>

struts-config.xml: Basic Action

		
<!-- BuscarLDAP: Realiza una busqueda en LDAP -->
<action path="/BuscarLDAP" type="listin.actions.BuscarLDAP">
	<forward name="success" path="/WEB-INF/jsp/resultados.jsp"/>
</action>
« Newer Snippets
Older Snippets »
Showing 1-6 of 6 total  RSS