struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Lorenz <>
Subject Re: s:action tag showing result
Date Sat, 22 Jun 2013 15:03:27 GMT
Hello Lukasz,

I still facing this behaviour. Even with 2.3.16-SNAPSHOT.

One thing that make me thing, was the flush attribute. When it is true, the json result (the
string) appear in the position where the action tag is in the jsp. But, when I change it to
false, the result appears in the top os my page.

One workaround that I can use is return a result name that is no defined in the struts.xml.
This workaround throw an exception, since struts could no find my result name, but my list
is populated and no result from this action tag appear in my page.

I hope this information can help.

Also, I am printing my config:


<?xml version="1.0" encoding="UTF-8" ?>
	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
<struts order="10">
	<constant name="struts.devMode" value="false" />
	<constant name="struts.action.extension" value=",json,xhtml,xml"/>

	<constant name="struts.convention.action.mapAllMatches" value="true" />
	<constant name="struts.convention.default.parent.package" value="default"/>

	<constant name="struts.custom.i18n.resources" value="global" />

	<constant name="struts.mapper.class" value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/>
	<constant name="struts.mapper.prefixMapping" value=":rest,/ajax:struts,/login:struts"/>

	<package name="default" extends="rest-default">

			<interceptor class="" name="login"/>
			<interceptor class="" name="permissao"/>
			<interceptor class="" name="idioma"/>
			<interceptor class="" name="jpa"/>
			<interceptor-stack name="jpaStack">
				<interceptor-ref name="login"/>
				<interceptor-ref name="permissao"/>
				<interceptor-ref name="idioma"/>
				<interceptor-ref name="jpa"/>
				<interceptor-ref name="restDefaultStack"/>
		<default-interceptor-ref name="jpaStack"/>

		<default-action-ref name="login_sistema"></default-action-ref>

			<result name="login">/login.jsp</result>
			<result name="forbidden">/forbidden.jsp</result>


	<include file="struts-ajax.xml"/>
	<include file="struts-login.xml"/>
	<include file="struts-filtro.xml"/>


<?xml version="1.0" encoding="UTF-8"?>
 "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
	<package name="ajax" extends="json-default" namespace="/ajax">
			<interceptor class="" name="jpa"/>
			<interceptor-stack name="jpaJsonStack">
				<interceptor-ref name="jpa"/>
				<interceptor-ref name="jsonValidationWorkflowStack"/>
		<default-interceptor-ref name="jpaJsonStack"/>

		<action name="loadCidadeByEstado" method="loadCidadeByEstado" class="">
			<result name="json" type="json">
				<param name="includeProperties">


Thanks for all your help!

Felipe Lorenz

Em 22/06/2013, às 04:27, Lukasz Lenart escreveu:

> 2013/6/22 Litman, Bruno <>:
>> We are also experiencing issues with tags and theme files, we are upgrading many
applications from to
>> I am not sure if this is related - if not and if I need to start a new discussion
please let me know and accept my apology.
>> 1/
>> We previously always coded forms as :
>>        <s:form action="login" namespace="/">....
>> Now randomly, this fails to generate the proper action url in the html (it is missing
the '.action', which results in a 404 once you post the form)
>> The only workaround we have found so far is to add the '.action' suffix to the s:form's
action attribute. Before it was always added for us by struts.
>> So now we are having success with
>>        <s:form action="login.action" namespace="/">...
>> Is this expected behavior? Did this change recently? is not so ancient..
> No, it isn't - mainly a bug - Struts should add suffix for you, you
> basically use the same action names as defined in struts.xml. This is
> very strange, I have just tested with struts2-blank on Jetty and
> suffix was there. Could you share more details about the config?
>> 2/
>> We are trying to replace the "required" attribute in the textfields with "requiredLabel"
without success. Was the xhtml theme's ftl file "controlheader_core" updated to reflect the
changes in the struts-tags.tld (requiredLabel replaced required)?
> You are right, it is bug :\ Please fill an issue
>> Also, it seems applications are randomly serving ftl files from other applications'
theme folders with the same name.
>> This was demonstrated by modifying something obvious in one application's ftl file
(displaying some text next to a text field's label), and the effect can be seen randomly on
other applications which shouldn’t even see that application's template folder (the themes
are however named the same in both applications)
>> I am only able to make the "requiredLabel" attribute work if placed in a <s:param>
tag as opposed to being just an attribute of the s:textfield tag, but even so it is still
not always using the same ftl files (however always from similarly named themes placed inside
each application)
>> This is extremely confusing. Is FreeMarker caching files independently of the application?
Is the app container interfering with caching? (We are using Resin 4.0.36)
> Hmmm... very strange behaviour, it will be hard to find the source of
> the problem. Maybe it is related to new ContainerHolder and how Resin
> is managing threads - but I'm not sure :\
> Regards
> -- 
> Łukasz
> + 48 606 323 122
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message