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

How to listen a huge number of IMAP folders of differnet accounts in one thread?
How to organize java classes?
Execute multiple SQL queries simultaneously via multi threading
Filtering on a list
DateFormat format.parse parse exception: Unparseable date
use of javax.servlet package in maven-bundle-plugin
Why static method cannot hide instance method in java
How can change font to JXteeTable for particular row
com.mysql.jdbc.Driver Error when I run the Jar File although that exists in my Build Path
What is the best way to share only the getter methods to client?
postgresql driver not loaded by the OSGI container?
Eclipse E4 RCP global error handling
PayPal Integration with java
am getting error with android studio R.java
How do i remove \r\n in a JSON file
is there a difference between searching in txt files and searching in html file in java-android

Categories

HOME
ms-access
sendgrid
keycloak
pycharm
push-notification
google-api-php-client
kalman-filter
adb
spring-jdbc
c#-2.0
ckeditor
datastax-java-driver
directx
cross-validation
adfs
primary-key
facebook-php-sdk
vifm
visual-studio-cordova
decomposition
dynamics-crm-online
functional-testing
tar
core-text
kudan
hammerspoon
icloud-api
opennlp
one-to-many
selectedindexchanged
wpfdatagrid
bootstrap-material-design
neo4j-spatial
wtx
kendo-datasource
bpel
react-chartjs
gtrendsr
wixsharp
http-digest
serve
x11-forwarding
libvpx
webix-treetable
temporary-files
trim
dism
mesos-chronos
spring-security-kerberos
rainbowtable
appcompat
tropo
lowpass-filter
slickedit
pg-dump
knpmenubundle
titanium-android
vtigercrm
cubes
slicknav
file-writing
py2app
paypal-express
skype4py
dlna
captivenetwork
atk4
feedback
spidermonkey
ideamart
mono-embedding
pretty-print
device-orientation
jscript.net
google-style-guide
relocation
id3v2
device-manager
preferences
code-access-security
php-5.4
responsive-slides
jubula
android-2.2-froyo
mcts
apc
shellexecute
padarn
frameset
ticoredatasync
removeclass
subscript
adk
yui-datatable
gdlib
sortable-tables
dentrix
rescale
fixed-width
meego
sector
port-number
grid-system
lzh

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App