Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

echo instruction in jsp

Tags:

How to make "echo" (php) but in jsp?

like image 471
elvenbyte Avatar asked Apr 19 '11 07:04

elvenbyte


People also ask

What is <%@ in JSP?

The page directive is used to provide instructions to the container that pertain to the current JSP page. You may code the page directives anywhere in your JSP page. By convention, page directives are coded at the top of the JSP page. Following is the basic syntax of page directive − <%@ page attribute = "value" %>

What is JSP example?

JSP (JavaServer Pages) is server side technology to create dynamic java web application. JSP can be thought as an extension to servlet technology because it provides features to easily create user views. JSP Page consists of HTML code and provide option to include java code for dynamic content.

Can we write HTML code inside JSP?

JSPs are Internally Compiled into Java Servlets Servlet can be viewed as "HTML inside Java", which is better for implementing business logic - as it is Java dominant. JSP, on the other hand, is "Java inside HTML", which is superior for creating presentation - as it is HTML dominant.


1 Answers

You can do like this:

out.print("whatever you want to echo"); also:

<c:out value="${variableName}" /> where variableNmae would the value you want to output.

Hope that helps.

like image 54
Naveed Ahmad Avatar answered Oct 07 '22 05:10

Naveed Ahmad