Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do NOT program Java on the JSP pages! #6

Open
FreakyBytes opened this issue Feb 6, 2017 · 0 comments
Open

Do NOT program Java on the JSP pages! #6

FreakyBytes opened this issue Feb 6, 2017 · 0 comments

Comments

@FreakyBytes
Copy link
Member

FreakyBytes commented Feb 6, 2017

Trac Ticket #6

component: code
owner: martinP,mariam
reporter: martin
created: 2016-06-09 16:59:48
milestone:
type: task
version:
keywords:

You shouldn't put programming code within the JSP stuff. That's super ugly and bad habits. Especially looking at constructs like these:

<% String feedbackUrl = Util.getFeedbackUrl(request); 
if( feedbackUrl != null) { %>
<div id="feedback">
   <a href="<%=feedbackUrl%>" title="feedback"></a>
</div>
<% } %>

or

<div class="col-md-2 col-md-offset-8 col-xs-6 search-result-score">
<% if( search.getAggregationType().equals("DEFAULT") ||  search.getAggregationType().equals("COMB_MNZ") ) { %>
	<fmt:formatNumber value="${result.score * 100}" minFractionDigits="1" maxFractionDigits="1" var="score" />
	score: ${score}%
	<% } %>
</div>

Instead please ONLY use taglibs and expression language! To learn more see for example: http://stackoverflow.com/a/3180202/723540

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant