struts2

NullPointer getting internationalization text at LocalizedTextUtil

Hi, I have 3 language files idioma_CA.properties idioma_EN.properties idioma_ES.properties in the package "idiomas" and one default idioma.properties. struts.properties has this properties: hibernatePlugin.configurationType=annotation struts.custom.i18n.resources = idiomas/idioma So everytime I try to change the language struts2 igno...

How to use Struts 2 with JFreeChart?

Firstly, I went here ( http://code.google.com/p/struts2-examples/downloads/list and I downloaded Hello_World_Struts2_Mvn.zip) and I run that example. After that, I went here (http://struts.apache.org/2.x/docs/jfreechart-plugin.html), I add the dependencies for commons-lang-2.5.jar, jcommon-1.0.16.jar and jfreechart-1.0.13.jar and I mo...

Compiling a webapp against Tomcat 5.5 libraries and deploying on Tomcat 6.

I have a Struts2 webapp, in which I compiled using the Tomcat 5.5 libraries. If I deploy this webapp on a Tomcat 6 server, should it still work without a hitch? ...

Struts 2- problem with s:action tag

Here is a small test application that does following things ask user to enter his name and submit - (index.jsp) as a result of index.jsp is the welcome.jsp page that asks user to select his/her blood group index.jsp <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/strut...

How to use the iterator tag in Struts2?

I have class A { private String field1; private String field2; private B b; } class B { private String field3; } List<A> myList; How can I access the field3 using the myList? This would work for field1 and field2, but how about field3? <s:iterator value="myList"> <tr> <td><s:proper...

Extending struts 2 "property" data tag

Hi, We are currently developing a project with Struts2. We have a module on which we display a large amount of data on read-only fields from a group of beans via the "property" Struts 2 data tag (i.e. <s:property value="aBeanProperty" />) on a jsp file. In some cases most of the fields might come empty, so a blank is being displayed on ...

Struts 2 and @SMD Method validation

Hi, i am using Struts 2 and the Json plugin, to make ajax requests. I want to know if there's one way to validate my json, with struts validator, and show field errors in my jsp, before calling the @SMDMethod in my Action. Thanks for your help. ...

Restoring web session in struts2

Hi, I have a classical scenario of a website and payment gateway integration, where the request for payment is sent to payment processor, and the payment processor calls back my application once it's done with some parameters I passed to it in the original request. Among parameters, we pass jsessionid and we expect that when the remote...

Lack of example escaping special characters in struts2

Hello colleagues! Googling today I couldn't found sample or mentioning of best practice: how to escape user input in Struts2. Of course I can manually convert characters on validate() method, but it looks too obvious. So may be exists some automation to avoid code/script injection? ...

Who is using Struts 2

Earlier i worked on Struts 1. Struts 2 seems own good design, comparatively fast, fun, and professional. But I could not search who is using Struts 2. Do anyone know which web applications are using it? Any other advice about adopting it for new web ventures? Please also share your personal experience with it, if you have worked on it! ...

Trouble with client side validation using Struts 2. Xml based validation rules not recognized.

Hi, This is my first post to ask a question on stack overflow and my issue is that when I don't see a client side validation error message when I don't enter any values for that field even when it is configured as required. The page is reloaded and goes to the result page and client validation fails. I am not sure what I am doing wrong. ...

programmatically load configuration (struts.xml)

We encounter an issue in our Struts application where intermittently we'll get namespace not found error. If this happens, we would explicitly like to load the configuration & package & action settings stated in struts.xml. We thought doing Dispatcher.getInstance().getConfigurationManager().reload(); will fix the issue but still ...

Spring MessageResource , Il8n Spring , Struts

Hi There! I am using Spring and struts in my application. To support il8n I have created a class public class ApplicationMessageResource extends ResourceBundle implements MessageSource { private static MessageSource ms = null; //Injected by spring and contains parentMessageSourc...

Obfuscating Struts2 web application ..

I want to obfuscate J2EE application which uses Struts2 framework, I tried using Proguard but its changing package and class names which does not get reflected stuts.xml file, Is it impossible to obfuscate struts2 web application ? Or any other way ? ...

How to use struts2_jquery plugin

HI Can somebody help me out with how to start using struts2 jquery plugin. Can someone give me a link to a small complete project with source code.. ...

[struts2] What is a preferred way of displaying result as a table?

I have an action that populates the result from the DB. Right now, I see a way of doing it and that is to make the Action ServletRequestAware, set the populated list as a request attribute and show it in jsp. Since a lot of improvements have been introduced into struts2, is there any other way of doing that? The first thing that comes ...

How to create dynamic images with struts2?

In strut2, the <s:img> tag is gone. How can I create dynamic images? Update I want to set the image 'src' according to a parameter in the value stack (like ${userName_}). ...

struts2: After locale switching how to return on same page where user was on ?

I am using struts2 and in my struts.xml I have written following code for locale switching - <action name="switchToEnglish"> <interceptor-ref name="i18n"/> <interceptor-ref name="basicStack"/> <result name="input">error.jsp</result> <result name="success">login.jsp</result> </action> <action name="s...

struts2: accessing external service from type converter

is it possible to inject a service reference into custom type converter? my situation is quite typical in fact, I have a combo, which binds to collection of entities. On submit I get only an ID of selected entity and have to refetch the real object in my action. I was thinking about more elegant way to do this, and it seems like making ...

Struts2 : possible to use dynamic method invocation and specify different validation rules for different methods ?

I have in struts.xml : <action name="MyAction!*" class="my.Action" method="{1}"> <result name="step1">step1.jsp</result> <result name="step2">step2.jsp</result> <result name="error">error.jsp</result> </action> Then my my.Action class has various methods that can be called by specifying the nam...