Author Login
Post Reply
user Digest 31 Dec 2009 16:10:30 -0000 Issue 8971
Topics (messages 204450 through 204473):
[Struts 2.1.8] Timer with Dojo tag <sx:div>
204450 by: Celinio Fernandes
Re: focusElement in s:form
204451 by: Dale Newfield
Custom interceptor stack not working
204452 by: Sanjay Patel
204464 by: Pawe³ Wielgus
204466 by: Sanjay Patel
Struts 2 redirect problem
204453 by: Rakesh K nair
204454 by: Burton Rhodes
204457 by: Rakesh K nair
Is there any way in Struts2 to handle session sharing accross browsers
204455 by: Struts-User
204456 by: Paul Benedict
204459 by: Paul Benedict
204460 by: Struts-User
204461 by: Paul Benedict
204462 by: Struts-User
204463 by: Sandeep G. Shenvi
204465 by: Pawe³ Wielgus
204467 by: Gabriel Belingueres
Re: Forwarding to a Java Application
204458 by: musomesa.aol.com
Struts 2.0 to 2.1 Migration problem
204468 by: bberken
204471 by: Wes Wannemacher
204472 by: bberken
204473 by: Wes Wannemacher
paramsPrepareParamsStack not having scopedModelDriven interceptor?
204469 by: Sanjay Patel
how to validate Dojo datetimepicker in struts2
204470 by: Rakesh K nair
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_204450.ezm (zipped)Hi,
I am using a timer with the Dojo tag <sx:div>. It works well. The only "problem" is that when i use a timer then the content does not load immediately the first time i load the page. It loads after 5 seconds only, which is the frequence of reloading.
How do i load the content of the <div> tag immediately (when the page loads for the first time) ?
<sx:div id="articles" href="%{descrsUrl}" loadingText="Loading ..." listenTopics="/refresh"
showLoadingText="true"
updateFreq="5000" highlightColor="red" startTimerListenTopics="/startTimer" stopTimerListenTopics="/stopTimer"
/>

Attachment:
user_204451.ezm (zipped)The only two places I found focus() called in the templates are in
css_xhtml/form-close.ftl and xhtml/form-close.ftl. You can look there
to see the "magic" behind the scenes.
Also note, while you're setting the theme globally, it can also be
changed on a tag-by-tag basis with the theme attribute.
-Dale

Attachment:
user_204452.ezm (zipped)Hi,
I am using this simple interceptor configuration, just following
http://struts.apache.org/2.1.8/docs/interceptor-configuration.html :
<struts>
<package name="default" namespace="/" extends="struts-default">
<interceptors>
<interceptor name="security" class="root.SecurityInterceptor"/>
<interceptor-stack name="secureStack">
<interceptor-ref name="security"/>
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="secureStack"/>
<global-results>
<result name="login">/WEB-INF/content/index.jsp</result>
</global-results>
</package>
<constant name="struts.devMode" value="true" />
</struts>
My class definition goes like this:
public class SecurityInterceptor extends AbstractInterceptor {
public String intercept( ActionInvocation actionInvocation ) throws
Exception {
throw new Exception();
}
}
I am scratching my head long since but it simply is not working. Any clues
would help a lot.
--
Thanks,
Sanjay
www.sanjaypatel.name

Attachment:
user_204464.ezm (zipped)Hi Sanjay,
it looks ok to me, You can compare your solution to mine described here:
http://poulwiel.blogspot.com/2009/01/intercepting-all-actions-inside-my-app.html
Best greetings,
Paweł Wielgus.
2009/12/30 Sanjay Patel <skpatel20@(protected)>:
> Hi,
>
> I am using this simple interceptor configuration, just following
> http://struts.apache.org/2.1.8/docs/interceptor-configuration.html :
>
> <struts>
> <package name="default" namespace="/" extends="struts-default">
>
> <interceptors>
> <interceptor name="security" class="root.SecurityInterceptor"/>
> <interceptor-stack name="secureStack">
> <interceptor-ref name="security"/>
> <interceptor-ref name="defaultStack"/>
> </interceptor-stack>
> </interceptors>
>
> <default-interceptor-ref name="secureStack"/>
>
> <global-results>
> <result name="login">/WEB-INF/content/index.jsp</result>
> </global-results>
> </package>
> <constant name="struts.devMode" value="true" />
> </struts>
>
> My class definition goes like this:
>
> public class SecurityInterceptor extends AbstractInterceptor {
>
> public String intercept( ActionInvocation actionInvocation ) throws
> Exception {
> throw new Exception();
> }
> }
>
> I am scratching my head long since but it simply is not working. Any clues
> would help a lot.
>
> --
> Thanks,
> Sanjay
> www.sanjaypatel.name
>

Attachment:
user_204466.ezm (zipped)it looks ok to me, You can compare your solution to mine described here:
>
> http://poulwiel.blogspot.com/2009/01/intercepting-all-actions-inside-my-app.html
>
>
Pawel, great! I got it. I was missing this:
and also this line in struts.properties:
struts.convention.default.parent.package=default
Thanks for your instant support and informative blog post.
Sanjay
www.sanjaypatel.name

Attachment:
user_204453.ezm (zipped)
Hi
I am Rakesh
In my current project i need to display a different web application in a div
which is a part of my main web page.I am able to get only the html output
which acts as if it is in same context.For eg: for image,java script path it
looks in the local context.My need is that div should completely occupy
third party application from where i can operate the same.
I am using struts 2.1.6
I managed do that using below code(only the necessary part)
jsp page
<%@(protected)"%>
<%@(protected)"%>
<s:url id="ajaxTest" action="showMapView"/>
<sx:a id="link1" href="%{ajaxTest}" targets="mapview">
Show Map
</sx:a>
<div id="mapview">Map</div>
struts.xml
<action name="showMapView" class = "org.trinity.actions.MultipleTripMapView"
>
<result type="redirect">${url}</result>
</action>
in MultipleTripMapView i am setting value of url like
'http://www.google.co.in/' and also included getter for url
Going through different discussion forums i found it can be done using
ServletRedirectResult, but i am not able find enough support for that.
Expecting your kind interaction
Thanks in advance
Rakesh
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_204454.ezm (zipped)This probably isn't the answer you want, but an <iframe> tag would
probably do the trick.
On 12/29/09, Rakesh K nair <rakeshknair84@(protected):
>
> Hi
>
> I am Rakesh
>
> In my current project i need to display a different web application in a div
> which is a part of my main web page.I am able to get only the html output
> which acts as if it is in same context.For eg: for image,java script path it
> looks in the local context.My need is that div should completely occupy
> third party application from where i can operate the same.
>
> I am using struts 2.1.6
>
> I managed do that using below code(only the necessary part)
>
> jsp page
> <%@(protected)"%>
> <%@(protected)"%>
>
> <s:url id="ajaxTest" action="showMapView"/>
> <sx:a id="link1" href="%{ajaxTest}" targets="mapview">
> Show Map
> </sx:a>
> <div id="mapview">Map</div>
>
> struts.xml
>
> <action name="showMapView" class = "org.trinity.actions.MultipleTripMapView"
>>
> <result type="redirect">${url}</result>
> </action>
>
> in MultipleTripMapView i am setting value of url like
> 'http://www.google.co.in/' and also included getter for url
>
> Going through different discussion forums i found it can be done using
> ServletRedirectResult, but i am not able find enough support for that.
>
> Expecting your kind interaction
>
> Thanks in advance
>
> Rakesh
> --
> View this message in context:
> http://old.nabble.com/Struts-2-redirect--problem-tp26963912p26963912.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)
>
>

Attachment:
user_204457.ezm (zipped)
Thanks for your comment.It is working but i would like to know whether there
is any another method
Thankfully
Rakesh
Burton Rhodes wrote:
>
> This probably isn't the answer you want, but an <iframe> tag would
> probably do the trick.
>
> On 12/29/09, Rakesh K nair <rakeshknair84@(protected):
>>
>> Hi
>>
>> I am Rakesh
>>
>> In my current project i need to display a different web application in a
>> div
>> which is a part of my main web page.I am able to get only the html output
>> which acts as if it is in same context.For eg: for image,java script path
>> it
>> looks in the local context.My need is that div should completely occupy
>> third party application from where i can operate the same.
>>
>> I am using struts 2.1.6
>>
>> I managed do that using below code(only the necessary part)
>>
>> jsp page
>> <%@(protected)"%>
>> <%@(protected)"%>
>>
>> <s:url id="ajaxTest" action="showMapView"/>
>> <sx:a id="link1" href="%{ajaxTest}" targets="mapview">
>> Show Map
>> </sx:a>
>> <div id="mapview">Map</div>
>>
>> struts.xml
>>
>> <action name="showMapView" class =
>> "org.trinity.actions.MultipleTripMapView"
>>>
>> <result type="redirect">${url}</result>
>> </action>
>>
>> in MultipleTripMapView i am setting value of url like
>> 'http://www.google.co.in/' and also included getter for url
>>
>> Going through different discussion forums i found it can be done using
>> ServletRedirectResult, but i am not able find enough support for that.
>>
>> Expecting your kind interaction
>>
>> Thanks in advance
>>
>> Rakesh
>> --
>> View this message in context:
>> http://old.nabble.com/Struts-2-redirect--problem-tp26963912p26963912.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)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_204455.ezm (zipped)
Hi All - Is there any way in Struts2 to handle session sharing across
browsers.
My problem:
User logs in -> session created, user does CTRL+N and opens child window
now he logs in as admin-> session created (it does not create new session)
and now parent window has the admin session, and session data is of admin.
This problem is seen only when browser windows are opened by CTRL+N.
Please suggest....
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_204456.ezm (zipped)What does "handle" mean to you here?
On Wed, Dec 30, 2009 at 12:05 AM, Struts-User
<bharatesh.huchchannavar@(protected):
>
> Hi All - Is there any way in Struts2 to handle session sharing across
> browsers.
> My problem:
> User logs in -> session created, user does CTRL+N and opens child window
> now he logs in as admin-> session created (it does not create new session)
> and now parent window has the admin session, and session data is of admin.
> This problem is seen only when browser windows are opened by CTRL+N.
>
> Please suggest....
> --
> View this message in context: http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964416.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>

Attachment:
user_204459.ezm (zipped)Some extreme financial sites only allow one session per user. They
track in their database when a user logs in, and the user must remain
on that session ID for X minutes or log out.
Consequences:
1. If the user shuts his browser by accident, ooops! X minutes must
pass until the original session times out. See step 2.
2. Any other login attempt is denied until original session times out.
Of interest to you?
Paul
On Wed, Dec 30, 2009 at 12:28 AM, <bharatesh.huchchannavar@(protected):
> Handle means
> 1. Detect when session is being copied from browser to browser
> 2. Direct user to login page if session is copied in 'CTRL+N'ed page
>
> Paul Benedict-2 wrote:
>>
>> What does "handle" mean to you here?
>>
>> On Wed, Dec 30, 2009 at 12:05 AM, Struts-User
>> <bharatesh.huchchannavar@(protected):
>>>
>>> Hi All - Is there any way in Struts2 to handle session sharing across
>>> browsers.
>>> My problem:
>>> User logs in -> session created, user does CTRL+N and opens child window
>>> now he logs in as admin-> session created (it does not create new
>>> session)
>>> and now parent window has the admin session, and session data is of
>>> admin.
>>> This problem is seen only when browser windows are opened by CTRL+N.
>>>
>>> Please suggest....
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964416.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)
>>
>>
>>
> Quoted from:
> http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964469.html
>
>

Attachment:
user_204460.ezm (zipped)
Thanks Paul, What I mean is not exaclty one session per user rather
preventing or detecting the session which is getting copied when any one
does CTRL+N or in IE7 opens application new TAB.
In above said cases session remains to be same however session data is
replaced with the recentely logged in user's data.
This creates problem when employee logs in one window and same employee
tries to log as admin in CTRL+Ned window as admin which will result in
employee session data being replaced by admin data....
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_204461.ezm (zipped)When the user presses CTRL+N in IE, a new browser instance is started.
That's not another view of the current browser session, but a whole
new session. There's nothing that can be done about this in Struts or
anything else.
On Wed, Dec 30, 2009 at 1:12 AM, Struts-User
<bharatesh.huchchannavar@(protected):
>
> Thanks Paul, What I mean is not exaclty one session per user rather
> preventing or detecting the session which is getting copied when any one
> does CTRL+N or in IE7 opens application new TAB.
> In above said cases session remains to be same however session data is
> replaced with the recentely logged in user's data.
> This creates problem when employee logs in one window and same employee
> tries to log as admin in CTRL+Ned window as admin which will result in
> employee session data being replaced by admin data....
>
>
>
> --
> View this message in context: http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964689.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)
>
>

Attachment:
user_204462.ezm (zipped)
That is not a new new session its parent browser session copied, you can give
try.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_204463.ezm (zipped)Hi,
Even I am facing similar problem... However, this problem occurs only if I access the url in a new tab within the same browser instance (IE7) and not if I open a new browser instance altogether.
-----Original Message-----
From: Bharat_2.0 [mailto:bharatesh.huchchannavar@(protected)]
Sent: Wednesday, December 30, 2009 1:47 PM
To: user@(protected)
Subject: Re: Is there any way in Struts2 to handle session sharing accross browsers
That is not a new new session its parent browser session copied, you can give
try.
--
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 may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________

Attachment:
user_204465.ezm (zipped)Hi all,
i'm a big fan of this subject, it goes up here and there every some time,
maybe we could add some info on struts2 pages/wiki about what http session is
and how it is created and handled by S2 app (or any ohter http app).
What impact has scheme changing on session (http -> https and https -> http).
Also an info about how current browsers handle the session cookie
(tabs vs. new windows).
How to check if session has changed, how to invalidate session and
what it means.
Maybe if we would have such a page,
discussions like this one would not be necessary at all.
If You guys think it would be worth it, i'm willing to do it.
Best greetings,
Paweł Wielgus.
2009/12/30 Sandeep G. Shenvi <Sandeep.Shenvi@(protected)>:
> Hi,
>
> Even I am facing similar problem... However, this problem occurs only if I access the url in a new tab within the same browser instance (IE7) and not if I open a new browser instance altogether.
>
>
> -----Original Message-----
> From: Bharat_2.0 [mailto:bharatesh.huchchannavar@(protected)]
> Sent: Wednesday, December 30, 2009 1:47 PM
> To: user@(protected)
> Subject: Re: Is there any way in Struts2 to handle session sharing accross browsers
>
>
> That is not a new new session its parent browser session copied, you can give
> try.
>
>
> --
> View this message in context: http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26965019.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 may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
>
> ______________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_204467.ezm (zipped)Session data handling is the same for all frameworks based on the
Servlet and JSP specification, and AFAIK S2 doesn't provide any helper
to handle it differently (one exception is the token interceptor to
avoid double submits.)
I think you should design the application specifically to handle this
case: if some user is already logged in, you can prevent him log in
again as an admin by checking some data is already present in session
scope.
Also, it seems you have 2 login screens: one for regular users and
other for admins. Other solution can be to have only one login screen
and rework your user roles, assigning some regular users the "admin"
role too.
HTH,
Gabriel
2009/12/30 Struts-User <bharatesh.huchchannavar@(protected)>:
>
> Thanks Paul, What I mean is not exaclty one session per user rather
> preventing or detecting the session which is getting copied when any one
> does CTRL+N or in IE7 opens application new TAB.
> In above said cases session remains to be same however session data is
> replaced with the recentely logged in user's data.
> This creates problem when employee logs in one window and same employee
> tries to log as admin in CTRL+Ned window as admin which will result in
> employee session data being replaced by admin data....
>
>
>
> --
> View this message in context: http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964689.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)
>
>

Attachment:
user_204458.ezm (zipped)
The <Object> tag previously referred to is where you can launch a java app from
a jsp (or even an ordinary html page). Check out Java Web Start.
Your java app can be an ordinary swing app and the server sends
a .jnlp file with instructions to the browser to download the necessary classes.
Your client needs to either have a full JDK installed (not just a JRE) or have
Java Web Start installed.
Chris
-----Original Message-----
From: Rafael Muneton <rafael_muneton@(protected)>
To: Struts Mailing list <user@(protected)>
Sent: Mon, Dec 28, 2009 12:39 pm
Subject: RE: Forwarding to a Java Application
i Wes:
Thanks for your answer.
I am a little bit confused now.
What I am trying to do is uncommon?????
The fact that I want to launch a Java class(Nor a Servlet) from a Java Server
age is something odd???
Or is it against the rules of Struts????
The question is now ===> How would you do something like that????
Thanks again.
Rafael.
Date: Thu, 24 Dec 2009 13:48:49 -0500
Subject: Re: Forwarding to a Java Application
From: wesw@(protected)
To: user@(protected)
On Thu, Dec 24, 2009 at 12:52 PM, Rafael Muneton
<rafael_muneton@(protected):
>
> Hi Vitor:
>
> What I am trying to achieve is that , after a user can log in to the Web
pplication, this user receives the MainMenu screen of the Application, where
here are several options, that he/she can choose from.This MainMenu is a Java
pplication not a Servlet.
>
> And after reading your answer, I think that maybe I need to upgrade to
truts 2.
>
> I am using Struts 1.1
>
I don't think an upgrade is necessary. I think you just need to
understand a little better how things work in a JSP/Servlet
environment... The page that launches the MainMenu application is
bound to have either an <applet... or <object... tag. It has been a
while for me, I can't remember which. But, if there is information
that needs passed to the MainMenu, then you need to make that
information into params. Then, when the page that launches the
MainMenu is rendered, pass the information to the MainMenu by
rendering the appropriate <param... tags.
-Wes
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
________________________________________________________________
indows Live: Keep your friends up to date with what you do online.
ttp://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010=

Attachment:
user_204468.ezm (zipped)I've attempted to update our application from struts 2.0.6 to 2.1.6 (also
using tiles 2.0.6) and am running into problems - I have a global error
result defined as a jsp inside my WEB-INF dir:
....
/WEB-INF/jsp/Error.jsp
and rendering of this jsp (and any jsp inside my WEB-INF) is failing on any
tags inside that jsp. I receive a nullpointerexception:
java.lang.NullPointerException at
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag (
ComponentTagSupport.java:49)
at
org.apache.jsp.WEB_002dINF.jsp.Error_jsp._jspx_meth_s_005finclude_005f0(Error_jsp.java:143)
And debugging into ComponentTagSupport shows that the line:
Container container = Dispatcher.getInstance().getContainer();
is failing due to inability to obtain an instance of the Dispatcher.
This all appears to work if I move the jsps out of WEB-INF and into my
normal webcontext directory.
Does anyone have any thoughts as to what I'm missing? This did all work
w/struts 2.0.6, and I've only made small modifications to my web.xml..
following this migration howto:
http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
thanks
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_204471.ezm (zipped)Hello,
Can you post your web.xml, particularly the section that defines the
Struts filters? Between 2.0 and 2.1, we broke the DispatcherFilter
into multiple filters. Also, can you post the configuration of this
global error result?
-Wes
On Wed, Dec 30, 2009 at 7:49 PM, bberken <bberkenpas@(protected):
>
> I've attempted to update our application from struts 2.0.6 to 2.1.6 (also
> using tiles 2.0.6) and am running into problems - I have a global error
> result defined as a jsp inside my WEB-INF dir:
>
>
> ....
> /WEB-INF/jsp/Error.jsp
>
>
>
> and rendering of this jsp (and any jsp inside my WEB-INF) is failing on any
> tags inside that jsp. I receive a nullpointerexception:
>
>
java.lang.NullPointerException>
> at
>
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag (
ComponentTagSupport.java:49)
>
> at
> org.apache.jsp.WEB_002dINF.jsp.Error_jsp._jspx_meth_s_005finclude_005f0(Error_jsp.java:143)
>
>
> And debugging into ComponentTagSupport shows that the line:
>
> Container container = Dispatcher.getInstance().getContainer();
>
>
> is failing due to inability to obtain an instance of the Dispatcher.
>
>
> This all appears to work if I move the jsps out of WEB-INF and into my
> normal webcontext directory.
>
>
> Does anyone have any thoughts as to what I'm missing? This did all work
> w/struts 2.0.6, and I've only made small modifications to my web.xml..
> following this migration howto:
>
> http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
> http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
>
>
> thanks
>
>
> --
> View this message in context: http://old.nabble.com/Struts-2.0-to-2.1-Migration-problem-tp26974067p26974067.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

Attachment:
user_204472.ezm (zipped)"Can you post your web.xml, particularly the section that defines the
Struts filters? "
my web.xml:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>TestApp</display-name>
<description>TestApp.</description>
<welcome-file-list>
<welcome-file>/pages/index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<exception-type>
java.lang.Exception</exception-type>
<location>/WEB-INF/jsp/Error.jsp</location>
</error-page>
<context-param>
<description>This context parameter specifies the name and location
of the Spring root application context file.</description>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext*.xml</param-value>
</context-param>
<context-param>
<description>This context parameter specifies the name and location
of the Tiles Definitions file.</description>
<param-name>org.apache.tiles.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/classes/tiles-defs.xml</param-value>
</context-param>
<session-config>
<session-timeout>20</session-timeout>
</session-config>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>openSessionInViewFilter</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>filterDispatcher</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>openSessionInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>filterDispatcher</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>
org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
</web-app>
"Also, can you post the configuration of this
global error result?"
struts.xml global-results:
<global-results>
<result name="accessDenied" type="dispatcher">accessDenied.jsp</result>
<result name="loginLimit"
type="dispatcher">loginLimitCheck.jsp</result>
<result name="loginExpiered"
type="dispatcher">loginExpiered.jsp</result>
<result name="loginDisabled"
type="dispatcher">loginDisabled.jsp</result>
<result name="loginIncorrect"
type="dispatcher">loginIncorrect.jsp</result>
<result name="notloggedin" type="dispatcher">/login.jsp</result>
<result name="notloggedintype2"
type="dispatcher">/logintemplate2.jsp</result>
<result name="error" type="dispatcher">/WEB-INF/jsp/Error.jsp</result>
<result name="success" type="redirectAction">default</result>
</global-results>
<global-exception-mappings>
<exception-mapping exception="
java.lang.Throwable" result="error"/>
</global-exception-mappings>
On Wed, Dec 30, 2009 at 7:49 PM, bberken <bberkenpas@(protected)>
wrote:
>
> I've attempted to update our application from struts 2.0.6 to 2.1.6 (also
> using tiles 2.0.6) and am running into problems - I have a global error
> result defined as a jsp inside my WEB-INF dir:
>
>
> ....
> /WEB-INF/jsp/Error.jsp
>
>
>
> and rendering of this jsp (and any jsp inside my WEB-INF) is failing on
> any
> tags inside that jsp. I receive a nullpointerexception:
>
>
java.lang.NullPointerException>
> at
>
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag (
ComponentTagSupport.java:49)
>
> at
> org.apache.jsp.WEB_002dINF.jsp.Error_jsp._jspx_meth_s_005finclude_005f0(Error_jsp.java:143)
>
>
> And debugging into ComponentTagSupport shows that the line:
>
> Container container = Dispatcher.getInstance().getContainer();
>
>
> is failing due to inability to obtain an instance of the Dispatcher.
>
>
> This all appears to work if I move the jsps out of WEB-INF and into my
> normal webcontext directory.
>
>
> Does anyone have any thoughts as to what I'm missing? This did all work
> w/struts 2.0.6, and I've only made small modifications to my web.xml..
> following this migration howto:
>
> http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
> http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
>
>
> thanks
>
>
> --
> View this message in context:
> http://old.nabble.com/Struts-2.0-to-2.1-Migration-problem-tp26974067p26974067.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_204473.ezm (zipped)On Thu, Dec 31, 2009 at 10:53 AM, bberken <bberkenpas@(protected):
[snip]
>
> <error-page>
> <exception-type>
java.lang.Exception</exception-type>
> <location>/WEB-INF/jsp/Error.jsp</location>
> </error-page>
>
[snip]
> struts.xml global-results:
>
> <global-results>
...
> <result name="error" type="dispatcher">/WEB-INF/jsp/Error.jsp</result>
>
[snip]
My guess is that the exception is being caught by the Application
Server. If the dispatcher / filter isn't run against the request, the
Container will be unavailable. Topics similar to this have come up in
the past, but I can't remember the exact solution. There are a few
ways to view the "solution" to your problem. For one, if you want to
catch *all* errors and use the error-page in the web.xml, then don't
use any struts tags in there. This is my preferred method, simply
because the error could come from deep in the darkest trenches of the
framework (or another framework - i.e. Hibernate / Spring
filters/listeners). It's a bit of a chicken-and-egg problem. If you
want absolute certainty, then take the tags out of your error page.
Another approach is to create a graph of exception-mappings -
http://struts.apache.org/2.x/docs/exception-configuration.html
Which it looks like you have attempted to do. However, I don't think
using "Throwable" is enough. When you have the problem, do you see a
stack-trace in the application server console? There is bound to be
another exception that happens beforehand that is causing the "error"
result to be dispatched to... Basically, the NPE is a result of the
"error" result attempt, so what is the cause of the "error" result?
(hint, it isn't the NPE, it'll most likely be in your application
server logs).
Once you track that down, you can solve this particular problem, but
long-term, I don't think your exception-mapping will work 100% of the
time, you will find situations like this that are simply outside of
the scope of Struts to handle.
-Wes
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

Attachment:
user_204469.ezm (zipped)Hi All,
Although it is documented that paramsPrepareParamsStack is similar as
defaultStack, there seems to be some differences. For example, it does not
have the scopedModelDriven interceptor. If I need the scopedModelDriven,
will it be safe to create a custom stack by copying the
paramsPrepareParamsStack and inserting the scopedModelDriven interceptor? If
yes, at what place?
--
Thanks,
Sanjay
www.sanjaypatel.name

Attachment:
user_204470.ezm (zipped)Hi
I have 2 datetimepicker in my struts2 jsp page.I want to validate like first
one should always less than second one.Is it possible to use normal
validation frame work or is there any another method
I have one more problem with radio button
<s:radio name="vehRad" list="vehList">
<br/>
</s:radio>
vehList is ArrayList.it is working fine without validation.But with
validation it shows an error that is
"
org.apache.jasper.JasperException: tag 'radio', field 'list', name
'vehRad': The requested list key 'vehList' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]"
Please replay me with solutions for above two problems
Expecting your kind interaction
Thanks in advance
Rakesh
--
Sent from the Struts - User mailing list archive at Nabble.com.