Hi,

I am getting error Error:500


Please any one help me in this regard.. Here I am giving some details.. I
defined my own class Ticker.java like this..

The aim of this code is I wrote one simple method  PrintName() in the
Ticker.java class..o I want to call this method from my jsp and I want to
display in the JSP page..

I am putting my java file in the  package examples.malla;


and this is my link..
http://127.0.0.1:8080/examples/malla/ticker1.jsp

Please help me in this problem.. I think this is simple one.. I am unable to
get it..

Please reply to this mail asap.

Thanks,
Malla Reddy Choodi

my mail id is [EMAIL PROTECTED]
or [EMAIL PROTECTED]




Errors=======================================================
Error: 500
try to access method examples.malla.Ticker.()V from class
examples.malla.ticker1_jsp_1

IMPORTANT: Do not modify the generated servlets
Unhandled error! You might want to consider having an error page to report
such
errors more gracefully
java.lang.IllegalAccessError: try to access method
examples.malla.Ticker.<init>
)V from class examples.malla.ticker1_jsp_1
        at examples.malla.ticker1_jsp_1.<init>(ticker1_jsp_1.java:22)
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Unknown Source)
        at
com.sun.jsp.runtime.JspServlet$JspServletWrapper.load(JspServlet.jav
:64)
        at
com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(Jsp
ervlet.java:79)
        at
com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.
ava:87)
        at
com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
        at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at
com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:15
)
        at com.sun.web.core.Context.handleRequest(Context.java:414)
        at
com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
HANDLER THREAD PROBLEM: java.io.IOException: Socket Closed
java.io.IOException: Socket Closed



Code
============================================================
Ticker.java

package examples.malla;
import java.io.Serializable;
import java.lang.*;
import java.sql.*;
import java.util.Vector;
public class Ticker extends java.lang.Object
   implements Serializable
{

   public String  aTickerid      = "";
   public String  aType          = "";
   public String  aCol1                  = "";
   public String  aCol2                  = "";
   public String  aCol3                  = "";
   public String  aCol4                  = "";

   Ticker()
   {
   }

  Ticker(ResultSet rs) throws SQLException
      {
         aTickerid        = rs.getString ("TICKER_ID") .trim();
         aType            = rs.getString ("TYPE")      .trim();
         aCol1                = rs.getString ("COL1")      .trim();
         aCol2            = rs.getString ("COL2")      .trim();
         aCol3                    = rs.getString ("COL3")      .trim();
         aCol4                    = rs.getString ("COL4")      .trim();
       }
  public String PrintName(){
          System.out.println("Malla Reddy");
          String asd = "Malla Reddy";
          return asd;
  }
}


And my simple jsp file.. is
Ticker.jsp.


<%= (new java.util.Date()).toLocaleString() %>

<%@page language="java" import="java.sql.*, examples.malla.Ticker "%>

<%! Ticker tic = new Ticker();%>

<%
String asd = tic.PrintName();
%>

<%= asd %>





_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to