struts2

Outputstream write error in websphere file download

Hi, I have the option to export the data, which prompts the user for three option. open, save, cancel. It is working well when the user clicks on open and save. while clicking on cancel my client is geeting the follwing error stacktrace. but from my machine it working fine. What might be the problem?how to resolve it? ExceptionMapp E ...

Is the use of Vector supported in Struts2?

I am new to Struts 2. I am trying a to use a Vector field in my POJO class .In the struts.xml file I am using the following snippet of code. <action name="Login" class="example.Login"> <param name="arrayDiscoveryReach">${arrayDiscoveryReach}</param> Here Login.java is my POJO class(which acts as a Struts Action class) and arrayDiscove...

Displaying Icons in the Struts2-dojo Tree Control

So, I've got a Struts2.1.8 application and I want to add a tree control with icons, similar to what you see on a file manager. I decided to use the tree control provided in the struts2-dojo-plugin. The tree displays just fine, but I can't find a way to add icon decorations to the nodes. Anyone know how to do this? I've searched the s...

Error while starting tomcat server in eclipse for struts 2 web application

I am trying to implement a sample web application using struts 2 in eclipse. I have configured everything. But when I am starting tomcat it is displaying below error Sep 15, 2010 11:59:46 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Sep 15, 2010 11:59:46 AM org.apache.catalina.core.StandardContext s...

Struts2 form to update object in Session map?

In my build action, I have an object that I put into my session map. InputField testField = new InputField(); testField.setName("testName"); testField.setValue("testValue"); sessionMap.put("TEST_FIELD", testField); In the JSP, I want to build a textfield using this object. <s:textfield name="#session.TEST_FIELD.value"/> Upon sub...

using struts2.2.1 annotations with netbeans 6.9 not working

Hello Im doing the convention plugin for struts2.2.1, examples with netbeans6.9 and it seems like something is wrong. I even copy/paste everything and nothing. rightnow I get : "The error message is ${message} " when it should be "The error message is Hello World" i could not post the structure, but I put the jsp under the WEB-...

Struts-2 problem on action button HTTP Status 404 - There is no Action mapped for namespace / and action name add.

I m Newbie to struts and I am following http://viralpatel.net/blogs/2010/01/tutorial-struts2-hibernate-example-eclipse.html to make strut2 project but i m getting error : HTTP Status 404 - There is no Action mapped for namespace / and action name add. I am creating project in "Netbeans 6.8". URL pattern on which I am getting error http:/...

Ajax url inside java script in struts 2.0.

how to use Ajax url inside java script in struts 2.0. For example for servlets we write url= ControllerServlet?ActionId=myJsp similarly how to write for struts 2. Thanks in advance. ...

struts 2 password preset value

i want set preset value in struts 2 password tag, can anybody tell me advance for thanks ...

Struts2 JSON Plugin With Annotations

I have a Struts2 Action Class configured via annotations. All of the "normal" methods that are annotated with @Action work fine. However, I need to add a method into the action that returns JSON. Here is a trimmed down version of my class (dao autowired with Spring): @Namespace("featureClass") // define success and input actions for c...

Struts2 Request Scope Problem

Hi I am working on create and edit of asset(A master of my project). I have a jsp named createEditAsset and an action AssetAction. When creating i call save method and when redirecting to jsp for edit i call poupulateFieldsForEdit() so that jsp fields can be loaded with data for editing. Now this all works fine but after editing when i...

Struts 2 and YUI Uploader issues

I have a project that I'm working on where we need to be able to select multiple files for upload at one time. Since we already use YUI for several other things this seemed to be an fairly simple request. I did some research and decided to use YUI's Uploader to do the work. Built a simple example to get familiar with the component. The ...

Struts 2.2.1 gives There is no Action mapped for namespace / and action name .

I've got a simple Struts 2 application that I build and deploy to glassfish with Netbeans. When I point the web browser to http://localhost:8080/Struts2Hello/login.action/ it gives this error: There is no Action mapped for namespace / and action name . My action is named "login". Why does it think it is named "."? (In order to get t...

Struts2: global-results configuration error

I want to use a global result "login". But it ony works without global-results in the configuration. This is the relevant part of my configuration: categoryList.jsp categoryDetail.jsp /WEB-INF/login.jsp When I start my application it throws this Exception: org.xml.sax.SA...

how do i set default selected value in struts2 select tag

Hi am new in struts2. i have user from , in the role column displays by dropdown list. when user form edit mode, the stored values are placed into corresponding controls.but i cant set dropdown list default selected value. how can i have do it. ...

in struts 2 execute method is not called by default.

in struts 2 execute method is not called by default. I have HelloWorld.java as controller and HelloWorld.jsp this is my struts.xml <struts> <package name="example" namespace="/example" extends="struts-default"> <action name="add" class="example.HelloWorld" method="add"> <result name="SUCCESS" type="redirect">HelloWorld</re...

Struts2 - if result type json and method defined then all methods get invoked

Idefined my struts xml as follows: "<"action name="index" method="execute" class="hr.credo.web.struts2.action.Index"> <"result name="success" >/index.jsp <"/action> <"action name="hello" class="hr.credo.web.struts2.action.Index" method="JSON"> <"result name="success" type="json" > <"/action> and in my action class i have an execute...

Populating dropdownlist based on other dropdwonlist in struts 2

Hi, I have two drop-down lists that are populated from the DB. I want to populate the second drop-down dynamically based on the selected item in the first drop-down. Can you help me? Thanks in advance. ...

Struts2: what is the difference between redirect - redirectionAction - chain

Hi, I guess they must be somehow base on the good-old "request.sendRedirect" and "RequestDispatcher.forward". They both have pros and cos: - sendRedirect changes the URL but requires 2 request/response, so hard to share data between 2 request - forward is my favorite but it doesn't change the URL, so pressing F5 may cause error. I don...

A newbish Struts2 question

Here is the situation. I have 3 actions 1. action/create_something 2. action/save_something 3. action/preview_something I start at www.site.com/action/create_something I fill in some info and submit a form which passes to the save_something action save_something creates an object foo based on the form inputs. foo now has a field cal...