How can I use a applet in a JSP file?

hi
I failed to use applet in a jsp file.My workspace is a BC4J type. I put the applet's source file in business component project.the jsp is in JSP project.
The jsp file calls applet by <jsp:plugin></jsp:plugin> style.
The error is can't find the applet class.
why? Thank someone for give me help.

Actually using jsp applet tags does not mean that it is taking care of that the classes are available. It simply renders the Applet tag tothe JSP page. If e.g. teh codebase is specified as /java/, then there should be a mapping to the Java class location with thename of /java/. If codebase is not provided, then the Java class must be in the classpath of the JSp servlet.
Frank

Similar Messages

  • How Can i use Html frames with  simple JSP???

    How Can i use Html frames with simple JSP???
    Actually i am creating an application in which i have used Index.html as frame.
    Noew i am trying that if i click on a link of one frame(say menu frame) the \result shoul come to some other frame(say frame named mainwindow).
    Hoe can i do like this???
    Anand Pritam

    Well i am using..
    < Base target="mainwindow">
    But it is no working is there some other way??

  • Can u tell me how can i use a given gateway in jsp code?

    Hi everybody,
    As iam working on a project,i need to send and receive sms using given gateway(given by client).
    can any one tell me.. how can i use the gateway using java code in jsp page?i need the total java
    code.

    No.
    Your client has provided you with a SMS gateway, and we don't know anything else about it. So we can't give you the code.
    Even if we could give you the code, we don't know what you want to do with it - what functionality do you want to expose to the users of the JSP?
    Even if we could knew what you were using and exactly what you wanted to do with it, why on earth would we want to write all your code for you?
    [Please read this link|http://www.catb.org/~esr/faqs/smart-questions.html]

  • How can I use Airport Extreme just as a file server - no wifi

    I'm setting up a new Apple environment for an invalid music buff.  Here are the components, all newly purchased.
    MacBook Pro
    Airport Extreme
    Airport Express
    I was handed a G-Drive with a large iTunes file collection on it.
    The user will have Comcast as his network provider and he already has a Comcast wireless router, so none of the Apple devices will need to be used as a wireless router or base station (assuming I understand what Apple means by a "base station").
    The Airport Express has the primary function of acting as an AirPlay device, feeding an analog music signal to the user's hi-end audio system (Denon integrated amplifier, Thiel Loudspeakers).
    The Airport Extreme has the sole function of acting as a network file share for the G-Drive.
    The MacBook Pro will operate iTunes and will get its music files from the network shared G-Drive and send it to the AirPlay device, which will feed the music signal to the hi-end audio system.
    I am able to get the Airport Express to simply act as a wireless client on the Comcast provided wireless network.  The MacBook Pro is also on the network and can see the Airport Express as an AirPlay device and send music to the audio system.
    What I'm having problems with is getting the Airport Extreme to simply act as a file server on this LAN.  It can either work in bridged mode and just be a wireless network client, or I can readily run an ethernet cable from the Airport Extreme to the Airport Express, or even to the Comcast router. 
    I tried to connect the MacBook Pro to the Airport Extreme with an ethernet cable and get it to "join an existing network", but it refused to recognize the Comcast provided network.  All it could see were some networks in homes nearby.
    I was hoping that if I just ran a network cable between the Airport Extreme and the Airport Express, that it would just get a network address over DHCP through the Airport Express.  Nope.
    So I'm stuck.   How do I get the Airport Express to simply act as a file server for the G-Drive on my LAN?

    +Can I use the Airport Extreme base station as a wired router, with wireless disabled for the time being?+
    Sure, but it will probably take just as much time...a few minutes....to turn the wireless off than simply change the name on the default wireless network to your personal choice.
    The AirPort Extreme is pre-configured to create a wireless network when it is hooked up to a modem. All you need do is assign a name to this network and establish a password. If you don't want to do this, you can turn the wireless off and use the device as a wired only router.
    AirPort Utility, the application that is used to setup the AirPort Extreme has a simple guided step by step process for you to configure the device the way you want.

  • How can i using datasource in toplink's map file

    In the TopLink map :
    <toplink:login xsi:type="toplink:database-login">
    <toplink:platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</toplink:platform-class>
    <toplink:user-name>test</toplink:user-name> <toplink:password>C23487CFA591952D44310804F3D591CB</toplink:password>
    <toplink:sequencing>
    <toplink:default-sequence xsi:type="toplink:native-sequence">
    <toplink:preallocation-size>1</toplink:preallocation-size>
    </toplink:default-sequence>
    </toplink:sequencing>
    <toplink:driver-class>oracle.jdbc.driver.OracleDriver</toplink:driver-class>
    <toplink:connection-url>jdbc:oracle:thin:@192.168.0.1:1521:testdb</toplink:connection-url>
    <toplink:bind-all-parameters>true</toplink:bind-all-parameters>
    </toplink:login>
    How can i modify it using datasource?

    The login information stored in the map file is good for direct connection and design time login information.
    For your runtime login information I would use the sessions configuration (sessions.xml). It provides complete deployment configuration:
       <session>
          <name>my-session</name>
          <!-- This references the ORM map XML file -->
          <project-xml>META-INF/employee-basic.xml</project-xml>
          <session-type>
             <server-session/>
          </session-type>
          <login>
             <datasource>jdbc/TopLinkDS</datasource>
             <uses-external-connection-pool>true</uses-external-connection-pool>
             <uses-external-transaction-controller>true</uses-external-transaction-controller>
          </login>
          <external-transaction-controller-class>oracle.toplink.essentials.transaction.oc4j.Oc4jTransactionController</external-transaction-controller-class>
          <enable-logging>true</enable-logging>
          <logging-options>
             <log-exceptions>true</log-exceptions>
             <print-thread>false</print-thread>
             <print-date>false</print-date>
          </logging-options>
       </session>Doug

  • How can I use automator to import a .csv file into a an excel file

    I would still like all the import settings that I get if I am using excel to do the process, i.e. going in with the text format instead of the general format. That way my dates don't change

    You'll need to use Applescript in Automator.
    Note:  File extension cannot be CSV (Excel will assume that the file is comma separated), so add an action to copy or rename with extension TXT.
    (You can rename back at end of Workflow is needed)
    The Applescript Action is:
    on run {input, parameters}
         repeat with f in input
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
              end tell
          end repeat
          eturn input
    end run
    NOTE: This is formating the 1st col to text
    If you need to format the second, then you need to:
      open text file filename (f as string) data type delimited field info {{1, general format}, {2, text format}} other char "|" with use other
    (You'll need to list the 1st col, 2nd col, etc until you get to the col to format as text).  Formats are (from the Applescript Excel Library):
    [field info list] : A list contain parse information for the individual columns of data.
    Formats are general format, text format, MDY format, DMY format, YMD format, MYD format, DYM format, YDM format, skip column.
    Or you can skip using Automator and just use an Applescript App (this is a droplet, just drop the files on the icon, or click to choose files):
    on run
         set fs to choose file with prompt "Select one or more files to open:" default location alias (the path to desktop folder as text) with multiple selections allowed
         proceed(fs)
    end run
    on open fs
         proceed(fs)
    end open
    on proceed(fs)
         repeat with f in fs
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
               end tell
          end repeat
    end proceed

  • How can I use java swing class in JSP page design

    I am a new developer in Java server pages. I want to use layout managers available in java swing classes to design the page. Can any body suggest me a way to do this.Is it possible if I do it with servelets.

    So, you want to use layout managers within your JSPs?
    The immediate answer is that "it isn't a good idea". The more considered answer is "tell us what you're up to".
    Are you coding all presentation within a traditional JSP? That is, HTML, customer or library tags and/java scriptlets?
    Or are you building your HTML within your servlets and sending that back to the browser?
    If the first, then you are probably better off either using explicit HTML tables (or the equivalent custom tags) or finding a library that you can use.
    If the second, you can write classes similar to the Swing layout managers that end up being a fancy way of putting elements into an HTML table. We have exactly that in my current environment. I wouldn't recommend rolling your own and I'd tend to leave all that presentation stuff to the JSP.
    In any case, you can't really use the Swing layout managers as they are for an entirely different pradigm.

  • How can i load a applet in a jsp page

    hi ,
    i am chiranjit , i am working in a jsp project . i want to load a applet in a jsp page.previously i had tried this one through <jsp:plugin> but when it goes in cross platform this page unable to load the applet from the serverside.
    if have any solution then pls send the solution in forum.
    thank you.
    chiranjit

    I never tried this... but doesn't the normal html <applet> tag work?

  • How can I use my time capsule to save files from my windows PC (Windows 8.1)?

    I have been to see the iStore close to where I live but I am frustrated to say that they are no help what so ever. The technical desk there freely admits that they do not how to do it and all they say is "apparently it is easy. Just follow the instructions on screen" which helps me no end!
    I have the Time Capsule set up on my mac and want to use part of the disc to save my files from my Windows PC (running Windows 8.1) that is on the same home network.
    I have found the apple forums so helpful in the past that I am pinning on my hopes on anyone that can help me via the forum now!

    Load the airport utility for windows. Sadly the most recent one is old.
    http://support.apple.com/kb/dl1547
    Although it is for windows 7 it does work on 8 and 8.1 .. tell us if you have problems loading it. Some people find it won't work without using safe mode.
    The utility will not help a lot to setup the latest model TC.. it is fine for Gen4 and earlier. But it does load bonjour for windows and a disk access agent.
    The TC should run simple names.. Short.. keep them below 10 characters if you can. No spaces and pure alphanumeric.
    That includes the base station name and wireless name.
    Once all of that is correct, open windows explorer and type in the address bar.
    \\TCname or \\TCipaddress where you replace TCname with the new short name or TCipaddress with obviously its actual IP.
    You will then get a request for username and password. Username is whatever.. admin will do. Password type in your disk access password.. public by default.
    TC is not designed to allow partitions so you cannot partition the TC disk. Create a folder and simply copy and paste your files to the folder.
    NOTE:: The TC cannot back itself up. So make sure you do not move files to the TC without having another copy.
    NOTE:: The TC does not happily mix TM backups and data.
    See http://pondini.org/TM/Home.html For info about TM and the TC.
    This area in particular.
    Q3 http://pondini.org/TM/Time_Capsule.html
    On mixing data and backups.

  • User Variable Options: How can I use them in a Business Rule?

    How can I use a "User Variable" set in File / Preferences in a Business Rule? It doesn't seem to appear as an Essbase Substitution Variable or as a Global Variable of Business Rules. The only way I know how to use it is to place the dimension on the POV or Page dimension of a data form, then use a Global Variable in a run time prompt to pick the member and run a BR against it, or some function of it.
    What do I do if I want to have that dimension in Columns or Rows? How can I set a BR to directly reference the member chosen under User Variable Options?
    J

    Thanks Alp, but I can't seem to reproduce what you are writing below. I want to refer my Business Rule to address the value set in File / Preferences / User Variable Options; no matter what members I show elsewhere in the data form.
    My other workaround is through a run time prompt and hope the user selects the appropriate user variable at the very bottom of the selection list in order to calculate the appropriate list of members.
    J

  • Use an applet in a Jsp to display data from Oracle DB

    Hi everyone, I'm very new to java my question is:
    Is there a way to display an applet like a table within a Jsp to display data from a Oracle DB? The thing is that I would be able to show this applet only at the click of the submit button in my html form.
    Please help me any sample code are welcome
    Thank you in advance
    Fabry

    Hi,
    Why can't you use a Java Bean which takes the data from the database. Then call this bean from the JSP page using <jsp:useBean> tag.
    Ok,if you dont want a Java Bean and if you want to use an applet in a JSP file, you will have to use <jsp:plugin>tag. Here is an example
    <html><head><title> Demo Applet</title></head>
    <body bgcolor="rd">
    <% if (request.getParameter("SUBMIT") != null) {%>
    <jsp:plugin type="applet" code="DemoApplet.java" codebase="." name="Demo" height="400 with="300>
    <jsp:fallback> Plug in not supported by your browser</jsp:fallback>
    </jsp:plugin>
    </body></html>
    Hope this will help you.
    Rgds,
    Ravi Shankar

  • How can I use applet to get the desktop image of client

    hi,I have a question to ask u.
    How can I use applet to get the desktop image of client? Now I develop a web application and want user in the client to get his current image of the screen.And then save as a picture of jpeg format ,then upload it to the server?
    I have done an application to get the screen image and do upload file to server in a servlet with the http protocal.

    Since the desktop image is on the client's local hard drive, you'll need to look at trusted applets first.

  • How can I use URLConnection to use applet communication with servlet?

    I want to send a String to a servlet in applet.I now use URLConnection to communicat between applet and servlet.
    ====================the applet code below=========================
    import java.io.*;
    import java.applet.Applet;
    import java.awt.*;
    import java.net.*;
    //I have tested that in applet get data from servlet is OK!
    //Still I will change to test in applet post data to a servlet.
    public class TestDataStreamApplet extends Applet
    String response;
    String baseurl;
    double percentUsed;
    String total;
    public void init()
    try
    java.net.URL url = new java.net.URL(getDocumentBase(),"/servlet/dataStreamEcho");
    //String currenturl=new String("http://lib.nju.edu.cn");
    java.net.URLConnection con = url.openConnection();
    //URL currentPage=getCodeBase();
    // String protocol=currentPage.getProtocol();
    // String host=currentPage.getHost();
    //int port=currentPage.getPort();
    // String urlSuffix="/servlet/dataStreamEcho";
    // URL url=new URL(protocol,host,port,urlSuffix);
    // URLConnection con=url.openConnection();
    con.setUseCaches(false);
    con.setDoOutput(true);
    con.setDoInput(true);
    ByteArrayOutputStream byteout = new ByteArrayOutputStream();
    PrintWriter out=new PrintWriter(byteout,true);
    String currenturl=new String("http://lib.nju.edu.cn");
    String var1=this.encodedValue(currenturl); //encode the data
    String data="currenturl="+var1;
    out.print(data);
    out.flush();
    con.setRequestProperty("Content-Length",String.valueOf(byteout.size()));
    con.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
    byteout.writeTo(con.getOutputStream());
    BufferedReader in=new BufferedReader(new InputStreamReader(con.getInputStream()));
    String line;
    while((line=in.readLine())!=null)
         System.out.println(line);
    catch (Exception e)
    e.printStackTrace();
    private String encodedValue(String rawValue)
         return(URLEncoder.encode(rawValue));
    =========================The servlet code below=====================
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class DataStreamEcho extends HttpServlet
    {public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
          res.setContentType("text/plain");
          PrintWriter out = res.getWriter();
          Runtime rt = Runtime.getRuntime();
          out.println(rt.freeMemory());
          out.println(rt.totalMemory());
          response.setContentType("text/html; charset=GBK");     
          request.setCharacterEncoding("GBK");
          PrintWriter out = response.getWriter();
          HttpSession session=request.getSession();
          ServletContext application=this.getServletContext();
          String currenturl=(String)session.getAttribute("currenturl");
          out.print(currenturl);
    =============================================================
    I have done up,but I found the program don't run as I have thought.
    Can you help me to find where is wrong?Very thank!

    You are trying to pass the current URL to the servlet
    from the applet, right?
    Well, what I put was correct. Your servlet code is
    trying to read some information from session data.
    request.getInputStream() is not the IP address of
    anything...see
    http://java.sun.com/products/servlet/2.2/javadoc/javax
    servlet/ServletRequest.html#getInputStream()
    Please read
    http://www.j-nine.com/pubs/applet2servlet/Applet2Servle
    .htmlNo,you all don't understand I.
    I want to send an Object to the server from a applet on a client.not url only.I maybe want to send a JPEG file instead.
    All I want is how to communicate with a servlet from an applet,send message to servlet from client's applet.
    for example,Now I have a method get the desktop picture of my client .and I want to send it to a server with a servlet to done it.How can I write the applet and servlet program?
    Now my program is down,But can only do string,can't not done Object yet.Can anyone help me?
    =======================applet=============================
    public void init()
    try
    java.net.URL url = new java.net.URL(getDocumentBase(),"/servlet/dataStreamEcho");
    //String currenturl=new String("http://lib.nju.edu.cn");
    java.net.URLConnection con = url.openConnection();
    //URL currentPage=getCodeBase();
    // String protocol=currentPage.getProtocol();
    // String host=currentPage.getHost();
    //int port=currentPage.getPort();
    // String urlSuffix="/servlet/dataStreamEcho";
    // URL url=new URL(protocol,host,port,urlSuffix);
    // URLConnection con=url.openConnection();
    con.setUseCaches(false);
    con.setDoOutput(true);
    con.setDoInput(true);
    ByteArrayOutputStream byteout = new ByteArrayOutputStream();
    PrintWriter out=new PrintWriter(byteout,true);
    String currenturl=new String("http://lib.nju.edu.cn");
    String var1=this.encodedValue(currenturl); //encode the data
    String data="currenturl="+var1;
    out.print(data);
    out.flush();
    con.setRequestProperty("Content-Length",String.valueOf(byteout.size()));
    con.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
    byteout.writeTo(con.getOutputStream());
    con.connect();
    BufferedReader in=new BufferedReader(new InputStreamReader(con.getInputStream()));
    String line;
    while((line=in.readLine())!=null)
         System.out.println(line);
    catch (Exception e)
    e.printStackTrace();
    =======================servlet=============================
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
         response.setContentType("text/html; charset=GBK");
    //request.setCharacterEncoding("GBK");
    PrintWriter out = response.getWriter();
    HttpSession session=request.getSession();
    ServletContext application=this.getServletContext();
    //String currenturl=(String)session.getAttribute("currenturl");
    String currenturl=(String)request.getParameter("currenturl");
    out.print(currenturl);
    File fileName=new File("c:\\noname.txt");
    fileName.createNewFile();
    FileOutputStream f=new FileOutputStream(fileName); //I just write the String data get from
    //applet to a file for a test.
    byte[] b=currenturl.getBytes();
    f.write(b);
    f.close();
    }

  • How can i hnow the applet had load complet by javascript?

    hi,how can i hnow the applet had load complet by javascript?
    my applet load by <object> tag,
    i add a "onload" event listener to the html page's <body> tag,but the event listener is call by the page load,
    but ,the applet sometime has not loaded complet,so how can i know the applet had loaded complet!
    the <OBJECT>has some method to check the applet load status??
    3KS!

    You can have your applet call some javascript to inform that it is loaded. Make the call from your
    applet's start method
    Suppose you have a javascript function called "appletReady()"
    which sets a ready variable to true or whatever.
    Now in your start method of your applet you can do the following:
           JSObject win = null;
            try
                win = (JSObject)JSObject.getWindow((Applet)this);
                if (win == null)
                    System.err.println("JSObject window was null");
                else
                        win.call("appletReady",null);
            catch (Exception jse)
                System.err.println("Exception: " + jse);
            }Make sure you import netscape.javascript.
    And when you compile use the appropriate jaws.jar in your classpath
    It should be found under jre/lib of your JDK installation.
    I hope this helps.

  • How can I sign My applet for IE and Netscape without JavaPlugIn?

    I think we can sign our applets with Javasigner.exe but this certificate is not being
    supported by IE and Netscape. If you want to use this certificate with IE and Nets.
    you must install JavaPlugIn to all users. I dont want to choose this way.
    I think we have one alternative for this purpose.
    For Netscape: Signing Tool
    For IE: The program that included SDK-Java
    But I could not find SDK-Java any where.
    I think Microsoft have gave up to support the Java certification...
    I am not sure.
    How can I prepare signed applet that can be run on IE and Netscape?
    This applet will have some permissions.

    The tool you need for signing cab files for the MS JVM is signtool.exe. I beleive that the .NET version of this tool can be used, as the signing process was not Java specific. You do need certificates in a different format than for jarsigner or the netscape signing tool. Verisign will happily sell you two different certificates, but there is probably a way to convert between formats using openssl or similar.
    You'll also need to package your files in a cab instead of a jar. cabarc.exe is what we use here. Again, it does not seem to be Java specific, so you can probably still find it despite Microsoft no longer making their Java tools available.

Maybe you are looking for