Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 16 Apr 2008 08:22:24 -0000 Issue 7981

user-digest-help

2008-04-16


Author LoginPost Reply

user Digest 16 Apr 2008 08:22:24 -0000 Issue 7981

Topics (messages 185465 through 185475):

redirect-action and redirect
 185465 by: Niral Trivedi

Re: Struts 2 + AjaxTags + DisplayTag
 185466 by: Márcio Gurgel

Re: [S2] Spring: Interceptors, prototype or singleton?
 185467 by: Randy Burgess

Re: [OT] Scheduled DB clean up service with Spring
 185468 by: Reginald.Javier.gxs.com
 185472 by: Peter Theissen

Re: [OT] Re: How do I insert a file into mySQL?
 185469 by: ryan webb

Re: How to open a page in new window with <s:a> or <s:url> tag?
 185470 by: Mohiit

ServletRedirectActionResult - is there a way to set parameters?
 185471 by: Alex Shneyderman
 185473 by: Alex Shneyderman

Is it possible to make a pop up window using Struts?
 185474 by: ryan webb

Trouble executing scripts in returned ajax content
 185475 by: Jukka Välimaa

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_185465.ezm (zipped)
Hi All,

I am facing a strange issue. I am using Struts 2.0.11 on Websphere 6.1 with
JDK 1.5.

Thing is, I am using result type "redirect-action" and "redirect" to
redirect to a different action for certain scenarios in my action class.
This works fine from my local workstation. But when we deploy our app in the
test environment, it still works, but the url that we see after redirection
is of the app server url and not the web server url.

For example, I invoked action as
http://www.somedomain.com/appContext/some.action
at this point, some.action will be invoked and I do some processing inside
my execute method and I return result which is of type "redirect-action" and
the action name is redirectFile.action

So, after redirection, I expect to see the url as
http://www.somedomain.com/appContext/redirectFile.action but instead, I see
as http://www.appServer.com/appContext/redirectFile.action

I mean, the flow works without any issues but why does the url changing? We
do have a webserver running on app server box but this never happend with
Struts 1.x. So, what is Struts2 redirect-action result type doing special
that is causing this? And any idea how to resolve this?

Thanks in advance.

Attachment: user_185466.ezm (zipped)
Hi Randy,

I also tried to set requestURI.
I'm having lots of problems with components inside tabbedPanels...

For example:
This example works outside a tabbed panel:

2. Attach to "onmouseover", and "onclick" event on Area below and update
content of Div1, highlight targets with green color
  <sx:bind id="ex2" href="%{#urlAbrirDadosGerais}" sources="div2"
targets="div1" events="onmouseover,onclick" highlightColor="green"/>
  <div id="div2" style="width: 300px; height: 50px; border: 1px solid
black">
    Mouse Over or Click Here!
  </div>

When its inside a div from tabbedpanel just doesn't work.

Does anyone can help me?


2008/4/15, Randy Burgess <RBurgess@(protected)>:
>
> Well your requestURI is not set so the URL is set to the current JSP and
> not
> the action. I have never had any success leaving requestURI blank with
> DisplayTag on S1 or S2. I always set it to the name of an action.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: Márcio Gurgel <marcio.rga@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Tue, 15 Apr 2008 01:18:34 -0300
> > To: Struts Users Mailing List <user@(protected)>
> > Subject: Re: Struts 2 + AjaxTags + DisplayTag
>
> >
> > Matt, tanks for your help. But I need to persist with displayTags /:
> >
> > I guess that there's some kind of validation inside struts 2 that doesnt
> > allow the correct work of ajaxtags..
> > Just take a look at my generated url from displaytag pagination.
> >
> > http://localhost:8080/SGVDBA/view/usuario/UsuPesquisaResultados.jsp?
> >
> currentUsu.eMail=&currentUsu.chv=&currentUsu.dtGvr=&struts.enableJSONValidatio
> > n=true
> > &buttonPesquisar=Pesquisar&dojo.currentUsu.dtGvr=&d-49489-p=2
> >
> >
> > Tanks all!
> >
> > 2008/4/14, matt.payne <matthew.b.payne@(protected)>:
> >>
> >>
> >> You could try struts2 + jquery + jgrid
> >> (http://trirand.com/jqgrid/jqgrid.html)
> >> If you need ajax, you need something that returns an json or xml
> response
> >> (insert you velocity, freemarker, json result, jsp result here).
> >>
> >> Matt
> >>
> >>
> >>
> >> Márcio Gurgel wrote:
> >>>
> >>> Hi all!
> >>>
> >>> Since this morning I'm having troubles to configure ajaxTags in my
> >>> project.
> >>> I followed the steps from ajaxTags web site, I also saw the ajaxTags
> >> show
> >>> case wich contains a example of display:table.
> >>> But doen't work...
> >>>
> >>> Is there some kind os special configuration for struts 2?
> >>> My displayTable is inside a <sx:tabbedPanel><sx:div>
> >>>
> >>> I also tried to use: useSelectedTabCookie="useSelectedTabCookie" to
> >> select
> >>> the correct tab when my displayTable pagination submits the page.
> >>> In this case, the content of the first tab doesn't appear.
> >>>
> >>> Regards.
> >>>
> >>> Márcio Gurgel
> >>>
> >>>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Struts-2-%2B-AjaxTags-%2B-DisplayTag-tp16670438p1668945
> >> 8.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(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.
>
>
> 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.
>

Attachment: user_185467.ezm (zipped)
I've never used that method of injection so I wouldn't comment on it one way
or another, I just found it in the Spring documentation.

If you don't declare the scope for a Spring bean it defaults to singleton.
It will never be a prototype unless you explicitly declare it as such using
either annotations or XML.

Randy


> From: Martin Gainty <mgainty@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 15 Apr 2008 17:16:03 -0400
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>
> Yes very clear thank you
>
> so the default assignment of scope=singleton happens under these scenarios:
> 1)bean creation defaulting to singleton as in ApplicationContext
> 2)beanFactory supports registerSingleton
>  then a singleton bean can be set to lazy-initialize (that is not be
> pre-instantiated).
>
> For all other situations the default of prototype is implied
>
> This statement about Method Injection is extremely problematic woth regards
> to singletons
>
> For most application scenarios, the majority of the beans in the container
> will be singletons. When a singleton bean needs to collaborate with another
> singleton bean, or a non-singleton bean needs to collaborate with another
> non-singleton bean, the typical and common approach of handling this
> dependency by defining one bean to be a property of the other is quite
> adequate. There is a problem when the bean lifecycles are different.
> Consider a singleton bean A which needs to use a non-singleton (prototype)
> bean B, perhaps on each method invocation on A. The container will only
> create the singleton bean A once, and thus only get the opportunity to set
> the properties once. There is no opportunity for the container to provide
> bean A with a new instance of bean B every time one is needed.
>
> So if prototype bean B changes A has no clue..
>
> I think I'll stay with the scope="prototype/singleton" in the declarator..
>
> Thanks,
> Martin
> ----- Original Message -----
> From: "Randy Burgess" <RBurgess@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Tuesday, April 15, 2008 9:51 AM
> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>
>
>> Just about every single S2 action I have ever created uses Spring to
> inject
>> a service object of some sort into the action. I use Spring for
>> transactions, SLSB's, MDB's, JDBC, Hibernate, you name it.
>>
>> Ganfab asked about injecting a new instance of an object into a custom
>> interceptor on every action call and my thinking was that Spring had only
>> constructor or setter injection and that interceptors were always
>> singletons, so the injected bean would always be a singleton. Well I just
>> found in Spring 2.5 they have lookup method injection which can be used to
>> create a new instance of an object from the Spring bean factory and inject
>> them into a Singleton. Using this you could inject new instances and
> declare
>> your interceptor in a package and not have to declare it for every action
>> needing this type of interceptor. See 3.3.7.1.
>>
>>
> http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#bea
>> ns-factory-method-injection
>>
>> I hope I'm being clear about what I mean. :)
>>
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>>
>>
>>
>>> From: Martin Gainty <mgainty@(protected)>
>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>> Date: Mon, 14 Apr 2008 21:50:15 -0400
>>> To: Struts Users Mailing List <user@(protected)>
>>> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>>>
>>> Could you provide a scenario where one bean is injected into another?
>>>
>>> Thanks
>>> M-
>>> ----- Original Message -----
>>> From: "Randy Burgess" <RBurgess@(protected)>
>>> To: "Struts Users Mailing List" <user@(protected)>
>>> Sent: Monday, April 14, 2008 3:55 PM
>>> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>>>
>>>
>>>> So the interceptor would have to be declared at the action level in
> this
>>>> case then? If I have a spring bean named myBean that is default scope
> and
>>> I
>>>> inject another bean declared as a prototype into it, the injected bean
>>> will
>>>> still be a singleton since there will be only one instance of myBean.
>>>>
>>>> Regards,
>>>> Randy Burgess
>>>> Sr. Web Applications Developer
>>>> Nuvox Communications
>>>>
>>>>
>>>>
>>>>> From: Don Brown <donald.brown@(protected)>
>>>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>>>> Date: Tue, 15 Apr 2008 01:12:49 +1000
>>>>> To: Struts Users Mailing List <user@(protected)>
>>>>> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>>>>>
>>>>> To clarify, interceptors aren't technically singletons as each
>>>>> instance in an interceptor stack gets its own interceptor instance.
>>>>> However, for all requests using that stack, the same interceptor will
>>>>> be used. Therefore, you do need to be careful. For example, most
>>>>> interceptors take parameters that configure their use within the
>>>>> stack, like the "validation" interceptor that takes a list of excluded
>>>>> methods from validation. Interceptors can be configured at the stack
>>>>> level or at the action level. If at the action level, you will get a
>>>>> unique interceptor instance for that action.
>>>>>
>>>>> If you want Spring to construct your interceptor, I recommend the
>>>>> prototype scope, so that Struts gets a new instance of the interceptor
>>>>> as expected.
>>>>>
>>>>> Don
>>>>>
>>>>> On Tue, Apr 15, 2008 at 12:48 AM, Randy Burgess <RBurgess@(protected)>
>>> wrote:
>>>>>> Interceptors are Singletons according to the documentation. If it
> were
>>> me I
>>>>>> would come up with another method besides Spring for changing object
>>>>>> properties.
>>>>>>
>>>>>> Regards,
>>>>>> Randy Burgess
>>>>>> Sr. Web Applications Developer
>>>>>> Nuvox Communications
>>>>>>
>>>>>>
>>>>>>
>>>>>>> From: GF <ganfab@(protected)>
>>>>>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>>>>>> Date: Mon, 14 Apr 2008 14:51:25 +0200
>>>>>>> To: Struts Users ML <user@(protected)>
>>>>>>> Subject: [S2] Spring: Interceptors, prototype or singleton?
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> In a guide I found on the web, the interceptor was defined as
>>> singleton in
>>>>>>> the Spring's ApplicationContext.
>>>>>>>
>>>>>>> If I need to use "changeable" object properties, I need to have it
> as
>>>>>>> Prototype, otherwise different requests will result in a object
>>> property
>>>>>>> overwriting.
>>>>>>> Is there any issues about defining an interceptor as Prototype, or
> is
>>> it ok?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> GF
>>>>>>
>>>>>>
>>>>>>
>>>>>> 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.
>>>>>>
>>>>>>
>>>>>> 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: user-unsubscribe@(protected)
>>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(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.
>>>>
>>>>
>>>> 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: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(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.
>>
>>
>> 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: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(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.


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.

Attachment: user_185468.ezm (zipped)
Hi Peter,

Please try adding the quartz.jar or spring-quartz.jar to your classpath. You can check out http://www.springframework.org for the dependencies of the spring version you're using.

Pls don't add anymore jars at the moment. Also, I would suggest reverting your original classpath settings prior to testing the above, to isolate issues.

Reginald Javier

-----Original Message-----
From: peter.theissen@(protected)]
Sent: Wednesday, April 16, 2008 4:10 AM
To: Struts Users Mailing List
Subject: Re: [OT] Scheduled DB clean up service with Spring

Hi all,

sorry to continue with that OT thread, but its starting to get
really mad out here. But first of all, thanks for the hint that
the runtime classpath (rcp) has to be configured independently.
Well, I tried that but it ended up in a mess!

Of course, first thing I did was adding spring.jar to rcp of the
Apache... and I was awating the startup of my Webapp
joyfully. The joy ended quite soon with the following message
below (***)

Then I added servlet-api.jar to the rcp and another exception.
For every exception I got, I added a new (corresponding) jar
file. This ended up in a NullPointerEx. I guess thats because
the order of the jar files is also important.
However, to add those jars to the rcp, I added them in the
Run Dialog under Classpath, first I tried that under "User
Entries" and then under "Bootstrap Entries" in different permutations
and so on and so on. Happy trial and error.
But after some hours I have to admint: that doesnt make sense
any longer.

Can it be so difficult to use load class of the Spring Lib at runttime
and create it as a bean?
>>>
<bean id="simpleTrigger"
class="org.springframework.scheduling.quartz.SimpleTriggerBean" />
<<<
If I omit this line, I have no problem to start the app at all!
In that case, my webApp works perfectly with default config:
Bootstrap Entries: JRE System Lib jre_1.6.0_5
User Entries: bootstrap.jar

How can I find out what the required jar files are to add to the rcp
except Spring.jar and in which order do I have to provide them.
Which of them have to be in "Bootstrap Entries" and which one in
"User Entries"?

Could anybody point me to the rigth direction, please?
I have lost the rigth path ;-)

Thanks and best regards
Peter

PS: sorry if my question is not formulated professional,
Im quite new to all that JavaWebFramework stuff.

>>> (***)
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(Unknown Source)
  at java.security.SecureClassLoader.defineClass(Unknown Source)
  at java.net.URLClassLoader.defineClass(Unknown Source)
  at java.net.URLClassLoader.access$000(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1275)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1206)
  at
org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:3786)
  at
org.apache.catalina.core.StandardContext.start (StandardContext.java:4350)
  at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045)
  at org.apache.catalina.core.StandardHost.start (StandardHost.java:719)
  at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045)
  at
org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443)
  at
org.apache.catalina.core.StandardService.start (StandardService.java:516)
  at
org.apache.catalina.core.StandardServer.start (StandardServer.java:710)
  at org.apache.catalina.startup.Catalina.start (Catalina.java:578)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:288)
  at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException:
javax.servlet.ServletContextListener
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClassInternal(Unknown Source)
  ... 28 more
<<<


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


Attachment: user_185472.ezm (zipped)
Hi,

many thanks to you! I was really making things more complicated
then it was neccessary: Adding the quartz.jar to the runtime classpath
was enough to fix the problem.

Have a nice day
Peter


> Hi Peter,
>
> Please try adding the quartz.jar or spring-quartz.jar to your classpath. You can check out http://www.springframework.org for the dependencies of the spring version you're using.
>
> Pls don't add anymore jars at the moment. Also, I would suggest reverting your original classpath settings prior to testing the above, to isolate issues.
>
> Reginald Javier
>
> -----Original Message-----
> From: peter.theissen@(protected)]
> Sent: Wednesday, April 16, 2008 4:10 AM
> To: Struts Users Mailing List
> Subject: Re: [OT] Scheduled DB clean up service with Spring
>
> Hi all,
>
> sorry to continue with that OT thread, but its starting to get
> really mad out here. But first of all, thanks for the hint that
> the runtime classpath (rcp) has to be configured independently.
> Well, I tried that but it ended up in a mess!
>
> Of course, first thing I did was adding spring.jar to rcp of the
> Apache... and I was awating the startup of my Webapp
> joyfully. The joy ended quite soon with the following message
> below (***)
>
> Then I added servlet-api.jar to the rcp and another exception.
> For every exception I got, I added a new (corresponding) jar
> file. This ended up in a NullPointerEx. I guess thats because
> the order of the jar files is also important.
> However, to add those jars to the rcp, I added them in the
> Run Dialog under Classpath, first I tried that under "User
> Entries" and then under "Bootstrap Entries" in different permutations
> and so on and so on. Happy trial and error.
> But after some hours I have to admint: that doesnt make sense
> any longer.
>
> Can it be so difficult to use load class of the Spring Lib at runttime
> and create it as a bean?
> >>>
> <bean id="simpleTrigger"
> class="org.springframework.scheduling.quartz.SimpleTriggerBean" />
> <<<
> If I omit this line, I have no problem to start the app at all!
> In that case, my webApp works perfectly with default config:
> Bootstrap Entries: JRE System Lib jre_1.6.0_5
> User Entries: bootstrap.jar
>
> How can I find out what the required jar files are to add to the rcp
> except Spring.jar and in which order do I have to provide them.
> Which of them have to be in "Bootstrap Entries" and which one in
> "User Entries"?
>
> Could anybody point me to the rigth direction, please?
> I have lost the rigth path ;-)
>
> Thanks and best regards
> Peter
>
> PS: sorry if my question is not formulated professional,
> Im quite new to all that JavaWebFramework stuff.
>
> >>> (***)
> java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
>   at java.lang.ClassLoader.defineClass1(Native Method)
>   at java.lang.ClassLoader.defineClass(Unknown Source)
>   at java.security.SecureClassLoader.defineClass(Unknown Source)
>   at java.net.URLClassLoader.defineClass(Unknown Source)
>   at java.net.URLClassLoader.access$000(Unknown Source)
>   at java.net.URLClassLoader$1.run(Unknown Source)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at java.net.URLClassLoader.findClass(Unknown Source)
>   at java.lang.ClassLoader.loadClass(Unknown Source)
>   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>   at java.lang.ClassLoader.loadClass(Unknown Source)
>   at
> org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1275)
>   at
> org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1206)
>   at
> org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:3786)
>   at
> org.apache.catalina.core.StandardContext.start (StandardContext.java:4350)
>   at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045)
>   at org.apache.catalina.core.StandardHost.start (StandardHost.java:719)
>   at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045)
>   at
> org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443)
>   at
> org.apache.catalina.core.StandardService.start (StandardService.java:516)
>   at
> org.apache.catalina.core.StandardServer.start (StandardServer.java:710)
>   at org.apache.catalina.startup.Catalina.start (Catalina.java:578)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   at java.lang.reflect.Method.invoke(Unknown Source)
>   at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:288)
>   at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:413)
> Caused by: java.lang.ClassNotFoundException:
> javax.servlet.ServletContextListener
>   at java.net.URLClassLoader$1.run(Unknown Source)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at java.net.URLClassLoader.findClass(Unknown Source)
>   at java.lang.ClassLoader.loadClass(Unknown Source)
>   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>   at java.lang.ClassLoader.loadClass(Unknown Source)
>   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>   ... 28 more
> <<<
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>  


Attachment: user_185469.ezm (zipped)
Dear Dave,

Thank you for your time in replying to my mail.
Yes you are correct my english is quite confusing.
I will follow your advise and ask to database mailing-list.

regards,
Ryan Webb

On 4/15/08, Dave Newton <newton.dave@(protected):
> Perhaps this would be better asked on a mailing list relating to databases.
>
> --- ryan webb <webb.ryan1@(protected):
> > I want to store a file (any file mp3, avi, etc) on the database without
> > using blob datatype.
>
> No, you want to store the path of a file in the database.
>
> > I just want to put the address of the file (in my Hard Disck) [...]
>
> See?
>
> > in mySQL and load the address of the file to be played on web page.
> > but I have no idea how this can be done.
>
> That confuses me. Why wouldn't you just store the path of the file in the
> database like you're saying you want to? You provided an example of it.
>
> What are you really asking, and how is it related to Struts?
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_185470.ezm (zipped)

I myself found the solution.
To open link in the new window, do as it is mentioned below.

<s:url id='abc' action='xyz'></s:url>
<s:a href='#' onclick="javascript:window,open('%{abc}');">test</s:a>

this is working for me. I hope this solution can help you guys also. =)


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' ...
  ${abc}

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


Attachment: user_185471.ezm (zipped)
I am using 2.0.11 it seems that I can not use action-redirect result
type. I need to tag along a request paramter. So my annotation looks
like this:

@Result (name="enterNewContactInfo",value="enterNewContactInfo",type=ServletActionRedirectResult.class,params={"country","AUT"})

I get a nasty NPE if I add the params. If I remove it everything works fine.

Another question is how do I set the parameter dynamically ? If I
recall correctly WW had a special syntax for it. Something like
params={"country","%{country}"}, but with no annotations for
course.Any way to do this in S2?

Here is the stack trace:

HTTP ERROR: 500

INTERNAL_SERVER_ERROR

RequestURI=/******/displayContactInfo.do
Caused by:

java.lang.NullPointerException
 at org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getUriFromActionMapping (DefaultActionMapper.java:466)
 at org.apache.struts2.dispatcher.ServletActionRedirectResult.execute (ServletActionRedirectResult.java:184)
 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java:348)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:253)
 at ******
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at ******
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (DefaultWorkflowInterceptor.java:221)
 at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:86)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (ConversionErrorInterceptor.java:123)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java:167)
 at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:86)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (StaticParametersInterceptor.java:105)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at org.apache.struts2.interceptor.CheckboxInterceptor.intercept (CheckboxInterceptor.java:83)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (ModelDrivenInterceptor.java:74)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (ChainingInterceptor.java:115)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (I18nInterceptor.java:143)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (PrepareInterceptor.java:121)
 at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:86)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (ServletConfigInterceptor.java:170)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java:167)
 at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:86)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (AliasInterceptor.java:123)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (ExceptionMappingInterceptor.java:176)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
 at org.apache.struts2.impl.StrutsActionProxy.execute (StrutsActionProxy.java:50)
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:504)
 at org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:419)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage (PageFilter.java:119)
 at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter (PageFilter.java:55)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter (ActionContextCleanUp.java:99)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360)
 at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
 at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
 at org.mortbay.jetty.Server.handle (Server.java:324)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
 at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
 at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
 at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Any ideas?

Thanks,
Alex.

Attachment: user_185473.ezm (zipped)
Hmm, it appears that disabling zero config and codebehind and
supplying the struts.xml of the equvalent config works just fine.
I am having way too many problems with this zero config/codebehind.
Nice idea crappy implementation :-(

Alex.

On Wed, Apr 16, 2008 at 8:33 AM, Alex Shneyderman
<a.shneyderman@(protected):
> I am using 2.0.11 it seems that I can not use action-redirect result
> type. I need to tag along a request paramter. So my annotation looks
> like this:
>
> @Result (name="enterNewContactInfo",value="enterNewContactInfo",type=ServletActionRedirectResult.class,params={"country","AUT"})
>
> I get a nasty NPE if I add the params. If I remove it everything works fine.
>
> Another question is how do I set the parameter dynamically ? If I
> recall correctly WW had a special syntax for it. Something like
> params={"country","%{country}"}, but with no annotations for
> course.Any way to do this in S2?
>
> Here is the stack trace:
>
> HTTP ERROR: 500
>
> INTERNAL_SERVER_ERROR
>
> RequestURI=/******/displayContactInfo.do
> Caused by:
>
> java.lang.NullPointerException
>      at org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getUriFromActionMapping (DefaultActionMapper.java:466)
>      at org.apache.struts2.dispatcher.ServletActionRedirectResult.execute (ServletActionRedirectResult.java:184)
>      at com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java:348)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:253)
>      at ******
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at ******
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (DefaultWorkflowInterceptor.java:221)
>      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:86)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (ConversionErrorInterceptor.java:123)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java:167)
>      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:86)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (StaticParametersInterceptor.java:105)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at org.apache.struts2.interceptor.CheckboxInterceptor.intercept (CheckboxInterceptor.java:83)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (ModelDrivenInterceptor.java:74)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (ChainingInterceptor.java:115)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (I18nInterceptor.java:143)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (PrepareInterceptor.java:121)
>      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:86)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (ServletConfigInterceptor.java:170)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java:167)
>      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:86)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (AliasInterceptor.java:123)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (ExceptionMappingInterceptor.java:176)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>      at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>      at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java:455)
>      at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:221)
>      at org.apache.struts2.impl.StrutsActionProxy.execute (StrutsActionProxy.java:50)
>      at org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:504)
>      at org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:419)
>      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage (PageFilter.java:119)
>      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter (PageFilter.java:55)
>      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>      at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter (ActionContextCleanUp.java:99)
>      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>      at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360)
>      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>      at org.mortbay.jetty.Server.handle (Server.java:324)
>      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
>      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>
> Any ideas?
>
> Thanks,
> Alex.
>

Attachment: user_185474.ezm (zipped)
Hi,

Is it possible to make a window pop up using struts?
usually this can be done in Javascript..

God bless,
Ryan Webb

Attachment: user_185475.ezm (zipped)
Hi everyone,

I'm using Struts 2.1's ajax tags to replace content in a section of my page.
I have this section enclosed in sx:div tags, like so:

<sx:div id="pageContentSection" preload="false" href="%{myUrl}"
  listenTopics="/reloadContentSection"
  afterNotifyTopics="/contentSectionLoaded" executeScripts="true"
  showLoadingText="true" separateScripts="true" indicator="barIndicator">

..

</sx:div>

I change the div content by editing its href with javascript and then
publishing the topic it's listening to:

function reloadContentSection(url){
  if(!isAnUrl(url)) return false;

  var contentSection = dojo.widget.byId("pageContentSection");
  if(contentSection == null) return false;

  var origHref = contentSection.href;

  contentSection.href = url;

  dojo.event.topic.publish('/reloadContentSection', '','');

  contentSection.href =origHref;
}

It's working fine otherwise, but I have trouble executing scripts in
returned content. I've experimented with different values of executeScripts
and separateScripts to no effect. I've even tried to include scripts as a
reference to separate javascript library--no better luck there. Even though
scripts I write don't work, a datetimepicker in the same returned content,
done using ajax tags and of course relying on scripts, works perfectly.

When I set separateScripts as false, my scripts are included in generated
DOM source, after some scripts by Matt Cruse, which I assume are directly
related to struts ajax functionality. Of course, being included doesn't mean
that they work.

Right now, I've worked around this problem by including the scripts I need
in the page I'm calling ajax from, and not in returned content. I don't
think this is good design, and won't work if I need to generate scripts
dynamically.

Can any of you tell me what's wrong, or how to fix it?

Jukka
©2008 gg3721.com - Jax Systems, LLC, U.S.A.