0

amru.java :--

package test;
public class amru {

    public  static void fa()
    {
    System.out.println("ADitya");
    //return;
     }

}

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

INDEX .jsp

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="test.amru"%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>        
       <% amru adi = new amru();
       adi.fa();%>
    </body>
</html>

the above code displays only helloworld but not aditya
please give me a detailed explanation
any kind of suggestion would be appretiated
thnkx in advancee!!!!!

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by peter_budo
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.