uluroki
uluroki

Reputation: 171

Applet in jsp page (Eclipse)

I'm trying to embed an applet into a very simple project in Eclipse, with Spring and Hibernate. After nearly 5 hours of reading and trying I have to ask a stupid question, because I just don't understand: where am I supposed to place .class file and the .jsp?

I'm getting the java.lang.ClassNotFoundException error all the time, no matter what is written in the code="" and where I place .class files.

    <APPLET 
        code="Soms.class"
        codebase="../../app-som"
        width=400 
        height=520>

        <PARAM name="sizex" value="RGB">
        <PARAM name="sizey" value="BW">
    </APPLET>

I've read that WEB-INF can't be accessed by the applet, and that I have to create a folder somewhere else. Also, having in mind this (at the bottom of the page) I've tried to create a folder in /src and putting there the .jsp and .class (in subfolders). Did not help either.

This is my project structure now:

Eclipse project structure

The applet will be in HistDetails.jsp

Thanks in advance.

Upvotes: 0

Views: 747

Answers (2)

Tcanarchy
Tcanarchy

Reputation: 770

I think your META-INF folder should not be in the WebContent folder, but directly under MedCase. I'm not 100% sure, but I just looked at my own project, and that's the first difference I noticed

Upvotes: 0

Kevin Workman
Kevin Workman

Reputation: 42174

You need to separate the two. Your server-side JSP simply creates the client-side html, which then displays the applet.

I would maybe start by creating a static html (not jsp) file that displays your applet. When you get that working, then you can work on creating the html via jsp.

Upvotes: 1

Related Questions