how to include a user java file into a jsp page

Discussion in 'Software' started by gaurav_kant, Oct 5, 2007.

  1. gaurav_kant

    gaurav_kant

    Joined:
    Sep 26, 2007
    Messages:
    10
    :withstup:

    in a jsp program,
    i have a ReadAndPrintXMLFile.java in src folder. and arose.jsp is in main project folder(outside WEB-INF folder). Tramp.class is placed in WEB-INF/classes/ReadAndPrintXMLFile.class .

    now in .java file, 1 public static fun() named function exists. i m calling this function in my jsp page inside scriptlet. like this

    <%

    Vector sup=ReadAndPrintXMLFile.fun();

    %>

    class paths & all i think right. but i dont know y this error is comming



    An error occurred at line: 26 in the jsp file: /ShowFile.jsp
    ReadAndPrintXMLFile cannot be resolved
    23: <th width="100">Status</th>
    24: <%
    25: //ReadAndPrintXMLFile fl=null;
    26: Vector sup=ReadAndPrintXMLFile.fun();
    27: Iterator itr= sup.iterator();
    28: boolean change=false;
    29: while(itr.hasNext()) {


    Stacktrace:
    at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
    at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Unknown Source)




    :bored: please help me out
     
    gaurav_kant, Oct 5, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nick

    JSP File

    Nick, Jan 3, 2004, in forum: Computer Support
    Replies:
    6
    Views:
    5,069
  2. ZZ

    .jsp web page won't load (WinXP, IE6)

    ZZ, Jun 29, 2004, in forum: Computer Support
    Replies:
    1
    Views:
    3,768
    ┬░Mike┬░
    Jun 29, 2004
  3. BEM
    Replies:
    1
    Views:
    6,861
  4. DebbieinFlorida

    embedding Java into HTML in JSP

    DebbieinFlorida, Sep 18, 2008, in forum: General Computer Support
    Replies:
    0
    Views:
    704
    DebbieinFlorida
    Sep 18, 2008
  5. fitz
    Replies:
    0
    Views:
    1,146
Loading...

Share This Page