Home Tutorialhelp Comment How to use EL with a getMethod that has params?

 
 

Comment

lyassa
How to use EL with a getMethod that has params?,
September 6, 2008 at 3:18 AM

Thanks for this great tutorial. I have a question though:

Suppose you have class A with two methods, getMethod1() and getMethod2(String str).

In a web app, you can do the following:
A objectA = new A();
request.setAtrribute("objectA", objectA)

then in a jsp you can do the following EL:
${objectA.method1}

What would be the syntax for using method2, that takes a parameter?

I tried both ${objectA.method["string"]} and ${objectA.method("string")}, but it doesn't seem to work.

View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
JSP Servlet Questions

JSP-EL - JSP-Servlet
 

JSP Tutorials

EL Basic Comparisons
 

JSP Interview Questions

JSTL
 

JSTL

Overview of JSTL Tags
 

IDE Questions

how to use jstl tags?
 

JSP Tutorials

Use of dot(.) operator in EL
 

JSTL

JSTL Tutorials and Online Training
 

JSP Tutorials

EL Implicit Objects
 

Training

JSTL Training
 

JSTL

Introduction to the JSTL
 

JSP Tutorials

AN INTRODUCTION TO JSTL
 

Programming Tutorials

Installing JSTL,Downloading JSTL, Installing JSTL
 

JSP Tutorials

EL and Complex Java Beans
 

JSP Tutorials

EL and complex JavaBeans1
 

JSP Servlet Questions

JSP EL
 

JSP Tutorials

Request Parameters In EL
 

Travel

Latitude and Longitude of El Salvador
 

JSP Servlet Questions

EL in jsp - JSP-Servlet
 

JSP Servlet Questions

JSP-EL - JSP-Servlet
 

JSP Servlet Questions

EL(JSP) - JSP-Servlet
 

JSP Servlet Questions

JSTL in Netbeans 6.9.1
 

JSTL

New Page 1
 

JSP Servlet Questions

JSP-EL - JSP-Servlet
 

JSP Servlet Questions

JSP-EL - JSP-Servlet
 

JSTL

Use of <x:if> tag of JSTL
 

JSP Servlet Questions

PROBLEM IN ACCESSING JSTL - JSP-Servlet
 

JSP-Tutorials

IF-ELSE In JSTL
 

JSTL

Downloading JSTL
 

JSTL

JSTL XML Tags
 

JSTL

JSTL Tutorial
 

JSP Tutorials

JSP JSTL c:if tag
 

JSP Tutorials

Use of <fn:length(String)> Tag of JSTL
 

JSP Tutorials

Use of <fn:escapeXml(String)> Tag of JSTL
 

JSP Tutorials

Use of <fn:startsWith(String, String)> Tag of JSTL
 

JSP Tutorials

Use of <fn:indexOf(String, String)> Tag of JSTL
 

JSP Tutorials

Use of <fn:trim(String)JSTL Tag
 

JSTL

Use of <x:param> tag of JSTL
 

JSTL

jstl if else
 

JSTL

Use of <x:out> tag of JSTL
 

JSTL

Use of <x:set> tag of JSTL
 

JSTL

Use of <x:parse> tag of JSTL
 

JSP Tutorials

Use of <fn:containsIgnoreCase(String, String)> Tag of JSTL
 

Programming Tutorials

Jstl c:if tag in jsp
 

JSTL

Use of <x:forEach> tag of JSTL
 

JSP Tutorials

JSTL: forEach and status
 

JSP Tutorials

Use of <fn:endsWith(String, String)> Tag of JSTL
 

JSP Tutorials

Use of <fn:replace(String, String, String)> Tag of JSTL
 

JSTL

Use of <x:choose> tag of JSTL
 

Java Beginners

Error in using jstl tags
 

JSTL

Use of <sql:transaction> tag of jstl
 

JSP-Tutorials

How to Use Java Functions In EL
 

JSP Tutorials

Use of <fn:subString(String, int, int)> Tag of JSTL
 

JSTL

Example of Variable Support Tags of JSTL Core Tag Library
 

JSP Tutorials

Use of fn:toUpperCase(String) and fn:toLowerCase(String) Tag of JSTL
 

JSTL

Use of &lt;x:transform&gt; tag of JSTL
 

JSTL

Example of Flow Control Tags of JSTL Core Tag Library
 

JSP Tutorials

JSP JSTL c:when tag
 

JSTL

An Introduction to JSTL
 

Programming Tutorials

The fn:toUpperCase & fn:toLowerCase tags of JSTL
 

JSP Servlet Questions

How to use next and previous button(or href) for database table that is retrieved from MySQL DB using jsp,jstl,javascript
 

JSP Tutorials

JSTL: Removing Session Attribute
 

Java Technology Tutorials

JSTL XML Tags
 

JSP-Tutorials

JSTL Functions
 

JSP-Tutorials

AN INTRODUCTION TO JSTL
 

JSP Tutorials

JSTL c:catch with c:if
 

JSP Tutorials

Use of <fn:split(String, String)> and <fn:join(String, String)> Tag of JSTL
 

Programming Tutorials

Jstl c:when,c:choose,c:otherwise tag in jsp
 

JSP Tutorials

JSTL If- Else
 

JSP Tutorials

Use of <fn:substringBefore(String, String)> and <fn:subStringAfter(String, String)>JSTL Tag
 

JSP Servlet Questions

JSTL - check odd/even number - JSP-Servlet
 

JSP Tutorials

Expression Language in JSP
 

JSTL

Use of <c:catch> tag of Core JSTL tags
 

Programming Tutorials

Using of [] operator of EL with the Map
 

Programming Tutorials

Request Parameters in EL
 

JSP Tutorials

Throwing an Exception in JSTL
 

Spring Framework Questions

How to populate an HTML table using jstl code - Spring
 

Programming Tutorials

Using [] operator of EL with an Array
 

JSP Servlet Questions

How to store values in a database using JSTL? - JSP-Servlet
 

JSTL

Execute database query by using sql tag of JSTL SQL library
 

JSP Tutorials

<c:forEach> in JSTL
 

Java Beginners

jstl - Java Beginners
 

JSP Tutorials

Nested <c:forEach> in JSTL
 

JSP Servlet Questions

jstl - JSP-Servlet
 

JSP Tutorials

Expression Language Basic Arithmetic
 

Programming Tutorials

This is Conditional Forward using EL
 

JSP Tutorials

Features of jsp2.1
 

JSP-Tutorials

JSTL XML Tags
 

JSP Tutorials

Request Headers In EL
 

JSP Tutorials

JSTL: another for each and status
 

Java Beginners

JSTL in JSF2 Facelet makes sense?
 

JSP Tutorials

JSTL : Submit Form TextField
 

JSP Servlet Questions

JSTL - JSP-Servlet
 

JSP Tutorials

Conditional Forward using EL
 

JSP Servlet Questions

help me on jstl- <c:url> - JSP-Servlet
 

Programming Tutorials

Complex Java Beans Using El
 

JSP Servlet Questions

connection with mysql with jstl - JSP-Servlet
 

XML Questions

JSTL- xml tag library - XML
 

JavaScript Questions

How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?
 

JSP-Tutorials

JSTL Tutorial Part 2
 

JSP Tutorials

Catch an Exception using EL
 

Advertisements Advertisements
 

 

 

DMCA.com