try something like this - #sessi...@fully.qualified.salesconstants@SALES_MKT_CAT].salesPrice
-Wes On Tue, Jun 22, 2010 at 9:56 PM, prathima <prathima_b...@yahoo.co.in> wrote: > Hi, > We are migrating Struts 1.2 application to Struts2 and I am facing some > issues. > > I have all the constants defined in a file called SalesConstants.java. It has > a constant which is SALES_MKT_CAT ="marketing". In the Action class, an > object(marketingProduct) of type Product is placed in session with key as > "marketing". > For example: session.put(SalesConstants.SALES_MKT_CAT,marketingProduct). > > I have to check if marketingProduct is in session and if so if it has > salesPrice = 100 where salesPrice is a field in marketingProduct object which > is of type Product. > > How can I check this in if tag? > I tried #session.%{SalesConstant.SALES_MKT_CAT}.salesPrice but it didnt work > I do not want to specify "marketing" directly which is the value of > SalesConstant.SALES_MKT_CAT. > Also, how can I check if "marketingProduct" is in session or not? > We are currently upgrading from Struts 1.2 to Struts2 and we are in tight > schedule. I understand we do not have logic:present , logic:equal tags in > Struts2 :( > I am new to Struts2, Please help. > > Thanks, > Prathima > > -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org