Display 2d matrix on the page using a servlet -



Display 2d matrix on the page using a servlet -

i have scenario, wherein need display matrix box in browser output. taking input page, business logic , output of logic matrix need show on page. can see output in console in browser see matrix in 1 line. please help me out. piece of code using servlet :

out.println("matrix"); (int = 0; < n; i++) { (int j = 0; j < n; j++) {`enter code here` out.print(matrix[i][j] + " "); } out.print("\n"); }

browsers want see html instead of text. add together newlines out.print("<br/>"), or add together out.print("<pre>"); first output, or output content-type header saying content text/plain.

servlets

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

r - url in CRAN extension manual -

asp.net - .NET Control.ID property inconsistency -