Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet how to include a java class in jsp
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sarvesh rai
how to include a java class in jsp
1 Answer(s)      6 years and 3 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

August 1, 2008 at 6:01 PM


Hi friend,

<HTML>
<HEAD>
<TITLE>Using an if-else</TITLE>
</HEAD>

<BODY>
<H1>Using an if-else</H1>
<%
String day = "Friday";

if(day == "Monday")
out.println("It\'s Monday.");
else if (day == "Tuesday")
out.println("It\'s Tuesday.");
else if (day == "Wednesday")
out.println("It\'s Wednesday.");
else if (day == "Thursday")
out.println("It\'s Thursday.");
else if (day == "Friday")
out.println("It\'s Friday.");
else if (day == "Saturday")
out.println("It\'s Saturday.");
else if (day == "Sunday")
out.println("It\'s Sunday.");
%>
</BODY>
</HTML>


----------------------------------------------------------------


Read for more information.

http://www.roseindia.net/jsp/

Thanks.


Related Tutorials/Questions & Answers:
how to include a java class in jsp - JSP-Servlet
how to include a java class in jsp  hello sir, this is my first question, i want know that how to use a java class function's variables and methods of a java class in jsp.if possible plz tr to explain with a simple example
how to include a session class in java awt code - JavaMail
how to include a session class in java awt code  Hi... i have been developing a mini online shopping tool using java awt and websphere MQ... information and examplle of how to include session class to ressolve this issue
Advertisements
how to call a java class in jsp - JSP-Servlet
how to call a java class in jsp  hi.. friends iam new to roseindia.i found it very nice site to clarify our douts. i have a problem to use my java class in a jsp.can anyone please help me with this query
how to call a java class in jsp - JSP-Servlet
how to call a java class in jsp  hi.. friends iam new to roseindia.i found it very nice site to clarify our douts. i have a problem to use my java class in a jsp.can anyone please help me with this query
How to include?
How to include?  How can we include a JSP file in one application to the JSP file in another application which are in the same server?? please help me out with code
How To Include Two Jsp page in another jsp page?
How To Include Two Jsp page in another jsp page?  I use following code to Include Two Jsp Page Header and footer <%@include file="header.jsp... the following links: http://www.roseindia.net/jsp/jsp-include-file.shtml http
difference between <%@ include ...> and <jsp:include>
difference between <%@ include ...> and   What is the difference between <%@ include ...> (directive include) and <jsp:include>
jsp:include page=.. and include file = ...
jsp:include page=.. and include file = ...   What is the difference between <jsp:include page = ... > and <%@ include file = ... >?.   <jsp:include page = ... >: This is like a function call from
Creating dynamic jsp file in java file to include another jsp file
Creating dynamic jsp file in java file to include another jsp file  I am able to create jsp file in java that includes ; table tr td and img tags..... Need to include jsp file in the same content. The below code doesn't help me
Java to create table in jsp file that include other jsp file
Java to create table in jsp file that include other jsp file  String jspContent = "table" += "tr" += "td" += "jsp:include page='fileSource... this http://www.roseindia.net/tutorial/java/core/files/javacreatetableinHTML.html
JSP include directive tag
JSP include directive tag  What is include directive tag in JSP
Include Static HTML Page in JSP
Include Static HTML Page in JSP       This example shows how to include static html page in jsp. In JSP, there are two ways to include another web resource. 1
include a jsp file
include a jsp file   Sir, I have 2 jsp pages. I want to include second jsp in the first jsp page when a button in the first jsp is clicked. how can I do this. I tried in sevaral ways . I am using jsp and javascript... anyone
JSP include directive tag
JSP include directive tag  What is include directive tag in JSP?   Hi, The JSP include directive includes a static file or sends a request to a dynamic file. or The JSP include directive is used to include
Dynamic include jsp
Dynamic include jsp  I need dynamic include jsp page with an example
jsp include action tag
jsp include action tag  Defined jsp include action tag ?   The <jsp:include> element allows you to include either a static or dynamic... that is included in the JSP page. When the include action is finished, the JSP
Jsp include page problem
Jsp include page problem  I have included footer.jsp in all my pages. It is working in all pages except search.jsp. In search.jsp (Old footer.jsp content is displayed ) How can I rectify this?   Hi, You have to delete
how to include Timestamp into my enquiry form? - Java Beginners
how to include Timestamp into my enquiry form?  Dear expert, I'd like to include a timestamp function into my enquiry form. However, I am stuck at the servlet portion whereby I want to map my Timesatmp class to my update
The Include Directive in JSP Page
directive of the JSP. You will learn about what is include and how to implement... The Include Directive in JSP Page   ...; <%@include file="relativeURL" %> <jsp:include page="
jsp:include action tag
jsp:include action tag In this section we will discuss about JSP "include" action tag. The jsp "include" tag is used to include... into Servlet. The include tag is used to include another resource it may be jsp
How to create a class in java
How to create a class in java  I am a beginner in programming and tried to learn how to do programming in Java. Friends please explain how can I create a class in Java
JSP Include File
JSP Include File          JSP Include File is used to insert a html... to include a html file in the jsp page. You can see in the given example that we
jsp using include & with mysql
jsp using include & with mysql  Sir, I am creating a login application using jsp & Mysql. The Codes are--- Html File...... <...; Jsp file....... <%@ page import="java.sql.*" %> <% String
JSP Include jsp
JSP Include jsp   ... include either a static or dynamic file in a JSP file. If the file is static, its...;Includes Jsp Page</h2> <jsp:include page="includedJsp.jsp" >
JSP include
JSP include       A JSP page can include page fragments from other files to form the complete... the action:   <jsp:include page=" relative URL" flush="true"
How to include website in google search?
How to include website in google search?  Does anyone has idea about how to include a website into Google Search?   Visit the given Google website link on how to oiptimize or submit your website to Google. http
How to include a File using directive and include action
How to include a File using directive and include action... one attribute named as file, which is used to include a file in the jsp page..., whether it is a html, xml or any jsp page we should use include directive
flush attribute in jsp:include tag - JSP-Servlet
flush attribute in jsp:include tag  what is the use of flush attribute in jsp:include tag ?  hi friend, ------------------------------ Read for more information, http://www.roseindia.net/jsp
how to pass variable from simple java main class(not servlet) to the jsp page?
how to pass variable from simple java main class(not servlet) to the jsp page?  I have a simple Java class in which I invoke a call to a JSP page... from the simple Java class to the JSP page. How can I do that? Here is my
JSP Include Param
JSP Include Param          JSP Include Param is used to pass parameter in the include directive. The example uses <jsp:param> clause to pass
Include static files within a JSP page
Include static files within a JSP page  How do I include static files within a JSP page?   Static resources should always be included using the JSP include directive. This way, the inclusion is performed just once
 

 

 

DMCA.com