How can i get all the nested tag elements from a struts2 tag?
for instance text and checkbox tags from form tag?:
<s:form>
<s:text .../>
<s:checkbox .../
<s:form>
I know that form is a tag defined in strust-tags.tld and it extends the org.apache.struts2.views.jsp.ui.FormTag,
but how does it goes behind the scene to get the nested t...
Hi guys,
I'm reimplementing a web app in Spring, and I need to expose the business logic with SOAP. I'm going for Spring 3.0, and I'd like to know: what is the recommended way of exposing Spring beans? The rest of my stack is Tomcat 6, JDK 1.6, Struts 2.
Cheers
Nik
...
Hello guys!
I need to some properties such as init params to all my actions. How can I access init parameters in my action classes. Or is there any way such that I can pass parameters to my actions. I could use .properties file but that would be for only one action. I need to define parameters for all actions.
Thanks in advance
...
I have a struts2-spring application which works fine in jetty server but when i try migrating it to WAS 6 the decorator(sitemesh) is not getting applied. The server logs shows no error.Is this a known issue ?
my web.xml looks like this
<filter>
<filter-name>action2-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatch...
Hi all,
I have configured a Spring bean as follows to return a SecurityContext:
<bean id="securityContext" class="org.springframework.security.context.SecurityContextHolder"
factory-method="getContext">
</bean>
When I use this bean the Authentication object returns null.
Authentication authentication = securityContext.getAuthen...
I'm using the fileUpload interceptor to upload files :). I've set a maximum file size as a interceptor parameter:
<interceptor-ref name="defaultStack">
<param name="fileUpload.maximumSize">20000</param>
</interceptor-ref>
Now, I want to get this value in my input/form jsp. To have a message for example "upload the config file (max...
Hello
I have the following refreshing timer:
<s:url id="getDeployQueue" action="deploymentQueue" >
<s:param name="readonly" value="readonly" />
</s:url>
<sx:div id="deploymentQueue" href="%{#getDeployQueue}" errorText="Oh wait, I couldn't get the queue right now!"
formId="queueForm" executeScripts="false" preload="true" liste...
Hi,
I am trying to access request parameters on a web page and trying to set a hidden fields value to the passed parameter. How can I achieve this using struts2 tags?
Something like...
<s:hidden name="myfield" value="#parameters['myparam']"/>
I have tries using the parameters object but it does not work!
Thanks in advance.
...
Hi All,
I am working on a struts2 application. In my jsp page I have 2-3 anchor tag and 2-3 hidden fields like
<s:a href="#">File 1</s:a>
<s:a href="#">File 2</s:a>
<s:a href="#">File 3</s:a>
and
<s:hidden name=" hidden1" />
<s:hidden name=" hidden2" />
<s:hidden name=" hidden3" />
Now please let me know, In my action class how ca...
hi,
can we declare FilderDispatcher and ActionServlet in the struts2 struts.xml
Thanks
Usman.sk
...
How can you access the REQUEST_URI from within a Struts 2 Action? In perl/php/ruby it is readily available via ENV["REQUEST_URI"] and the like. In java it seems that the PageContext.getErrorData().getRequestURI() is what I'm looking for, but sadly, the PageContext does not appear to be defined within the action, either because the ErrorD...
i have an object called 'item'.
it has a property called 'type'
when i do this:
<s:property value="item.type" />
i get this:
Q
ok, so i can read the value, but when i try this:
<s:property value="item.type == 'Q'" />
i get an empty string
this give me an empty string:
<s:property value="%{#item.type == 'Q'}" />
i even tried t...
I am a little confused on how to Error handling in Struts2. I wish to make once central page where the users will be directed if an error occurs. Furthermore, when an error occurs i wish to log it, since i am using log4j I'll be logging it as log.error(e.getMessage(), e);
However, in my action class if I catch the error (put all my cod...
Hi all, In my struts2 application I have an iterator and a list with objects like -
<s:iterator value="listOfObjects">
<tr>
<td><s:property value="item" /></td>
<td><s:property value="category" /></td>
<td><s:property value="quantity" /></td>
<td><s:property value="brand" /></td>
<td><s:checkbox name="deleteRow" onclick="submit()"/...
my code is
request.setAttribute( "test", (new userarray()).getUsers() );
my fieldValue="%{test.checked} is not working properly as when i click on submit the checkboxes which i select ....their values do not get set...and in the user array
public class userarray extends ActionSupport{
private ArrayLi...
I have the following code which does not seem to work. I fail to see why this wont work.
<s:iterator value=%{questions} id="question">
<s:if test='%{incorrectQs.contains("#question.questionId")}'>
Print something here
</s:if>
</s:iterator>
In the above code, basically I have a method called getQuestions in the action clas...
i have two fields
1)password
2)confirm password
and want to perform validation that both fields are the same............and want client side validation
plz help
...
Hi,
I want to send String as a response to the AJAX xhrPOST method. I am using Struts2 to implement the server side processing. But, I am not getting how to send the result "type" as string and the mapping which should be done to send the string from the struts2 action class to the AJAX response.
...
Japanese Yen Mark is expressed with two ways of next
0x5c (ASCII)
0xa5 (utf-8)
When I did a POST of 0xA5 in Java6, environment of Struts2, at the stage that I output in log, I become 0x5C.
Where will substitution of a character code be performed to be concrete?
...