Re: Local Host Error

2008-04-10 Thread Lukasz Lenart
 Hello. To preface I am very new to using Apache. I am attempting to
  experiment locally, however I cannot connect to local host nor the
  127.0.0.1 directly. I am looking to try and get the IT works! Apache

Are you using Skype? By default, Skype block port 80 and 443, disable
such port in Skype or change the default port for Apache.

You can also use netstat -b from command prompt to see all programs
with opened ports.


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



Re: Most popular classes to be used in Struts

2008-04-10 Thread Lukasz Lenart
Hi,

Some home work? ;-)

  What are the most popular classes to be used in Struts?

ActionSupport?


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



Re: Most popular classes to be used in Struts

2008-04-10 Thread Lukasz Lenart
 ActionSupport?

Ugh... sorry this came from xwork ;-)


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



Advice on dynamic form elements

2008-04-10 Thread Zoran Avtarovski
Hi,

We porting/upgrading a relatively simple survey tool over to struts2 from an
old php version.

The tool manages questions which can one of a fixed type (radio, drop,
checkbox, text) and then persists responses to DB.
Where I need some advice is how to implement the struts 2 display mechanism.

I figure there are two options:

1. Write a custom tag which takes the question as an attribute. Something
like s:question value=²%{question}² /

2. I could have a small jsp fragment that I would include to render the
appropriate html.

I figured I¹d do something like :

s:iterator value=²questions² id=²question²
s:push value=²%{question}²
s:include value=²pagefragment.jspf²/
/s:push
/s:iterator

And pagefragment.jspf would have some logic and use the appropriate form
tags to render the HTML.

I was looking for some input into what people think.


Z.



Re: Using jsp tag in Value attribute of textfield tag in Struts2

2008-04-10 Thread Tauri Valor

I get the following error :

According to TLD or attribute directive in tag file, attribute value does
not accept any expressions

I could get the value using html tag 'input type=text..value=%=  ...%'

Thanks,
Tauri.




Tauri Valor wrote:
 
 Hi 
 
 Is there a way to include value for textfield tag in struts2 , Im trying
 the following :
 
 
   tds:textfield name=firstName label=*First Name size=15
 value=%=freshUser.getFirstName() %//td
 
 
 But I get tld error..
 
 Please let me know how I could use jsp tag in the textfield tag, or let me
 know an alternative...
 
 Thanks in Advance,
 Tauri.
 

-- 
View this message in context: 
http://www.nabble.com/Using-jsp-tag-in-Value-attribute-of-textfield-tag-in-Struts2-tp16602523p16603834.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]



Re: Most popular classes to be used in Struts

2008-04-10 Thread Antonio Petrelli
2008/4/10, Lukasz Lenart [EMAIL PROTECTED]:

 Some home work? ;-)



Nope, just a phone interview :-D

Antonio


Re: retrotranslating struts 2.0.11 not working

2008-04-10 Thread Antonio Petrelli
2008/4/10, Paula Estrella [EMAIL PROTECTED]:

 the working environment is: tomcat 5.0.30, jdk 1.4.2, struts 2.0.11 on a
 linux suse server;  we followed the procedure to retrotranslate the
 following files from struts-2.0.11-j4.zip



The j4 package contains already retrotranslated versions of Struts 2 and
XWork.
Moreover you want to retrotranslate struts 2.0.1 while you were using
2.0.11... Just a mess, isn't it? :-D
FYI: the latest release is 2.0.11.1
http://struts.apache.org/download.cgi#struts20111
Anyway the link to the retrotranslated release is wrong, replace j4 with
backport.

Antonio


Re: Advice on dynamic form elements

2008-04-10 Thread Laurie Harper

Zoran Avtarovski wrote:

Hi,

We porting/upgrading a relatively simple survey tool over to struts2 from an
old php version.

The tool manages questions which can one of a fixed type (radio, drop,
checkbox, text) and then persists responses to DB.
Where I need some advice is how to implement the struts 2 display mechanism..

I figure there are two options:

1. Write a custom tag which takes the question as an attribute. Something
like s:question value=²%{question}² /


Well, it wouldn't be s:question unless you're planning on modifying the 
Struts taglib ;=) but a custom tag would be one way to do this. Using a 
.tag file might be the easiest, depending how complex your rendering 
logic is.



2. I could have a small jsp fragment that I would include to render the
appropriate html.

I figured I¹d do something like :

s:iterator value=²questions² id=²question²
s:push value=²%{question}²
s:include value=²pagefragment.jspf²/
/s:push
/s:iterator


The tag-based solution is obviously more concise to use, although the 
s:push is unnecessary here (s:iterator pushes the value automatically).



And pagefragment.jspf would have some logic and use the appropriate form
tags to render the HTML.


If you can express what you want to do in a JSP, it should be trivial to 
do it in a .tag file, which would give you the more concise usage. 
Otherwise, a custom tag may be worth it.


L.


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



Re: Using jsp tag in Value attribute of textfield tag in Struts2

2008-04-10 Thread Laurie Harper

You need to use OGNL expression rather than JSP RT expressions:

http://struts.apache.org/2.0.11.1/docs/tag-syntax.html

though generally, just the name= is enough unless you need the value to 
come from one place but get saved somewhere else on submit.


L.

Tauri Valor wrote:

I get the following error :

According to TLD or attribute directive in tag file, attribute value does
not accept any expressions

I could get the value using html tag 'input type=text..value=%=  ...%'

Thanks,
Tauri.




Tauri Valor wrote:
Hi 


Is there a way to include value for textfield tag in struts2 , Im trying
the following :


tds:textfield name=firstName label=*First Name size=15
value=%=freshUser.getFirstName() %//td


But I get tld error..

Please let me know how I could use jsp tag in the textfield tag, or let me
know an alternative...

Thanks in Advance,
Tauri.






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



retrotranslating struts 2.0.11 not working

2008-04-10 Thread Paula Estrella
Hello, We have a small application developed with struts2 for uploading 
files and returning the results of doing something with the files and we 
are trying to run struts2 with java 1.4.2 but it is not working after 
many attempts to remove the filter start error; could you please give us 
some hints?

thanks a lot and we're sorry if someone already asked this.
Paula

the working environment is: tomcat 5.0.30, jdk 1.4.2, struts 2.0.11 on a 
linux suse server;  we followed the procedure to retrotranslate the 
following files from struts-2.0.11-j4.zip

commons-collections-3.1
freemarker-2.3.4
spring-aop-1.2.8
spring-context-1.2.8
spring-web-1.2.8
struts2-core-2.0.1
commons-logging-1.0.4
ognl-2.6.7
spring-beans-1.2.8
spring-core-1.2.8
struts2-api-2.0.1
xwork-2.0-beta-1

except for struts2-api-2.0.1, which we couldn't find anywhere.

here's the stacktrace

StandardContext[/project]Exception starting filter struts2
java.lang.UnsupportedClassVersionError: project/FileUploadAction 
(Unsupported major.minor version 49.0)

   at java.lang.ClassLoader.defineClass0(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:808)
   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:147)
   at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
   at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
   at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
   at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
   at 
com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:139)
   at 
com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:100)
   at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:366)
   at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:329)
   at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:429)
   at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
   at 
org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
   at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
   at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
   at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
   at 
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
   at 
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
   at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
   at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
   at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:79)
   at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3702)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4329)
   at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
   at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
   at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
   at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
   at 
org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
   at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
   at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)

   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
   at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
   at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
   at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:480)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)

   at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
   at 

Again: question to interceptors

2008-04-10 Thread Peter Theissen

Hello,

first of all thanks for all your previous answers. Somehow,
I got the interceptor working for the simplest case, but
honestly I still dont know exactly why. Maybe it was a
caching issue.

Now I have some questions:

I have the SimpleInterceptor:

public String intercept(ActionInvocation invocation) throws Exception {
 System.out.println(The action is being intercepted!);
 return invocation.invoke();   
 //return Action.SUCCESS; (**)

}


and the struts.xml contains:

action name=listRegistrationsWaiting 
class=registrationWaitingAction method=execute

 resultpages/list.jsp/result
 result name=inputpages/list.jsp/result
 interceptor-ref name=simpleInterceptor/   
/action



When I comment in (**) instead of the return,
the result is not displayed (list.jsp) is not invoked.
I dont understand why, since the interceptor should
be called as the LAST step as far as I understand the
doc?! Therefore, there should be no influence of
the interceptor at the result at all!

But obvously, Im misunderstanding something, since I found
out that it works, when I just call return invocation.invoke();
But also in this case I wounder why the interceptor is called
BEFORE the DB Access (I can see that on the console),
since the interceptor is provided as the LAST part of the
action.

Thanks for your help
Peter



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



Re: How to open a page in new window with s:a or s:url tag?

2008-04-10 Thread Laurie Harper

Mohiit wrote:

I am using Struts 2. I want to open the page in the new window when I click
on an icon. I am using s:a tag and giving action by s:url tag.
i.e., s:url id='abc' action='xyz',/s:url
   s:a href='%{abc}'/s:a

This way it is opening an action in same page. I want it in the new window
like in HTML tag we can do it by link .
What is the way in struts 2 for this..?


Struts 2's s:a tag doesn't support this. The solution is to use a 
combination of s:url and a vanilla HTML anchor tag:


  s:url id='abc' ...
  a href='${abc}' target=... ...

HTH,

L.


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



Re: retrotranslating struts 2.0.11 not working

2008-04-10 Thread Al Sutton

Paula,

Quick question; Any reason you can't upgrade to Java 1.5 and use the primary 
distribution and not a retrotranslated one?


Al.

P.S. Your problem is that your projects classes are being compiled with a 
JDK = 1.5.


- Original Message - 
From: Paula Estrella [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Thursday, April 10, 2008 10:20 AM
Subject: retrotranslating struts 2.0.11 not working


Hello, We have a small application developed with struts2 for uploading 
files and returning the results of doing something with the files and we 
are trying to run struts2 with java 1.4.2 but it is not working after many 
attempts to remove the filter start error; could you please give us some 
hints?

thanks a lot and we're sorry if someone already asked this.
Paula

the working environment is: tomcat 5.0.30, jdk 1.4.2, struts 2.0.11 on a 
linux suse server;  we followed the procedure to retrotranslate the 
following files from struts-2.0.11-j4.zip

commons-collections-3.1
freemarker-2.3.4
spring-aop-1.2.8
spring-context-1.2.8
spring-web-1.2.8
struts2-core-2.0.1
commons-logging-1.0.4
ognl-2.6.7
spring-beans-1.2.8
spring-core-1.2.8
struts2-api-2.0.1
xwork-2.0-beta-1

except for struts2-api-2.0.1, which we couldn't find anywhere.

here's the stacktrace

StandardContext[/project]Exception starting filter struts2
java.lang.UnsupportedClassVersionError: project/FileUploadAction 
(Unsupported major.minor version 49.0)

   at java.lang.ClassLoader.defineClass0(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:808)
   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:147)
   at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
   at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
   at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
   at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
   at 
com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:139)
   at 
com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:100)
   at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:366)
   at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:329)
   at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:429)
   at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
   at 
org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
   at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
   at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
   at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
   at 
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
   at 
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
   at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
   at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
   at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:79)
   at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3702)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4329)
   at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
   at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
   at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
   at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
   at 
org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
   at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
   at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
   at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
   at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
   at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
   at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
  

Re: Again: question to interceptors

2008-04-10 Thread Ralf Fischer
Hi Peter,

On Thu, Apr 10, 2008 at 12:08 PM, Peter Theissen [EMAIL PROTECTED] wrote:
snip /
  I have the SimpleInterceptor:
  
  public String intercept(ActionInvocation invocation) throws Exception {
   System.out.println(The action is being intercepted!);
   return invocation.invoke();//return Action.SUCCESS; (**)
  }
  

You 'usually' don't return anything else from the intercept method
despite the return code of the action invocation itself. Anyway the
return of your interceptor leads back to the action invocation, which
then puts the resulting success-String into a local variable and
returns null. End of processing. So neither action nor result are
executed, as there never is a call to actionInvocation.invoke() at the
end of your interceptor stack, which whould do this. You only
understand what a recursion is, when you've understood recursion ;-)

  and the struts.xml contains:
  
  action name=listRegistrationsWaiting class=registrationWaitingAction
 method=execute
   resultpages/list.jsp/result
   result name=inputpages/list.jsp/result
   interceptor-ref name=simpleInterceptor/   /action
  

You know this leaves you with only ONE interceptor on your interceptor
stack, the default stack is completely omitted! Means no configuration
parameters or URL parameters injected into your action, and lots of
other stuff you miss. Try something like

action name=foo class=org.bar.Foo
  result/foo.jsp/result
  interceptor-ref name=defaultStack /
  interceptor-ref name=simpleInterceptor /
/action

  When I comment in (**) instead of the return,
  the result is not displayed (list.jsp) is not invoked.
  I dont understand why, since the interceptor should
  be called as the LAST step as far as I understand the
  doc?! Therefore, there should be no influence of
  the interceptor at the result at all!

Nope. actionInvocation.invoke() calls the next intercepter on the
interceptor stack until there are no more interceptors. THEN the call
to actionInvocation.invoke() from the last interceptor on the stack
invokes the action. Thus in your example above the action never should
be called.

  But obvously, Im misunderstanding something, since I found
  out that it works, when I just call return invocation.invoke();
  But also in this case I wounder why the interceptor is called
  BEFORE the DB Access (I can see that on the console),
  since the interceptor is provided as the LAST part of the
  action.

Check out some more docs in the wiki, especially take a look at the
big picture[1] and interceptors[2].

Cheers,
-Ralf


[1] http://struts.apache.org/2.0.11.1/docs/big-picture.html
[2] http://struts.apache.org/2.x/docs/interceptors.html

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



Re: retrotranslating struts 2.0.11 not working

2008-04-10 Thread Paula Estrella

Antonio Petrelli wrote:


2008/4/10, Paula Estrella [EMAIL PROTECTED]:
 


the working environment is: tomcat 5.0.30, jdk 1.4.2, struts 2.0.11 on a
linux suse server;  we followed the procedure to retrotranslate the
following files from struts-2.0.11-j4.zip
   





The j4 package contains already retrotranslated versions of Struts 2 and
XWork.
Moreover you want to retrotranslate struts 2.0.1 while you were using
2.0.11... Just a mess, isn't it? :-D
FYI: the latest release is 2.0.11.1
http://struts.apache.org/download.cgi#struts20111
Anyway the link to the retrotranslated release is wrong, replace j4 with
backport.

Antonio

 

Hello, sorry I just put the versions wrong in the post but we are indeed 
using the retrotranslated version of struts2 and xworks (backport 
instead of j4) and it is still not working.
We'd like to know what are the exact libraries we have to use and if we 
have to retrotranslate other jars in order to make the examples work on 
our server. For instance, in struts2-blank-2.0.11\WEB-INF\lib there is also

commons-logging-1.0.4.jar
freemarker-2.3.8.jar
ognl-2.6.11.jar

do we have to convert them to jdk1.4 ? is the folder structure ok?
thanks a lot,
Paula


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



Problem when upgrading to Struts 2.1

2008-04-10 Thread oscar perez
HI all,
I am using appfuse as start-up application for one project.
The problem is that when I upgraded from struts 2.0.11.1 to 2.1.1 my test
cases are no longer working as ActionContext.getContext() returns null.

  http://www.mail-archive.com/[EMAIL PROTECTED]/msg29571.html

I read about the refactoring of ActionContext and while I agree I cannot see
a quick-and-dirty workaround to solve this problem. How can I get a context
for running my tests now?
Thanks,
Oscar


Re: retrotranslating struts 2.0.11 not working

2008-04-10 Thread Antonio Petrelli
2008/4/10, Paula Estrella [EMAIL PROTECTED]:
  StandardContext[/project]Exception starting filter struts2
  java.lang.UnsupportedClassVersionError:
 project/FileUploadAction (Unsupported major.minor version 49.0)

As Al Sutton noticed before, is *your* class that is compiled with
Java 5 and put into a JDK 1.4 environment.

Antonio

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



Re: Advice on dynamic form elements

2008-04-10 Thread Zoran Avtarovski
Thanks Laurie,

I actually thought of a tag file but thought it might be the lazy way out.
We actually use them extensively for dropping in html components.

I feel a lot better now.

Thanks

Z.
 
 Zoran Avtarovski wrote:
  Hi,
  
  We porting/upgrading a relatively simple survey tool over to struts2 from
 an
  old php version.
  
  The tool manages questions which can one of a fixed type (radio, drop,
  checkbox, text) and then persists responses to DB.
  Where I need some advice is how to implement the struts 2 display
 mechanism..
  
  I figure there are two options:
  
  1. Write a custom tag which takes the question as an attribute. Something
  like s:question value=²%{question}² /
 
 Well, it wouldn't be s:question unless you're planning on modifying the
 Struts taglib ;=) but a custom tag would be one way to do this. Using a
 .tag file might be the easiest, depending how complex your rendering
 logic is.
 
  2. I could have a small jsp fragment that I would include to render the
  appropriate html.
  
  I figured I¹d do something like :
  
  s:iterator value=²questions² id=²question²
  s:push value=²%{question}²
  s:include value=²pagefragment.jspf²/
  /s:push
  /s:iterator
 
 The tag-based solution is obviously more concise to use, although the
 s:push is unnecessary here (s:iterator pushes the value automatically).
 
  And pagefragment.jspf would have some logic and use the appropriate form
  tags to render the HTML.
 
 If you can express what you want to do in a JSP, it should be trivial to
 do it in a .tag file, which would give you the more concise usage.
 Otherwise, a custom tag may be worth it.
 
 L.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 




Looking for documentation for Table Tags plugin

2008-04-10 Thread Lars Krog
Hi.
I'm looking for documentation for the Table Tags plug-in. The projects 
home page only contains a few JSP samples. A  complete example with an 
Action implementation would be of much help.


Lars

Re: how to handle an action with parameter?

2008-04-10 Thread Lukasz Lenart
Hi,

Define setter setCategory(String value) for NewsAction


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



RE: Need help getting started with remote tabs

2008-04-10 Thread Jiang, Jane (NIH/NCI) [C]
Musachy,

Thanks for your suggestion.  Do you mean this showcase?

http://www.planetstruts.org/struts2-showcase/ajax/tabbedpanel/example3.j
sp

I found the source for the jsp, but there is no source code for the
action.  Is there a place to download the complete source code?

Thank you,

Jane

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 09, 2008 5:38 PM
To: Struts Users Mailing List
Subject: Re: Need help getting started with remote tabs

There are examples in the showcase application.

musachy

On Wed, Apr 9, 2008 at 8:55 PM, Jiang, Jane (NIH/NCI) [C]
[EMAIL PROTECTED] wrote:
 Is there a complete working example for the tabbedPanel tag?  I found
  this example in the tag reference document.  How do I set up the
result
  for AjaxTest.action?  I loaded the dynamic contents in that action
and
  directed it to the jsp that displays that content.  The action was
  invoked, but the tab shows up empty.  I tried to include the jsp
inside
  the s:div tag and still nothing.

  s:tabbedpanel id=test beforeSelectTabNotifyTopics=/beforeSelect
s:div id=three label=remote theme=ajax
href=/AjaxTest.action
  
One Tab
/s:div
s:div id=three label=remote theme=ajax
href=/AjaxTest.action
  
Another tab
/s:div
  /s:tabbedpanel

  Thanks a lot for your help,

  Jane

  -
  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

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



Struts2, SiteMesh and Struts Menu

2008-04-10 Thread Matthew Seaborn
Has anyone had any experience of using these three together?  I have Struts 2 
and SiteMesh working together happily, but soon as I add Struts Menu I get the 
error below.

I believe it is due to SiteMesh and not Struts 2 but am not sure on this.

Has anyone seen this before?

Thanks.


javax.servlet.ServletException: Stream closed

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)

com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)

org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)

root cause

java.io.IOException: Stream closed

org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)

org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:114)

org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:172)

org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)

org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614)

org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:119)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)

com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)

org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)









Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]

[cid:image001.jpg@01C89B1B.A3B79980]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: interesting proxy + action chain issue

2008-04-10 Thread Brad A Cupit
The only problem with the scope plugin is that it will use the session,
which may break the whole notion of POST-redirect-GET: if the data in
the session is removed or replaced by later requests, then pressing the
back or refresh buttons on the initial page with errors will not yield
the same response.

I think it would be cool if the errors were url parameters as part of
the redirect, but there's currently no easy way to do this. Could a
custom interceptor realize that the result is a redirect and turn the
validation errors into url parameters? Or would this need to be a custom
result class (perhaps extending ServletRedirectResult or
ServletActionRedirectResult)?

Brad Cupit
Louisiana State University - UIS

-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 08, 2008 6:24 PM
To: Struts Users Mailing List
Subject: Re: interesting proxy + action chain issue

Ian Meikle wrote:
 HI,

 I have been following this post with interest since I used the PRG
pattern 
 in previous projects.
 We are using struts 2 in are current project and I like the
errorMessages 
 behaviour that is part of the Action.

 Is it possible to persist these over the PRG cycle ?
 By default I assume they would be lost when we get to the GET stage
since 
 they are request scope and the GET is a seperate request than the POST

 that caused  the error.

   

Hi Ian,
This is an issue that Struts2 needs to handle better.  It can be done 
but its not as straight-forward as it could be.

The scope interceptor [1] provides this feature. It allows you to 
specify which properties should be bound to session or application scope

and injected into the action.
The scoped modeldriven interceptor is for modeldriven actions [2].  Both

are included in the default stack.

The scope plugin allows annotations to specify which properties persist 
over a cycle.  It's not bundled with struts but I have heard good 
comments about it [4].

[1] http://cwiki.apache.org/WW/scope-interceptor.html
[2] http://cwiki.apache.org/WW/scoped-model-driven-interceptor.html
[3] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
[4] http://article.gmane.org/gmane.comp.jakarta.struts.devel/65052

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



interceptor-stack and param problem

2008-04-10 Thread Tomasz Pankowski
Hi
I have something like this:
 interceptor-stack name=myStack
 interceptor-ref name=interA/
 interceptor-ref name=interB
 param name=parmAaaa/parm
 /interceptor-ref
 interceptor-ref name=interC/
/interceptor-stack

 action name=myAction...
 interceptor-ref name=myStack 
param name=interB.parmBbbb/parm
 /interceptor-ref
/action

And the problem is, that only parmB is set, parmA have default value.
To have both params set properly  I must set all param on stack or on
action, but how to mix it?

Im using struts 2.0.11.1

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



RE: How to use Autocompleter like GMail style.

2008-04-10 Thread Allen, Daniel
The showcase [1] has an autocompleter example page with demonstrations
of several of its features and accompanying source.

~DVA

[1] http://www.planetstruts.org/struts2-showcase/ajax/autocompleter/

-Original Message-
From: Joey [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 10, 2008 6:23 AM
To: Struts Users Mailing List
Subject: How to use Autocompleter like GMail style.

Hi Everybody.

Just want to know how to can I use Autocompleter as GMail style,
I mean, in GMail website, When I  type more than 1 recipient name in
To: text box, the text box can complete with each recipient name.

I have checked Antocompleter document in Struts2 website, but didn't
find any useful information.

Thanks

Joey

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Re: Help using Ajax form validation

2008-04-10 Thread goelshek

There is so much talk about Struts 2.1 and so many examples that work only
with 2.1, not 2.0. So where do I download 2.1 from? A GA release is clearly
not available. So why even put examples out there for a distro that is not
available?




Musachy Barroso wrote:
 
 If you are using 2.0.8 or 2.0.6 the AJAX validation was implemented with
 DWR, not Dojo. AJAX validation with Dojo will be(it is) available on 2.1
 
 regards
 musachy
 
 On 6/26/07, King, William S. [EMAIL PROTECTED] wrote:

 I've downloaded the showcase, and the example I'm trying to use is under
 the validation examples, validation (ajax).   The generated source code
 is pointing to some js files that don't exist in the project, so I'm
 assuming (I know...that's bad) the files are generated by Dojo.  I'm
 having issues finding out how to port dojo into my existing project.
 Thanks for the reference points, I'm gonna check those out now.

 Shane

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 26, 2007 9:34 AM
 To: Struts Users Mailing List
 Subject: Re: Help using Ajax form validation

 I think you have more than one question :), start by checking out the
 tutorials:

 http://struts.apache.org/2.x/docs/tutorials.html

 and take a look at Starting with Struts book:

 http://www.infoq.com/minibooks/starting-struts2

 Then you can move to the Dojo stuff:

 http://struts.apache.org/2.x/docs/ajax-tags.html

 I would also advise to download Struts Showcase as it has many examples
 that will help you get started.

 musachy

 On 6/26/07, King, William S. [EMAIL PROTECTED] wrote:
 
  I'm BRAND NEW to Struts2  Ajax. Can anyone point me in the right
  direction to use Dojo in my application...it's a web app using
  portles, JSPs, Struts2, Ajax. I see in documentation that to utilize
  the Ajax form validation I need to install the Dojo toolkit. I've
  downloaded the zip file, but it doesn't look like bringing the .jar
  file in to my eclipse project will do anything for me. Any help would
  be greatly appreciated.
 
 
  W. Shane King
 
  General Dynamics
  Advanced Information Systems
  2673 Commons Blvd., Suite 200
  Beavercreek, OH 45431
 
  Email: [EMAIL PROTECTED]
  Voice: (937) 427-4431
  Fax: (937) 427-6416
 
 


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

 -
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/Help-using-Ajax-form-validation-tp11305181p16608837.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]



RE: Local Host Error

2008-04-10 Thread Alvaro Ernesto Gomez Cerna
Change port is running for apache is port  

-Mensaje original-
De: Alberto A. Flores [mailto:[EMAIL PROTECTED] 
Enviado el: Jueves, 10 de Abril de 2008 07:12 a.m.
Para: Struts Users Mailing List
Asunto: Re: Local Host Error

Also, note that if you have IIS running, you would need to change the listening
port (on either IIS or Apache).

Lukasz Lenart wrote:
 Hello. To preface I am very new to using Apache. I am attempting to  
 experiment locally, however I cannot connect to local host nor the
  127.0.0.1 directly. I am looking to try and get the IT works! 
 Apache
 
 Are you using Skype? By default, Skype block port 80 and 443, disable 
 such port in Skype or change the default port for Apache.
 
 You can also use netstat -b from command prompt to see all programs 
 with opened ports.
 
 
 Regards

-- 

Alberto A. Flores
http://www.linkedin.com/in/aflores





__ Informacin de NOD32, revisi n 3016 (20080410) __

Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com


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



Re: Need help getting started with remote tabs

2008-04-10 Thread Musachy Barroso
See the download section on the website:

http://struts.apache.org/download.cgi

musachy

On Thu, Apr 10, 2008 at 1:38 PM, Jiang, Jane (NIH/NCI) [C]
[EMAIL PROTECTED] wrote:
 Musachy,

  Thanks for your suggestion.  Do you mean this showcase?

  http://www.planetstruts.org/struts2-showcase/ajax/tabbedpanel/example3.j
  sp

  I found the source for the jsp, but there is no source code for the
  action.  Is there a place to download the complete source code?

  Thank you,

  Jane



  -Original Message-
  From: Musachy Barroso [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, April 09, 2008 5:38 PM
  To: Struts Users Mailing List
  Subject: Re: Need help getting started with remote tabs

  There are examples in the showcase application.

  musachy

  On Wed, Apr 9, 2008 at 8:55 PM, Jiang, Jane (NIH/NCI) [C]
  [EMAIL PROTECTED] wrote:
   Is there a complete working example for the tabbedPanel tag?  I found
this example in the tag reference document.  How do I set up the
  result
for AjaxTest.action?  I loaded the dynamic contents in that action
  and
directed it to the jsp that displays that content.  The action was
invoked, but the tab shows up empty.  I tried to include the jsp
  inside
the s:div tag and still nothing.
  
s:tabbedpanel id=test beforeSelectTabNotifyTopics=/beforeSelect
  s:div id=three label=remote theme=ajax
  href=/AjaxTest.action

  One Tab
  /s:div
  s:div id=three label=remote theme=ajax
  href=/AjaxTest.action

  Another tab
  /s:div
/s:tabbedpanel
  
Thanks a lot for your help,
  
Jane
  
-
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

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





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

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



Struts 2.0: Ajax based client side validation onblur

2008-04-10 Thread goelshek

For Struts 2.0 (NOT 2.1):

The documentation for introduction to 
http://struts.apache.org/2.0.11.1/docs/ajax-client-side-validation.html Ajax
Client Side Validation  says that The validation occurs on each onblur
event for each form element. The 
http://struts.apache.org/2.0.11.1/docs/ajax-validation.html example   starts
off by saying that An example is provided on how to use AJAX validation
with Prototype, in this case the Dojo plugin is not required. So I scroll
down to the bottom of the page and try to follow the Example using
Prototype. However, there are two issues I see with this example. 

Firstly, there is no onblur specified for each element. So does this example
really work for onblur? 

Secondly, even if I assume that the code for onblur will be put at runtime,
when implementing the said example, my browser tells me that it could not
find Ajax which is probably an object in prototype.js. Apparently the src
in the two script declarations: 

1) script language=JavaScript
src=${pageContext.request.contextPath}/struts/utils.js
type=text/javascript/script 

AND 

2) script src=${pageContext.request.contextPath}/js/prototype.js
type=text/javascript/script 

cannot be resolved. From all my searching, there has been no clue as to
where I can find these .js files. People say that they are automagically
put there. But even for that magic to happen, those files must be present in
the source code of struts. I searched through the entire source code and it
just does not have either of those two files. 

To conclude, I am trying to get Ajax based client side validation to work
onblur at each element (NOT onsubmit of the form; that works fine). But
there seems to be no example - not even in the showcase tutorial. If anyone
has got it to work, I would really appreciate if you could share your
example with me. 

Thanks. 

PS: In many places in the documentation I see notifications to the effect:
This documentation refers to version 2.1 which has not been released yet.
Isn't that kind of ridiculous? Providing documentation for something that
isn't even released is something I cannot wrap my head around. If someone
can explain that concept to a novice user like myself, it would be a great
help.
-- 
View this message in context: 
http://www.nabble.com/Struts-2.0%3A-Ajax-based-client-side-validation-%22onblur%22-tp16608849p16608849.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]



Re: Help using Ajax form validation

2008-04-10 Thread Musachy Barroso
I feel your pain and there was some talk to branch the wiki for
different versions, but it never happened.

musachy

On Thu, Apr 10, 2008 at 2:32 PM, goelshek [EMAIL PROTECTED] wrote:

  There is so much talk about Struts 2.1 and so many examples that work only
  with 2.1, not 2.0. So where do I download 2.1 from? A GA release is clearly
  not available. So why even put examples out there for a distro that is not
  available?




  Musachy Barroso wrote:
  
   If you are using 2.0.8 or 2.0.6 the AJAX validation was implemented with
   DWR, not Dojo. AJAX validation with Dojo will be(it is) available on 2.1
  
   regards
   musachy
  
   On 6/26/07, King, William S. [EMAIL PROTECTED] wrote:
  
   I've downloaded the showcase, and the example I'm trying to use is under
   the validation examples, validation (ajax).   The generated source code
   is pointing to some js files that don't exist in the project, so I'm
   assuming (I know...that's bad) the files are generated by Dojo.  I'm
   having issues finding out how to port dojo into my existing project.
   Thanks for the reference points, I'm gonna check those out now.
  
   Shane
  
   -Original Message-
   From: Musachy Barroso [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, June 26, 2007 9:34 AM
   To: Struts Users Mailing List
   Subject: Re: Help using Ajax form validation
  
   I think you have more than one question :), start by checking out the
   tutorials:
  
   http://struts.apache.org/2.x/docs/tutorials.html
  
   and take a look at Starting with Struts book:
  
   http://www.infoq.com/minibooks/starting-struts2
  
   Then you can move to the Dojo stuff:
  
   http://struts.apache.org/2.x/docs/ajax-tags.html
  
   I would also advise to download Struts Showcase as it has many examples
   that will help you get started.
  
   musachy
  
   On 6/26/07, King, William S. [EMAIL PROTECTED] wrote:
   
I'm BRAND NEW to Struts2  Ajax. Can anyone point me in the right
direction to use Dojo in my application...it's a web app using
portles, JSPs, Struts2, Ajax. I see in documentation that to utilize
the Ajax form validation I need to install the Dojo toolkit. I've
downloaded the zip file, but it doesn't look like bringing the .jar
file in to my eclipse project will do anything for me. Any help would
be greatly appreciated.
   
   
W. Shane King
   
General Dynamics
Advanced Information Systems
2673 Commons Blvd., Suite 200
Beavercreek, OH 45431
   
Email: [EMAIL PROTECTED]
Voice: (937) 427-4431
Fax: (937) 427-6416
   
   
  
  
   --
   Hey you! Would you help me to carry the stone? Pink Floyd
  
   -
   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
  
  

  --
  View this message in context: 
 http://www.nabble.com/Help-using-Ajax-form-validation-tp11305181p16608837.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]





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

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



RE: Need help getting started with remote tabs

2008-04-10 Thread Jiang, Jane (NIH/NCI) [C]
Thank you.  I found my problem was not really with my code.  I
accidentally find the remote tab working fine with IE.  But it shows
nothing in Firefox.  The jsp alone display ok in firefox, I can also
include the jsp using the s:include tag, but when I changed it to remote
tab, nothing shows up on the tab.  I did not find any error either.

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 10, 2008 10:38 AM
To: Struts Users Mailing List
Subject: Re: Need help getting started with remote tabs

See the download section on the website:

http://struts.apache.org/download.cgi

musachy

On Thu, Apr 10, 2008 at 1:38 PM, Jiang, Jane (NIH/NCI) [C]
[EMAIL PROTECTED] wrote:
 Musachy,

  Thanks for your suggestion.  Do you mean this showcase?


http://www.planetstruts.org/struts2-showcase/ajax/tabbedpanel/example3.j
  sp

  I found the source for the jsp, but there is no source code for the
  action.  Is there a place to download the complete source code?

  Thank you,

  Jane



  -Original Message-
  From: Musachy Barroso [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, April 09, 2008 5:38 PM
  To: Struts Users Mailing List
  Subject: Re: Need help getting started with remote tabs

  There are examples in the showcase application.

  musachy

  On Wed, Apr 9, 2008 at 8:55 PM, Jiang, Jane (NIH/NCI) [C]
  [EMAIL PROTECTED] wrote:
   Is there a complete working example for the tabbedPanel tag?  I
found
this example in the tag reference document.  How do I set up the
  result
for AjaxTest.action?  I loaded the dynamic contents in that action
  and
directed it to the jsp that displays that content.  The action was
invoked, but the tab shows up empty.  I tried to include the jsp
  inside
the s:div tag and still nothing.
  
s:tabbedpanel id=test
beforeSelectTabNotifyTopics=/beforeSelect
  s:div id=three label=remote theme=ajax
  href=/AjaxTest.action

  One Tab
  /s:div
  s:div id=three label=remote theme=ajax
  href=/AjaxTest.action

  Another tab
  /s:div
/s:tabbedpanel
  
Thanks a lot for your help,
  
Jane
  
  
-
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

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





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

-
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: retrotranslating struts 2.0.11 not working

2008-04-10 Thread Paula Estrella

Antonio Petrelli wrote:


2008/4/10, Paula Estrella [EMAIL PROTECTED]:
 


StandardContext[/project]Exception starting filter struts2
java.lang.UnsupportedClassVersionError:
project/FileUploadAction (Unsupported major.minor version 49.0)
   



As Al Sutton noticed before, is *your* class that is compiled with
Java 5 and put into a JDK 1.4 environment.

Antonio

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

 

we don't think so because we recompiled the java clases on the server 
with jdk 1.4 and we get the same error message ... is it right to have 
in the lib folder all these libs ?

backport-util-concurrent-3.0.jar
commons-fileupload-j4-1.1.1.jar
commons-io-j4-1.1.jar
commons-logging-api-j4-1.1.jar
commons-logging-j4-1.0.4.jar
freemarker-j4-2.3.8.jar
ognl-j4-2.6.11.jar
retrotranslator-runtime-1.2.2.jar
retrotranslator-transformer-1.2.2.jar
struts2-core-j4-2.0.11.jar
xwork-j4-2.0.4.jar

thanks,
Paula

error from catalina
2008-04-10 16:20:15,123 [main] WARN  org.apache.struts2.config.Settings 
- Settings: Could not parse struts.locale setting, substituting default 
VM locale
2008-04-10 16:20:15,793 [main] ERROR tomcat.localhost./project.Context - 
Error filterStart
2008-04-10 16:20:15,793 [main] ERROR tomcat.localhost./project.Context - 
Context startup failed due to previous errors



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



Re: retrotranslating struts 2.0.11 not working

2008-04-10 Thread Antonio Petrelli
2008/4/10, Paula Estrella [EMAIL PROTECTED]:

 Antonio Petrelli wrote:

  2008/4/10, Paula Estrella [EMAIL PROTECTED]:
 
 
   StandardContext[/project]Exception starting filter struts2
   java.lang.UnsupportedClassVersionError:
   project/FileUploadAction (Unsupported major.minor version 49.0)
  
  
 
  As Al Sutton noticed before, is *your* class that is compiled with
  Java 5 and put into a JDK 1.4 environment.
 
  Antonio
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 we don't think so because we recompiled the java clases on the server with
 jdk 1.4 and we get the same error message ...



Ok, sorry if I seem rude, but if you still receive your class called
FileUploadAction having a version number of 49.0, it means that it has
been compiled with Java 5 (JDK1.4 has a version of 48.0).
So you probably need to clean up your classes and recompile completely your
project.

is it right to have in the lib folder all these libs ?
 backport-util-concurrent-3.0.jar
 commons-fileupload-j4-1.1.1.jar
 commons-io-j4-1.1.jar
 commons-logging-api-j4-1.1.jar
 commons-logging-j4-1.0.4.jar
 freemarker-j4-2.3.8.jar
 ognl-j4-2.6.11.jar
 retrotranslator-runtime-1.2.2.jar
 retrotranslator-transformer-1.2.2.jar
 struts2-core-j4-2.0.11.jar
 xwork-j4-2.0.4.jar



AFAIK only xwork and struts2-core need to be retrotranslated. The other
packages are already compiled against JDK 1.4

Antonio


Re: Struts2, SiteMesh and Struts Menu

2008-04-10 Thread Al Sutton

I'm using the combination you mention without any problems.

Check the order you're using the servlet filters in, mine is;


filter
filter-namestruts-cleanup/filter-name
filter-classorg.apache.struts2.dispatcher.ActionContextCleanUp/filter-class/filterfilter filter-namesitemesh/filter-name filter-classcom.opensymphony.module.sitemesh.filter.PageFilter/filter-class/filterfilter 
filter-namestruts/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class/filterfilter filter-namestruts-cleanup/filter-name 
url-pattern/*/url-pattern/filter-mappingfilter-mapping filter-namesitemesh/filter-name url-pattern/*/url-pattern/filter-mappingfilter-mapping filter-namestruts/filter-name 
url-pattern/*/url-pattern/filter-mapping Other filters here .and for Struts Menu I use the listener; listener  listener-classnet.sf.navigator.menu.MenuContextListener/listener-class /listenerHope this helps.Al.- Original Message 
-From: Matthew SeabornTo: 'Struts Users Mailing List'Sent: Thursday, April 10, 2008 3:00 PMSubject: Struts2, SiteMesh and Struts MenuHa
s anyone had any experience of using these three together?  I have Struts2 and 
SiteMesh working together happily, but soon as I add Struts Menu I getthe error 
below.I believe it is due to SiteMesh and not Struts 2 but am not sure on 
this.Has anyone seen this before?Thanks.javax.servlet.ServletException: Stream 
closed
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) 
   
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)

com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) 
   
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)root
 causejava.io.IOException: Stream closed
org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)  
  org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterIm
pl.java:114)
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:172)   
 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954) 
   
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614) 
   
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:119)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) 
   
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
com.opensymphony.modul
e.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)Matthew SeabornSoftware Architectt+44(0) 208 484 0729m  +44(0) 7949 465 142e   [EMAIL PROTECTED] HousePlane Tree CrescentFeltham, Middlesex, TW13 7HEUnited Kingdomhttp://www.performgroup.com/CONFIDENTIALITY - This email and any files transmitted with it, areconfidential, may be legally privileged and are intended solely for the useof the individual or entity to whom they are addressed. If this has come toyou in error, you must not copy, distribute, disclose or use any of theinformation it contains. Please notify the sender immediately and deletethem from your system.SECURITY - Please be aware that communication by email, by its very 
nature,is not 100% secure and by communicating with Perform Group by email youconsent to us monitoring and reading any such correspondence.VIRUSES - Although this email message has been scanned for the presence ofcomputer viruses, the sender accepts no liability for any damage sustainedas a result of a computer virus and it is the recipient's responsibility toensure that email is virus free.AUTHORITY - Any views or opinions expressed in this email are solely thoseof the sender and do not necessarily represent those of Perform Group.COPYRIGHT - Copyright of this email and any attachments belongs to PerformGroup, Companies House Registration number 6324278.


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



Using closable div in tabbedpanel

2008-04-10 Thread Gustavo Felisberto
I'm running struts 2.0.11.1 and trying to use some AJAX things with the 
provided dojo.


s:tabbedpanel id=contacts_list_container
   s:url id=cListUrl action=SimpleListContacts/
   s:div id=contacts_list href=%{cListUrl} theme=ajax 
listenTopics=show_contacts formId=msg_form/

/s:tabbedpanel

This is working, but if I add a closable=true to the s:div / this 
will crash as there is not such thing.

How can I make this work?

This mail serves this purpose and another that is more of a complain on 
the lack and confusion of user documentation on struts2. For example:

why does:
http://struts.apache.org/2.0.11.1/docs/ajax-and-javascript-recipes.html
Contains: This documentation refers to version *2.1* which has not been 
released yet.


--
Gustavo Felisberto.
WIT-Software, Lda
Coimbra (Portugal), San Jose (California)
Phone: +351239801030
Web: http://www.wit-software.com 





signature.asc
Description: OpenPGP digital signature


Does Struts 2 support clustering?

2008-04-10 Thread mojoRising

We have struts running great on a single server but when we test in our
clustered environment there are problems: The user is not staying on the
same server the initial request came in on, so their session is getting
lost.  Does struts 2 support a clustered enterprise environment? If so, is
there anything special that needs to be done to make this work? Our
environment is Apache,weblogic9.2, struts2.  

Thanks! 
--John
-- 
View this message in context: 
http://www.nabble.com/Does-Struts-2-support-clustering--tp16609897p16609897.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]



Re: Does Struts 2 support clustering?

2008-04-10 Thread Ian Roughley
How are you clustering the HTTP session?  Usually this involves 
configuration of the app server so that it is stored in some type of 
non-transient storage.


/Ian

mojoRising wrote:

We have struts running great on a single server but when we test in our
clustered environment there are problems: The user is not staying on the
same server the initial request came in on, so their session is getting
lost.  Does struts 2 support a clustered enterprise environment? If so, is
there anything special that needs to be done to make this work? Our
environment is Apache,weblogic9.2, struts2.  

Thanks! 
--John
  



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



Re: Again: question to interceptors

2008-04-10 Thread Peter Theissen

Hi all, dear Ralf,

thanks a lot for your answer it was really helpful.
Honestly, I didnt understand the call-stack-principle
behind the interceptors at all. So your hint:
To understand recursion, you must understand recursion
was a good one and also this picture:
[1] http://struts.apache.org/2.0.11.1/docs/big-picture.html
I already knew that design from the event handling of
a Javascript API (Map24 AJAX API)

However, what I thought, was one has to determine the
order in that the interceptors are called, in the action tag:
all interceptors that are before the result are also called
before the action, then the action is called, then the result
and those the interceptors are called, which are written AFTER
the result tags. OK, in retrospect my idea was also not
so intelligent ;-)

Thx  best regards
Peter



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



Re: Does Struts 2 support clustering?

2008-04-10 Thread Dave Newton
--- mojoRising [EMAIL PROTECTED] wrote:
 We have struts running great on a single server but when we test in our
 clustered environment there are problems: The user is not staying on the
 same server the initial request came in on, so their session is getting
 lost.  Does struts 2 support a clustered enterprise environment? If so, is
 there anything special that needs to be done to make this work? Our
 environment is Apache,weblogic9.2, struts2.  

This is almost certainly a server configuration issue; in general nothing on
the framework / application side should have anything to do with session
management or even be aware of it.

Dave



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



Fwd: 404 Not Found :Parsing error processing resource path /WEB-INF/cfg/struts-config.xml

2008-04-10 Thread hardik pandya
Hello All,

I get this error, when I click on submit button to Action Class

*404 Not Found :
Servlet error:* Parsing error processing resource path
/WEB-INF/cfg/struts-config.xml

I am using set-property tags inside action-mapping to access Application
Module from Bc4jContext in struts action class. When I comment those tags,
it does not give that eror

These two errors are consistent and I do not know, whats the problem,

Everything is included in classpath, but still TLD *warnings* (not a
registered namespace) on all jsp pages comes up.

This is my : struts-config.xml DTD

?xml version = '1.0' encoding = 'windows-1252'?
!DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts
Configuration 1.1//EN 
http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;

can somebody please point me whats wrong here ??

Thank you all in advance,


RE: interesting proxy + action chain issue

2008-04-10 Thread Guillaume Bilodeau

Hi Brad,

Have you tried this:
http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect

I've used this for a while with good results, although recently I've
stumbled on WW-2170 ( https://issues.apache.org/struts/browse/WW-2170 ).  It
seems to occur only when using annotations though.

Cheers,
GB


Brad A Cupit wrote:
 
 The only problem with the scope plugin is that it will use the session,
 which may break the whole notion of POST-redirect-GET: if the data in
 the session is removed or replaced by later requests, then pressing the
 back or refresh buttons on the initial page with errors will not yield
 the same response.
 
 I think it would be cool if the errors were url parameters as part of
 the redirect, but there's currently no easy way to do this. Could a
 custom interceptor realize that the result is a redirect and turn the
 validation errors into url parameters? Or would this need to be a custom
 result class (perhaps extending ServletRedirectResult or
 ServletActionRedirectResult)?
 
 Brad Cupit
 Louisiana State University - UIS
 
 -Original Message-
 From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 08, 2008 6:24 PM
 To: Struts Users Mailing List
 Subject: Re: interesting proxy + action chain issue
 
 Ian Meikle wrote:
 HI,

 I have been following this post with interest since I used the PRG
 pattern 
 in previous projects.
 We are using struts 2 in are current project and I like the
 errorMessages 
 behaviour that is part of the Action.

 Is it possible to persist these over the PRG cycle ?
 By default I assume they would be lost when we get to the GET stage
 since 
 they are request scope and the GET is a seperate request than the POST
 
 that caused  the error.

   
 
 Hi Ian,
 This is an issue that Struts2 needs to handle better.  It can be done 
 but its not as straight-forward as it could be.
 
 The scope interceptor [1] provides this feature. It allows you to 
 specify which properties should be bound to session or application scope
 
 and injected into the action.
 The scoped modeldriven interceptor is for modeldriven actions [2].  Both
 
 are included in the default stack.
 
 The scope plugin allows annotations to specify which properties persist 
 over a cycle.  It's not bundled with struts but I have heard good 
 comments about it [4].
 
 [1] http://cwiki.apache.org/WW/scope-interceptor.html
 [2] http://cwiki.apache.org/WW/scoped-model-driven-interceptor.html
 [3] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
 [4] http://article.gmane.org/gmane.comp.jakarta.struts.devel/65052
 
 -
 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/interesting-proxy-%2B-action-chain-issue-tp16544472p16612701.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]



Re: How to show html generated files?

2008-04-10 Thread Musachy Barroso
You can read those files and write them to the outputstream.

musachy

On Thu, Apr 10, 2008 at 6:11 PM, Jerome [EMAIL PROTECTED] wrote:
 Hi all
  i'm using Struts to make a web interface for a bioinformatic application
 developed here. With Struts i can check out the validity of the input data,
 control the job running on our cluster, and get back the result.

  Here is my problem: the result are made of various html files. How can i
 show all this file using my web application? My first idea was to extract
 all this files on an apache server and redirect with a struts action to
 point on this page. But i would like to put all this files on a  temporal
 directory on my web applcation. This is possible with Struts?

  Hope that's someone can give me some idea..

  Thank's all for this very good stuff.

  Best regards.

  --
  -- Jérôme
  Qui s'est brûlé la langue n'oublie plus de souffler sur sa soupe.
 (Proverbe allemand)

  -
  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

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



404 Not Found :Parsing error processing resource path /WEB-INF/cfg/struts-config.xml

2008-04-10 Thread hardik pandya

 Hello All,

 I get this error, when I click on submit button

 *404 Not Found :
 Servlet error:* Parsing error processing resource path
 /WEB-INF/cfg/struts-config.xml

 I am using set-property tags inside action-mapping to access Application
 Module from Bc4jContext in struts action class. When I comment those tags,
 it does not give that eror

 These two errors are consistent and I do not know, whats the problem,

 Everything is included in classpath, but still TLD *warnings* (not a
 registered namespace) on all jsp pages comes up.

 This is my : struts-config.xml DTD

 ?xml version = '1.0' encoding = 'windows-1252'?
 !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts
 Configuration 1.1//EN 
 http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;

 can somebody please point me whats wrong here ??

 Thank you all in advance,




Re: How can I tell Struts 2 to throw/log exceptions for invalid OGNL Expressions

2008-04-10 Thread mraible

Following up months later as this has come up again now that 2.1 is close to
release. The current version does log messages for invalid properties, but
it doesn't blow up for invalid properties which is more of what I'm looking
for.

When I blogged about this[1], one of the responses was the following:



 When you are using freemarker as your result technology in struts2 you get
 great feedback on problems like this. This is not indicative of the whole
 framework -- just the result-type that you are using (probably jsp?)
 

I tried FreeMarker this morning and discovered that the problem exists there
too. Grrr. I've experienced Struts 2 being eliminated as a web framework
candidate on a couple projects because of this. Kindof annoying. 

Matt

[1] http://raibledesigns.com/rd/entry/does_struts_2_suck


Ted Husted wrote:
 
 Good point. Feel free to open a S2 JIRA ticket that cross-references
 XW-557 (since I'm not sure if its something we could do here or not)
 -- and feel even more free to submit a patch!
 
 As usual, we are short of active volunteers, and we can always use a
 hand with the code!
 
 -Ted.
 
 On 9/6/07, mraible [EMAIL PROTECTED] wrote:

 struts.devMode=true will catch setting invalid properties, but not
 reading
 from them. I want to be warned when a property/method doesn't exist. Or
 in
 the instance of calling stating methods with FQCN, I want to be made
 aware
 when I fat finger the package name. If I could use JSP's import and then
 read from the package, that'd be even nicer. It's somewhat verbose to
 call
 FQ static methods. I suppose I could move the methods into my action, so
 it's not too bad.

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

-- 
View this message in context: 
http://www.nabble.com/How-can-I-tell-Struts-2-to-throw-log-exceptions-for-invalid-OGNL-Expressions-tp11659700p16612885.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]



RE: interesting proxy + action chain issue

2008-04-10 Thread Brad A Cupit
Hi Guillaume,
yep, I'm familiar with the ServletActionRedirectResult, and I'm
especially familiar with bug you mentioned (you and I both commented on
it, asking for a backport to 2.0.x...on that note, anyone with commit
access want to backport https://issues.apache.org/struts/browse/WW-2170
and release 2.0.12? The patch is there and ready to go)  :-)

What I'm not sure how to do is to get the error messages into the
redirect url, and it seems like something you'd want often enough for it
to be built-in to ServletActionRedirectResult (or a class which extends
it).

Brad Cupit
Louisiana State University - UIS


-Original Message-
From: Guillaume Bilodeau [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 10, 2008 1:24 PM
To: user@struts.apache.org
Subject: RE: interesting proxy + action chain issue


Hi Brad,

Have you tried this:
http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect

I've used this for a while with good results, although recently I've
stumbled on WW-2170 ( https://issues.apache.org/struts/browse/WW-2170 ).
It
seems to occur only when using annotations though.

Cheers,
GB


Brad A Cupit wrote:
 
 The only problem with the scope plugin is that it will use the
session,
 which may break the whole notion of POST-redirect-GET: if the data in
 the session is removed or replaced by later requests, then pressing
the
 back or refresh buttons on the initial page with errors will not yield
 the same response.
 
 I think it would be cool if the errors were url parameters as part of
 the redirect, but there's currently no easy way to do this. Could a
 custom interceptor realize that the result is a redirect and turn the
 validation errors into url parameters? Or would this need to be a
custom
 result class (perhaps extending ServletRedirectResult or
 ServletActionRedirectResult)?
 
 Brad Cupit
 Louisiana State University - UIS
 
 -Original Message-
 From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 08, 2008 6:24 PM
 To: Struts Users Mailing List
 Subject: Re: interesting proxy + action chain issue
 
 Ian Meikle wrote:
 HI,

 I have been following this post with interest since I used the PRG
 pattern 
 in previous projects.
 We are using struts 2 in are current project and I like the
 errorMessages 
 behaviour that is part of the Action.

 Is it possible to persist these over the PRG cycle ?
 By default I assume they would be lost when we get to the GET stage
 since 
 they are request scope and the GET is a seperate request than the
POST
 
 that caused  the error.

   
 
 Hi Ian,
 This is an issue that Struts2 needs to handle better.  It can be done 
 but its not as straight-forward as it could be.
 
 The scope interceptor [1] provides this feature. It allows you to 
 specify which properties should be bound to session or application
scope
 
 and injected into the action.
 The scoped modeldriven interceptor is for modeldriven actions [2].
Both
 
 are included in the default stack.
 
 The scope plugin allows annotations to specify which properties
persist 
 over a cycle.  It's not bundled with struts but I have heard good 
 comments about it [4].
 
 [1] http://cwiki.apache.org/WW/scope-interceptor.html
 [2] http://cwiki.apache.org/WW/scoped-model-driven-interceptor.html
 [3] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
 [4] http://article.gmane.org/gmane.comp.jakarta.struts.devel/65052
 
 -
 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/interesting-proxy-%2B-action-chain-issue-tp1654447
2p16612701.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]


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



Re: Does Struts 2 support clustering?

2008-04-10 Thread mojoRising

Thanks. That is what I suspect also but I am trying to weed out other
possibilities... can I then take your response to mean : Yes, Struts 2 DOES
support clustering?



newton.dave wrote:
 
 
 This is almost certainly a server configuration issue; in general nothing
 on
 the framework / application side should have anything to do with session
 management or even be aware of it.
 
 Dave
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
View this message in context: 
http://www.nabble.com/Does-Struts-2-support-clustering--tp16609897p16617641.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]



Re: S2 Textfield tag date formatting

2008-04-10 Thread Guillaume Bilodeau

That note about not using type conversion for dates probably has to do with
the fact that dates can be formatted and so parsed using different patterns
depending on different locales.  If your code uses a fixed pattern such as
yours, I suppose you can ignore this.

So based on that, you can simply use a Date property in your action or a
nested model object and annotate it with a @TypeConversion with a custom
type converter.

Cheers,
GB


akinss wrote:
 
 I'm trying to use a textfield tag for date input.  I need to format this
 in
 the form dd/MM/ HH:mm:ss
 
 The teaxtfield tag formats the date to a Locale based format
 DateFormat.SHORT  via XWorkBasicConverter.  For my locale this turns out
 to
 be dd/MM/yy. This is not the format I want.
 
 s:textfield  cssClass=field key=filter.dateTimeStart
 name=filter.dateTimeStart/
 
 DateTimePicker wont allow you to apply a style class to the input field so
 it wont format.  Bug has been reported in Struts JIRA (WW-1778) and a fix
 made.  Need to wait for Struts 2.1 before this will work so I can't use
 this.
 
 Using the value parameter and a date tag won't work because this
 overwrites
 the value entered.  If the user enters a value that can't be converted to
 a
 date it isn't re-displayed, the field is displayed empty.
 
 s:textfield  cssClass=field key=filter.dateTimeStart
 name=filter.dateTimeStart
   s:param name=value
 s:date name=filter.dateTimeStart format=dd/MM/ HH:mm:ss /
   /s:param
 /s:textfield
 
 In the S2 guide for Type Conversion (
 http://struts.apache.org/2.x/docs/type-conversion.html) it has a note
 saying
 not to use Type Conversion for dates.
 
 Does anyone know of a way to do this?
 
 
 Thanks in advance.
 
 

-- 
View this message in context: 
http://www.nabble.com/S2-Textfield-tag-date-formatting-tp16600189p16617646.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]



Re: Does Struts 2 support clustering?

2008-04-10 Thread Randy Burgess
You can configure sticky sessions, which means that requests that go to one
server in your cluster will always go to that server. To me this defeats the
purpose of the cluster because if that machine goes down the user will be
sent to another server, but their session will be gone with the down server.
However this is the best performing configuration. Another option is shared
sessions and this is covered in the WebLogic documentation at
http://edocs.bea.com. How or if the session is shared in a cluster has
nothing to do with Struts or any web application really.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: mojoRising [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Thu, 10 Apr 2008 13:45:11 -0700 (PDT)
 To: user@struts.apache.org
 Subject: Re: Does Struts 2 support clustering?
 
 
 Thanks. That is what I suspect also but I am trying to weed out other
 possibilities... can I then take your response to mean : Yes, Struts 2 DOES
 support clustering?
 
 
 
 newton.dave wrote:
 
 
 This is almost certainly a server configuration issue; in general nothing
 on
 the framework / application side should have anything to do with session
 management or even be aware of it.
 
 Dave
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/Does-Struts-2-support-clustering--tp16609897p16617641.ht
 ml
 Sent from the Struts - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



This email and any attachments (Message) may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

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



RE: interesting proxy + action chain issue

2008-04-10 Thread Guillaume Bilodeau

I'm not sure if I'm missing something here, but using the
ServletActionRedirectResult with parse=true and extra parameters does
include these parameters in the redirect URL.

The problem is that this mechanism is limited to string-based (or
string-parseable) parameters, so you're ruling out objects like an ArrayList
that would contain error messages.  That's where something like flash scope
would be useful and is unfortunately lacking in 2.0.

Cheers,
GB


Brad A Cupit wrote:
 
 Hi Guillaume,
 yep, I'm familiar with the ServletActionRedirectResult, and I'm
 especially familiar with bug you mentioned (you and I both commented on
 it, asking for a backport to 2.0.x...on that note, anyone with commit
 access want to backport https://issues.apache.org/struts/browse/WW-2170
 and release 2.0.12? The patch is there and ready to go)  :-)
 
 What I'm not sure how to do is to get the error messages into the
 redirect url, and it seems like something you'd want often enough for it
 to be built-in to ServletActionRedirectResult (or a class which extends
 it).
 
 Brad Cupit
 Louisiana State University - UIS
 
 
 -Original Message-
 From: Guillaume Bilodeau [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 10, 2008 1:24 PM
 To: user@struts.apache.org
 Subject: RE: interesting proxy + action chain issue
 
 
 Hi Brad,
 
 Have you tried this:
 http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect
 
 I've used this for a while with good results, although recently I've
 stumbled on WW-2170 ( https://issues.apache.org/struts/browse/WW-2170 ).
 It
 seems to occur only when using annotations though.
 
 Cheers,
 GB
 
 
 Brad A Cupit wrote:
 
 The only problem with the scope plugin is that it will use the
 session,
 which may break the whole notion of POST-redirect-GET: if the data in
 the session is removed or replaced by later requests, then pressing
 the
 back or refresh buttons on the initial page with errors will not yield
 the same response.
 
 I think it would be cool if the errors were url parameters as part of
 the redirect, but there's currently no easy way to do this. Could a
 custom interceptor realize that the result is a redirect and turn the
 validation errors into url parameters? Or would this need to be a
 custom
 result class (perhaps extending ServletRedirectResult or
 ServletActionRedirectResult)?
 
 Brad Cupit
 Louisiana State University - UIS
 
 -Original Message-
 From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 08, 2008 6:24 PM
 To: Struts Users Mailing List
 Subject: Re: interesting proxy + action chain issue
 
 Ian Meikle wrote:
 HI,

 I have been following this post with interest since I used the PRG
 pattern 
 in previous projects.
 We are using struts 2 in are current project and I like the
 errorMessages 
 behaviour that is part of the Action.

 Is it possible to persist these over the PRG cycle ?
 By default I assume they would be lost when we get to the GET stage
 since 
 they are request scope and the GET is a seperate request than the
 POST
 
 that caused  the error.

   
 
 Hi Ian,
 This is an issue that Struts2 needs to handle better.  It can be done 
 but its not as straight-forward as it could be.
 
 The scope interceptor [1] provides this feature. It allows you to 
 specify which properties should be bound to session or application
 scope
 
 and injected into the action.
 The scoped modeldriven interceptor is for modeldriven actions [2].
 Both
 
 are included in the default stack.
 
 The scope plugin allows annotations to specify which properties
 persist 
 over a cycle.  It's not bundled with struts but I have heard good 
 comments about it [4].
 
 [1] http://cwiki.apache.org/WW/scope-interceptor.html
 [2] http://cwiki.apache.org/WW/scoped-model-driven-interceptor.html
 [3] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
 [4] http://article.gmane.org/gmane.comp.jakarta.struts.devel/65052
 
 -
 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/interesting-proxy-%2B-action-chain-issue-tp1654447
 2p16612701.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]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/interesting-proxy-%2B-action-chain-issue-tp16544472p16623232.html
Sent from the Struts - User mailing list archive at Nabble.com.



how do i make the tomcat server send a 403 Forbidden response in JSP and in Struts?

2008-04-10 Thread ryan webb
I am having difficulty with authentication of user levels.
I have to kinds of users user and administrators.

What we did in mySQL db is make a user table and in it, a level column is
placed containing whether a user is administrator or not.
there's no problem with this actually (I just wrote the situation and
setup).

*Now, I want the server to send a 403 response to non-administrative
personnel accessing some secured places in our site.*

How can I do this?(Or is this possible? I have no idea actually..)

I have a userBean.java that contains all user informations from database.
I made this in my execute method in Action class. (Something Like this)

execute(response, request, form){

UserActionForm uaf = (UserActionForm) form;

UserBean userbean =  new UserBean();

 *   if (userbean.getlevel().equals(user)){
response.sendError(SC_FORBIDDEN);
}

*return mapping.findForward(Sucess);
}

this code does not compile..sendError() expects int value. I tried
sendError(403) but doesn't work.

Any Help is Gladly Appreciated! =)

God Bless!
Ryan Webb from Philippines


tc5.x caching jsp

2008-04-10 Thread Chris Pat
Hello
I have a reset() that generates a random number.  However after the first page 
view the same number persists.  How do I stop this caching by the server?  tia.


How do I make Tomcat send 403 Forbidden page to the client in jsp and in struts?

2008-04-10 Thread ryan webb
I am having difficulty with authentication of user levels.
I have to kinds of users user and administrators.

What we did in mySQL db is make a user table and in it, a level column is
placed containing whether a user is administrator or not.
there's no problem with this actually (I just wrote the situation and
setup).

*Now, I want the server to send a 403 response to non-administrative
personnel accessing some secured places in our site.*

How can I do this?(Or is this possible? I have no idea actually..)

I have a userBean.java that contains all user informations from database.
I made this in my execute method in Action class. (Something Like this)

execute(response, request, form){

UserActionForm uaf = (UserActionForm) form;

UserBean userbean =  new UserBean();

 *   if (userbean.getlevel().equals(user)){
response.sendError(SC_FORBIDDEN);
}

*return mapping.findForward(Sucess);
}

this code does not compile..sendError() expects int value. I tried
sendError(403) but doesn't work.

Any Help is Gladly Appreciated! =)

God Bless!


Validation result URL contains failed parameters

2008-04-10 Thread Guillaume Bilodeau

Hi guys,

I'm using Struts 2.0.11 for a standard web application and using annotations
all the way.  I have the following action, with some fields and getters /
setters omitted for brevity:

@ParentPackage(default)
@Results( {
@Result(name = input, type = ServletDispatcherResult.class, 
value =
/views/users/changePassword.jsp),
@Result(type = ServletActionRedirectResult.class, value = 
workbench,
params = {
namespace, /workbench, parse, true, 
actionMessageKey,
${actionMessageKey} }) })
@Validation
public class ChangePasswordAction extends ActionSupport {
@Override
@Validations(requiredStrings = {
@RequiredStringValidator(fieldName = currentPassword, 
message = , key
= users.changePassword.currentPassword.invalid),
@RequiredStringValidator(fieldName = newPassword1, 
message = , key =
users.changePassword.newPassword.invalid),
@RequiredStringValidator(fieldName = newPassword2, 
message = , key =
users.changePassword.newPassword.invalid) }, expressions = {
@ExpressionValidator(expression = newPassword1.equals(newPassword2),
message = , key = users.changePassword.mismatch) })
public String execute() {
String result = Action.INPUT;

try {
userService.changeUserPassword(getUser().getId(), 
currentPassword,
newPassword1);
result = Action.SUCCESS;
}
catch (InvalidPasswordException e) {

addActionError(getText(users.changePassword.currentPassword.invalid));
}

return result;
}
}

The accompanying JSP, changePassword.jsp, contains a simple form with 3
fields (current, new, confirm new password) and a submit button.

When leaving all form fields and submitting the form, the validation
interceptor correctly executes, correctly identifies all validation errors
and correctly executes the input result.  The rendered page correctly shows
the correct form with all expected error messages next to the corresponding
fields.  Basically, the whole request handling works as expected.  However,
the browser's address bar now shows the following:

http://localhost:8080/healthcheck/users/changePassword.go?currentPassword=newPassword1=newPassword2=general.submit=Submit

The URL contains all failed parameters with their values in clear text,
which is something I don't want.  The behavior is the same when using an
empty result type for the input result.

1. Is there a way not to see these parameters in the final URL?
2. I don't see why these parameters need to be added to the URL when they
are clearly accessible to the JSP using the value stack.  Surely there must
be a good reason to this?

Thanks all,
GB

-- 
View this message in context: 
http://www.nabble.com/Validation-result-URL-contains-failed-parameters-tp16624608p16624608.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]



Re: i18n Tags in FreeMarker Decorator for SiteMesh

2008-04-10 Thread Jeromy Evans

mraible wrote:

I tried [EMAIL PROTECTED] value=text('key')/] and that doesn't seem to work
either. I don't have a struts.xml or struts.properties in my project. I
tried putting the i18n bundle in all packages using it at the Action level
(ActionName.properties), but that didn't work either. Creating a
src/main/resources/struts.properties with the following in it is the only
thing that seems to work.

struts.custom.i18n.resources=messages

And then putting my keys in src/main/resources/messages.properties.

AFAICT, i18n bundles at the action/package level seems to be completely
broken in 2.1.1.

Matt

  


Sorry Matt, I can't replicate this issue.

I created a freemarker decorator that uses @s.text and it was able to find:
- resources in the global resource bundle (specified via 
struts.custom.i18n.resources)
- resources in the named resource bundle when contained within an 
@s.i18n tag

- resources in the actionName.properties resource bundle
- resources in the package.properties resource bundle

I used each technique one at at a time, inside and outside a decorator 
and in both FTL and JSP. My test action extended ActionSupport for the 
TextProvider. 


However, I'm am still convinced there's a problem. A possible scenario:
 - getText matches the first TextProvider found in the value stack.  
Not the first TextProvider providing the requested key.
 - some operations can push another TextProvider onto the stack (in 
front of the action).  The i18n tag does this.
 - there are cases where the alternate TextProvider is not popped off 
the stack (see https://issues.apache.org/struts/browse/WW-2539)


I've started cleaning up the implementation to isolate it.  See my post 
in struts-dev.


regards,
Jeromy Evans

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