struts2

why occurs deployement errors in struts2 Application?

Incrementally deploying http://localhost:8084/Strust2Example Completed incremental distribution of http://localhost:8084/Strust2Example Incrementally redeploying http://localhost:8084/Strust2Example start?path=/Strust2Example FAIL - Application at context path /Strust2Example could not be started C:\Documents and Settings\vanita.vaghasiy...

Getting template text from FreeMarker in Struts2 app

I would like to generate email inside a Struts2 application, using Freemarker. As I am also using Freemarker for my view, I would like to "reuse" the same config. There is already a similar question for doing the same thing with Spring. http://stackoverflow.com/questions/230763/getting-template-text-from-freemarker-in-spring-app I am n...

struts2 validate error

When i give validate="true" in struts2 form in index.jsp, my first page i get the exception freemarker.template.TemplateModelException: Method public java.util.List org.apache.struts2.components.Form.getValidators(java.lang.String) threw an exception when invoked on org.apache.struts2.components.Form@1a998c7 at freemarker.ext.beans...

question on struts2 interceptor stack

I write in my struts.xml this interceptor stack <interceptor-stack name="project-interceptors-stack"> <interceptor-ref name="my1-i" /> <interceptor-ref name="my2-i" /> <interceptor-ref name="paramsPrepareParamsStack" /> <interceptor-ref name="logger" /> ...

struts-2 acegi integration

Hey I am using struts2 and acegi.I am new to both of these.In my application which i have wrote using struts,i need to add security feature.For this I am using acegi(spring security). For which I have mapped acegi filter in web.xml along with mapping of struts filter.Both struts and acegi seems to be working fine except when acegi direct...

Dynamic URLs on Struts 2.

Hi, I'm creating an application using Struts2 and I want to have friendly URLs. Si, i set the following params in struts.xml: <constant name="struts.action.extension" value=""/> <constant name="struts.enable.SlashesInActionNames" value="true"/> <constant name="struts.mapper.alwaysSelectFullNamespace" value="false"/> and my actions: ...

How can use Struts 2.0, Spring and Hibernate in my framework

Is it possible put these three framework Spring, Struts 2.0 and Hibernate in single application and how without using JPA? ...

Which software/setting do I need to get my first "Hello World" in Struts?

Hello, I'd like to learn Struts 2. Unlike when I learned ASP.NET MVC/C# where I needed just to download VS2008 Express sp1 (Server Casini, Linq where included), I downloaded Eclipse Gallileo, but it looks like it's not enough. I'd like to know what (and how) to set up my machine environment so that I can write my first Hello world in St...

How to implement complicated servlet mapping in web.xml descriptor

Hi all! I faced with next task: I have an host, for example host.com and web-application on it. Application written on Java (JSP/Servlets+Struts2). I need to implement such HTTP-request to servlet mapping: if user enters address in browser like http://host.com/admin.action, where admin.action - existing action, defined in struts.xml, t...

Accessing a HashMap using Struts 2

Hi everyone, I have hashmap that was created on a page using the struts2 <s:set> tag. It looks something like this <s:set var="mymap" value="#request.mymap"/> At some point in the page, i need to get a value from the hashmap based upon a key, and i want to do it using OGNL. The key is generated based upon some logic, which i s...

Navigating from struts.xml to occurrence of action in Eclipse

I have some code within struts.xml like: <action name="viewApplicationPDF" class="com.xxx.abc.web.action.XApplicationPDFAction"> <result name="success">/WEB-INF/templates/xApplication.jsp</result> </action> I want to be able to quickly jump to the occurrences of the action "viewApplicationPDF" within jsp files...

combo box issue in jsp

i have combo box in jsp using Struts2: select the value of combo box, page is refreshing but after refreshing it display the default value in combo box (first value), not the selected value. how i show the selected value in combox after refreshing. here is my code on jsp. Combo box: <select name="ItemName" id="ItemName" onchange="...

Struts 2 List Parameter Passing

How do I pass a list of integers using the s:a href and param tags in Struts 2? Example POJO: private List<Integer> myList = new ArrayList<Integer>(); public List<Integer> getMyList() { return myList; } public void setMyList(List<Integer> myList) { this.myList = myList; } Example JSP Page: <s:url id="testUrl" action="testA...

Add exception message to json response

Hello, I have a code which throws a specific type of exception like this: throw new BadDataException("error message"); these kind of exceptions are thrown inside a method whose response type is json. I have a configuration for this exception type like this: <global-exception-mappings> <exception-mapping result="badDataError" e...

How to validate a dynamically generated inputs bound to a List in Struts 2?

Is there a way to validate a collection other than using the visitor validator? Let's say that I'm validating just primitive data and not a domain model object. For the next example how the 7 following inputs can get validated for "required". The only way that I believe I can do that is programatically in the validate() of the Action b...

jQuery not working with struts2 actions

Is it a must to use the struts2-jquery plugin to be able to run jQuery code in a struts2 application? I am working on a struts2 web app jQuery file: WebContent/js/jquery-1.4.3.js JSP pages location: WebContent/pages/*.jsp THDFindYourQuote.jsp is the default page of the application: I have a simple script in THDFindYourQuote.jsp [scrip...

Setting up struts with Eclipse

Hi, I just downloaded struts 2.2.1 and I'm trying to set it up with Eclipse and tomcat. Any good tutorials available ? Thanks ...

Struts2 or Django for GAE and future scalability

Hi, I am developing location based service. FYI, the database will expand vastly as time and location are the variables. I am considering GAE for initial deployment. I am open for any of python or java based development. While calculating the scalability, I am getting confused. I never thought of scalability before as I haven't worked on...

Tiles2 error with cascade attribute in put-attribute tag

I just don't know why i get this error: 2010-10-28 16:32:29,925 ERROR [ache.commons.digester.Digester.error :1635] - Parse Error at line 45 column 56: Attribute "cascade" must be declared for element type "put-attribute". org.xml.sax.SAXParseException: Attribute "cascade" must be declared for element type "put-attribute". til...

Change Session Timeout during runtime in Struts2

Hello, I know that I can set the session timeout in web.xml in the <session-config> section. What I need now is to change this setting dynamically during runtime, i.e. call a method that overrides the web.xml setting if needed. Any ideas? I found nothing so far. ...