How to run Aplet under Servlet?

Hi!
I'am using servletrunner. I have servlet which is in C:JSKD2.0\examples\. Where should I put the *.class (this is aplet) and how to finish this code to run the aplet?
out.println("<HTML>\n"+
"<HEAD>\n"+
" <TITLE>Testing...</TITLE>\n"+
"</HEAD>\n"+
"<BODY>\n"+
"<CENTER>\n"+
???"<APPLET CODE = "fdraw.class" NAME = "fdraw" WIDTH = 640 HEIGHT = 480>???
"</CENTER>\n"+
"</BODY>\n"+
"</HTML>");
This doesn't work! It gives mi "...class fdraw not found..." Why? Can anyone help me?

Try adding a codebase attribute to your applet tag specifying where that class should be found.
BTW, you don't run an applet "under" a servlet. The servlet receives requests from (normally) HTTP clients. The applet resides on the server, but is downloaded by the browser via embedded HTML tags.
Though they are both on the server, they are fundamentally different technologies. Your applet may communicate with your servlet via HTTP (or a custom protocol). But the applet does not "live under" the servlet or vice versa. One is client, and the other is server. Normally, HTTP ties them together.
- Saish

Similar Messages

  • How To Run OIM Under Weblogic As A Windows Service?

    Hi
    does anyone know how to run OIM under Weblogic as a windows service?
    Many thanks in advance,
    Evanela

    Hi
    Does anyone know how to run OIM under Weblogic as a windows service?
    I have used "Setting Up a WebLogic Server Instance as a Windows Service" (http://download.oracle.com/docs/cd/E12839_01/web.1111/e13708/winservice.htm#START143), but It doesn't work because OIM use the xlStartWLS.cmd file and not startWebLogic.cmd.
    thanks!
    Edited by: user13082223 on Sep 29, 2010 9:09 AM

  • How to Run a simple servlet "HelloWorld.java" in JBoss 3.0 ?

    Dear all,
    I am a beginner and I want to run a simple "HelloWorld.java" servlet .
    I need to use JBoss 3.0 .
    After I run this simple servlet, I need to use EJB-Servlet-JSP to implement MVC .
    I have the servlet code and I am able to compile it.
    But I dont know how to proceed as to where to put the class files , where do I specify an alias for my servlet and what modifications I need in Web.xml,Jboss.xml,Application.xml ?
    I do not anything about tools like Ant or Xdoclet so need to proceed without them.Please alos let me know where I can fond complete info about Ant and Xdoclet .
    Thanx in Advance,
    Sujith

    I am not sure of the JBoss package that you are using. If you are using the JBoss-Tomcat package, here's the solution. Create either a .war file or create a directory with the name <your-webapp>.war under <jboss-root>/server/default/deploy. If you are creating a war file, you have to place that war file in the same directory. JBoss-Tomcat will keep looking at this directory for new files or updates to files and deploys/re-deploys as required.
    The contents of the war file should be something like this.
    WEB-INF - directory
    WEB-INF/classes - your servlet classes
    WEB-INF.web.xml - your configuration. Here you can specify the servlet name, class and URI mapping.
    Now, you can call your servlet using the browser in this way: http://localhost:8080/<your-webapp>/servlet/<servlet-alias>. Here the <your-webapp> is the prefix of the .war file.
    Resources:
    Ant - http://jakarta.apache.org/ant/
    Xdoclet - http://xdoclet.sourceforge.net/

  • How to run jsp and servlet using JBOSS server

    Dear Friend,
    I have JBoss application server and Eclipse id
    now i want to run JSP and Servlet but i am not getting the place where to place my servlet class file to run it .
    before that i run jsp and servlet using tomcat5.0 but in that i place my servlet class in WEB-INF/classes folder and do corresponding entry in web.xml file and run it through browser.
    now i want to use JBOSS how it is possible
    PLZ Help me

    Is the servlet class defined in a package.? If servlet class package is servlets., copy the servlet to
    WEB-INF/classes/servlets directory.

  • How to run JAXP in servlet using JSWDK?

    Hi,
    I am trying to parse xml to html using JAXP API within a servlet. But an error message showing ' java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException ' is displayed in the web brower. But when I parse the xml to html and output the html text to the standard output, the program works. So, how can I run xml parsers within JSWDK?
    Thanks a lot.

    Hi,
    The problem is you don't have jaxp.jar in your classpath. JAXP Package is the implementation of the specification of XML processing in Java. The xml.jar contains implementation of Sun's(called Project X) XML Parser and related utilities that does not deals with JAXP Specs. The xml.jar is meant for the JSWDK to process the xml files(configuration files). I have not found any documentations for XML Utility classes in xml.jar.
    The solution for your problem is; download JAXP api and get the jar files(3 jars) into the classpath. While setting classpath for the jars in JAXP check out that thing named crimson.jar appears first before any other jars in classpath, else it would throw a SecurityException.
    Hope this helps.
    Regards,
    Rajavelu G.

  • How to run and compile servlets using tomcat4.0.3

    Hello
    I have simple servlet "HelloWorld".I have doubts in compiling and running this servlet.I'm using server Tomcat 4.0.3 as and JDK1.3.
    1)where do i need to save this servlet?
    2)how to compile this servlet by setting a classpath?
    3)how do i run this after compilation?
    4)do i need any HTML page to run on browser?.if, so how do i have a reference of servlet in HTML page?
    HERE IS THE SIMPLE SERVLET
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<body>");
    out.println("<head>");
    out.println("<title>Hello World!</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello World!</h1>");
    out.println("</body>");
    out.println("</html>");
    Thanx for help

    put your helloworld servlet inside of webapps/example/WEB-INF/classes...
    and then start your tomcat..and type
    http://localhost:8080/webapps/servlet/HelloWorld
    S

  • How  to run  and compile servlet

    hi
    m beginner to servlets
    so please help me how to compile nd run the servlets on notepad.
    i dnt no where to save the servlets nd how to compile nd run it
    thanks in advance

    These links may help you
    http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-First-Servlets.html
    http://www.coreservlets.com/Apache-Tomcat-Tutorial/
    -Mani

  • How to run exe in servlet?

    I need to run a local exe program and here is the code in servlet.
    private static Exception error = null;  
             public static boolean runBatch() {  
                  boolean result = false;  
                  try {  
                       Runtime r = Runtime.getRuntime();  
                       String base = System.getProperty("C:\\Program Files\\UCB\\ATT\\Graphviz\\bin\\");  
                       String target = base+File.separator+"dot.exe";  
                       System.out.println("Target: "+target);  
                       Process p = r.exec(target);  
                       result = true;  
                  catch( IOException ioe ) {  
                       ioe.printStackTrace();  
                       error = ioe;  
                  return result;  
             } 

    You need to handle the result and the error streams.
    Carefully read this: [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html] (all 4 pages).

  • How to run Servlet in weblogic server ?

    Hi ,
    I am new to J2ee Tech.
    how to run a simple servlet program in weblogic server?
    mainly i want know how to give the address in ID.
    Now i am using htt:\\localhost :7001\Sample\HelloServlet
    but it is not working
    Please give me the steps
    Thanks
    Merlin Rosina

    Hi ,
    I am new to J2ee Tech.
    how to run a simple servlet program in weblogic server?
    mainly i want know how to give the address in ID.
    Now i am using htt:
    localhost :7001\Sample\HelloServlet
    but it is not working
    Please give me the steps

  • How do run unix command in java

    hi
    All unix command working fine in our java program.
    but i want change user in linux by using java. it's not working.
    "su root" This command onely not working.
    anybody know help me
    This is my ID [email protected]
    This my code
    <% String s = null;
    try{
    Process p = Runtime.getRuntime().exec("su root");
    BufferedReader stdInput = new BufferedReader(new
    InputStreamReader(p.getInputStream()));
    BufferedReader stdError = new BufferedReader(new
    InputStreamReader(p.getErrorStream()));
    out.println("Here is the standard output of the command:\n");
    while ((s = stdInput.readLine()) != null)
    out.println(s);
    catch(Exception e) {}
    %>

    I don't have further info to add to your first post, but think your guess seems quite reasonable. I thought of starting a new thread on the same topic, but think this (question) fits in here, too.
    I have Java code (freeware, not opensoure), intended for Unix, which basically provides the graphical interface and relies on an I/O layer (C + shell scripts) to do most of the work. I have access to the C+shell scripts which are opensource. I ported it to Cygwin and want to use it under Windows (there is no Cygwin native Java VM).
    My problem now boils down to " how to run commands under Unix and what differences are there with Windows". What are the variants?
    I have to guess what the program is doing when I get an IOException at some point. E.g.: a call to shell script may be made in a different way as to a compiled exe in Unix?. I found a way to bypass path problems because forward slashes are also accepted and /cygdrive/c construct can be replace by c:/; shell scripts can be compiled into exes using shc and they work; if symbolic links are replaced by duplication of exe files, they work. What will happen in an instance whereby a process runs a shell script dynamically, through a pipe (the shell script is compiled in the Cygwin/win version and receives parameters) in a construct like:
    pipefp = epopen(cmdbuf,"w"); /* (cmbuf is "makehdr par1 par2 ... ") (makehdr was a shell script and is now compiled exe for Cygwin/Windows) */?.
    Thanks.
    LT

  • Urgent: how to run applet which connected to the servlet?

    hi frends:
    i have written an applet on the server side and it supposed to pass parameters to my servlet and retrieve some info from the servlet.
    i put both applet and servlet under tomcat../WEB-INF/classes. but when i run the applet from the web browser, there is no response from the servlet.
    could anyone help me to solve this problem?
    one more thing is i know that applet is able to connect to servlet, but how about java application? is it able to do so? if yes, is it also using URLconnection as applet? and how to run it?
    i will be very appreciate if anyone can help me... thanx a million.

    You can connect to the servlet from an application.There's a URL class in java.net that has an openConnection method. Then cast the return to an HttpURLConnection and use setMethod to set up as a post request.This may be the default if you call setDoOutput(true) on the URLConnection. Then you'll need to get an OutputStream and write properly formatted form POST data to it. It's also possible to encode your data on the URL, even when using the POST method, and this may be easier when doing it programmatically from an application. To send a get request you can append the name-value pair at the end of the url.

  • How to run servlet in tomcat5

    How to run the servlet in tomcat5...
    Is it need to set any classpath here. I tried alot in editing web.xml, and also i set the environment variable as
    JAVA_HOME, CATALINA_HOME to Java1.2 and tomcat5 rsptly.
    I cant even run the jsp file... it is giving the error lik this "The requested resource (file name) is not available " (HTTP status 404).
    what will be the problem..
    pls help me
    thx in advance

    You have not told your container what url maps to your servlet. This needs to be in your web descriptor:
    <servlet>
        <servlet-name>watermelon</servlet-name>
        <servlet-class>myservlets.watermelon</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>watermelon</servlet-name>
        <url-pattern>/fruits/*</url-pattern>
    </servlet-mapping>Then all requests to any url under yourwebapp/fruits/ will be processed by the servlet.
    I suggest you read a tutorial before going any further:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/

  • HT204074 I have a PC at work and a Mac at home. Both run Itunes under same Apple ID account.  How can I sync both computers to a common song library?  ITunes Match?

    I have a PC at work and a Mac at home. Both run Itunes under same Apple ID account.  Each computer's itunes library is common by around 75% of the songs.  How can I sync both computers to a common song library, so that all songs can be updated for both computers?  Will ITunes Match do that?

    I solved this by reset of the Wifi (unplug cable and power to both modem and wifi ... wait 60 sec ... plug in modem cable and power ... plug in wifi power and LAN to modem ... restart AppleTV and Mac ... Turn Home Share 'OFF' in iTunes then back "ON" ... it took ~60 sec for the AppleTV to pick up my Mac in computers.

  • How to run a servlet in tomcat 5.0.

    Hi all,
    how to run a servlet in tomcat 5.0
    please tell me the entire procedure....(directory structure)
    step by step....

    hi :-)
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html
    or
    http://www.google.com.ph/search?hl=en&q=java+servlet+tutorial&btnG=Google+Search&meta=
    regards,

  • How to run servlet codes in WebServer 6.1?

    I am new to Java Web Server and at our place we had installed WebServer 6.1. How to run Servlets in this - the default directory is
    http//win2000:81/Sun/WebServer6.1/docs
    I have'nt insatlled any new virtual class / servers - just running with the default class and servers.
    I could not find any virtual directory named servlet (similar to JavaWebServer 2.0) here.
    Someone kindly tell me how to post servlet files and run them.

    Refer "Sun ONE Web Server 6.1 Programmer's Guide to Web Applications"
    http://docs.sun.com/app/docs/doc/817-1833-10
    Meena

Maybe you are looking for

  • Disk Utilities | Bug?

    Open up your utilities application under Application/Utilities/Disk Utilities.app Then select any drive and click the info button. Scroll down with your mouse (I'm using the mighty mouse scroll wheel) and what do you see? I see "Type: Volume" blurred

  • Mplayer-vaapi osd issue

    Hello All, I use mplayer-vaapi (with intel i7/hd4000) and can't figure out how to configure the osd settings properly. If ass is disabled the subtitle fonts look like below. If ass is enabled the subtitle fonts are OK, but the OSD message fonts ares

  • Po_tax_codes_summary_v is not available in R12

    Hi All, po_tax_codes_summary_v is not available in R12, Could you please let me know the equivalent table in R12. Somewhere in document I came to know we have to follow the below step. Could you please advise how to follow the same. Added ORG_ID • Re

  • Download drivers for all the devices

    I have installed Win 2008 R2 using Bootcamp, I found the windows device manager showing generic microsoft drivers been used for display and also there are unrecognized devices. I am using iMac 27". Where can I download device drivers for all the devi

  • Does apple, sells unlock iphone 5 and can be use in asia

    wanted to know if apple store is selling unlock iphone 5 and can it be use in asian countries?