facebook

error loading class in default pkg

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #228653 Reply

    scorpionking
    Member

    the editor is showing an error “cannot find symbol: class hotelSearch” for <jsp:useBean id=”hot” scope=”page” class=”hotelSearch”/>..

    i have verified the root directory of the bean class files..the editor is locating the class files..i have added servlet-api.jar file to the “project – properties – java build path” option but iam still confronting the same problem.. hope someone wud help me out in this..

    
    
    
    <%@ page language="java" import="java.util.*" %>
    <jsp:useBean id="hot" scope="page" class="hotelSearch"/>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    
    #228661 Reply

    Riyad Kalla
    Member

    the editor is showing an error “cannot find symbol: class hotelSearch” for <jsp:useBean id=”hot” scope=”page” class=”hotelSearch”/>..

    This line implies that you have actually created a Java file named “hotelSearch.java” and it lives in the default package… if this is infact the case, god will strike you down with lightning and fire for doing it.

    The class should be named “HotelSearch” and live IN a package, like “com.mycompany.search” or something like that, in which case the line would look like:

    
    <jsp:useBean id="hot" scope="page" class="com.mycompany.search.HotelSearch"/>
    
    #228680 Reply

    scorpionking
    Member

    yep..its a silly mistake..thanks alot for ur help..cheers!!

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: error loading class in default pkg

You must be logged in to post in the forum log in