java


How to get parameters from the method and display a matrix in the HTML through JSP?


The JSP have a method that creates a matrix:
<%!
int[][] rndMatrix(int M, int N) {
Random rnd = new Random();
int matrix[][] = new int[M][N];
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
matrix[i][j] = 1;
}
matrix[i][rnd.nextInt(N)] = 0;
}
%>
I can not figure out how to get the parameters of the method itself, which would have to ask them and to bring in html.
If I understand you correctly, you just want to access the parameters you pass to the method. In that case, you already have that in the return value
M == return_matrix.length
N == return_matrix[0].length

Related Links

Java Embedded Application - What is needed on the device
How to add condition to Quartz cron job?
The while loop never ends [duplicate]
How to combine/merge sheets of two workbook into one workbook
Throw an Exception
Spring mongo data repository findAll() return empty?
No qualifying bean of type 'com.example.repo.UserRepository' available
How to remove/ignore quotation before JSON { and ] in Java
CloudFormation - Start a java backend
Why is that an Optional member variable in a class has a default value of null? [duplicate]
nar-maven plugin 3rd Party Library
socket.io and okhttp3 conflict
How to download GitHub release asset from private repo using only java
Jackson serialize exclude object from list
Android Java - Send JSONObject instead of Parameter
Differentiate between Java application mmaped memory and JVM mmapped memory on Linux

Categories

HOME
hook
netbeans
gremlin
plone
fft
fme
xmpp
spring-cloud-stream
frameworks
mvvmcross
wamp
convolution
directx
maude-system
communication
quicklook
modelica
google-apps-marketplace
size
visual-studio-2005
worldwind
clojurescript
systemc
transformation
plunker
nas
xlsxwriter
java-3d
ehcache
kvc
numerical-methods
dynamic-featured-image
pingfederate
fifo
buck
webkitspeechrecognition
primitive
quote
frame
yadcf
uisplitview
commit
uiswipegesturerecognizer
mozilla
normal-distribution
stacked
swisscomdev
android-browser
hue
unoconv
sfdc
sencha-touch-2.3
segment
filepicker
jedis
tizen-native-app
carrot
typed-lambda-calculus
windows-mobile-6.5
capacity
wdf
rotativa
fody
lttng
asp.net5
two-factor-authentication
vhd
xna-4.0
fouc
map-projections
drawbitmap
microbenchmark
interrupted-exception
streambase
bridge.net
bigbluebutton
gwidgets
asp.net-dynamic-data
mdt
qcodo
nsbutton
device-manager
document-classification
tld
mysql-error-1062
mcts
sitemesh
dataadapter
jquery-mobile-dialog
onsubmit
uiviewanimation-curve
netbeans-6.9
psi
ecl
telerik-scheduler
asp.net-mvc-areas
coda-slider
castle-monorail
bespin
zend-tool
eqatec
private-members
.net-1.0

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App