how to call a java class in jsp

how to call a java class in jsp

View Answers

November 25, 2008 at 1:01 AM

Hi friend,

Code to solve the problem :

<%@page import="roseindia.Extends" %>

<html>
<head><title>Example of Extends
Attribute of page Directive in JSP</title></head>

<body>
<font size="20" color="red">
<%
Extends ex = new Extends();
out.print(ex.show());
%>
</font>
</body>


</html>

"Extends.java"

package roseindia;

public class Extends{
public String show(){
return "Roseindia.net";
}
}

For more information on JSP visit to :

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

Thanks









Related Tutorials/Questions & Answers:
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
Advertisements
How to call java method on Button click in jsp?
How to call java method on Button click in jsp?  How to call java method on Button click in jsp
how call ireports in jsp
how call ireports in jsp  please send me code any one for calling ireports in servlet-jsp program i am trying to call the ireports in servlet and jsp...: java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable
How to call servlet in JSP?
How to call servlet in JSP?  How to call servlet in JSP
how to call java script function through java class file
how to call java script function through java class file  how to call jframe in java script
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 call jsp from flex
how to call jsp from flex  hi, i want to know that how can i call a FLEX from JSP. . A good Example will be appreciated
how to call jsp from flex
how to call jsp from flex  Plz help me out to get JSP from FLEX.... I need your help.... Thanks for future
How do you call a constructor for a parent class?
How do you call a constructor for a parent class?  How do you call a constructor for a parent class
How to call the run method from another class?
How to call the run method from another class?  Sorry, if this is a stupid question. I would like to find out how to call the run method... run() { new FereastraPrincipala().setVisible(true); from the class
How to call business deleget class(EJB) from JSF Page? - Java Server Faces Questions
How to call business deleget class(EJB) from JSF Page?  Hi, How to call a biz i.e. business deleget class(EJB) from JSF Page? I am creating one 3-tier banking application. I am using JSF 1.2 I want to know that.How to call
how to call jsp variable through servlet
how to call jsp variable through servlet  Hi deepak; i am posting some peace of code. and i need to call jsp varable <%=f%> through servlet so that it can call the downlode.jsp page. String f = "C:/temp/View HR
How to call jasper from jsp or servlet - JSP-Servlet
How to call jasper from jsp or servlet  Hi Expert , I created jasper report using ireport.how to call that jasper with jsp file or servlet file ? Thanks in advance Eswaramoorthy.s
Call class methods
Call class methods       This Example shows you how to call class method in velocity... through method  init(). 2: Create object of VelocityContext Class. 3
call dll from java - JSP-Servlet
call dll from java  Hello all how to call dll file methods in java
Call dll from java - JSP-Servlet
Call dll from java  Any one tell me how to call dll from java...) in java .For this i want to call a dll from java . Also any one have another solution ,please tell me how to do it. Thank You in advance
remote procedure call using java - JSP-Servlet
remote procedure call using java  what is the romote procedure call and related coding in java?  Hi Friend, The RPC (Remote Procedure Call) is a mechanism that enables a remote procedure call from a client
Java class in JSP
Java class in JSP          To use a Java class method in jsp first we need... make a object of the java class and by the instance of the java class call
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
how to convert jsp page to class file - JSP-Servlet
how to convert jsp page to class file  hai. iam doing online banking project by using jsp.i completed all the jsp pages.next can you tell me how to convert these jsp pages to class files with example and where to copy these class
tomcat jsp call DLL
tomcat jsp call DLL  Where can i find Example of use JSP under Tomcat environment call DLL
Diff ways to call a EJB from Servlet, JSP - Java Interview Questions
Diff ways to call a EJB from Servlet, JSP  How can I call EJB from Servlet or JSP
How to validate a form in action class and forward errors to the jsp in struts?
How to validate a form in action class and forward errors to the jsp in struts?  How to validate a form in action class and forward errors to the jsp in struts
How can i pass the valus from a JSP to the action class???
How can i pass the valus from a JSP to the action class???  hewllo wevryone... can anyone help me with how i can pass the value of menuId in my JSP and pass it in the action class
how to send my system.out.println in a class file to a jsp in Struts2
how to send my system.out.println in a class file to a jsp in Struts2   System.out.println("File" + f + " contains text " + text... to sent this to a JSP page
Doubt in using combination of JSP page and Java class. - JSP-Servlet
Doubt in using combination of JSP page and Java class.   I've got... be disabled from clicking. How to go about doing this in a "JSP Page using a Pure Java class"? The Database table looks like this: SeatCode
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
web service call in jsp page
web service call in jsp page  I am wandering on internet for hours looking for a simple and good example on how to create a simple JSP page to call a web service when you have a WSDL. I am using tomcat web server and eclipse
how to call from pc to telephone in java - MobileApplications
how to call from pc to telephone in java  Hi, presently I am working on "make a call from pc to telephone" in java. I am unable to procceed how to start. I am new this technoloy.Please give me some valuable suggestions how
javascript call action class method instruts
javascript call action class method instruts  in struts2 onchange event call a method in Actionclass with selected value as parameter how can i do
how to call static method
how to call static method  class A { //some code } class B extends class A { static method() } class C { } //how to access static method() from B to C
how to call static method
how to call static method  class A { //some code } class B extends class A { static method() } class C { } //how to access static method() from B to C
how to call static method
how to call static method  class A { //some code } class B extends class A { static method() } class C { } //how to access static method() from B to C
Java call method from another class
Java call method from another class       In this section, you will study how to access  methods of another class. For this we have created two java files
how to call static method
how to call static method  class A { //some code } class B extends A { static method() } class C { } //how to access static method() from B to C
how to call static method
how to call static method  class A { //some code } class B extends A { static method() } class C { } //how to access static method() from B to C
how to call static method
how to call static method  class A { //some code } class B extends A { static method() } class C { } //how to access static method() from B to C
How to pass Array of string from action class to jsp page
How to pass Array of string from action class to jsp page  this is my action class package login.ipm; import java.sql.*; import java.util.ArrayList... class DiagservicesAction extends org.apache.struts.action.Action { private static
how to pass string array from action class to jsp page? pls reply me.
how to pass string array from action class to jsp page? pls reply me.  how to pass string array from action class to jsp page? pls reply me.  ...;but, we can not use java code in jsp. with out using java code in jsp
call from java - JavaMail
call from java  Hi, how i will call servlet from java.. plz its... the java.net package to call a servlet from the java code...*; public class ServletExample extends HttpServlet { protected void service
how to forward select query result to jsp page using struts action class
how to forward select query result to jsp page using struts action class  how to forward select query result to jsp page using struts action class
Unable to call .jrxml file from jsp
Unable to call .jrxml file from jsp  Hi, I am doing web application in jsp. To create report I have used ireport and interated with neatbeans using plugin. After creating report in netbean when i call that jrxml file
how to get session object in simple java class??
how to get session object in simple java class??  i am fallowing...) GroupDetailsDao.java (it is also a simple java class which have the jdbc logic... java class (GroupDetailsDao.java) please help me
Call servlet from javascript - JSP-Servlet
Call servlet from javascript  Hi in my application i have jsp... , in my jsp i have provided an upload button thet upload single column excel file...="+finaldate; FAForm1.reset(); } how do i implement this using jquery where my
Unable to compile class for JSP - WebSevices
Unable to compile class for JSP  org.apache.jasper.JasperException: Unable to compile class for JSP When I am trying to access a java file kept under src folder under a package from a jsp page placed under web directory, I am
How I call the function union from the main - Java Interview Questions
How I call the function union from the main  Please, from public static void main(String[] args) I would like to call the function union and I...}, }; //calling the function union : paramtere to pass is mat //how i call
how to call an exe file from java - Java Beginners
how to call an exe file from java  hi, how to call exe file with some parameters from java and save the output of the exe file in a specified path. Please let me know immediately..its urgent!!! Thanks in advance
In Java how to get size of class and object?
In Java how to get size of class and object?  In Java how to get size of class and object
In Java how to get size of class and object?
In Java how to get size of class and object?  In Java how to get size of class and object

Ads