JSP & APPlet - HTML

Hi All,
I am new to web development platform. I know core java, now as I need to proceed to web development I would like to know certain concepts / languages used.
Jsp - Jsp is used to develop webpages, how does it differ from html.
Applets - We can develop web pages using applets. Then what are the circumstance we use applets, jsp.
JSP & Applets - Can JSP and Applet both used to create a webpage? If yes how?
Kindly answer my question. Thank you.
Regards,
lg

Go look up a basic tutorial dude.
Basically JSP lets you create an HTML page on the fly. Rather than just serving up a static page, you customise it for each request.
This gives a pretty good example of how JSP fits into things
http://www.javaranch.com/journal/200510/Journal200510.jsp#a1
Applets - Its a program running on a web page. I kinda lump them into the same box as "flash" and "activex". They let you step outside the bounds of html which a webpage is tied to. That has both advantages and disadvantages. Most web applications don't use applets.

Similar Messages

  • Java applet was loaded in JSP as HTML.

    I was running my web application in Linux platform. I have the lastest mozilla broswer which is 1.7.1. I was installed the Java plugins which this can be proved by i was able to load ICQ2Go of ICQ.com. The Java applet i created was loaded correctly in .html file. Unfortunately the Java applet was not load in .jsp file and a window was pop up to prompt me to go java.sun.com to donwload the proper plugin to view the applet which the link is http://java.sun.com/products/plugin/?application/x-java-applet;. I need help. Please give me a hand. Thank you.
    Coding to load Java applet in .jsp
    <HTML>
    <HEAD>
    <TITLE>Applet In Broswer</TITLE>
    </HEAD>
    <BODY>
    <H1>Applet in Broswer</H1>
    Fibonacci Test in Java Applet.
    <jsp:plugin type="applet" code="foo.FibonacciTest.class" width="800" height="300" >
    </jsp:plugin>
    </BODY>
    </HTML>Coding to load Java applet in .html
    <HTML>
    <HEAD>
    <TITLE>Applet In Broswer</TITLE>
    </HEAD>
    <BODY>
    <H1>Applet in Broswer</H1>
    Fibonacci Test in Java Applet.
    <APPLET CODE="foo.FibonacciTest.class" WIDTH=800 HEIGHT=300>
    </APPLET>
    </BODY>
    </HTML>

    Whoops.. I even make a mistaken on the title of my problem - should be is Java applet was not loaded in JSP as HTML. The problem was solved. Thanks for anyone who had view this.

  • JSP applet tag X Html applet tag (what is the difference?)

    what is the advantage in using the JSP applet tag instead of a simple Html applet tag ?
    second question:
    I have an applet in a Html frame, and a menu on the left side.... When the user select the applet option at first time, everything runs ok.. after the user select another option and then select the applet again, it fails in some features .. Why ?

    well, if by "the JSP applet tag", you mean the jsp:plugin tag.. that will just generate the same HTML tag you would write. The only advantage would be it should be less typing to use the taglib.
    second answer:
    without seeing any code, it'd be hard to figure out the problem. The obvious thing is you are setting some state of something that is preventing further action.

  • JSP, APPLET and JNLP

    OK, here is my question, we have a simple (sic) application, which consists of jsps, applets ( Runtime.exec ), I have been suggested to use jnlp and jws, A typical JSP page looks like this.
    <% %>
    :Bunch of JSP /HTML stuff
    <APPLET>
    </APPLET>
    Bunch of jsp/HTML/javascript stuff
    How should i go about changing it to jsp + jnlp, Any insight is helpful.
    Thanks.

    OK, here is my question, we have a simple (sic) application, which consists of jsps, applets ( Runtime.exec ), I have been suggested to use jnlp and jws, A typical JSP page looks like this.
    <% %>
    :Bunch of JSP /HTML stuff
    <APPLET>
    </APPLET>
    Bunch of jsp/HTML/javascript stuff
    How should i go about changing it to jsp + jnlp, Any insight is helpful.
    Thanks.

  • Simple applet html editor

    Hi,
    I need a simple applet html editor.
    Does anyone has implemented one?
    The functions I need is bold, italic, insert table, insert image, and all basic functions of an editor
    I need some source, because I dont want to make it from scratch
    Thanks

    Using the search feature of this site, I found:
    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=%2Bforum%3A57&qt=html+editor
    ;o)
    V.V.

  • Can i import java fx in jsp or html?

    can i import java fx in jsp or html?

    coolsayan.2009 wrote:
    just to test i did rigt-click on my web-based jsp project project->new item->other->javaFX stage and wrote the example code like:
    but got all red under lined word in all the lines what to do???Ouch! Not being familiar with NetBean, I am not sure, but I fear you mix stuff.
    "web-based jsp project" => so you write JSP or HTML stuff there, no? Like including the dtfx.js file and putting the javafx({ ... }) call in the proper places.
    "wrote the example code like (JavaFX code)" => Maybe it should be in a separate JavaFX project? Then generate the .jar file and use it in the above project.
    Now maybe I am misleading (if there is a a JavaFX stage in new items of the projects, perhaps NB allows it?) so I hope somebody knowing NB better than me will help you.
    Just in case: JavaFX code goes to .fx files; you cannot embed JFX code in JSP pages.

  • JSP Applet communication

    Hi all ,
    I know this question has been asked so many times and I have read all the posts but still i was unsuccessful.
    I am trying to send a string from a jsp to another jsp which is loading the applet to display that string.
    In my first jsp:
    <form method=post action="hello.jsp">
    <input type="text" name="formDesc" value="IBMTR/ABMTR Form" size="20" maxlength="20">
    <input type=submit name="Go" class="submituttontext" value="Go">
    </form>     
    in my seccond jsp:
    <APPLET CODE="ParamTest.class" WIDTH="400" HEIGHT="50">
    <PARAM NAME="font" VALUE="Dialog">
    <PARAM NAME="size" VALUE="24">
    <PARAM NAME="string" VALUE="Hello, world ... it's me. :)">
    <PARAM NAME="formDesc" VALUE="<%=request.getParameter("formDesc");%>">
    </APPLET>
    in my applet:
    String myFont = getParameter("font");
    String myString = getParameter("string");
    int mySize = Integer.parseInt(getParameter("size"));
    String desc =getParameter("formDesc");
    Font f = new Font(myFont, Font.BOLD, mySize);
    g.setFont(f);
    g.setColor(Color.red);
    g.drawString(myString, 20, 20);
    g.drawString(desc, 40, 40);
    but nope i cannot see...formDesc ..I jus see the <%=getParameter%>
    Thanx

    At first glance the only error I see is:
    <PARAM NAME="formDesc" VALUE="<%=request.getParameter("formDesc");%>">
    should be changed to:
    <PARAM NAME="formDesc" VALUE="<%=request.getParameter("formDesc") %>">
    No semicolon in expressions. This should give you JSP compile error, so maybe that was just a typo in your post and not the real problem.
    Let me know.

  • Please help!!  Where I can find free Java-applet HTML-Editor???

    I need free Java-applet HTML-Editor. Where I can find it????
    Thanks.

    NetBeans or Forte is supposed to do that now. I've not had an occasion to try to do it in either yet though.

  • Adding 2 archive into one applet html file

    I have 2 questions
    first one is i have an applet html file and i want to add 2 jar file as an archive of it
    but i dont know how can i do it?
    second one is i have a signed jar file and i want when people open the html page one of the clases which include in jar file to be shown
    for example i have an applet class inside of the jar file and when people open the html page i want that applet class to be show
    is two of this possible if it is how?

    sorry i found the java console error and it says
    java.lang.ClassFormatError: Incompatible magic value 1347093252 in class file techclient
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$100(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

  • JMF+Applet html

    Well my friends
    my prloblema is as follows:
    I am developing an application with the images to display JMF api of using a Webcam Applet.
    At appletviewer function, but when you put in an applet html does not work ..
    What would you tell me some solution?

    Sorry,I`ve downloaded the applet from the previous link and i simply can`t play the avi file,besides the jmf.jar file is there any other file(which is not included in the jre 1.4.2) required?

  • APPLET + HTML WORD DOC

    I created a servlet class which would return a page ( applet + html ) to the client.
    Now I want to create a URL link in this page, allowing the client to download this page to his computer.
    How can I do this? Actually, the file can be of any type. The most important thing is that they can download it and save the page in their computers.
    What do I need to accomplish this?
    Thanks.

                       response.setContentType("application/octet-stream");
              String filename= "whatever you.like";
              response.setHeader
                  ("Content-Disposition","attachment; filename=\""
                   + filename + "\";"
                   );And do not forget to use the outputstream (and not the writer).

  • Redirect from jsp bean to jsp or html page

    I am facing a problem in redirecting to a jsp page from jsp bean
    How do i redirect from jsp bean to any other page like jsp or html.
    [email protected]

    Hi
    The solution you suggested we tried it long before only but it is not feasible for us as we have to implement it in all web pages which are in thousands.
    My need is like this.
    We have given specific time to each of our registered user , as user logs to our portal we calculate session time in bean and as he logs out is new time gets updated. (its like dial up connection)
    Now what happens consider user has left only 10 minutes balance, I can calculate and keep track for his time in bean.Now as the time becomes zero I want to redirect him to home page.
    As u said i can get return value zero for bean and can do it ,but our webpages are near about thousands.

  • How to pass the value from JSP or HTML  to Applet

    Plz reply ....How can we pass the value from the JSP Page or from HTML page to Applet embedded in same page....

    Hi,
    <applet codebase = "."
    archive = foo.jar"
    code = "com.bar"
    name = "bar"
    id = "bar"
    width = "<%=Request["width"] %>"
    HEIGHT = "<%=Request["appHeight"] %>"
    hspace = "0"
    vspace = "0"
    align = "middle"
    alt     = "Applet is Loading..."
    >
         <param name="LANGUAGE"                value="<%=Request["lan"] %>">          
         <param name="LOGOUT_USER_URL"           value="EndSession.asp">
         <param name="DATA_READ_INTERVAL"      value="10000">
         <param name="REFRESH_INTERVAL"           value="5000">     
         <param name="DEFAULT_FONT"           value="Arial">
    </applet>
    pass values @ ur html or jsp page to Applet as parameters.
    Refer above code. By using getParameter() method of Applet, u can take values inside applet.

  • Please help me....JSP & Applet Translation

    Hi!!!
    I did the following JSP, and it run very well:
    <!doctype html public "-//w3c//dtd html 3.2//en">
    <html>
    <!-- Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.-->
    <head>
    <title>Query of Municipalities</title>
    </head>
    <body bgcolor=#FFFFFF>
    <font face="Helvetica">
    <h1>
    <font color=#DB1260>
    Municipalities List
    </font>
    </h1>
    <%@ page import="
    weblogic.db.jdbc.*,
    weblogic.html.*,
    java.sql.*,
    java.awt.*
    " %>
    <p>
    <%
    Connection conn = null;
    try {
    Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    conn = DriverManager.getConnection("jdbc:weblogic:pool:DESAPool");
    catch (Exception e) {
    e.printStackTrace();
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * from CAT_MUNICIPIO");
    %>
    <%!
    int cont=0;
    String mun[] = new String[1000];
    %>
    <%
    while (rs.next())
    mun[cont++] = rs.getString(3);
    %>
    <form method="post" name="p3" action="p3.jsp">
    <table border=0 cellspacing=2 cellpadding=2 width=80%>
    <tr>
    <td width=30%><font face="Helvetica"><b>Municipio</b></td>
    <td><font face="Helvetica"><select name="p3">
    <%
    for (int c = 0; c < cont; c++) {
    %>
    <option value=mun[c]><%= mun[c] %></option>
    <%
    %>
    </select></td>
    </tr>
    </table>
    </form>
    <%
    rs.close();
    stmt.close();
    conn.close();
    %>
    <p>
    <font size=-1>Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    </font>
    </font>
    </body>
    </html>
    Now I�m doing the translation to a applet...but I don�t obtain the information in the choice element.
    My applet is:
    import java.awt.*;
    import java.net.*;
    import java.applet.*;
    import java.sql.*;
    import java.awt.event.*;
    import java.io.*;
    import weblogic.html.*;
    import weblogic.common.*;
    import weblogic.db.jdbc.*;
    import weblogic.common.internal.*;
    public class p3 extends Applet { 
    Connection conn = null;
    Choice Municipios = new Choice();
    int cont = 0;
    String Municipios_array[] = new String[1000];
    public void init() {
    try {  
    Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection conn = DriverManager.getConnection("jdbc:weblogic:pool:DESAPool");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM cat_municipio");
    while(rs.next()) {
    Municipios_array[cont++] = rs.getString(3);
    for (int c = 0; c < cont; c++) {
    Municipios.addItem(Municipios_array[c++]);
    add(Municipios);
    rs.close();
    stmt.close();
    conn.close();
    }catch (Exception e) {
    e.printStackTrace();
    Is like the information doesn�t put into the choice element....
    Somebody could help me please?....
    Thanks in advance.....
    Mary

    ok....excuse me....i did a mistake...but now I already add the line....my applet t1.java is:
    import java.awt.*;
    import java.net.*;
    import java.applet.*;
    import java.util.Vector;
    import java.util.Properties;
    import java.sql.*;
    import java.awt.event.*;
    import java.io.*;
    import weblogic.html.*;
    import weblogic.common.*;
    import weblogic.db.jdbc.*;
    import weblogic.common.internal.*;
    import javax.swing.JApplet;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import javax.swing.UIManager;
    import javax.swing.JTabbedPane;
    import java.awt.Rectangle;
    import javax.swing.JPanel;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseEvent;
    import javax.swing.JLabel;
    //import oracle.jdeveloper.layout.XYLayout;
    //import oracle.jdeveloper.layout.XYConstraints;
    import javax.swing.JComboBox;
    import javax.swing.JList;
    import javax.swing.JEditorPane;
    import java.awt.Font;
    import javax.swing.JSlider;
    import javax.swing.JTextArea;
    import javax.swing.JTextPane;
    import javax.swing.JTree;
    public class t1 extends Applet {
    Choice Municipios = new Choice();
    String Municipios_arr[] = new String[1000];
    public void init() {
    try {  
    Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection conn = DriverManager.getConnection("jdbc:weblogic:pool:DESAPool");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM cat_municipio");
    int cont = 0;
    while(rs.next())
    Municipios_arr[cont++] = rs.getString(3);
    for (int c1 = 0; c1 < cont; c1++)
    Municipios.addItem(Municipios_arr[c1]);
    add(Municipios);
    rs.close();
    stmt.close();
    conn.close();
    }catch (Exception e) {
    e.printStackTrace();
    But the console sends the followig:
    Java (TM) Plug-in: Versi�n 1.3.1_02
    Usar versi�n JRE 1.3.1_02 Java HotSpot(TM) Client VM
    Directorio local del usuario = C:\Documents and Settings\Administrador
    Configuraci�n del delegado: sin delegado
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    java.lang.ClassNotFoundException: java.io.FileNotFoundException: File not found: http://172.21.9.23/gep/alterno/1/weblogic/jdbc/pool/Driver.class
         at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
         at java.net.HttpURLConnection.getResponseCode(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at t1.init(t1.java:49)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    The line no. 49 is:
    Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    I think that in the server i have to add some code line in the classpath f...but I don�t which is it....
    Could you help me please?....
    Thanks...

  • Using java to get table rows (jsp and html)?

    I was wondering if there is any way to count rows from a html-table?
    I want to know the number of rows created, just after it has been made. So that I can use this number 'for' creating my next table.
    Have got this to work by using javascript code:
              function test2()
                   if (!document.getElementsByTagName || !document.createTextNode) return;
              rows = document.getElementById('spesifikasjonsTabell').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
              antallRader = rows.length;               
                   document.test.hoyde.value = antallRader;
                   return antallRader;
    , but this only generates on the clientside; which is not what I want.
    I got a webpage, that uses html and jsp. After the generation of a table - which has an unknown numbers of rows, because of several underlying tests - I'd like to retrive how many rows that was generated before I proceed with my next table.
    Is there a good workaround to this problem?
    P�l
    Message was edited by:
    paulOlsen

    Hey there, and thanks for fast response.
    Allready tried that code earlier. Works great on displaying the var 'row'-s inside, for instance, a <input type="text" or as a pup-up on a alert();
    The javascript works on the client-side, so I have no way of using that code for further testing in codes for my viewing; at least I can't think of any.
    The thing is that:
    1) I can't use an 'onClick', since the next table should be generated without any human interference.
    2) I used the same code to get the number of rows when I sat the table inside a form. But then, when calling the javascript function, I have no way to retrieve the linenumbers for use to test ON the next table.
    Since I'd have to use, say a field name <input type hidden="rows".., a method to call this very "rows" in jsp:
    <table>
    <!-- lots of rows -->
    </table>
    <%
    int numberOfRows = request.Parameter("rowcount") or what ever; here is where I need the 'number of rows'
    // let's just say int here though a String
    if(numberOfRows < 35)
    %>
    <table>
    <!-- Im including this table if the test above occurs -->
    </table>
    <%
    else
    %>
    <!-- if this occurs, then I'd like to do something else -->
    <%
    %>
    Any ideas?
    P�l
    Message was edited by:
    paulOlsen
    null

Maybe you are looking for

  • Is there a way of knowing when someone signs in?

    I have recently switched forom MSN Messenger to iChat. However, I miss the pop-ups telling me when somebody signs in. Is there a way of getting these, such as an add-on, or a preference? Thanks. iMac G5   Mac OS X (10.4.4)  

  • Display thumbnail preview for images in a Document Set

    I have a Document Set with Images in it.  I would like to show a thumbnail preview of the images in the view of the files in the document library.  I added the Thumbnail Preview column but it just shows a large File Icon.

  • Problem in repaint

    I drawn some rectangles.If one rectangle was clicked,the rectangles below it should move down..but for me,its not repainting.the old location as well as the new location was there when i click the rectangle... import javax.swing.JApplet; * To change

  • Master and Subprojects problems with Apps

    Hi all, What is going on with Master and Subprojects in an Online tenant with apps?? I will show some pictures about, cause Apps (no-one) is getting information about Master and Subprojects: - This picture shows the Project Center, and the project "M

  • Send Email of Current VC Screen.

    Dear All, I have to send the email of print screen in VC like, what we get from Button Action.      System Action: Print Apply to: Self Parameters: Print Screen Thank you, Regards, Devasarathy Pandi