A
A
artshelom2017-04-04 20:30:37
WordPress
artshelom, 2017-04-04 20:30:37

How to make forech method in jsp referring to a class??

Pros tell me how to properly configure jsp. The balls() method returns some object. idea highlights "think.ThinkMethod" in yellow. And at startup it writes an error:
"HTTP Status 500 - Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException"

<%@ page import="think.ThinkMethod" %>
    <% ThinkMethod thinkMethod = new ThinkMethod(); %>
<c:forEach items="<%= thinkMethod.balls() %>" var="bals">
<h1>${bals.point.user.urlFoto}"/></h1>
</c:forEach>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Orkhan Hasanli, 2018-03-08
@last_round

Hello!
You can also include them via functions.php
Look at the example of including a style for a specific page

function add_custom_script() {
  if (is_page(array(2017,2021,2023,2027)) || is_tax('drugcat')) {
            /* Ваши стили здесь*/
  }
}
add_action( 'wp_enqueue_scripts', 'add_custom_script' );

Use
is_page(ID) for a specific page
is_page(array(ID1, ID2, ID3)) for multiple pages, etc.
detailed information about conditional tags
https://codex.wordpress.org/Conditional_Tags

S
Sergey Epifanov, 2018-03-08
@kacheleff

this is a normal solution.
you can check not the address, but, for example, use is_home()or any other suitable functions
as an option, there is also a plugin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question