Q:

Why class not found?

I'm facing a little problem in JSP development. 
Why class not found in this code?
<%@ page import="br.webi.amazon.AwsSns" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

    <%
        AwsSns snsClient = new AwsSns();

    %>

</body>
</html>

Server answer:

HTTP Status 500 - An exception occurred processing JSP page /webi.jsp
  at line 14
type Exception report
message An exception occurred processing JSP page /webi.jsp at line 14
description The server encountered an internal error that prevented it
  from fulfilling this request.
exception  org.apache.jasper.JasperException: An exception occurred
  processing JSP page /webi.jsp at line 14
11:  12:  <% 13:       14:        AwsSns snsClient = new AwsSns(); 15:  16:
    %> 17:

Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
    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)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)

root cause 
javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/amazonaws/AmazonWebServiceRequest
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:912)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)
    org.apache.jsp.webi_jsp._jspService(webi_jsp.java:88)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    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)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)

The package name is correct and class name is ok.
What's wrong in this code?
Thanks in advance.

A:

I solved my problem.
I'm using the Amazon Web Services library and it was in incorrect folder. I have move the libs to WEB-INF/lib folder and the problem was solved.

