This discussion is archived
3 Replies Latest reply: Oct 1, 2007 10:32 AM by 666705 RSS

Deploying applets through Workshop for Weblogic

666705 Newbie
Currently Being Moderated
Hi.

We are creating a web application whic primarily is driven through java/jsp (using Workshop 10.1). We have come over a problem which requires us to introduce an applet to the stack.

Our application configuration concists of a dynamic web project (main project) and a utility J2EE project (the applet). The Applet currently concists of just one java class, and if we could, we would happily incorporate this into our main project. But I hear that to run the applet it has to be inside a containing jar and that requires us to use a separate project.

* If we configure our main projects J2EE Module dependency to point to the applets project, we seemingly get no results.
* If we add the utility project to the main project's build path, we get an error message during deployment: "The web project build path contains classes or jars which are not inside the standard <WebApproot>/WEB-INF/classes or <WebApproot>/WEB-INF/lib directories"

We want the applet to be available to the client. The "/WEB-INF/lib/" and "/WEB-INF/classes" aren't, and we can therefore not export the utility project manually as a jar to these folders.

The best solution would be to create a dependancy which would compile and deploy our utility project as a jar or classes automatically when we build our main project, and place the file(s) in a location available to the client. But I do not know how we could do this.

Anyone want to share some knowledge on this issue? It would be greatly appreciated.

Concreatly:
* On which path in the main project does the jar file have to be placed in order for it to be available to the client?
* How do we deploy the jar through the Workshop IDE? Do we have to use ANT scripting to acheive this?

Thanks in advance.
  • 1. Re: Deploying applets through Workshop for Weblogic
    666705 Newbie
    Currently Being Moderated
    Your requirement might not be addressed by the deployment scenarios supported by Workshop. Please re-direct the query under WebLogic Server/J2EE Newsgroups for a better solution:

    http://forums.bea.com/category.jspa?categoryID=2004

    FYI:

    http://edocs.bea.com/wls/docs100/programming/libraries.html

    http://edocs.bea.com/wls/docs100/webapp/reference.html#wp57772

    http://java.sun.com/docs/books/tutorial/deployment/applet/deployindex.html
  • 2. Re: Deploying applets through Workshop for Weblogic
    666705 Newbie
    Currently Being Moderated
    Please be sure to post your solution to this - I, and I am sure others, are watching this thread for this important information!
  • 3. Re: Deploying applets through Workshop for Weblogic
    666705 Newbie
    Currently Being Moderated
    Hi

    You can also checkout the link http://e-docs.bea.com/wls/docs100/webapp/configureresources.html#wp158951

    If you need to serve classes or other resources from the system CLASSPATH, or from the WEB-INF/classes directory of a Web application, you can use a special servlet called the ClasspathServlet. The ClasspathServlet is useful for applications that use applets or RMI clients and require access to server-side classes.

    The ClasspathServlet returns the classes or resources from the system CLASSPATH in the following order:

    WEB-INF/classes
    jar files under WEB-INF/lib/*
    system CLASSPATH

    So may be you can place your applet in one of the places and serve it using classpath servlet from wls. I haven't tested this servlet with workshop but I will check it out.

    Vimala-