Re: Dynamic Tree in JSP

2008-01-19 Thread naveen k
Thanks friend for ur kind reply.
Do you have any idea of any third party taglibs that generate Dynamic tree.
If u have information, u can share with me please.

 Naveen



 On Jan 19, 2008 4:05 AM, Laurie Harper [EMAIL PROTECTED] wrote:

  naveen k wrote:
   Hi,
  
  I am developing web application using struts.
  I want to create a dynamic tree in a Jsp page that shows some
  URL's.
  Is there any tag available in jsp to create it?
  If it there, then how i create it with the tags available in jsp?
  Which tags i have to use for that?
  If possible can u send me any sample code.
  
   Thanks in advance for ur reply
 
  If you're using Struts 2, s:tree would be a good place to start:
 
  http://struts.apache.org/2.x/docs/tree.html
 
  If you're using Struts 1, there is nothing built in so you'd have to
  look at a third-party taglib or Javascript control. There are plenty
  floating around, so try a little googling.
 
  L.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Cos multipart plugin, where is it?

2008-01-19 Thread deepak aggarwal
I have been trying out various file upload plugins that struts2
supports. I could find jakarta (included with struts distribution) and
pell (included in struts2-pell-multipart-plugin-2.0.9.jar) plugins,
but nowhere could I find cos plugin. I was browsing through various
sites and saw on one of the pages that these three plugins were once
in struts2.dispatcher.multipart package. But now only jakarta remains
there and pell has been bundled into a separate jar.

But, the original question remains, whatever happened to cos?

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



Re: Cos multipart plugin, where is it?

2008-01-19 Thread Don Brown
It was pulled due to lack of license compatibility.  It had a special
license that required every member of your development team to buy a
copy of Jason Hunter's Servlets book if you used it in a production
system.

Don

On Jan 19, 2008 10:11 PM, deepak aggarwal [EMAIL PROTECTED] wrote:
 I have been trying out various file upload plugins that struts2
 supports. I could find jakarta (included with struts distribution) and
 pell (included in struts2-pell-multipart-plugin-2.0.9.jar) plugins,
 but nowhere could I find cos plugin. I was browsing through various
 sites and saw on one of the pages that these three plugins were once
 in struts2.dispatcher.multipart package. But now only jakarta remains
 there and pell has been bundled into a separate jar.

 But, the original question remains, whatever happened to cos?

 -
 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: Cos multipart plugin, where is it?

2008-01-19 Thread Don Brown
Yep, we can't have any code that depends on that library in any
ASF-sponsored release.  You should be able to take the code as it
existed in WebWork 2.2 and port it to Struts 2, using the pell file
upload plugin as an example.  Then, put the code up somewhere like
Google Code and register your plugin with our Plugin Repository to
share it with the community (if you so choose).

Don

On Jan 19, 2008 10:34 PM, deepak aggarwal [EMAIL PROTECTED] wrote:
 Thanks Don. I am willing to buy his book but still there seems to be
 an issue. cos.jar distribution on Jason's website is from Nov.2002 and
 when I downloaded the source, it didn't compile with JDK 1.5 ( because
 it used classes like Enumeration and Servlet 2.3 api and we are using
 servlet api 2.4). Does it mean that if I want to use it in my app, I
 would have to make the necessary changes to make it work and maintain
 the source code?

 Deepak


 On Jan 19, 2008 4:49 PM, Don Brown [EMAIL PROTECTED] wrote:
  It was pulled due to lack of license compatibility.  It had a special
  license that required every member of your development team to buy a
  copy of Jason Hunter's Servlets book if you used it in a production
  system.
 
  Don
 
 
  On Jan 19, 2008 10:11 PM, deepak aggarwal [EMAIL PROTECTED] wrote:
   I have been trying out various file upload plugins that struts2
   supports. I could find jakarta (included with struts distribution) and
   pell (included in struts2-pell-multipart-plugin-2.0.9.jar) plugins,
   but nowhere could I find cos plugin. I was browsing through various
   sites and saw on one of the pages that these three plugins were once
   in struts2.dispatcher.multipart package. But now only jakarta remains
   there and pell has been bundled into a separate jar.
  
   But, the original question remains, whatever happened to cos?
  
   -
   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]



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



Re: Cos multipart plugin, where is it?

2008-01-19 Thread deepak aggarwal
Thanks Don. I am willing to buy his book but still there seems to be
an issue. cos.jar distribution on Jason's website is from Nov.2002 and
when I downloaded the source, it didn't compile with JDK 1.5 ( because
it used classes like Enumeration and Servlet 2.3 api and we are using
servlet api 2.4). Does it mean that if I want to use it in my app, I
would have to make the necessary changes to make it work and maintain
the source code?

Deepak

On Jan 19, 2008 4:49 PM, Don Brown [EMAIL PROTECTED] wrote:
 It was pulled due to lack of license compatibility.  It had a special
 license that required every member of your development team to buy a
 copy of Jason Hunter's Servlets book if you used it in a production
 system.

 Don


 On Jan 19, 2008 10:11 PM, deepak aggarwal [EMAIL PROTECTED] wrote:
  I have been trying out various file upload plugins that struts2
  supports. I could find jakarta (included with struts distribution) and
  pell (included in struts2-pell-multipart-plugin-2.0.9.jar) plugins,
  but nowhere could I find cos plugin. I was browsing through various
  sites and saw on one of the pages that these three plugins were once
  in struts2.dispatcher.multipart package. But now only jakarta remains
  there and pell has been bundled into a separate jar.
 
  But, the original question remains, whatever happened to cos?
 
  -
  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: REST vs Original

2008-01-19 Thread Frans Thamura
On Jan 19, 2008 7:28 AM, Jeromy Evans [EMAIL PROTECTED] wrote:
 Hi Frans,

 Unfortunately at the moment you can't mix conventions within the same
 Struts2 webapp.
hi there

so what should i do if I am intersting with REST, but have a hugh code
using S2 old way.

i think that is not good to rewrite it all over, this can be months job.

any tips?

F

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



Re: Cos multipart plugin, where is it?

2008-01-19 Thread deepak aggarwal
That sounds good. I will make the necessary code changes and try to
register with Struts2 repository.

There is one feature that I want to add to cos file upload - make the
file upload interruptible. Large file uploads can sometime take a lot
of time  and you want transaction to timeout gracefully in such a case
(by setting a timeout on transactioninterceptor that starts the
transaction as soon as the request arrives in). When the transaction
times out, transactionmanager issues an interrupt on the thread
handling the request but in our case, this will go ignored as blocking
i/o calls are not interruptible (unless using a nio channel). So there
is a potential for this thread to get hosed up.

In general, i believe that any operation that takes potentially large
time should add hooks to get interrupted gracefully.

Any takers for this idea?

Deepak

On Jan 19, 2008 5:10 PM, Don Brown [EMAIL PROTECTED] wrote:
 Yep, we can't have any code that depends on that library in any
 ASF-sponsored release.  You should be able to take the code as it
 existed in WebWork 2.2 and port it to Struts 2, using the pell file
 upload plugin as an example.  Then, put the code up somewhere like
 Google Code and register your plugin with our Plugin Repository to
 share it with the community (if you so choose).

 Don


 On Jan 19, 2008 10:34 PM, deepak aggarwal [EMAIL PROTECTED] wrote:
  Thanks Don. I am willing to buy his book but still there seems to be
  an issue. cos.jar distribution on Jason's website is from Nov.2002 and
  when I downloaded the source, it didn't compile with JDK 1.5 ( because
  it used classes like Enumeration and Servlet 2.3 api and we are using
  servlet api 2.4). Does it mean that if I want to use it in my app, I
  would have to make the necessary changes to make it work and maintain
  the source code?
 
  Deepak
 
 
  On Jan 19, 2008 4:49 PM, Don Brown [EMAIL PROTECTED] wrote:
   It was pulled due to lack of license compatibility.  It had a special
   license that required every member of your development team to buy a
   copy of Jason Hunter's Servlets book if you used it in a production
   system.
  
   Don
  
  
   On Jan 19, 2008 10:11 PM, deepak aggarwal [EMAIL PROTECTED] wrote:
I have been trying out various file upload plugins that struts2
supports. I could find jakarta (included with struts distribution) and
pell (included in struts2-pell-multipart-plugin-2.0.9.jar) plugins,
but nowhere could I find cos plugin. I was browsing through various
sites and saw on one of the pages that these three plugins were once
in struts2.dispatcher.multipart package. But now only jakarta remains
there and pell has been bundled into a separate jar.
   
But, the original question remains, whatever happened to cos?
   
-
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]
 
 

 -
 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]



Slow AJAX response for a page that contains tabbed panel

2008-01-19 Thread ricky lomanta
Here is the code in one of my page:

...
s:url id=editUrl action=edit
s:param name=attributeA value=attributeA /
/s:url
s:a href=%{editUrl} id=a_%{attributeA} theme=ajax 
targets=editDivEdit/s:a 
...

The edit action will load a page that contains tabbed panel into a div tag. The 
first time I click 'Edit'
link, the response is quite fast, but after so many times I clicked the link, 
the response become slower and slower. If I refresh the whole page and click 
'Edit' link again the response will be fast again.
Does anyone know why that happen? and How to fix this problem?

Thanks in advance


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Cos Multipart Plugin - Feature enhancement

2008-01-19 Thread deepak aggarwal
I am toying with the idea of using cos multipart plugin in my app. Of
course, based on Don's replies in another thread, I'll have to make
some code changes to make it compatible with JDK 1.5 and I can also
probably register with struts2 plugin registry.

There is one feature that I want to add to cos file upload - make the
file upload interruptible. Large file uploads can sometime take a lot
of time  and you want transaction to timeout gracefully in such a case
(by setting a timeout on transactioninterceptor that starts the
transaction as soon as the request arrives in). When the transaction
times out, transactionmanager issues an interrupt on the thread
handling the request but in our case, this will go ignored as blocking
i/o calls are not interruptible (unless using a nio channel). So there
is a potential for this thread to get hosed up.

In general, i believe that any operation that takes potentially large
time should add hooks to get interrupted gracefully.

Any takers for this idea? Or am I missing something?

Deepak

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



Re: STRUTS2 and Spring2

2008-01-19 Thread Dave Newton
--- Niral Trivedi [EMAIL PROTECTED] wrote:
 We are trying to have Spring manage all the value objects and action
 objects. And so followed steps in Struts document to add struts2-spring
 plugin jar and made necessary changes but getting errors when try to create
 a bean in session scope. Following are my configuration files:
 [...]
 [1/18/08 23:49:51:855 EST] 0032 WebAppE   [Servlet
 Error]-[Error
 creating bean with name 'scopedTarget.mVO': Scope 'session' is not active
 for the current thread; consider defining a scoped proxy for this bean if
 you intend to refer to it from a singleton; nested exception is
 java.lang.IllegalStateException: No thread-bound request found: Are you
 referring to request attributes outside of an actual web request? If you
are
 actually operating within a web request and still receive this message,your
 code is probably running outside of DispatcherServlet/DispatcherPortlet: In
 this case, use RequestContextListener or RequestContextFilter to expose the
 current request.]: 
 [...]
 So, I tried changing web.xml and replace
 org.springframework.web.context.ContextLoaderListener with
 org.springframework.web.context.request.RequestContextListener. At that
 point, server starts up correctly, but while accessing action class, I am
 getting error message saying :

The reference manuals for both 2.0 and 2.5 say to *add* the
RequestContextListener [1,2], not to remove the listener that sets up your
application context.

I'd recommend perusing the reference doc a bit more and also checking the API
documentation for both ContextLoaderListener [3] and RequestContextListener
[4] to understand what each of them do.

d.

[1]
http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes-other
[2]
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-scopes-other
[3]
http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/web/context/ContextLoaderListener.html
[4]
http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/web/context/request/RequestContextListener.html
[tags: s2, spring, config, scope]



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



Re: Struts2 and Spring2 with session scoped beans

2008-01-19 Thread Dave Newton
See my reply to your first message.

d.

--- Niral Trivedi [EMAIL PROTECTED] wrote:

 Hi All,
 
 We've are trying to use Struts2 with Spring2 on Webspher 6.1 and JDK 1.5.
 Basically we are trying to use session scoped beans from Spring
 applicationContext in to Struts2 using Spring DI. but running in to issue.
 Following are my config files:
 
 web.xml

==
  filter
 filter-namestruts2/filter-name
 filter-classorg.apache.struts2.dispatcher.FilterDispatcher
 /filter-class
 /filter
 filter-mapping
 filter-namestruts2/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
 
 listener
   listener-class
 org.springframework.web.context.ContextLoaderListener/listener-class
 /listener

==
 
 Spring applicationContext.xml

==
 
 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:aop=http://www.springframework.org/schema/aop;
xsi:schemaLocation=
   http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
   http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop-2.0.xsd;
 bean id=mVO class=com.foo.bar.vo.MyVO scope=session
   aop:scoped-proxy/
  /bean
 bean id=myInterceptor class=com.foo.bar.interceptors.MyInterceptor
   property name=mvo
ref local=mVO /
   /property
  /bean
 ..

=
 
 When I run this configuration, I am getting following error:
 ==
 [1/18/08 23:49:51:855 EST] 0032 WebAppE   [Servlet
 Error]-[Error
 creating bean with name 'scopedTarget.mVO': Scope 'session' is not active
 for the current thread; consider defining a scoped proxy for this bean if
 you intend to refer to it from a singleton; nested exception is
 java.lang.IllegalStateException: No thread-bound request found: Are you
 referring to request attributes outside of an actual web request? If you
 are
 actually operating within a web request and still receive this message,your
 code is probably running outside of DispatcherServlet/DispatcherPortlet: In
 this case, use RequestContextListener or RequestContextFilter to expose the
 current request.]: org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'scopedTarget.mVO': Scope 'session' is not
 active for the current thread; consider defining a scoped proxy for this
 bean if you intend to refer to it from a singleton; nested exception is
 java.lang.IllegalStateException: No thread-bound request found: Are you
 referring to request attributes outside of an actual web request? If you
 are
 actually operating within a web request and still receive this message,your
 code is probably running outside of DispatcherServlet/DispatcherPortlet: In
 this case, use RequestContextListener or RequestContextFilter to expose the
 current request.
 Caused by: java.lang.IllegalStateException: No thread-bound request found:
 Are you referring to request attributes outside of an actual web request?
 If
 you are actually operating within a web request and still receive this
 message,your code is probably running outside of
 DispatcherServlet/DispatcherPortlet: In this case, use
 RequestContextListener or RequestContextFilter to expose the current
 request.
  at

org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes
 (RequestContextHolder.java:102)
  at org.springframework.web.context.request.SessionScope.get(
 SessionScope.java:88)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
 AbstractBeanFactory.java:283)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
 AbstractBeanFactory.java:160)
  at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(
 SimpleBeanTargetSource.java:33)
  at

org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget
 (Cglib2AopProxy.java:660)
  at

org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept
 (Cglib2AopProxy.java:610)
  at
 com.foo.bar.vo.MyVO$$EnhancerByCGLIB$$d821bb7e.setClassName(generated)
  at com.foo.bar.interceptors.MyInterceptor.intercept(MyInterceptor.java:56)
  at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 DefaultActionInvocation.java:224)
  at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 DefaultActionInvocation.java:223)
  at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
 UtilTimerStack.java:455)
  at 

Re: STRUTS2 and Spring2

2008-01-19 Thread Niral Trivedi
Hi Dave,

I have looked up api and spring doc for both the listeners. But I was trying
to say, if I add RequestContextListener then Struts2 plugin gives error
saying that You have to add ContextLoaderListener. And if I add
ContextLoaderListener, spring gives error saying add RequestContextListener.

Can I have both listener at same time? I haven't tried doing that but will
try and see if that works..

Thank you.

On Jan 19, 2008 8:57 AM, Dave Newton [EMAIL PROTECTED] wrote:

 --- Niral Trivedi [EMAIL PROTECTED] wrote:
  We are trying to have Spring manage all the value objects and action
  objects. And so followed steps in Struts document to add struts2-spring
  plugin jar and made necessary changes but getting errors when try to
 create
  a bean in session scope. Following are my configuration files:
  [...]
  [1/18/08 23:49:51:855 EST] 0032 WebAppE   [Servlet
  Error]-[Error
  creating bean with name 'scopedTarget.mVO': Scope 'session' is not
 active
  for the current thread; consider defining a scoped proxy for this bean
 if
  you intend to refer to it from a singleton; nested exception is
  java.lang.IllegalStateException: No thread-bound request found: Are you
  referring to request attributes outside of an actual web request? If you
 are
  actually operating within a web request and still receive this
 message,your
  code is probably running outside of DispatcherServlet/DispatcherPortlet:
 In
  this case, use RequestContextListener or RequestContextFilter to expose
 the
  current request.]:
  [...]
  So, I tried changing web.xml and replace
  org.springframework.web.context.ContextLoaderListener with
  org.springframework.web.context.request.RequestContextListener. At that
  point, server starts up correctly, but while accessing action class, I
 am
  getting error message saying :

 The reference manuals for both 2.0 and 2.5 say to *add* the
 RequestContextListener [1,2], not to remove the listener that sets up your
 application context.

 I'd recommend perusing the reference doc a bit more and also checking the
 API
 documentation for both ContextLoaderListener [3] and
 RequestContextListener
 [4] to understand what each of them do.

 d.

 [1]

 http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes-other
 [2]

 http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-scopes-other
 [3]

 http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/web/context/ContextLoaderListener.html
 [4]

 http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/web/context/request/RequestContextListener.html
 [tags: s2, spring, config, scope]



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




Re: REST vs Original

2008-01-19 Thread Martin Gainty
SmartURLs..Are there situations where using action-name based results are
preferable over a declared result?

Where can I get the source for
org.texturemedia.smarturls.SmartURLsConfigurationProvider?

Thanks
Martin
- Original Message -
From: Jeromy Evans [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, January 18, 2008 7:28 PM
Subject: Re: REST vs Original


 Hi Frans,

 Unfortunately at the moment you can't mix conventions within the same
 Struts2 webapp.  The trouble is the REST plugin overrides a lot of the
 default behaviour rather than augmenting it. Right now if your commit to
 REST conventions it'll apply to the entire webapp.  With some effort it
 may be possible to use a CompoundActionMapper to to the mix URL-mapping
 schemes though.

 It sounds like you're mainly interested in nice URLs...

 If you just want nice URLs and not actually REST conventions you may
 prefer the SmartURLs plugin.  It's being merged into Struts2.1
 Convention plugin but is available for 2.0 now. It does a lot, but
 generally it provides that actions in packages at
 com.mycompany.actions.bla.BlaAction are available at the URL
 /bla/bla.action and further that the URL /bar/ will execute
 com.mycompany.actions.bla.IndexAction, and so on.  If you add blank
 extension handline you get some nice urls: /bla/bla - bla.BlaAction

 If you want search-engine friendly URLs that contain parameters in the
 path there are two options:
   - the RestfulActionMapper in Struts2.0 allows URLs like
 /name1/value1/name2/value2/bla.action where name1 and name2 are
 properties in BlaAction.  It can be used with a CompoundActionMapper to
 mix this with the Default action mapping, or
   - the NamedVariablePatternMatcher in Struts2.1 allows action
 namespaces to contain properties.  eg. /{state}/{city}/bla.action where
 state and city are properties of the BlaAction

 AFAIK, the NamedVariablePatternMatcher can be used with either default
 or REST conventions.  It can't be used at the same time as default
 wildcards implementation though (/*blaAction).  This feature is
 relatively new and undocumented.

 It's enabled like this in struts.xml:
  bean type=com.opensymphony.xwork2.util.PatternMatcher
 name=namedVariablePatternMatcher
 class=com.opensymphony.xwork2.util.NamedVariablePatternMatcher/
  constant name=struts.patternMatcher
 value=namedVariablePatternMatcher/
  constant name=struts.mapper.alwaysSelectFullNamespace value=true/

 And used like this:
 @Namespace(/{country}/{state})
 public class SuburbController implements ModelDrivenObject {
public void String setCountry(String country) ...
public void String setState(String state)...
 ...
 }

 (The class above is a REST-controller model-driven action but it should
 work with normal actions too).  At this time (Jan08) I can't recommend
 the NamedVariablePatternMatcher unless you're willing to dive into the
 Struts2 source as issues arise as its quite experimental.

 Hope that helps,
 Jeromy Evans

 Frans Thamura wrote:
  hi there
 
  i just want to know, how to mixe the code between S2 and with REST under
one
  container.
 
  any idea?
 
  or anyone have an example that 'this is the old' and 'this is the REST'
 
  still cannot get how can .action become /bla/bla
 
 
  
 
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.516 / Virus Database: 269.19.6/1230 - Release Date:
17/01/2008 4:59 PM
 


 -
 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: STRUTS2 and Spring2

2008-01-19 Thread Dave Newton
--- Niral Trivedi [EMAIL PROTECTED] wrote:
 I have looked up api and spring doc for both the listeners. But I was
 trying
 to say, if I add RequestContextListener then Struts2 plugin gives error
 saying that You have to add ContextLoaderListener. And if I add
 ContextLoaderListener, spring gives error saying add
 RequestContextListener.
 
 Can I have both listener at same time? I haven't tried doing that but will
 try and see if that works..

...

Both error messages say to *add* the listener you're missing. The API docs
are pretty clear that their purposes are *completely* different. The
reference guide explains what both of them do.

d.


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



Re: REST vs Original

2008-01-19 Thread Dave Newton
--- Martin Gainty [EMAIL PROTECTED] wrote:
 SmartURLs..Are there situations where using action-name based results are
 preferable over a declared result?

Sure, if you don't want to configure a result manually.

 Where can I get the source for
 org.texturemedia.smarturls.SmartURLsConfigurationProvider?

http://code.google.com/p/smarturls-s2/

d.


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



Re: [struts] REST vs Original

2008-01-19 Thread Dale Newfield

Jeromy Evans wrote:
Unfortunately at the moment you can't mix conventions within the same 
Struts2 webapp.  The trouble is the REST plugin overrides a lot of the 
default behaviour rather than augmenting it. Right now if your commit to 
REST conventions it'll apply to the entire webapp.  With some effort it 
may be possible to use a CompoundActionMapper to to the mix URL-mapping 
schemes though.


I built something like that, but since I didn't get any response I 
didn't contribute it.  If anyone would like me to send you this 
NamespaceBasedActionMapper, just ask.


http://www.nabble.com/Re:-URL-questions...Was:--Re:--struts--params-and-staticParams-p14330694.html

-Dale

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



Re: REST vs Original

2008-01-19 Thread mgainty
Thanks for the link dave
If anyone knows how to get Signore Pontarelli I have a *working* build
script for the smarturl project

Ciao
Martin
- Original Message -
Wrom: BLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBD
To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 19, 2008 11:20 AM
Subject: Re: REST vs Original


 --- Martin Gainty [EMAIL PROTECTED] wrote:
  SmartURLs..Are there situations where using action-name based results
are
  preferable over a declared result?

 Sure, if you don't want to configure a result manually.

  Where can I get the source for
  org.texturemedia.smarturls.SmartURLsConfigurationProvider?

 http://code.google.com/p/smarturls-s2/

 d.


 -
 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: REST vs Original

2008-01-19 Thread Frans Thamura
hi all

is there a plan for REST, so we can mixed all become one, SmartURL,
original method and new REST model
i have hugh code and love to try REST

F

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



Re: REST vs Original

2008-01-19 Thread Jeromy Evans

Yes and no.

Yes: The REST plugin uses CodeBehind. If appropriate, CodeBehind will be 
replaced by the Convention plugin.  SmartURLs is being merged into the 
Convention plugin.  That's a nice convergence.


No: REST involves more than URL mapping. However, it's not unreasonable 
that a single Struts2 webapp should be able to have REST services as 
well as standard Struts2 actions, but I don't know of any effort to 
allow this at the moment.  Dale's NamespaceBasedActionMapper may be part 
of the solution?


Frans Thamura wrote:

hi all

is there a plan for REST, so we can mixed all become one, SmartURL,
original method and new REST model
i have hugh code and love to try REST

F

-
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: using YUI with struts 2

2008-01-19 Thread Jeromy Evans

Hi Ravi,

YUI doesn't require any specific tags.  AFAIK, they're all plain old 
valid html.  It can't get much better than that.


ie. this is a TabView:

div id=demo class=yui-navset
   ul class=yui-nav
   li class=selecteda href=#tab1emTab One Label/em/a/li
   lia href=#tab2emTab Two Label/em/a/li
   lia href=#tab3emTab Three Label/em/a/li
   /ul
   div class=yui-content

   divpTab One Content/p/div
   divpTab Two Content/p/div
   divpTab Three Content/p/div
   /div
/div


It's instantiated with:

var myTabs = new YAHOO.widget.TabView(demo);

Which adds additional valid html markup to the DOM. 

You can create a TagLib or Struts2 tags for commonly used widgets if you 
like, as provided by the YUI plugin, but this doesn't add much value.  
For instance, I've created a TabView tags like this:


yui:tabview id=demo selected=tab1
 yui:tab id=tab1 label=Tab One LabelTab One Content/yui:tab
 yui:tab id=tab2 label=Tab Two LabelTab Two Content/yui:tab
 yui:tab id=tab3 label=Tab ThreeLabelTab Three Content/yui:tab
/yui:tabview

That renders the original HTML above.  The value this adds over the 
original HTML is dubious considering the effort it took to write the 
custom-tag and the clarity of the original code.  Writing custom tags 
for the DataTable, TreeView, Charts etc are definitely not worth the 
effort because the tags can't replicate the functionality of the API.


What exactly were  you hoping for?

regards,
Jeromy Evans

ravi_eze wrote:

hi,

i want to use YUI library (http://developer.yahoo.com/yui/) with struts2.
The problem is that YUI requires YUI specific tags while struts generates
html tags. so, can we write themes(ftls etc similar to xhtml etc) which
would generate YUI tags instead of HTML? would this bring in new problems?
or did any one have tried this? YUI plugin is provided but its alpha version
and doesnt provide all components that we require.

any help?
  



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



using YUI with struts 2

2008-01-19 Thread ravi_eze

hi,

i want to use YUI library (http://developer.yahoo.com/yui/) with struts2.
The problem is that YUI requires YUI specific tags while struts generates
html tags. so, can we write themes(ftls etc similar to xhtml etc) which
would generate YUI tags instead of HTML? would this bring in new problems?
or did any one have tried this? YUI plugin is provided but its alpha version
and doesnt provide all components that we require.

any help?
-- 
View this message in context: 
http://www.nabble.com/using-YUI-with-struts-2-tp14978453p14978453.html
Sent from the Struts - User mailing list archive at Nabble.com.


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