Archive for category STRUTS

Struts’da Javascript’ten java action class’n atribute’na erişim

1. Strust/jsp
function saveInParent() {

var r=confirm("Odemenizi gerceklestiyoruz. Emin misiniz!")

if (r==true)
var postedData =$('#navigationPage').val('success');


var postedData =$('#navigationPage').val('input');



2. Java Acton class

public String doContinue() {
return navigationPage;

3. struts.xml



, , ,

Leave a comment

Redirect Action Result

This result uses the ActionMapper provided by the ActionMapperFactory to redirect the browser to a URL that invokes the specified action and (optional) namespace. This is better than the ServletRedirectResult because it does not require you to encode the URL patterns processed by the ActionMapper in to your struts.xml configuration files. This means you can change your URL patterns at any point and your application will still work. It is strongly recommended that if you are redirecting to another action, you use this result rather than the standard redirect result.

See examples below for an example of how request parameters could be passed in.

actionName (default) – the name of the action that will be redirect to
namespace – used to determine which namespace the action is in that we’re redirecting to . If namespace is null, this defaults to the current namespace
supressEmptyParameters – optional boolean (defaults to false) that can prevent parameters with no values from being included in the redirect URL.

detail link

, , ,

Leave a comment


“could not be resolved as a collection/array/map/enumeration/iterator type.”

hatasının çözümü

ActionBean içinde prepare() metodunuzu ya da default action 'da yaptığınız işleri tekrar çağırmanız gerekir.

1. public void prepare() throws Exception {

2. ekranda çıkan warning 'ise " struts.devMode = false" ekleyerek gizlebiliyor.(struts xml lerinizde vereilebilir)

3. struts.xml'nizde eklemeniz lazım.


Leave a comment