• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getter setter sequence  RSS feed

 
Charles McGuire
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When JSP's are compiled into servlets, what are the execution sequence of the property expressions? I would think that setter methods are executed before getter methods, but I cannot find a definitive reference to the sequence of executions. Maybe I'm stupid, (no, I know I'm stupid!) but I couldn't find it with Google or searching here in this forum. Maybe I'm asking the question the wrong way.

What is the sequence of operations within the servlet? I can't seem to find it anywhere.

Thanks in advance...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not exactly sure what you're asking.
If you're using Tomcat, you can see the generated servlet code by looking under the Work directory.
Seeing the code might answer your question.
 
Siamak Saarmann
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The execution is based on the order you call them or if you use them in an expression the order is according already known rules (i.e left to right, parentheses, multiplication/division, ...)

I can not guess a situation which comes to ambiguity. Can you give an example of when such a selection might be necessary?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!