Implementing secure shell within JSP page

Discussion in 'JSP' started by koustubh, Sep 29, 2013.

  1. koustubh

    koustubh New Member

    Joined:
    Sep 29, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I am new to JSP. I am trying to connect to my linux server through ssh from a JSP page, sing the library JSch. Please find attached the code and the error
    </body>
    </html>

    org.apache.jasper.JasperException: Unable to compile class for JSP:

    An error occurred at line: 17 in the jsp file: /Home-Transcode.jsp
    JSch cannot be resolved to a type
    14: <%@ page import="com.jcraft.jsch.*,java.io.*" %>
    15: <%
    16:
    17: JSch shell = new JSch();
    18:
    19: %>
    20: </body>


    An error occurred at line: 17 in the jsp file: /Home-Transcode.jsp
    JSch cannot be resolved to a type
    14: <%@ page import="com.jcraft.jsch.*,java.io.*" %>
    15: <%
    16:
    17: JSch shell = new JSch();
    18:
    19: %>
    20: </body>


    Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


    I think the library is correctly referenced as I can import the package without any problem. Could someone please help me with this?

    Thanks,
    Koustubh
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice