Visualizzazione post con etichetta Struts. Mostra tutti i post
Visualizzazione post con etichetta Struts. Mostra tutti i post

mercoledì 26 novembre 2008

Struts2 and WTF8 [ENG]

Struts 2 is, overall, a good piece of software, but as many other frameworks has its annoying shortcomings. For example: it doesn't deal well with UTF8 encoding at all. The solution - found by my colleague Leonardo A. (second name omitted for privacy's sake) - is to use a filter that will set the request encoding.
The source of the workaround is Ian Purton's Blog.
Hope this helps since it was not so easy to smoke out.

venerdì 29 febbraio 2008

Struts: passare parametri con html:link

<bean:define id="queueType" name="WorkFlowForm" property="queueType" />
<bean:define id="taskId" name="queues" property="taskId" />
<bean:define id="queueName" name="queues" property="queueName" />

<%
java.util.HashMap params = new java.util.HashMap();
params.put("queueName", queueName);
params.put("pageMode", queueType);
params.put("taskId", taskId);
pageContext.setAttribute("parameters", params);
%>

<html:link name="parameters" scope="page" page="<%=path%>">
 Anchor
</html:link>

(v. TheServerSide.com)