Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 97317 invoked from network); 9 Sep 2009 12:50:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Sep 2009 12:50:17 -0000 Received: (qmail 77907 invoked by uid 500); 9 Sep 2009 12:50:14 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 77861 invoked by uid 500); 9 Sep 2009 12:50:14 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 38950 invoked by uid 99); 9 Sep 2009 12:23:47 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of catherine.cabasson@gmail.com designates 209.85.221.199 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id :disposition-notification-to:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Wkw5fLN7hQA+DpCYg9nHcTkgiSuXdSbz7LTaYApadDc=; b=oj7Keb5Lh4OXTccB0JRyWWkf1R0qju4KQC+/lV2bMUgsQDgoULse0loGl/wVyVon14 xa/PGDDvayqdWhwIyJwmSIa1aKQNWX8NIJbGjAHjgtSsm7C5tpVRpAAIOm92frT3Ogp1 4spZl49kCC+A9lx9Uk2qMXa9cJdOMov6tr1Rw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; b=RLFpaFKjO/PhW/KiSaXm/HunHhp1qvKaQvdM1QAcKl/4W9YzXD4eU+koakOocxOoJI lkYdZB5EZeA2c+rUE/h8QPDhtO6gdSxOxyfubliz9yJMP/hsKYdJ6lq079eVpWrB37Un HxeRxFg2rS/7ko5wpuwbP8cwabTE359CbrsPY= Message-ID: <4AA79E2A.70106@gmail.com> Date: Wed, 09 Sep 2009 08:23:06 -0400 From: Denis Cabasson User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: [S2]All the methods with "get" prefix are invoked References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, The debug tag is "inspecting" the status of your action to build its HTML output, which include knowing the value of test1, and thus calling the corresponding getter. Take out the debug tag, and everything should be back to normal. Denis. G�bor Kov�cs a �crit : > Hi everyone, > > I'm confused, because I don't understand this problem: > > I've made a simple Struts2 project. Here are the codes (they're short) > > ACTION CLASS > --------------------------- > > package test.action; > > import com.opensymphony.xwork2.ActionSupport; > > public class TestAction extends ActionSupport{ > > public String getTest1(){ > System.out.println("getTest1"); > return SUCCESS; > } > > } > > STRUTS.XML > ------------------------ > > > > > /test.jsp > > > > > WEB.XML > ----------------------- > version="2.5"> > TEST > > > struts2 > > org.apache.struts2.dispatcher.FilterDispatcher > > > > > struts2 > /* > > > > test.jsp > > > > TEST.JSP > ------------------ > <%@ page language="java" contentType="text/html; charset=ISO-8859-1" > pageEncoding="ISO-8859-1"%> > <%@ taglib uri="/struts-tags" prefix="s" %> > . > . > . > . > > > > > > TEST > > > > > > > ---------------------------------------------------------------------------------------------------------------------------- > When I click the link which calls the action named test, I expect that: > Struts can see the struts.xml, then calls the TestAction's execute method(). > Yes, it does, but besides, it calls the TestAction's getTest1() method (it > writes "getTest1" to the console)...and if I write another method, which is > public and it's return type is String AND it has a GET prefix (getFOO) > ....it will be called, too. > I don't get it...Why? > > Thanks in advance! > > G�bor > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org