This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Shashank Rudra

Ranch Hand
+ Follow
since Mar 26, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shashank Rudra

got it James. neatly explained. though for development purpose while you will be making changes too often - use the dev mode Ankit is talking about.
10 years ago
Hi Guys,

One of the benefits of declarative approach is that you don't have to restart the server or redeploy the application most of the time. In the same context I want to understand what a change in web.xml means and do we need to restart in order to make this change effective. Again how any change in struts.xml is different from that. Do we need to restart the server for every change in the struts.xml and redeploy the application.

May be I sound confused- that is a fact I am lot confused. Thanks in advance for your responses.
10 years ago
David thanks for the response. This link I was looking at
http://struts.apache.org/2.1.6/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/TimerInterceptor.html
Here it says that the time taken will be logged in a file. I want this information to be in the valueStack and something that I can use on the response page that will be decided by the value of return string from the Action class's execute(or other method). We want to measure the time taken in the processing of this method in the Action class.

But someone here truly said that by the time the interceptor is getting the end time and the difference i.e. timeTaken the response has alraedy been committed. So how to get this value to the JSP page. Another question - if we have an instance variable in the Interceptor class and we have getter and setter for that in the interceptor class - will they be put on the valueStack similar to what happen in case of Action classes.

10 years ago
Thanks Freddy for pitching in. So how do you think shall I get this done. I want it to be configurable- as later on, I see myself tracking this timeTaken thing for other action classes.

What is the difference between Filter and Interceptor; shall I use Filter in this scenario.

One more thing- does the bean property set in the interceptor, set on ValueStack and subsequently can be accessed on the JSP pages using ELs.
10 years ago
Hi

I am using Struts2.0, Tomcat5.5 on windows XP system.

I am trying to keep track of time taken by a action class. For this I am trying to use interceptor. I specify this in the strus.xml as The interceptor is defined in the struts.xml as Now the Interceptor code is as As can be seen in the code I am trying two ways to get this timeTaken value to the result="success" JSP page

1. Via bean property i.e. private String ruleRunTimeTaken;
2. Via putting it in session attribute MyTime

Now in the result JSP I am trying to access this time taken as Here the bean property way is not working at all. I am getting blank always. May be this is not the correct way to do it. Please suggest how to get the timeTaken value across to the JSP page from Interceptor class.

Now the session thing sometimes work sometimes not. i.e. sometime I get the timeTaken value and other time it is blank. I am really confused

Please help me understand this. Thanks in advance for taking time out to help me.
10 years ago
Hi All

Here is the code where I am trying to synchronize access to the public instance . But from the output I am not able to figure out the difference than when I am commenting out the

synchronized(lst){

-line from the source.

Please help me understand the use of synchronizing on lst and the difference it is making. Thanks in advance for help.

yes I was just looking on strtus2 documentation pages. you guys are so prompt in helping, I appreciate that buddies.
10 years ago
thanks folks.. David any pointer to a link that shows how to create your own theme.
10 years ago
Hi Everyone,

Question#1

I need to display two s:textfield in the same line like two TDs in one TR. But all I am getting is these are creating two TRs and are not in line. How to get it right and display both the textfields in the same line as if in the same TR. TIA

Question#2

Also related to the struts tag I am facing this problem now as s:submit is being replaced with <div align=right> the button is not centrally aligned. How to get this correct.

Question#3

Do we have "s:button" or similar tag in struts2 ?

Any link that does help understand these intricacies will be very helpful.
10 years ago
Thanks Ankur for helping me understand this.

Will someone please comment on as to How the final methods are optimized as compiler gets us bytecode for them.TIA.
Hi to All,

1. How the final methods are more optimized in terms of being called/invoked

2. When talking about final parameters to method -

Final parameters are not considered part of the method signature, and are ignored by the compiler when resolving method calls. Parameters can be declared final (or not) with no influence on how the method is overriden.

What does this really mean??

Thanks in advance for taking time out and answering them.

yes exactly.
10 years ago
The gmail is tracking its session even if you are opening a new firefox window. By clicking on the exe icon.
10 years ago