Re: How to display message from resource bundle using Struts EL tags

2007-07-13 Thread Nuwan Chandrasoma
bean-el:message 
key=${stringvar}/http://struts.apache.org/1.3.8/struts-el/index.html-  
Original Message - 
From: semaj.najraham [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, July 13, 2007 5:49 AM
Subject: Re: How to display message from resource bundle using Struts EL 
tags





Any idea, guys!!

semaj.najraham wrote:


I have the following jsp:

%@ taglib uri=http://struts.apache.org/tags-bean; prefix=bean%
%@ page import=com.messages.Constants %

bean:message key=%=Constants.SECTION_TITLE % /

where Constants.java contains the following containts

public static final String SECTION_TITLE = section.title;

and key/value is defined in MessageResources.properties file as
section.title=Add User

How can I get the same functionality using Struts EL tag?

Thank you,
semaj





--
View this message in context: 
http://www.nabble.com/How-to-display-message-from-resource-bundle-using-Struts-EL-tags-tf4069659.html#a11573783

Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] Struts Downloads Skyrocket in 2007

2007-07-13 Thread mirimoglu



Li-3 wrote:
 
 Great job.
 
 On 7/9/07, James Carr [EMAIL PROTECTED] wrote:

 congrats guys!

 On 7/8/07, Ted Husted [EMAIL PROTECTED] wrote:
  [Apache Struts Group] Since its release in June 2001, Apache Struts
  (struts.apache.org) has become the most popular web framework for
  Java. Six years later, by any objective measure, Struts is still
  Java's most popular web framework.
 
  In February and March 2007, the group released both Struts 1.3.8 and
  Struts 2.0.6 to the general public, and Struts downloads zoomed to
  over 340,000 a month from the Apache site alone [1]. And this is just
  the tip of the iceberg. Most copies of Struts are downloaded from an
  network of mirrors or obtained from Maven repositories. Meanwhile,
  monthly page Views for the Struts website soared to over 2.1 million,
  up from levels of about 1.3 million page views in June 2004.
  Subscriptions to the Struts mailing lists hold steady at about 3,000
  accounts, not counting people who use services like Nabble and GMane.
 
  Since the framework's debut, well over twenty books about Apache
  Struts have been published [2], along with hundreds of online
  articles, and dozens of third-party extensions [3]. Books and articles
  devoted to Struts 2 are already appearing. InfoQ has released
  Starting with Struts2 both as a free PDF and as a hardcopy book via
  LuLu.com [4]. Mark Menard has started a Struts 2 cookbook [5], and
  sites like Rose India and ArcTech are offering extensive Struts 2
  tutorials [6]. Many teams are already moving Struts 1 applications to
  Struts 2, including the popular Apache Roller blogging application
  [7].
 
  An exciting feature of Struts 2 is configuration-free plugins.
  Third-party components can be added to the framework just by putting a
  JAR on the Java classpath. In fact, many of the framework's advanced
  features are provided by plugins that ship with Struts 2. A plugin
  repository site is open to the public [8], and several plugins are
  already available, including plugins for JSON, WebFlow, Google Web
  Toolkit, and Guice.
 
  While there is no lack of choice in the Java framework space, the
  clear winner with grassroots developers is still Apache Struts. With
  first-class support for Ajax, JSF, unit testing, and dependency
  injection, Struts 2 is an excellent choice for teams that want to step
  forward, without stepping away.
 
  Links:
 
  [1] -
 http://people.apache.org/~vgritsenko/stats/projects/struts#Downloads-N1008F
  [2] -
 http://opensource.atlassian.com/confluence/oss/display/BOOKS/Books+about+Struts
  [3] - http://husted.com/central/
  [4] - http://www.lulu.com/content/813300
  [5] - http://www.vitarara.org/cms/struts2cookbook
  [6] - http://www.roseindia.net/struts/struts2/index.shtml and
  https://www.arctechsoftware.com/tutorial/tutorial.do?subcatId=4
  [7] -
 http://cwiki.apache.org/confluence/display/ROLLER/What%27s+New+in+Roller+4.0
  [8] - http://cwiki.apache.org/S2PLUGINS/home.html
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -- 
 Small win by playing smart
 Big win by playing honest
 
 

-- 
View this message in context: 
http://www.nabble.com/-ANN--Struts-Downloads-Skyrocket-in-2007-tf4044764.html#a11575109
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] autocompleter, predefining initial value

2007-07-13 Thread Toni Lyytikäinen

I used a JSON action which outputs an array of arrays like this:

[
[VALUE, KEY],
[VALUE2, KEY2],
...
]

I build the list beforehand in the Action with an iterator over a
ListObjectType.
I don't know about ftl since I've never used it. And now I'm in the process
of migrating the app to use YUI, since dojo includes seem to slow down the
app too much, and YUI has nicer selection of widgets and easier api...

On 7/13/07, Pedro Herrera  [EMAIL PROTECTED] wrote:



Hi Toni.
   How do you assemble your list ? In my case I´m using a jsp result that
is
made from AjaxUtil . Is it possible to use flt for this case ?. In the
showcase example, uses a option.flt(value only), but I need two, key and
value instead.

Thanks

Herrera



Toni Lyytikäinen wrote:

 Whoops, sorry I should probably think before I post. So you want to set
 the
 key, not the value of the input element. I did this by having a
 getElementKey-method in the Action class which returns the key you want
as
 the default. Element is the name of the input element.

 On 7/12/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote:

 The value attribute sets the preset value of the input element, if that

 is
 what youre looking for.
 s:autocompleter value=AS etc... /

 On 7/12/07, Pedro Herrera [EMAIL PROTECTED]  wrote:
 
 
  I´m using autocompleter tag with Struts 2.0.8 and I need to show a
  default
  value to the user.
 
  For example, in the JSON list :
 
  [
  [Alabama,AL],
  [Alaska,AK],
  [American Samoa,AS],
  ...
 
  I need to show by default 'AS(id) - American Samoa' . How I do this ?
 
 
  Herrera
 
 
  --
  View this message in context:
 
 
http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11556982

  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -

  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




--
View this message in context:
http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11576447
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: s2: Logging

2007-07-13 Thread Dave Newton
Perhaps more importantly, do you have a log4j xml or
properties configuration file on the classpath? (IIRC
you do not need to explicitly initialize.)

--- Gary Feidt [EMAIL PROTECTED] wrote:

 What did you use for an Initialization procedure?
 
  [EMAIL PROTECTED] 7/12/2007 3:21:42 PM 
 Hi,
  How to enable logging in S2? I added log4j.jar and
 isDebug statements
 in my
 actions, but do not see any messages.
 Leena

___
 
 Confidentiality Statement:
 This email/fax, including attachments, may include
 confidential
 and/or proprietary information and may be used only
 by the
 person or entity to which it is addressed. If the
 reader of 
 this email/fax is not the intended recipient or his
 or her 
 agent, the reader is hereby notified that any
 dissemination, 
 distribution or copying of this email/fax is
 prohibited. If you 
 have received this email/fax in error, please notify
 the sender 
 by replying to this message and deleting this email
 or 
 destroying this facsimile immediately.
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 



   

Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: s2: Logging

2007-07-13 Thread Gary Feidt
What did you use for an Initialization procedure?

 [EMAIL PROTECTED] 7/12/2007 3:21:42 PM 
Hi,
 How to enable logging in S2? I added log4j.jar and isDebug statements
in my
actions, but do not see any messages.
Leena
___

Confidentiality Statement:
This email/fax, including attachments, may include confidential
and/or proprietary information and may be used only by the
person or entity to which it is addressed. If the reader of 
this email/fax is not the intended recipient or his or her 
agent, the reader is hereby notified that any dissemination, 
distribution or copying of this email/fax is prohibited. If you 
have received this email/fax in error, please notify the sender 
by replying to this message and deleting this email or 
destroying this facsimile immediately.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] autocompleter, predefining initial value

2007-07-13 Thread Toni Lyytikäinen

No, so far I have been programming with the YUI api directly using
Javascript, as I need all kinds of widgets, not just the autocompleter and
calendar. I may take a look at the YUI plugin and possibly try to add new
widgets to it, if I manage to find the time.

On 7/13/07, Pedro Herrera [EMAIL PROTECTED] wrote:



I agree , autocompleter is too slow...
Are you using  the
http://cwiki.apache.org/confluence/display/S2PLUGINS/YUI+Plugin  ?

Herrera





Toni Lyytikäinen wrote:

 I used a JSON action which outputs an array of arrays like this:

 [
 [VALUE, KEY],
 [VALUE2, KEY2],
 ...
 ]

 I build the list beforehand in the Action with an iterator over a
 ListObjectType.
 I don't know about ftl since I've never used it. And now I'm in the
 process
 of migrating the app to use YUI, since dojo includes seem to slow down
the
 app too much, and YUI has nicer selection of widgets and easier api...

 On 7/13/07, Pedro Herrera  [EMAIL PROTECTED] wrote:


 Hi Toni.
How do you assemble your list ? In my case I´m using a jsp result
that
 is
 made from AjaxUtil . Is it possible to use flt for this case ?. In the
 showcase example, uses a option.flt(value only), but I need two, key
and
 value instead.

 Thanks

 Herrera



 Toni Lyytikäinen wrote:
 
  Whoops, sorry I should probably think before I post. So you want to
set
  the
  key, not the value of the input element. I did this by having a
  getElementKey-method in the Action class which returns the key you
want
 as
  the default. Element is the name of the input element.
 
  On 7/12/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote:
 
  The value attribute sets the preset value of the input element, if
 that

  is
  what youre looking for.
  s:autocompleter value=AS etc... /
 
  On 7/12/07, Pedro Herrera [EMAIL PROTECTED]  wrote:
  
  
   I´m using autocompleter tag with Struts 2.0.8 and I need to show a
   default
   value to the user.
  
   For example, in the JSON list :
  
   [
   [Alabama,AL],
   [Alaska,AK],
   [American Samoa,AS],
   ...
  
   I need to show by default 'AS(id) - American Samoa' . How I do
this
 ?
  
  
   Herrera
  
  
   --
   View this message in context:
  
 

http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11556982

   Sent from the Struts - User mailing list archive at Nabble.com.
  
  
  
 -

   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 

 --
 View this message in context:

http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11576447
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





--
View this message in context:
http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11577695
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Migrate Struts 1 EventDispatchAction to Struts 2

2007-07-13 Thread Boon Leng

May I know what is the best way to migrate Struts 1 EventDispatchAction to
Struts 2?

The following is my struts-config.xml where displaying form and submitting
form is using the same action name but execute different methods in the
action.

action path=/*_add
type=org.springframework.web.struts.DelegatingActionProxy
name={1}Form
attribute={1}AddForm
parameter=insert, default=showForm
scope=request
validate=false
forward name=input path=.{1}.add/
forward name=success path=/{1}_add.do   redirect=true/
forward name=cancel   path=/welcome.do   redirect=true/
/action

How do I convert it to Struts 2 mapping?
Any help would be appreciated. Thanks.

Regards,
Boon Leng
-- 
View this message in context: 
http://www.nabble.com/Migrate-Struts-1-EventDispatchAction-to-Struts-2-tf4074633.html#a11580060
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Rendering an image into s:div from ajax

2007-07-13 Thread travers

Hi is it possible to specify href in s:div to render content as an image ? 
I have a struts2 action returning a JfreeChart chart as png. 

Without ajax, image src=/chart/ViewChart.action/ shows the chart
correctly, but the following renders it as text (well actually the binary
stuff inside the png)

s:url id=ajaxCallUrl value=/chart/ViewChart.action/
 s:div theme=ajax
   href=%{ajaxCallUrl} loadingText=Loading Chart...
 /s:div 

-- 
View this message in context: 
http://www.nabble.com/Rendering-an-image-into-%3Cs%3Adiv-from-ajax-tf4074632.html#a11580059
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rendering an image into s:div from ajax

2007-07-13 Thread Frank W. Zammetti
In general with AJAX this isn't possible... there's no way at present to
insert binary data, be it an image, PDF, whatever, into the page, and have
the browser render it.

What you would have to do is return HTML instead, which includes an img
tag pointing to the image on the server, which in this case would be your
chart, written out somewhere with some ID.  For instance, you might write
it to a database, using some unique identifier for the user as a key, and
then your img tag points to an Action, with the ID as a query string,
that retrieves the image from the database based on the ID.

So it would go something like:

User clicks generate chart button -- Server generates chart, writes to DB
--- Return HTML like img src=getChart.action?id=1234/ -- HTML
inserted into page, browser requests getChart.action to get image, which
is an Action, not an image -- Action retrieves image from DB and returns
it -- Chart displayed

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Fri, July 13, 2007 9:54 am, travers wrote:

 Hi is it possible to specify href in s:div to render content as an image
 ?
 I have a struts2 action returning a JfreeChart chart as png.

 Without ajax, image src=/chart/ViewChart.action/ shows the chart
 correctly, but the following renders it as text (well actually the binary
 stuff inside the png)

 s:url id=ajaxCallUrl value=/chart/ViewChart.action/
  s:div theme=ajax
href=%{ajaxCallUrl} loadingText=Loading Chart...
  /s:div

 --
 View this message in context:
 http://www.nabble.com/Rendering-an-image-into-%3Cs%3Adiv-from-ajax-tf4074632.html#a11580059
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [s2] formatting in textfield

2007-07-13 Thread yitzle

I would image you would need some on_change JavaScript.

I found this off Google:
http://javascript.internet.com/forms/currency-format.html

You might be able to adapt it somehow.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 performance

2007-07-13 Thread Ted Husted

On 7/13/07, Aram Mkhitaryan [EMAIL PROTECTED] wrote:

Does someone know how to switch on the enhancement for ognl 2.7???


It's not a matter of throwing a switch. Some code would have to be
rewritten in XWork 2 and Struts 2, which some people (James Holmes)
are volunteering to do.

-Ted.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] autocompleter, predefining initial value

2007-07-13 Thread Pedro Herrera

I agree , autocompleter is too slow...
Are you using  the 
http://cwiki.apache.org/confluence/display/S2PLUGINS/YUI+Plugin  ?

Herrera





Toni Lyytikäinen wrote:
 
 I used a JSON action which outputs an array of arrays like this:
 
 [
 [VALUE, KEY],
 [VALUE2, KEY2],
 ...
 ]
 
 I build the list beforehand in the Action with an iterator over a
 ListObjectType.
 I don't know about ftl since I've never used it. And now I'm in the
 process
 of migrating the app to use YUI, since dojo includes seem to slow down the
 app too much, and YUI has nicer selection of widgets and easier api...
 
 On 7/13/07, Pedro Herrera  [EMAIL PROTECTED] wrote:


 Hi Toni.
How do you assemble your list ? In my case I´m using a jsp result that
 is
 made from AjaxUtil . Is it possible to use flt for this case ?. In the
 showcase example, uses a option.flt(value only), but I need two, key and
 value instead.

 Thanks

 Herrera



 Toni Lyytikäinen wrote:
 
  Whoops, sorry I should probably think before I post. So you want to set
  the
  key, not the value of the input element. I did this by having a
  getElementKey-method in the Action class which returns the key you want
 as
  the default. Element is the name of the input element.
 
  On 7/12/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote:
 
  The value attribute sets the preset value of the input element, if
 that

  is
  what youre looking for.
  s:autocompleter value=AS etc... /
 
  On 7/12/07, Pedro Herrera [EMAIL PROTECTED]  wrote:
  
  
   I´m using autocompleter tag with Struts 2.0.8 and I need to show a
   default
   value to the user.
  
   For example, in the JSON list :
  
   [
   [Alabama,AL],
   [Alaska,AK],
   [American Samoa,AS],
   ...
  
   I need to show by default 'AS(id) - American Samoa' . How I do this
 ?
  
  
   Herrera
  
  
   --
   View this message in context:
  
 
 http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11556982

   Sent from the Struts - User mailing list archive at Nabble.com.
  
  
  
 -

   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 

 --
 View this message in context:
 http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11576447
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11577695
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] UTF-8

2007-07-13 Thread Morten
Hi Perssy

What do you mean by Page Header?

Just curious. Working with some of the same things.

Best regards,
Morten

Perssy Llamosas [EMAIL PROTECTED] skrev i en meddelelse 
news:[EMAIL PROTECTED]
 Solved it on my own.

 The page header requires to be in utf-8 too, it is not enough to have the 
 page encoding in jsp to utf-8.
 Without that line IE returns ascii while firefox returns utf-8.

 Perssy Llamosas wrote:
 Hello,

 I am trying to make struts read my requests as UTF-8, so far I have 
 configured Tomcat connector to uriencode in utf-8 but my struts beans 
 still receive ? strings. What am I missing?

 Perssy Llamosas

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts design best practice issue

2007-07-13 Thread Yoge

Write an interface with all the methods in your actionform. Your DTO bean
class and actionform class should implement the interface. Now you dont need
to do any type casting in your action class.

Sorry if my understanding is wrong.

--Yoge


On 7/13/07, Viplav Kallepu [EMAIL PROTECTED] wrote:


Hi All,

I am new to struts and I am using struts 1.3.8. I am using a bean class
for
every table in oracle as a Data Transfer Object and a actionform for every
jsp. Now my problem is I have to do  data type conversion from my
actionform
to DTO and DTO to actionform, for example I have date in my jsp which is
split into three drop down fileds(year,month,day) and in the DTO its a
single field.  How can manage this. Is it a standard that we can do data
type conversions in Action Class.?? I was trying to find out best
practice.
Please help me in sorting out the issue. Is there any design changes I
have
to do??


--
Regards
Viplav Kallepu




--
Yoge,
AdventNet, Inc.
925-965-6528
[EMAIL PROTECTED]
site24x7.com


Re: Struts 2 + Spring 2 + JPA + AJAX Tutorial

2007-07-13 Thread LucaLuca

Hi,

I read that tutorial too and i've follewed all the steps. My problem is that
i don't know which are the Jar requested. I was not able to find the
strtus2-api.jar. Where i can find it? I've tried to add all the Hibernate
3.2, Spring 2.0.6, Struts 2.0.8 jar, but it did not work.

It gives the following error:

13-lug-2007 12.06.52 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.8.
13-lug-2007 12.06.53 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
13-lug-2007 12.06.53 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
13-lug-2007 12.06.53 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1343 ms
13-lug-2007 12.06.53 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
13-lug-2007 12.06.53 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.9
13-lug-2007 12.06.53 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
13-lug-2007 12.06.53 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
13-lug-2007 12.06.54 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
13-lug-2007 12.06.58 org.apache.catalina.core.StandardContext listenerStart
GRAVE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor':
Cannot create inner bean '(inner bean)' of type
[org.springframework.transaction.interceptor.TransactionInterceptor] while
setting bean property 'transactionInterceptor'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.NoClassDefFoundError:
org/hibernate/MappingNotFoundException
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.NoClassDefFoundError:
org/hibernate/MappingNotFoundException
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.NoClassDefFoundError:
org/hibernate/MappingNotFoundException
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'entityManagerFactory' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
failed; nested exception is java.lang.NoClassDefFoundError:
org/hibernate/MappingNotFoundException
Caused by: java.lang.NoClassDefFoundError:
org/hibernate/MappingNotFoundException
 at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:125)
 at

Re: [S2] autocompleter, predefining initial value

2007-07-13 Thread Pedro Herrera

Hi Toni. 
   How do you assemble your list ? In my case I´m using a jsp result that is
made from AjaxUtil . Is it possible to use flt for this case ?. In the
showcase example, uses a option.flt(value only), but I need two, key and
value instead.

Thanks

Herrera



Toni Lyytikäinen wrote:
 
 Whoops, sorry I should probably think before I post. So you want to set
 the
 key, not the value of the input element. I did this by having a
 getElementKey-method in the Action class which returns the key you want as
 the default. Element is the name of the input element.
 
 On 7/12/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote:

 The value attribute sets the preset value of the input element, if that
 is
 what youre looking for.
 s:autocompleter value=AS etc... /

 On 7/12/07, Pedro Herrera [EMAIL PROTECTED] wrote:
 
 
  I´m using autocompleter tag with Struts 2.0.8 and I need to show a
  default
  value to the user.
 
  For example, in the JSON list :
 
  [
  [Alabama,AL],
  [Alaska,AK],
  [American Samoa,AS],
  ...
 
  I need to show by default 'AS(id) - American Samoa' . How I do this ?
 
 
  Herrera
 
 
  --
  View this message in context:
 
 http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11556982
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11576447
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts 2 Spring IOC problem

2007-07-13 Thread alex xander
i have some problem with Spring IOC
i use struts 2.x, hibernate 3.x and spring 2.x
my problem is
the destroy-method in my class don't respon anything
it's looks like spring doesn't recognize my destroy method
bean id=persistenceManager 
class=com.bba.persistence.hibernate.HibernatePersistenceManager 
init-method=init
destroy-method=destroy
singleton=false
property name=sessionFactory ref=mySessionFactory/

/bean

i already implement org.springframework.beans.factory.DisposableBean in my class
can anyone help me

   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. 

Re: Rendering an image into s:div from ajax

2007-07-13 Thread travers

Makes sense. I was hoping to do dashboard type implementation with
Jfreecharts where the ajax call to get the new chart  based on a timer thats
why I did not want to persist the chart somewhere.


Frank W. Zammetti wrote:
 
 In general with AJAX this isn't possible... there's no way at present to
 insert binary data, be it an image, PDF, whatever, into the page, and have
 the browser render it.
 
 What you would have to do is return HTML instead, which includes an  
 tag pointing to the image on the server, which in this case would be your
 chart, written out somewhere with some ID.  For instance, you might write
 it to a database, using some unique identifier for the user as a key, and
 then your   tag points to an Action, with the ID as a query string,
 that retrieves the image from the database based on the ID.
 
 So it would go something like:
 
 User clicks generate chart button -- Server generates chart, writes to DB
 --- Return HTML like  getChart.action?id=1234  -- HTML
 inserted into page, browser requests getChart.action to get image, which
 is an Action, not an image -- Action retrieves image from DB and returns
 it -- Chart displayed
 
 Frank
 
 -- 
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 AIM/Yahoo: fzammetti
 MSN: [EMAIL PROTECTED]
 Author of Practical Ajax Projects With Java Technology
  (2006, Apress, ISBN 1-59059-695-1)
 and JavaScript, DOM Scripting and Ajax Projects
  (2007, Apress, ISBN 1-59059-816-4)
 Java Web Parts - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!
 
 On Fri, July 13, 2007 9:54 am, travers wrote:

 Hi is it possible to specify href in s:div to render content as an image
 ?
 I have a struts2 action returning a JfreeChart chart as png.

 Without ajax, image src=/chart/ViewChart.action/ shows the chart
 correctly, but the following renders it as text (well actually the binary
 stuff inside the png)

 s:url id=ajaxCallUrl value=/chart/ViewChart.action/
  s:div theme=ajax
href=%{ajaxCallUrl} loadingText=Loading Chart...
  /s:div

 --
 View this message in context:
 http://www.nabble.com/Rendering-an-image-into-%3Cs%3Adiv-from-ajax-tf4074632.html#a11580059
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Rendering-an-image-into-%3Cs%3Adiv-from-ajax-tf4074632.html#a11580993
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts design best practice issue

2007-07-13 Thread Viplav Kallepu

Thanks for the reply.. but the variables in the actionform's datatype will
be string and DTO's will be corresponding oracle dataType. I am not able to
understand the advantage of writing the interface. May be I am missing the
concept. Actually my doubt is whether I can write type conversion codes in
Action Class and pass the variables to DTO or should I write another class
where datatype conversions are made. My understanding says we shouldn't
write type conversion code in Action Class . Even if I use 
BeanUtils.copyProperties  where  should  I place this code. Please  help
me.

On 7/13/07, Yoge [EMAIL PROTECTED] wrote:


Write an interface with all the methods in your actionform. Your DTO bean
class and actionform class should implement the interface. Now you dont
need
to do any type casting in your action class.

Sorry if my understanding is wrong.

--Yoge


On 7/13/07, Viplav Kallepu [EMAIL PROTECTED] wrote:

 Hi All,

 I am new to struts and I am using struts 1.3.8. I am using a bean class
 for
 every table in oracle as a Data Transfer Object and a actionform for
every
 jsp. Now my problem is I have to do  data type conversion from my
 actionform
 to DTO and DTO to actionform, for example I have date in my jsp which is
 split into three drop down fileds(year,month,day) and in the DTO its a
 single field.  How can manage this. Is it a standard that we can do data
 type conversions in Action Class.?? I was trying to find out best
 practice.
 Please help me in sorting out the issue. Is there any design changes I
 have
 to do??


 --
 Regards
 Viplav Kallepu



--
Yoge,
AdventNet, Inc.
925-965-6528
[EMAIL PROTECTED]
site24x7.com





--
Regards
Viplav Kallepu


File upload messages problem

2007-07-13 Thread Dean Pullen
I have a similar problem to a previous post that didn't get any replies.

 

I'll relist it for quick reference:

 

The documentation on the page File Upload Interceptor
(http://struts.apache.org/2.x/docs/file-upload-interceptor.html)
indicates that the error messages are currently set to defaults in the
struts-messages.properties file.  However, when I look at the file the
messages I am getting are different than those specified.  The page goes
on to indicate that these properties can be overridden by setting them
in your properties file for the following keys:
 
- struts.messages.error.uploading - a general error that occurs when the
file could not be uploaded
- struts.messages.error.file.too.large - occurs when the uploaded file
is too large
- struts.messages.error.content.type.not.allowed - occurs when the
uploaded file does not match the expected content types specified

 

 

I over-ride these in struts.properties and struts-messages.properties
and neither works.

 

What is the correct method?



Diagnosing A Redirect Error

2007-07-13 Thread Ferguson, Jason M TSgt 375 CSPTS/SCE
I am attempting to run a brank-new webapp, and finally managed to kill
enough code bugs that no odd exceptions are showing up in the
application logs.
 
However, attempting to hit the main page, login.jsp, causes Firefox to
tell me The page isn't redirecting properly: Firefox has detected that
the server is redirecting the request for this address in a way that
will never complete.
 
Unfortunately, absolutuley NOTHING is showing up in the logs.
 
login.jsp is the only JSP that is not behind WEB-INF. The web.xml notes
this in the welcome-file-list section.
 
I realize that this will be hard to diagnose without more information,
but can anyone offer me any troubleshooting tips for this issue?
 
Thanks,
Jason
 


Re: [S2] UTF-8

2007-07-13 Thread Perssy Llamosas
This is more a jsp/servlets/tomcat problem. There is a variable that 
controls character encoding in Struts2, it defaults to UTF-8 but I am 
not sure of when it is used by struts, I think it's for .properties reading.

In struts.properties:
struts.i18n.encoding=UTF-8

First you need to tell the tomcat container to read every request in 
UTF-8, you do by adding the property URIEncoding=UTF-8 to the 
connector in your conf/server.xml from your tomcat installation.
Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 
redirectPort=8443 URIEncoding=UTF-8 /


Then in every jsp/servlet response set the character encoding to UTF-8
In a servlet:
response.setContentType(text/html; charset=UTF-8);
In a jsp:
%@ page contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 %

Then set the page header meta content-type to UTF-8 or IExplorer will 
send ascii even if the page is already in utf-8

meta http-equiv=Content-Type content=text/html; charset=UTF-8

The files (.java .jsp .???) MUST be saved as UTF-8 or the characters 
won't display correctly.


Perssy Llamosas.

Morten wrote:

Hi Perssy

What do you mean by Page Header?

Just curious. Working with some of the same things.

Best regards,
Morten

Perssy Llamosas [EMAIL PROTECTED] skrev i en meddelelse 
news:[EMAIL PROTECTED]
  

Solved it on my own.

The page header requires to be in utf-8 too, it is not enough to have the 
page encoding in jsp to utf-8.

Without that line IE returns ascii while firefox returns utf-8.

Perssy Llamosas wrote:


Hello,

I am trying to make struts read my requests as UTF-8, so far I have 
configured Tomcat connector to uriencode in utf-8 but my struts beans 
still receive ? strings. What am I missing?


Perssy Llamosas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Autocompleter onchange

2007-07-13 Thread rrecoba

Hi, I can´t capture the onChange event of an autocompleter. Now I have the
autocompleter working, but i need to fill a div from an ajax call when one
item is selected in the autocompleter. How can I do this?

Thanks a lot.-
-- 
View this message in context: 
http://www.nabble.com/Autocompleter-onchange-tf4075496.html#a11582914
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File upload messages problem

2007-07-13 Thread Dean Pullen
The person who had the original problem was kind enough to help.

Added struts.custom.i18n.resources=struts-messages into
struts.properties and added a struts-messages.properties file, placed
the key/value pairs in there. Works fine.

-Original Message-
From: Dean Pullen [mailto:[EMAIL PROTECTED] 
Sent: 13 July 2007 16:46
To: user@struts.apache.org
Subject: File upload messages problem

I have a similar problem to a previous post that didn't get any replies.

 

I'll relist it for quick reference:

 

The documentation on the page File Upload Interceptor
(http://struts.apache.org/2.x/docs/file-upload-interceptor.html)
indicates that the error messages are currently set to defaults in the
struts-messages.properties file.  However, when I look at the file the
messages I am getting are different than those specified.  The page goes
on to indicate that these properties can be overridden by setting them
in your properties file for the following keys:
 
- struts.messages.error.uploading - a general error that occurs when the
file could not be uploaded
- struts.messages.error.file.too.large - occurs when the uploaded file
is too large
- struts.messages.error.content.type.not.allowed - occurs when the
uploaded file does not match the expected content types specified

 

 

I over-ride these in struts.properties and struts-messages.properties
and neither works.

 

What is the correct method?



Scanned by MailDefender - managed email security from intY -
www.maildefender.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts2 - Tab Panel

2007-07-13 Thread Marco Carnevale

We have an application using the s:tabbedPanel with multiple tabs loading
dynamically.  We are using struts 2.0.6 with tiles.

What we are seeing is that the action that loads the tab content that is
currently displayed is always called two times all the other tab actions are
only called once.

Has anyone else witnessed this?


Re: Struts 2 Spring IOC problem

2007-07-13 Thread Chris Pratt

I'm definitely no expert, but I think you're mixing new syntax with
old.  If I remember correctly singleton=false was replaced with
scope=prototype.  So maybe it was treating your beans as singletons,
which is why they were never getting destroyed.
 (*Chris*)

On 7/13/07, alex xander [EMAIL PROTECTED] wrote:

i have some problem with Spring IOC
i use struts 2.x, hibernate 3.x and spring 2.x
my problem is
the destroy-method in my class don't respon anything
it's looks like spring doesn't recognize my destroy method
bean id=persistenceManager 
class=com.bba.persistence.hibernate.HibernatePersistenceManager
init-method=init
destroy-method=destroy
singleton=false
property name=sessionFactory ref=mySessionFactory/

/bean

i already implement org.springframework.beans.factory.DisposableBean in my class
can anyone help me


-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts 2 and Tomcat 5.0.27 filter start error

2007-07-13 Thread Phillip Blevins

Greetings,

I am trying to use a struts 2 application on Tomcat 5.0.27. I
originally had it working on 5.5 but  i had to downgrade to 5.0.27
because thats the version my web service has. I am  getting the error
SEVERE: Error filterStart when i try and start Tomcat. Thinking this
might have to do with my application I tried it using the Struts Blank
application and I get the same error.
This page has a reference to the problem,
https://issues.apache.org/struts/browse/WW-1820
But no solution that i can get to work. Has anyone gotten struts 2 to
work on 5.0.27 or .28.

I'm using struts 2.0.8

This is what the console spits out when i try and start tomcat from eclipse
Jul 13, 2007 11:40:03 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 13, 2007 11:40:03 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 575 ms
Jul 13, 2007 11:40:03 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 13, 2007 11:40:03 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.27
Jul 13, 2007 11:40:03 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 13, 2007 11:40:07 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jul 13, 2007 11:40:07 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Jul 13, 2007 11:40:09 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Jul 13, 2007 11:40:09 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /AudioLog from URL
file:C:\Users\pblevin.GACL\workspaceWeb\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps\AudioLog
Jul 13, 2007 11:40:09 AM org.apache.catalina.startup.ContextConfig
applicationConfig
INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AudioLog]
Jul 13, 2007 11:40:10 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path  from URL
file:C:\Users\pblevin.GACL\workspaceWeb\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps\ROOT
Jul 13, 2007 11:40:10 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 13, 2007 11:40:10 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jul 13, 2007 11:40:10 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/33  config=null
Jul 13, 2007 11:40:10 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6565 ms

Thanks,

Phillip

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts2 + Eclipse

2007-07-13 Thread spaquet

Hi,

I'm trying to setting-up a Dynamic Web project under Eclipse 3.3 (Europa).
The project is OK and using Tomcat 6.0.13 but when editing jsp pages I have
the following error:

Invalid character used in text string (%@ taglib prefix=s
uri=/struts-tags %). Welcome.jsp line 2  
Invalid text string (%@ taglib prefix=s uri=/struts-tags %)
Welcome.jsp line 2

line 2 contains the following code: %@ taglib uri=/struts-tags prefix=s
%

All struts2 lib are in WEB-INF/lib.
-- 
View this message in context: 
http://www.nabble.com/Struts2-%2B-Eclipse-tf4075723.html#a11583679
Sent from the Struts - User mailing list archive at Nabble.com.


Re: How to display message from resource bundle using Struts EL tags

2007-07-13 Thread semaj.najraham

If I change as you mention, I get the following error:

[ERROR] - Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Missing message for key  in bundle
(default bundle) for locale en_US

Any idea?

Thanks,
semaj


nuwan chandrasoma-2 wrote:
 
 bean-el:message 
 key=${stringvar}/http://struts.apache.org/1.3.8/struts-el/index.html-  
 Original Message - 
 From: semaj.najraham [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Friday, July 13, 2007 5:49 AM
 Subject: Re: How to display message from resource bundle using Struts EL 
 tags
 
 

 Any idea, guys!!

 semaj.najraham wrote:

 I have the following jsp:

 %@ taglib uri=http://struts.apache.org/tags-bean; prefix=bean%
 %@ page import=com.messages.Constants %

 bean:message key=%=Constants.SECTION_TITLE % /

 where Constants.java contains the following containts

 public static final String SECTION_TITLE = section.title;

 and key/value is defined in MessageResources.properties file as
 section.title=Add User

 How can I get the same functionality using Struts EL tag?

 Thank you,
 semaj




 -- 
 View this message in context: 
 http://www.nabble.com/How-to-display-message-from-resource-bundle-using-Struts-EL-tags-tf4069659.html#a11573783
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-display-message-from-resource-bundle-using-Struts-EL-tags-tf4069659.html#a11583823
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: s2: Logging

2007-07-13 Thread Leena Borle

Hi,
 I did not add log4J.xml in the classpath. I am following mailreader
tutorial and did not see any in that application too.  Do I have to add it
explicitly ?
Leena

On 7/13/07, Dave Newton [EMAIL PROTECTED] wrote:


Perhaps more importantly, do you have a log4j xml or
properties configuration file on the classpath? (IIRC
you do not need to explicitly initialize.)

--- Gary Feidt [EMAIL PROTECTED] wrote:

 What did you use for an Initialization procedure?

  [EMAIL PROTECTED] 7/12/2007 3:21:42 PM 
 Hi,
  How to enable logging in S2? I added log4j.jar and
 isDebug statements
 in my
 actions, but do not see any messages.
 Leena

___

 Confidentiality Statement:
 This email/fax, including attachments, may include
 confidential
 and/or proprietary information and may be used only
 by the
 person or entity to which it is addressed. If the
 reader of
 this email/fax is not the intended recipient or his
 or her
 agent, the reader is hereby notified that any
 dissemination,
 distribution or copying of this email/fax is
 prohibited. If you
 have received this email/fax in error, please notify
 the sender
 by replying to this message and deleting this email
 or
 destroying this facsimile immediately.



-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]








Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated
for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




scope attribute must be declared.

2007-07-13 Thread Ryan
Hello,

I'm new to struts and I'm using struts 2.0.6. I'm trying to persist some 
variables so they can be used across multiple forms. I've read a number of 
posts that say you can persist data across a session by adding the 
scope=session attribute to the action tag. e.g...

action name=someAction scope=session

Here's a link to one...
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0601_vishwanathan/0601_vishwanathan.html

When I try this I get the following error in the Tomcat logs.

Attribute scope must be declared for element type action...

Do I have to configure something to use this attribute or am I using it 
incorrectly.

Thanks,
Ryan





 

Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food  Drink QA.
http://answers.yahoo.com/dir/?link=listsid=396545367

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display message from resource bundle using Struts EL tags

2007-07-13 Thread Laurie Harper
That indicates that the expression you're passing in the 'key' attribute 
is evaluating to null or the empty string. Check how you're specifying 
the key, and feel free to post a sample of the JSP markup you're using 
if you still can't figure it out.


L.

semaj.najraham wrote:

If I change as you mention, I get the following error:

[ERROR] - Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Missing message for key  in bundle
(default bundle) for locale en_US

Any idea?

Thanks,
semaj


nuwan chandrasoma-2 wrote:
bean-el:message 
key=${stringvar}/http://struts.apache.org/1.3.8/struts-el/index.html-  
Original Message - 
From: semaj.najraham [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, July 13, 2007 5:49 AM
Subject: Re: How to display message from resource bundle using Struts EL 
tags




Any idea, guys!!

semaj.najraham wrote:

I have the following jsp:

%@ taglib uri=http://struts.apache.org/tags-bean; prefix=bean%
%@ page import=com.messages.Constants %

bean:message key=%=Constants.SECTION_TITLE % /

where Constants.java contains the following containts

public static final String SECTION_TITLE = section.title;

and key/value is defined in MessageResources.properties file as
section.title=Add User

How can I get the same functionality using Struts EL tag?

Thank you,
semaj




--
View this message in context: 
http://www.nabble.com/How-to-display-message-from-resource-bundle-using-Struts-EL-tags-tf4069659.html#a11573783

Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: s2: Logging

2007-07-13 Thread Laurie Harper
Yes, you need to configure Log4J; just dropping the JAR in isn't enough 
for it to 'magically' know what you want it to do with log messages. See 
the Log4J documentation for details on configuration. As a quick start, 
you can create a WEB-INF/classes/log4j.properties with the following 
content:


-8-8-8-8-

# Set rootCategory to DEBUG/INFO/WARN/etc
# and specify which appender to output to
log4j.rootCategory=INFO, SYSOUT

# Override log level for specific packages...
log4j.logger.org.apache.struts=DEBUG

# Set up the appender (output target)
log4j.appender.SYSOUT=org.apache.log4j.ConsoleAppender
log4j.appender.SYSOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.SYSOUT.layout.ConversionPattern=%-5p %d %c{5} - %m%n

-8-8-8-8-

HTH,

L.

Leena Borle wrote:

Hi,
 I did not add log4J.xml in the classpath. I am following mailreader
tutorial and did not see any in that application too.  Do I have to add it
explicitly ?
Leena

On 7/13/07, Dave Newton [EMAIL PROTECTED] wrote:


Perhaps more importantly, do you have a log4j xml or
properties configuration file on the classpath? (IIRC
you do not need to explicitly initialize.)

--- Gary Feidt [EMAIL PROTECTED] wrote:

 What did you use for an Initialization procedure?

  [EMAIL PROTECTED] 7/12/2007 3:21:42 PM 
 Hi,
  How to enable logging in S2? I added log4j.jar and
 isDebug statements
 in my
 actions, but do not see any messages.
 Leena

___

 Confidentiality Statement:
 This email/fax, including attachments, may include
 confidential
 and/or proprietary information and may be used only
 by the
 person or entity to which it is addressed. If the
 reader of
 this email/fax is not the intended recipient or his
 or her
 agent, the reader is hereby notified that any
 dissemination,
 distribution or copying of this email/fax is
 prohibited. If you
 have received this email/fax in error, please notify
 the sender
 by replying to this message and deleting this email
 or
 destroying this facsimile immediately.



-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]







 


Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated
for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts design best practice issue

2007-07-13 Thread Laurie Harper
Struts2 provides automatic type conversion facilities, which makes life 
much easier in these cases. With Struts1, however, you need to handle 
the type conversion yourself. You can make this less painful by using 
the validation framework (so that by the time you get to doing the type 
conversion, you already know the data is in the right format).


There are, of course, varying opinions on how/where to place such type 
conversion logic. My preference is to handle it in the action, either 
directly or via a helper class. YMMV.


L.

Viplav Kallepu wrote:

Thanks for the reply.. but the variables in the actionform's datatype will
be string and DTO's will be corresponding oracle dataType. I am not able to
understand the advantage of writing the interface. May be I am missing the
concept. Actually my doubt is whether I can write type conversion codes in
Action Class and pass the variables to DTO or should I write another class
where datatype conversions are made. My understanding says we shouldn't
write type conversion code in Action Class . Even if I use 
BeanUtils.copyProperties  where  should  I place this code. Please  help
me.

On 7/13/07, Yoge [EMAIL PROTECTED] wrote:


Write an interface with all the methods in your actionform. Your DTO bean
class and actionform class should implement the interface. Now you dont
need
to do any type casting in your action class.

Sorry if my understanding is wrong.

--Yoge


On 7/13/07, Viplav Kallepu [EMAIL PROTECTED] wrote:

 Hi All,

 I am new to struts and I am using struts 1.3.8. I am using a bean class
 for
 every table in oracle as a Data Transfer Object and a actionform for
every
 jsp. Now my problem is I have to do  data type conversion from my
 actionform
 to DTO and DTO to actionform, for example I have date in my jsp 
which is

 split into three drop down fileds(year,month,day) and in the DTO its a
 single field.  How can manage this. Is it a standard that we can do 
data

 type conversions in Action Class.?? I was trying to find out best
 practice.
 Please help me in sorting out the issue. Is there any design changes I
 have
 to do??


 --
 Regards
 Viplav Kallepu



--
Yoge,
AdventNet, Inc.
925-965-6528
[EMAIL PROTECTED]
site24x7.com








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display xml data in struts list box

2007-07-13 Thread Laurie Harper

Asir Jeeva wrote:
Please give me an example to display *xml data in struts html:select 
box.*


That would depend on what the data was and how you wanted to display it. 
You'll need to provide a more complete description of what you're trying 
to do for anyone to offer much help.


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] UTF-8

2007-07-13 Thread Laurie Harper

Perssy Llamosas wrote:

...
%@ page contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 %
...
The files (.java .jsp .???) MUST be saved as UTF-8 or the characters 
won't display correctly.


To clarify, page encoding of JSPs is a separate issue. The only 
requirement here is that the pageEncoding attribute matches the 
character encoding you save the JSP with. You don't need to worry about 
it if you stick to ASCII characters in the JSPs -- which is usually easy 
to do if you have localizable text pulled out into resource bundles.


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrate Struts 1 EventDispatchAction to Struts 2

2007-07-13 Thread Laurie Harper

Boon Leng wrote:

May I know what is the best way to migrate Struts 1 EventDispatchAction to
Struts 2?

The following is my struts-config.xml where displaying form and submitting
form is using the same action name but execute different methods in the
action.

action path=/*_add
type=org.springframework.web.struts.DelegatingActionProxy
name={1}Form
attribute={1}AddForm
parameter=insert, default=showForm
scope=request
validate=false
forward name=inputpath=.{1}.add/
forward name=successpath=/{1}_add.do   redirect=true/
forward name=cancel  path=/welcome.do   redirect=true/
/action

How do I convert it to Struts 2 mapping?
Any help would be appreciated. Thanks.


What do you specifically need help with? Struts2 supports wildcard 
action paths, dispatch to different methods in an action and 
parameterized results (equivalent to the forwards in your S1 config). Is 
there something in particular you're having trouble with?


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Diagnosing A Redirect Error

2007-07-13 Thread Laurie Harper

Ferguson, Jason M TSgt 375 CSPTS/SCE wrote:

I am attempting to run a brank-new webapp, and finally managed to kill
enough code bugs that no odd exceptions are showing up in the
application logs.
 
However, attempting to hit the main page, login.jsp, causes Firefox to

tell me The page isn't redirecting properly: Firefox has detected that
the server is redirecting the request for this address in a way that
will never complete.
 
Unfortunately, absolutuley NOTHING is showing up in the logs.
 
login.jsp is the only JSP that is not behind WEB-INF. The web.xml notes

this in the welcome-file-list section.
 
I realize that this will be hard to diagnose without more information,

but can anyone offer me any troubleshooting tips for this issue?


Err... look at the content of index.jsp and figure out what it's 
redirecting to? The error suggests that it's redirecting to itself, 
effectively causing an infinite loop of redirects. Or maybe it's 
redirecting to something that's redirecting back to index.jsp. Just 
follow the trail of redirects until you find out where the loop is 
occurring.


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 + Spring 2 + JPA + AJAX Tutorial

2007-07-13 Thread Ted Husted

The Struts2-api.jar is obsolete. The error seems to be related to
hibernate. It looks like the class needed to instantiate
entityManagerFactory is missing.

Like as not, the only JARs you need for Struts are
commons-logging-api, freemarker, ognl, struts2-core, and xwork, plus
the stuts2-spring plugin.

-Ted.

On 7/13/07, LucaLuca [EMAIL PROTECTED] wrote:


Hi,

I read that tutorial too and i've follewed all the steps. My problem is that
i don't know which are the Jar requested. I was not able to find the
strtus2-api.jar. Where i can find it? I've tried to add all the Hibernate
3.2, Spring 2.0.6, Struts 2.0.8 jar, but it did not work.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 and Tomcat 5.0.27 filter start error

2007-07-13 Thread Roger Varley
On Friday 13 July 2007 18:08, Phillip Blevins wrote:
 Greetings,

 I am trying to use a struts 2 application on Tomcat 5.0.27. I
 originally had it working on 5.5 but  i had to downgrade to 5.0.27
 because thats the version my web service has. I am  getting the error
 SEVERE: Error filterStart when i try and start Tomcat. Thinking this
 might have to do with my application I tried it using the Struts Blank
 application and I get the same error.
 This page has a reference to the problem,
 https://issues.apache.org/struts/browse/WW-1820
 But no solution that i can get to work. Has anyone gotten struts 2 to
 work on 5.0.27 or .28.

I had a simarly unhelpful error message today while migrating an existing 
project to a new machine. You are probably missing a .jar file in your 
project that is not needed to compile, but is needed to run. 

Regards
Roger

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display message from resource bundle using Struts EL tags

2007-07-13 Thread semaj.najraham

Laurie,

This is what I did

 %@ taglib uri=http://struts.apache.org/tags-bean-el; prefix=bean-el%
 %@ page import=com.messages.Constants %

 bean:message key=${Constants.SECTION_TITLE } /

 where Constants.java contains the following contants

 public static final String SECTION_TITLE = section.title;

 and key/value is defined in MessageResources.properties file as
 section.title=Add User

and in struts-config.xml, I have message-resources
parameter=MessageResources /

isn't this the way I'm supposed to do?

Thanks
semaj


Laurie Harper wrote:
 
 That indicates that the expression you're passing in the 'key' attribute 
 is evaluating to null or the empty string. Check how you're specifying 
 the key, and feel free to post a sample of the JSP markup you're using 
 if you still can't figure it out.
 
 L.
 
 semaj.najraham wrote:
 If I change as you mention, I get the following error:
 
 [ERROR] - Servlet.service() for servlet jsp threw exception
 javax.servlet.jsp.JspException: Missing message for key  in bundle
 (default bundle) for locale en_US
 
 Any idea?
 
 Thanks,
 semaj
 
 
 nuwan chandrasoma-2 wrote:
 bean-el:message 
 key=${stringvar}/http://struts.apache.org/1.3.8/struts-el/index.html-
   
 Original Message - 
 From: semaj.najraham [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Friday, July 13, 2007 5:49 AM
 Subject: Re: How to display message from resource bundle using Struts EL 
 tags


 Any idea, guys!!

 semaj.najraham wrote:
 I have the following jsp:

 %@ taglib uri=http://struts.apache.org/tags-bean; prefix=bean%
 %@ page import=com.messages.Constants %

 bean:message key=%=Constants.SECTION_TITLE % /

 where Constants.java contains the following containts

 public static final String SECTION_TITLE = section.title;

 and key/value is defined in MessageResources.properties file as
 section.title=Add User

 How can I get the same functionality using Struts EL tag?

 Thank you,
 semaj



 -- 
 View this message in context: 
 http://www.nabble.com/How-to-display-message-from-resource-bundle-using-Struts-EL-tags-tf4069659.html#a11573783
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-display-message-from-resource-bundle-using-Struts-EL-tags-tf4069659.html#a11590270
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Autocompleter onchange

2007-07-13 Thread Musachy Barroso

Use the notifyTopics attribute.

musachy

On 7/13/07, rrecoba [EMAIL PROTECTED] wrote:



Hi, I can´t capture the onChange event of an autocompleter. Now I have the
autocompleter working, but i need to fill a div from an ajax call when one
item is selected in the autocompleter. How can I do this?

Thanks a lot.-
--
View this message in context:
http://www.nabble.com/Autocompleter-onchange-tf4075496.html#a11582914
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Hey you! Would you help me to carry the stone? Pink Floyd


Re: Struts2 - Tab Panel

2007-07-13 Thread Musachy Barroso

That was fixed on 2.0.8 I think

musachy

On 7/13/07, Marco Carnevale [EMAIL PROTECTED] wrote:


We have an application using the s:tabbedPanel with multiple tabs loading
dynamically.  We are using struts 2.0.6 with tiles.

What we are seeing is that the action that loads the tab content that is
currently displayed is always called two times all the other tab actions
are
only called once.

Has anyone else witnessed this?





--
Hey you! Would you help me to carry the stone? Pink Floyd


How to keep users from accessing to *.jsp strightforword?

2007-07-13 Thread M.Liang Liu

I just would like to block users to get to the login.jsp through the
url:http://somedomain.com/login.jsp.
Instead,users can login with the url :http://somedomain.com/login.action---
actually the login.jsp page.

With the help of code-in-behind-plugin,users can just login with the
url:http://somedomain.com/login.action.

And what I would like to do is block the direct *.jsp access.

Any comment would be greatly appreciated.

-- 
View this message in context: 
http://www.nabble.com/How-to-keep-users-from-accessing--to-*.jsp-strightforword--tf4077945.html#a11590867
Sent from the Struts - User mailing list archive at Nabble.com.


RE: How to keep users from accessing to *.jsp strightforword?

2007-07-13 Thread Neil Aggarwal
M.Liang:

Add this to your web.xml:

  !-- Do not allow users to load jsps directly --
  security-constraint
web-resource-collection
  web-resource-nameno_access/web-resource-name
  url-pattern*.jsp/url-pattern
/web-resource-collection
auth-constraint/
  /security-constraint 

Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.
-Original Message-
From: M.Liang Liu [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 13, 2007 11:01 PM
To: user@struts.apache.org
Subject: How to keep users from accessing to *.jsp strightforword?


I just would like to block users to get to the login.jsp through the
url:http://somedomain.com/login.jsp.
Instead,users can login with the url :http://somedomain.com/login.action---
actually the login.jsp page.

With the help of code-in-behind-plugin,users can just login with the
url:http://somedomain.com/login.action.

And what I would like to do is block the direct *.jsp access.

Any comment would be greatly appreciated.

-- 
View this message in context:
http://www.nabble.com/How-to-keep-users-from-accessing--to-*.jsp-strightforw
ord--tf4077945.html#a11590867
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrate Struts 1 EventDispatchAction to Struts 2

2007-07-13 Thread Boon Leng

Hi,

I would like to know is there any class in struts 2 which is equivalent to
EventDispatchAction?
So that I can convert the following:
action path=/sample_add parameter=insert, default=showForm ...
to something like this:
action name=sample_add method=insert, default=showForm ...

and struts 2 will call the method showForm() by default and call insert()
when button is clicked.

Currently I have to dispatch the method inside my action class if I
maintaining the same action name.

public String execute() throws Exception {
if (insert) {
return insert();
} else {
return showForm();
}
}

or slip the mapping into 2 actions:
action name=sample_add1 method=showForm ...
...
action name=sample_add2 method=insert ...

Regards,
Boon Leng


Laurie Harper wrote:
 
 What do you specifically need help with? Struts2 supports wildcard 
 action paths, dispatch to different methods in an action and 
 parameterized results (equivalent to the forwards in your S1 config). Is 
 there something in particular you're having trouble with?
 
 L.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Migrate-Struts-1-EventDispatchAction-to-Struts-2-tf4074633.html#a11591032
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display message from resource bundle using Struts EL tags

2007-07-13 Thread Nuwan Chandrasoma

Hi,

I think it should be like this.

bean-el:message key=${Constants.SECTION_TITLE } /

Thanks,

Nuwan

- Original Message - 
From: semaj.najraham [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Saturday, July 14, 2007 2:02 AM
Subject: Re: How to display message from resource bundle using Struts EL 
tags





Laurie,

This is what I did

%@ taglib uri=http://struts.apache.org/tags-bean-el; prefix=bean-el%
%@ page import=com.messages.Constants %

bean:message key=${Constants.SECTION_TITLE } /

where Constants.java contains the following contants

public static final String SECTION_TITLE = section.title;

and key/value is defined in MessageResources.properties file as
section.title=Add User

and in struts-config.xml, I have message-resources
parameter=MessageResources /

isn't this the way I'm supposed to do?

Thanks
semaj


Laurie Harper wrote:


That indicates that the expression you're passing in the 'key' attribute
is evaluating to null or the empty string. Check how you're specifying
the key, and feel free to post a sample of the JSP markup you're using
if you still can't figure it out.

L.

semaj.najraham wrote:

If I change as you mention, I get the following error:

[ERROR] - Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Missing message for key  in bundle
(default bundle) for locale en_US

Any idea?

Thanks,
semaj


nuwan chandrasoma-2 wrote:

bean-el:message
key=${stringvar}/http://struts.apache.org/1.3.8/struts-el/index.html-
Original Message - 
From: semaj.najraham [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, July 13, 2007 5:49 AM
Subject: Re: How to display message from resource bundle using Struts 
EL

tags



Any idea, guys!!

semaj.najraham wrote:

I have the following jsp:

%@ taglib uri=http://struts.apache.org/tags-bean; prefix=bean%
%@ page import=com.messages.Constants %

bean:message key=%=Constants.SECTION_TITLE % /

where Constants.java contains the following containts

public static final String SECTION_TITLE = section.title;

and key/value is defined in MessageResources.properties file as
section.title=Add User

How can I get the same functionality using Struts EL tag?

Thank you,
semaj




--
View this message in context:
http://www.nabble.com/How-to-display-message-from-resource-bundle-using-Struts-EL-tags-tf4069659.html#a11573783
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
View this message in context: 
http://www.nabble.com/How-to-display-message-from-resource-bundle-using-Struts-EL-tags-tf4069659.html#a11590270

Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrate Struts 1 EventDispatchAction to Struts 2

2007-07-13 Thread Nuwan Chandrasoma

Hi,

you can have a action mapping like this.

action name=sample_{*} method={1} ...

and in your action class have 2 method according to you example

public String add1() {

   // your logic

   return SUCCESS;

}

public String add2() {

   // your logic

   return SUCCESS;

}


if a call  like this
   eg: /sample_add1.action the method add1 one will be called

you can get more infromation from the below link

http://struts.apache.org/2.x/docs/action-configuration.html#ActionConfiguration-WildcardMethod

Thanks,

Nuwan

- Original Message - 
From: Boon Leng [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Saturday, July 14, 2007 4:45 AM
Subject: Re: Migrate Struts 1 EventDispatchAction to Struts 2




Hi,

I would like to know is there any class in struts 2 which is equivalent to
EventDispatchAction?
So that I can convert the following:
   action path=/sample_add parameter=insert, default=showForm ...
to something like this:
   action name=sample_add method=insert, default=showForm ...

and struts 2 will call the method showForm() by default and call insert()
when button is clicked.

Currently I have to dispatch the method inside my action class if I
maintaining the same action name.

   public String execute() throws Exception {
   if (insert) {
   return insert();
   } else {
   return showForm();
   }
   }

or slip the mapping into 2 actions:
   action name=sample_add1 method=showForm ...
   ...
   action name=sample_add2 method=insert ...

Regards,
Boon Leng


Laurie Harper wrote:


What do you specifically need help with? Struts2 supports wildcard
action paths, dispatch to different methods in an action and
parameterized results (equivalent to the forwards in your S1 config). Is
there something in particular you're having trouble with?

L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
View this message in context: 
http://www.nabble.com/Migrate-Struts-1-EventDispatchAction-to-Struts-2-tf4074633.html#a11591032

Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to keep users from accessing to *.jsp strightforword?

2007-07-13 Thread M.Liang Liu

to Neil,
Thanks for ur help,I noticed that with the help of error-page,I can
redirect the *.jsp to the index.html.
By the way,when I tryed to redirect to a url like /login.action,it does NOT
work.

However,this can meet my need all the way.

Any comment?
thx.
On 7/14/07, Neil Aggarwal [EMAIL PROTECTED] wrote:


M.Liang:

Add this to your web.xml:

  !-- Do not allow users to load jsps directly --
  security-constraint
web-resource-collection
  web-resource-nameno_access/web-resource-name
  url-pattern*.jsp/url-pattern
/web-resource-collection
auth-constraint/
  /security-constraint

Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.
-Original Message-
From: M.Liang Liu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 13, 2007 11:01 PM
To: user@struts.apache.org
Subject: How to keep users from accessing to *.jsp strightforword?


I just would like to block users to get to the login.jsp through the
url:http://somedomain.com/login.jsp.
Instead,users can login with the url :http://somedomain.com/login.action---
actually the login.jsp page.

With the help of code-in-behind-plugin,users can just login with the
url:http://somedomain.com/login.action .

And what I would like to do is block the direct *.jsp access.

Any comment would be greatly appreciated.

--
View this message in context:

http://www.nabble.com/How-to-keep-users-from-accessing--to-*.jsp-strightforw
ord--tf4077945.html#a11590867
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
 --M.Liang Liu