struts2

Paramter in the message resource properties file of struts

I am using the html:image tag to include images in the jsp. the image location is specified in the message resource properties file of struts. the paths are defined as ../../images/image1.gid previously. now the context is changing due to some reason, so the images are not being loaded. how do i access the context path in the message re...

Struts2 action: how to know if HTTP request is GET or POST?

Is there a way to know in Struts2 action's method if this is GET or POST request? ...

Which Java MVC Framework best aligns with the Web Application Security Framework Manifesto?

Has anyone in the stackoverflow community ever studied the security characteristics of various J2EE frameworks? I would love to understand what framework best aligns with the Web Application Security Framework Manifesto http://labs.securitycompass.com/papers/secure-web-application-framework-manifesto-v0-08.pdf ...

Struts 2 - Accessing different properties on the ValueStack sharing the same name

Struts 2 will resolve all property names during view rendering against the top object in the ValueStack first. But how can one access a property with the same name on the object lower on the stack? Example: Let's say I have an Action class called MyAction and it has a a logDate property. In the view rendered after this action is invoke...

What is the prerequisite when try to learn the spring or struts framework?

I think these technologies are really prior to java industry ...

How to pass parameter to method call in Struts 2 OGNL

Hi Guru, I want to use a property as a param of an object's method. <s:property value="orderProductId" /> returns correct value (e.g. 1) <s:iterator value="%{order.getProductById(1).activations}"> gives me correct value too. But <s:iterator value="%{order.getProductById(#orderProductId).activations}"> doesn't. Not sure why #or...

how to return url in form file in strut

hai all, i have one problem regarding to return the form file value is validation fail. i have one form that have a few field to be fullfil by the user and one attachment field.if one of the field is blank the system will give the error when submit the form..my problem is, all the field will have the value that we entered before this bu...

Struts 2: redirect-action ? From on page to another and back again.

Hello, i have a jsp page that has a submit button. This button is linked with another jsp page. So lets assume my stuts file looks like this: B.jsp So now the submit button being on page "A.jsp" will take me to B.jsp. This works. The problem is that i want to do the following: press on the submit button on page A.jsp , go to B...

How to select default tab in sx:tabbedPanel struts 2.1.6 dojo

Hi, I am using struts2.1.6 with DOJO plugin. I have three tabs shown as TabValue1, TabValue2 and TabValue3. I want to show TabValue2 as the default tab if a certain url is clicked otherwise TabValue1 is the default tab. Here is the code: <sx:tabbedpanel cssStyle="width: 630px; height: 600px;" doLayout="true" id="tabbedPanel2...

Serving static content with Struts2: Tomcat error 404

With Struts2 I can't find a way to serve a static CSS :-/ Newbie question but I could not find any answer on the Internet: The CSS file is static/styles.css in my WAR file. Tomcat replies with 404 when I request http://server/myapp/static/styles.css But it works if I put styles.css at the root of the WAR and request http://server/myap...

java.lang.ClassNotFoundException: org.apache.struts.tiles.TilesServlet

I'm using the tiles servlet in my struts application while running the application I'm getting the follwing error "java.lang.ClassNotFoundException: org.apache.struts.tiles.TilesServlet" The application is running fine using application servlet. ...

axis2 (1.3) problem with client.

Hi, (axis2 1.3, struts2 2.1.8.1, tomcat 6.x, java 1.5.0) I've got problem with making my first web service. I create a MOCK api which i want to test. My action: public HotelMessage[] getMessages(String roomNr) { HotelMessage[] msg2return = new HotelMessage[1]; HotelMessage m1 = new HotelMessage(); m1.setId(1L); m1.setMessage("wi...

where to place the struts.xml file

Hi...I need to know...where we have to place the struts.xml file...Is there any possibilities of changing the location of struts.xml file ...

Is there any Tag for generating a datagrid in Struts 2?

Hi.., I need to generate a datagrid using a Struts 2, i have found out Struts-Layout can do that, but its not supporting Struts 2. Can any one suggest me a way to generate a datagrid using Struts 2? ...

problem in export data to excel using displaytag in Struts

I load data to jsp page in Struts framework. And then export that data to excel using displaytag .It 's ok without using tiles. But I 'm using tiles in my project. So when I export data to excel , blank page is shown and nothing happen.Please help me. Thanks in advance. ...

Redirect to another action in an interceptor in struts 2

I am currently in the process of learning Struts 2 and I am currently building a simple application where unverified users are redirected to a login form. I have a login form and action functional which takes the users credentials, verifies them and stores a User object in the session however I am now trying to prevent access to pages b...

Struts2 data tranfer from Jsp to Action using Complex Objects

Hi, how to use Model-driven or Object-backed approaches to map Complex Object with depth more than one. for example, I have action class with property User object and USer has a address object as its property. Address has street name as property. like .. User.address.streetName In JSP, using s:textfield or other tags how can I repr...

How to do URL authentication in struts2

Hi, I am using struts2.1.6 + Spring 2.5 I have four modules in my application. Registration Module Admin Module Quote Module Location Module. In registration module the customer can register himself and only after registering he is supposed to have access of the remaining three modules. I want to implement something like if the acti...

Struts2 converting empty string parameter to an "int"

How does one convert an empty string to an int using Struts2. When the application encounters this parameter with no value, like from an empty text field, it throws the following exception. java.lang.NoSuchMethodException: com.XXXXXXXXXXXX.setID([Ljava.lang.String;) Where ID is an integer, and the URL is: Something.action?ID=&oth...

Struts2 RedirectAction: Params Interceptor and Workflow?

My common usecase for my Struts2 application is that I have Actions that collect data which are presented on an JSP page. I'll call these view-actions. But then I also have logic actions, which "do" something in the background (like registering a user). These might also have a bean that needs to be shown on an JSP, but I need to redirec...