Legit way of writing JSP?

Best practice of JSP app? This is the question been asking my self for a month. As my new job mainly serve and maintain Java-based system in-house and no wonder JSP is used for our online system especially those page which is customer facing.
It raise the tons of question mark. Yes I still learning, mostly from existing code base. Try to mimic the style they wrote for yrs or even decade before.
Several question raise after a month of observation and would like to conclude in here. Its a open -end question, nothing wrong / right. As long as the code run smoothly, customer happy. All good. Hence is more about code styling and convention.
Where does ur method call place ?
 – For me Im more prone to Encapsulate method into JSP page itself. That would be something like following:
– How ever other may prefer keep all Java code segment into separate Java class and import explicitly on headers.
Agains this is not wrong / right about it. Its more about coding style, but personally for me I would think Place both HTMl && Java together would be easily to maintain. But Its definitely non-test able against main stream testing framework like: J-unit.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s