Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

JSP problem

Options
  • 25-06-2005 11:54am
    #1
    Closed Accounts Posts: 658 ✭✭✭


    Hi

    Im having a bit of trouble with some JSP pages I have tried to upload to a webserver. JSP is working perfectly on this server. Basically, Ill explain the structure of the site...

    The main website with its html pages and jps pages has the following makeup.

    public_html/images <-- images in there
    public_html/styles <--css in here
    public_html/jsp <-- all jsp files in here
    public_html/WEB-INF <-- all classes and libraries in here

    and then in public_html itself there are all the static HTML files for the site.

    This works absolutely fine. The problem lies here...
    I have created an admin folder in public_html for the site administrator so they can send out emails for a newsletter or manage users. Its basically a content management system based in JSP for them to use.

    public_html/admin/images <-- images in there
    public_html/admin/styles <--css in here
    public_html/admin/WEB-INF <-- all classes and libraries in here
    and in public_html/admin I have it all as jsp files instead of html files.

    the admin section is new so i thought it best to keep it all as jsp files since it will be dynamic.

    here is the error i get.

    org.apache.jasper.JasperException: /admin/newsletter_manager.jsp(5,0) The value for the useBean class attribute com.package.class is invalid.

    I have changed the class name to com.package.class for safety reasons. I know the info here might be alot but I thought I should include it incase it is needed. Does anyone have any idea why this is happening. I have looked on the net and there is little info on it and anything that has been suggested I have tried and it has not been the problem.

    Thanks


Comments

  • Registered Users Posts: 3,886 ✭✭✭cgarvey


    Without much thought or understanding, I'd guess that it's something to do with your nested WEB-INF folder (/public_html/admin/WEB-INF) .. classes in there are more than likely not being picked up by Tomcat (or whatever your app server is). You could try moving out files in there back up to /public_html/WEB-INF.

    .cg


  • Closed Accounts Posts: 658 ✭✭✭pontovic


    Hi

    Thanks for the reply. I have a WEB-INF folder deployed into public_html which has the same contents as the WEB-INF folder in public_html/admin.

    i use

    <jsp useBean id="object_name" class="com.package.classname" scope="page"/>

    and that comes up as the error in jsp. I called my web hosting company about this and they can't seem to do anything about it. Do I need to edit or create a web.xml file or set any classpaths in Tomcat. Im kind of new to Tomcat myself.

    Thanks


  • Closed Accounts Posts: 658 ✭✭✭pontovic


    Hi

    I got it fixed in the end. It turns out I was uploading an older version of the WEB-INF folder that didnt contain the classes I needed. Its amazing how these little things can hold up development for nearly half a day ! Thanks again for all your help.

    Regards


Advertisement