Wie schreibt man Methoden innerhalb von JSP und Sie nennen?

Folgende ist meine jsp-code. Ich bin neu in JSP. Ich bekomme die Fehlermeldung angezeigt, nachdem der code

<body>
<%!
    public ArrayList<ArrayList<Leg>> trip;
    public void routeManager(){
        Location stLoc = new Location(60.2040521,24.96185113,"1023");
        Location endLoc = new Location(60.17936316, 24.92282214 ,"1130");
        RouteRetriever hrr = new RouteRetriever();
        trip = hrr.getRoutes(stLoc, endLoc, false);
    }
%>
<%  routeManager();
    System.out.println("Im here AA");%>
<%= out.println("Hello World:"+hrr.size()) %>
<p>Booooooooooooo!</p>
</body>

Fehler:

An error occurred at line: 30 in the jsp file: /index.jsp
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
ist dieser code kompiliert ?

InformationsquelleAutor dinesh707 | 2012-05-10

Schreibe einen Kommentar