struts

dynamic tree structure using struts tiles framework ?

I want to create a dynamic tree with menus and submenus fetching data from the database. I am using the struts tiles framework. Is there any tag or other ways to do it ? ...

How to work with referenced projects in eclipse

Ok maybe everybody knows how to do this, but I've never try it beacause I've never needed it so, how do you work with multiple referenced projects in eclipse? I have a couple of Struts 1 web applications that must use another struts 1 "library" project and right now I'm doing the communication between them using url requests, wich is rea...

Loading an object in ServletContext (application scope)

I would like to put two small constant objects (one TreeMap and one ArrayList) somewhere in the ServletContext of a Struts2 webapp (running under Tomcat 6), such that those objects may be accessible from any JSP, through the Application Scope. Under Struts1, I would have used one of those startup "plug-ins" (defined in struts-config.xml...

Struts html html:text does not close input type="text" tags

I use struts-html to generate forms fields. For example: <%@ taglib prefix="html" uri="/WEB-INF/taglibs/struts-html.tld" %> <html:text property="email" styleId="email" size="44"/> generates: <input type="text" name="email" size="44" value="" id="email"> As shown above the generated input tag is not closed. This causes my html t...

Problems with Struts and AJAX

Hello, Here is my problem, I'm bulding a modular aplication, and I'm using the SwitchAction in the struts-config.xml to change to another config file, eht problem is that when I change to the other module, and get back to the default config xml, I'm getting a error, because my page use a AJAX request to get some data from the DB, and I'v...

How to store a url which is rejected by a security filter, to go to it after the user logs in

I use application managed security for an Intranet web application. I have the next filter in my web.xml file: <filter> <filter-name>employeeAccessFilter</filter-name> <filter-class>security.AuthorizationFilter</filter-class> <init-param> <param-name>roles</param-name> <param-value>employee</param-value> </init-pa...

Java Struts: preselect value in s:select?

Hi guys, I have this struts tag: <s:select name="country.id" list="countries" listValue="name" listKey="id" headerValue="Select Country" headerKey="" label="Country" /> which outputs the following html code: <select name="country.id" tabindex="12" id="registration_country"> <option value="">Select Country</option> <optio...

How perform Junit tests with Struts - Ibatis

Hello everyone, im using Struts 1.2.x and Ibatis 2.x version for development, so i finish yesterday and now i want to perform test this is my first time trying to work with JUnit, I already make test but in JavaApp not running on server, so how can I simulate or generate mocks with server behavior, and wich mocks are recommended for Stru...

How can I get the content from a session variable?

My situation: On my jsp site I show a table. When somebody click a row, this row must be marked with an other backround color for example. Also more then one row can be marked. Two things are important. First: I bear in mind which rows are marked. Secend: In which order. My idea is: I have a ArrayList and put all row IDs in this. So I...

How to make Struts and Prototype work better together?

Prototype library uses $('element-id') or $F('element-id') to get the element or value of a form element. This is very convenient to code in javascript. But in Struts, I find there is no way to define an id attribute for a form element. Although i can use <html:xhtml/> to define a form tag with id attribute as follows: <%@ page co...

Exchanging of screens between two users

We have a web-based application with tech stack - 1. Java Struts based 2. Hibernate 3. DB - Oracle 4. App server - JBoss server We are facing an issue related to concurrent usage of the application by two or more users. When I am doing an operation and I submit the changes, the next page or success message that comes up is of a differen...

Data handling in web app with GWT, Struts and Hibernate

I am writing a Web App using Struts and Hibernate. Recently, I discovered GWT and the Visualization API. This all looked very interesting and provides AJAX functionalities that my app needs. I'm a newbie that is quite confused.... Where to put data access level checks? In the web app, users have different level of access for the data. ...

Using prefix as parameter inf a forward within a action mapping

There's any way to use a prefix as a paramter or in the path of a forward like: ???? ...

Using flex with struts

I have an old (around 5 years) enterprise application that I manage. Recently we got a go ahead for sprucing up the UI with flex. Keeping in mind that we want to utilize the current code base in struts (it's a fairly big application) , as I see it , I have three options: Flex BlazeDS Flex Tag Library FxStruts BlazeDS is an open sourc...

Websphere Portlet migration, missing parameter in DispatchAction

I'm migrating an old portlet application from WPS5 to WPS6. The application is using IBM legacy container. According to the migration guide, I only renew some portal library and some tag reference. The application is still using IBM legacy container and the modified Struts Portlet. When I create a link like by: <html:link page="/page1....

JSP - Saving a collection

[Warning] I'm new to JSP/Struts/JSTL. This is probably a newbie question :) I have a form that contains a collection: public class ServiceForm extends AbstractForm { private List<SrvDO> allSrv = new ArrayList<SrvDO> (); } I can see the object data correctly in my form using the JSP. The page displays 5 input box with the dat...

Struts tiles visual debugging

At a previous job they had a debug mode that would highlight struts tiles in the browser so you could tell what each tile was doing and the tile's filename. This was enormously helpful for when you are lost in a forest of nested tiles. Now that I'm at a new struts place, I've been trying to figure out how to implement it but I'm coming...

Mock Struts FormFile

I have an action class that expects a FormFile from a DynaActionForm. Typically in JMock, I'll just add request params to the struts mock, which will in turn populate the DynaActionForm. Obviously, the set request param is for strings only. So I'm unsure how to get or set the mock to use a multi-part request such that I can add the Fo...

Struts Indexed Property -- no getter method found for property

So in struts I have an action form which has 5 properties. Each property is a String Array. in my form class i getter/setter methods for the properties like the ones below: public String getPropertyX(int index) { return x[index]; } public void setPropertyX(int index, String value) { x[index] = value; } When my form is first pr...

Unable to find the path to JSP in struts

I am working on WCS 6.0 which makes use of the struts framework. The entry for one of the views(CategoryDisplayView) is defined as the following global forward in the struts config xml <forward className="com.ibm.commerce.struts.ECActionForward" name="CategoryDisplayView/10001" path="/"/> There is also an action mapping defined for th...