How to write a values in HTML template, Using Microservices?

MVC Pattern template creation for PDF conversion

public static void main(String...aArguments) throws IOException {

        String strDatos = "Jorman 14988611";
    StringTokenizer tokens = new StringTokenizer(strDatos, " ");
    int nDatos = tokens.countTokens();
    String[] datos = new String[nDatos];
    int i = 0;


This code separates a string into tokens and stores them in an array of strings, and then compares a variable with the first home ... why isn't it working?

>Solution :

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri=""%>
    <title>View Names</title>
    <link href="<c:url value="/css1/common1.css"/>" rel="stylesheet" type="text/css">

    <c:forEach items="${names}" var="name">

Note: here "names" refer List<String> . If you have List<User> then in <td> <td>${user.getName()}</td> 


    public String getModel(@RequestBody ViewModel viewModel, Model model){

        model.addAttribute("names", viewModel.getNames());
        model.addAttribute("name1", viewModel.getName1());
        return "home";

Leave a Reply