I've got an app that is trying to use @EJB annotation to inject remote references to EJBs in my ejb.jar file. I'm getting inconsistent results. In one case, I have a listener in web.xml that gets called and apparently has the EJB injected correctly, since I can see it connecting to the EJB and calling methods on it. In another class (...
I'm using Struts 2 and I'd like to determine the page generation time without an external profiler. I can easily profile the actions execute() method, but I don't know how to include the time spent before (in dispatchers, interceptors...) and after (time taken by the servlet corresponding to the view ("jsp time")).
Is there simple way t...
I've upgraded Xwork from 2.0.4 to 2.0.6 (struts version is 2.0.11.1). The field validation is working correctly, however the keys for the errors are not. For example, I have a required field called profile.name.firstName. The field error key is now coming up as profile.profile.name.firstName. The first value in the dot-notation is al...
I had been told to deploy a *.war file within tomcat and this application should be working fine.
But for an unknown reason all I get is:
System Exception: javax.servlet.jsp.JspException: ValidatorResources not found in application scope under key "org.apache.commons.validator.VALIDATOR_RESOURCES"
I know that this application has been ...
I am using struts 2 and full-hibernate-plugin-for-struts2. I would like to set fileUpload interceptor
<param name="allowedTypes">image/png,image/gif,image/jpeg</param>
Where can i find the content of defaultStackHibernate so I can do that?
...
Hi, I'm new to this.
I want to know how to display a different value in struts 2 select.
eg: i want to put Jan,Feb as month where the value should pass 1,2 respectively.
if anybody aware of this please let me know
thank you.
...
I have this problem and it took me some time for me to understand it, so I thought it could save some time to others if I post it here for reference. It doesn't really require an answer, though if someone can explain it or fix it it would be welcome !
Using Struts 2.1.8, I have some actions configured like that :
<action name="ReportO...
Hi I'm using struts 2.
I'm trying to reload a target div from a javascript by using jquery to target the div and a struts action that loads the content.
Does anyone know how to do this?
The problem is how I use (javascript) jquery to do this.
BR, Tobias
...
Scenario: A fairly mature project uses Struts2 and Spring and Hibernate. I say mature because it has been going on a for a while and there are many struts actions written already.
Suppose we wanted to remove Struts2 from the project and instead depend entirely on Spring MVC without rewriting the entire project.
Is this something that s...
Hello, Im having an issue getting json working with the struts-jquery-plugin-2.1.0
I have included the struts2-json-plugin-2.1.8.1 in my classpath as well.
Im sure that I have my struts-jquery-plugin configured correctly because the grid loads, but doesnt load the data its supposed to get from the action class that has been json'ized.
...
Hi all,
You can easily use a List in struts2 select tag, but is there a way to use Map in tag?? If it is possible please provide a sample code...
thanx !
...
Hello,
I would like to know if it is possible, in Struts2, to map an HTML form's fields to those of an action, automatically, without getters and setters.
It is clear that by getters and setters or the ParameterAware interface and the Map, fields can be set in the action, but I just wanted to know if otherwise there was a way.
...
I have this jsp
<s:form action="saveOrUpdateProduct" method="post" enctype="multipart/form-data" validate="true" theme="css_xhtml ">
<s:textfield name="product.productName" label="Name" required="true" requiredposition="left" labelposition="left"></s:textfield>
<br>
<s:textfield name="product.productPrice" label="Price" requ...
Hi
I want to use two struts taglib in each other, something like this:
< s:property value="url-< s:property value="number"/>"/>
or
< s:property value="url-${number}"/>
but I got the following error in the second one:
According to TLD or attribute directive in tag file, attribute values does not accept any expressions.
Anybody h...
<ajax:autocompleter name="cityName" list="list" size="1" label="Select City"
listValue="cityName" listKey="id" autoComplete="true"></ajax:autocompleter>
i am using struts 2 with ajax but its not working
...
How do we populate\retrieve information from\into multiple forms in same action class in Struts2 ? With ModelDriven approach, action is tied to one form. With ScopedModelDriven interceptor jsp becomes dirty as one has to write model.property to access form properties. Is there a better way of doing it?
...
I have a package that extends hibernate-default and I would like to use json plugin too, but if I write extends="hibernate-default,json-default" I cannot use hibernate anymore because my session is always null. Why is my session null? If my package extends only hibernate-default session is not null.
...
Is there an easy way to make Struts 2 action names case insensitive? Currently I have the following action defined:
<action name="printTest" class="MyClass" >
<result name="error">/WEB-INF/jsp/error.jsp</result>
<result name="input">/WEB-INF/jsp/test.jsp</result>
<result name="success">/WEB-INF/jsp/test.jsp</result>
</action>
If...
i am a newbie . i have a question regarding struts 2 framework and tomcat . i know that each request has it own thread , but my question is are the global variables defined in struts action shared amongst requests.
for ex: if i have a global variable named say
int pageNo; and i am using in say method called paginationAll() ...
Map session = ActionContext.getContext().getSession();
session.put("user", user);
This code generates a warning: Type safety: The method put(Object, Object) belongs to the raw type Map. References to generic type Map should be parameterized.
Map<String, Serializable> session = (Map<String, Serializable>)ActionContext.getContext().getS...