struts2

mapping arraylist to iterator

How to map an String arraylist to iterator tag in struts 2 for er: public ArrayList list1 = new ArrayList; this list1 have to be displayed in jsp using s:iterator give me the syntax ...

Struts 2: how to send JSON to action

How to send Json to action, on Struts2? ...

Global Exception in struts2

I am trying to configure Global exceptions in struts.xml. when i include the global-exception mapping tag, the project is not getting start. i am getting the following message in log, Jul 27, 2010 6:33:07 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jul 27, 2010 6:33:07 PM org.apache.catalina.core.Standard...

Deploying Struts2 Application without ContextPath

I've got a struts2 application running under a contextpath "/path" on my local tomcat without problems. When I deploy it on a webserver (using a proxy to redirect from "http://www.domain.com" to "myserver:8080/path/") Struts does all kinds of strange things. First, it includes the context in -tags. That can be turned off by an attribute...

Using cookies with Struts 2 struts2 struts

I've got the following (shortened) struts2 action: public class MyAction extends BaseAction implements CookiesAware { public String execute() { if (cookiesMap.containsKey("BLAH")) blah=Integer.parseInt(cookiesMap.get("BLAH")); return "success"; } // For handling cookies Map<String, String> cookiesMap; @Over...

Is it possible to add ajax to the struts2 tags ,textfeild or checkbox in jsp page using DOJO ? if yes how ?

Hi Is it possible to add ajax to the struts2 tags ,textfeild or checkbox in jsp page using DOJO ? if yes how ? Or if not what library should i use to apply ajax to single textField ? Thanks ...

How can I share common components between Java web applications?

Environment IDE: Netbeans 6.9 App Server: Glassfish 3 Frameworks: Spring, Hibernate, Struts 2 Problem I have 2 web applications. I want to share resources between them both - i.e. authentication form jsp and other assets (js - yui,jquery/images/css). I will be adding more web applications that will also require access to these commo...

repopulate controls when validation fails in struts2

Hi, I am new this framework. In my page i have one dropdown and one text box. If any error comes that drop is no longer available. How to fix this. Struts.xml: <action name="*DropDown" class="com.mmm.ehspreg2.web.action.DropdownListAction" method="{1}" /> <action name="addComment" method="add" class="com.mmm.e...

Disabling works in IE8 and not in lower versions of IE

I have a jsp code like this <html:option value="${apealstaList.appealStatusMasterId}" disabled="true">${apealstaList.appealStatusDescription}</html:option> This disable the options and it works fine in IE8 and not working in the lower versions like IE7 and IE6. Please help me in this issue. EDIT Please share If there are any other a...

How to understand Open Source projects/libraries?

There are few open source projects/APIs/libraries that we use in our project (Spring, Struts, iBatis etc.) and I want to understand their design and how they work internally. What is the best way to understand these projects? Note that I am already using these libraries in my project. And I know the input-output interaction/configuratio...

Struts2 Error when Deploying: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory

I'm creating a basic Struts2, Maven webApp and getting this error when I deploy to Tomcat 6 or Jetty. Has anyone seen this? 2010-07-29 15:33:38.801::WARN: failed struts2 Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/workspaces/test/test/target/work/webapp/WEB-INF/lib/struts2-core-2....

Struts 2 Action: parameter access

Hi, I defined an action like this: <action name="login" class="tognetti.site.actions.AuthenticationAction"> <param name="defaultURI">/secure/listaAnnunci.action</param> <result>/login.jsp</result> </action> I can I access the param from inside the action? Thanks ...

how can i replace struts1 <logic:match>tag in struts2?

hi all in struts1, this is <logic:match> tag to use [Regular Expression]. how can i use the function in struts2 tag ? for example, i want to check a string begin with 'AA', <s:if test=""> The string begin with 'AA' </s:if> Thank you ...

Mapped properties in Struts2

I need to update List of Domain objects in struts2. I fetching those list of objects from other table..Each row of page table contains one dropdown. when user clicks on SAve button i have to fetch all these dropdowns and save t into the database. <display:table id="data" name="lstEntities" sort="list" uid="row" h...

JSP code to display a JFreeChart using Struts2

All, I have been trying to use this guide to render a JFreeChart on a JSP page. Could someone help me out with the JSP code required to show this on a tabbed panel using the struts-dojo-tags. Eventually I want to render a different graph on each tab and refresh them using AJAX. At the moment I have configured everything as shown in th...

Refresh the contents of a tabbed panel in Struts2

All, I have a question regarding Tabbed Panel in Struts2. If I have a few panels and I want the content on a tab to be updated every five seconds would how would I do this? Also, I only want the tab which is currently being viewed to update at the given interval. The other tabs should update when selected and then continue t be updat...

struts 2.1 book?

Struts 2.1 is a major upgrade from the previous 2.0.X versions. I have not been able to find any books for Struts2.1 or ref guides. There is a thread on Struts mailing list but I think Manning has canceled the publication Struts2.1 book Does anyone know of Struts books being released that cover Struts2.1 in details? ...

Struts2 Hibernate (returning a list causing hibernate to fetch data from all relationships)

Hello, I am creating dependent drop downs using Struts2 jquery. The problem is that getLobList() method inside action class is causing hibernate to fetch all data for a lob. If I remove that getter method, those logs are not created. Why is this happening any way to fix it? JSP page <s:url id="remoteurl" action="getLists"/> <sj:select...

Default initialization of variables in action forms.

Hi Guys, i have made a from like : MyForm extend ActionForm{ list<Menu> MenuList=null; MyForm(){ super(); setMenuList(); //initialize menu list } } Menu object has string desciption and boolean variable for selected or not. In web page, i am iterating the list to display all the menus and checkbox over those boole...

Dojo datetimepicker doesn't take any event

I am using the dojo dateTimePicker in my application. Now i want to limit its start date and end date on particular event e.g. If the selected period is current finacial year then i want change the startDate value of my dateTimePicker to 1st April 2010 & lastDate value to 31st march 2011. And i want to do that on onchange/onblur event of...