JSP Programming Course Available

          Hello:
          wAppearances now offers a 5-day hands-on JSP programming course.
          Visit www.wAppearances.com for details.
          Robert Burdick
          wAppearances
          Co-author, "Professional JSP, 2nd Edition," Wrox Press.
          

Hi Neha,
there are two different runtime options in MI - JSP and AWT - that you already mentioned corredtly.
Depending what dev model you choose, you have to install the related runtime. That is a logical step. Well, if you are aware, JSP pages are displayed in a browser and are hosted on a server. In our case MI client JSP runtime is that server and especially if you run the application on a small device like a PDA, you will see significant performance issues. The screen response time is something around 2-5seconds. this is due to the messages and the processing time of the different components.
If you use AWT on the other hand, you are running it in the MI AWT client runtime and so all runs as a single application. This has a better screen response time.
So from this perspective the decision should clearly be the AWT component. BUT!!!
If you ever have developed an AWT app, you have noticed, that it is not that easy to develop tables for example in AWT. It is possible, but it is getting complex and slow soon. So depending on the complexity of your screens it can be soon, that JSP itself has a faster rendering time then an AWT application. And because JSP screen development is taht simple, most apps are JSP apps at the moment.
With MI7.1 this will change. You have the possibility to use eSWT and WebDynpro for UI development as well, and so the development of MI applicartions that use les system performance for the runtime itself will be more easy.
Hope this helps!
Regards,
Oliver

Similar Messages

  • What are the mistake in this JSP program?

    Hi,all. I am a newcomer to learn JSP, and I sincerely hope somebody help me. the following is a JSP program, and I want it extract data from my database and show them on webpage as XML. But there always have some mistakes I cann't found it. Could somebody help me find out them and tell me how to correct. Thanks veeeeeeeeeeeery much!
    <%@ page contentType = "text/xml" %>
    <%@ page language="java" %>
    <%@ page import = "java.sql.* " %>
    <%@ page import = "java.io.* " %>
    <%@ page import = "javax.xml.parsers.DocumentBuilder" %>
    <%@ page import = "javax.xml.parsers.DocumentBuilderFactory" %>
    <%@ page import = "org.w3c.dom.Document" %>
    <%@ page import = "org.w3c.dom.Element" %>
    <%@ page import = "org.w3c.dom.Node" %>
    <%@ page import = "org.w3c.dom.NodeList" %>
    <%@ page extends = "Object"%>
    <html>
    <head><title>Searching Page</title></head>
    <body>
    <p><INPUT size=22 name=T1></p>
    <p><INPUT type=submit value=OK name=B3></p>
    <% Document retailerDoc = null;
    Document dataDoc = null;
    Document newDoc = null;
         try {
         DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docbuilder = dbfactory.newDocumentBuilder();
         retailerDoc = docbuilder.parse("RetailerXmlExtract.xml");
                   //Instantiate a new Document object
                   dataDoc = docbuilder.newDocument();
                   //Instantiate the new Document
                   newDoc = docbuilder.newDocument();
              }catch(Exception e){}
              //Retrieve the root element
              Element retailerRoot = retailerDoc.getDocumentElement();
              //Retrieve the (only) data element and cast it to Element
              Node dataNode = retailerRoot.getElementsByTagName("data").item(0);
              Element dataElement = (Element)dataNode;
              String driverName = "sun.jdbc.odbc.JdbcOdbcDriver";
              String connectURL = "jdbc:odbc:Retailer";
              Connection db = null;
              try{
                   Class.forName(driverName);
                   db = DriverManager.getConnection(connectURL);
                   catch(ClassNotFoundException e){}
                   catch(SQLException e){}
              //Create the PreparedStatement
              PreparedStatement statement = null;
              //Create the Resultset object, which ultimately holds the data retrieved
              ResultSet resultset = null;
              //Create the ResultSetMetaData object, which will holds
              //information about the ResultSet
              ResultSetMetaData resultmetadata = null;
              //Create a new element called "data"
              Element dataRoot = dataDoc.createElement("data");
              try{
                   statement = db.prepareStatement("SELECT * FROM Orders");
                   //Execute the query to populate the ResultSet
                   resultset = statement.executeQuery();
                   //Get the ResultSet information
                   resultmetadata = resultset.getMetaData();
                   //Determine the number of columns in the ResultSet
                   int numCols = resultmetadata.getColumnCount();
                   //Check for data by moving the cursor to the first record(if there is one)
                   while(resultset.next()){
                        //For each row of data, create a new element called "row"
                        Element rowEl = dataDoc.createElement("row");
                        for(int i = 1; i <= numCols; i++){
                             //For each colum index, determine the column name
                             String colName = resultmetadata.getColumnName(i);
                             //Get the column value
                             String colVal = resultset.getString(i);
                             //Determine if the last column accessed was null
                             if(resultset.wasNull()){
                                  colVal = "and up";
                             //Create a new element with the same name as the column
                             Element dataEl = dataDoc.createElement(colName);
                             //Add the data to the new element
                             dataEl.appendChild(dataDoc.createTextNode(colVal));
                             //Add the new element to the row
                             rowEl.appendChild(dataEl);
                        //Add the row to the root element
                        dataRoot.appendChild(rowEl);
              catch(SQLException e){}
              finally{
                        try{
                             db.close();
                             }catch(SQLException e){}
              //Add the root element to the document
              dataDoc.appendChild(dataRoot);
              //Retrieve the root element (also called "root")
              Element newRootInfo = (Element)retailerRoot.getElementsByTagName("root").item(0);
              //Retrieve the root and row information
              String newRootName = newRootInfo.getAttribute("name");
              String newRowName = newRootInfo.getAttribute("rowName");
              //Retrive information on element to be built in the new document
              NodeList newNodesRetailer = retailerRoot.getElementsByTagName("element");
              //Create the final root element with the name from the file
              Element newRootElement = newDoc.createElement(newRootName);
              //Retrieve all rows in the old document
              NodeList oldRows = dataRoot.getElementsByTagName("row");
              for(int i=0;i<oldRows.getLength();i++){
                   //Retrieve each row in turn
                   Element thisRow = (Element)oldRows.item(i);
                   //Create the ner row
                   Element newRow = newDoc.createElement(newRowName);
                        for(int j=0;j<newNodesRetailer.getLength();j++){
                             //For each mode in the new mapping, retrieve teh information
                             //First the new information........
                             Element thisElement = (Element)newNodesRetailer.item(j);
                             String newElementName = thisElement.getAttribute("name");
                             //Then the old information
                             Element oldElement = (Element)thisElement.getElementsByTagName("content").item(0);
                             String oldField = oldElement.getFirstChild().getNodeValue();
                             //Get the original values based on the mapping information
                             Element oldValueElement = (Element)thisRow.getElementsByTagName(oldField).item(0);
                             String oldValue = oldValueElement.getFirstChild().getNodeValue();
                             //Create the new element
                             Element newElement = newDoc.createElement(newElementName);
                             newElement.appendChild(newDoc.createTextNode(oldValue));
                             //Retrieve list of new elements
                             NodeList newAttributes = thisElement.getElementsByTagName("attribute");
                             for(int k = 0;k<newAttributes.getLength();k++){
                                  //For each new attribute, get the order information
                                  Element thisAttribute = (Element)newAttributes.item(k);
                                  String oldAttributeField = thisAttribute.getFirstChild().getNodeValue();
                                  String newAttributeName = thisAttribute.getAttribute("name");
                                  //Get the original vale
                                  oldValueElement = (Element)thisRow.getElementsByTagName(oldAttributeField).item(0);
                                  String oldAttributeValue = oldValueElement.getFirstChild().getNodeValue();
                                  //Create the new attribute
                                  newElement.setAttribute(newAttributeName, oldAttributeValue);
                             //Add the new element to the new row
                             newRow.appendChild(newElement);
                        //Add the new row to the root
                        newRootElement.appendChild(newRow);
                   //Add the new root to the document
                   newDoc.appendChild(newRootElement);
              try{
                   out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                   out.ptintln("<!DOCTYPE orders SYSTEM \"RetailerXml.dtd\">");
                   out.println(newRootElement.toString());
              } catch(IOException e) {}
    %>
    </body>
    </html>

    it reminded that there were some mistakes when i run this JSP program,so it must have something wrong, but due to my weak programming skills, I can not found these mistakes out. That must give me very useful help if you tell me how to solve them. thank you vrey much!

  • Help needed in executing the java/jsp program from UCM .

    Hi ,
    I have a .jsp program running in my Jdeveloper which when executed pops a window to browse and select files and with few custom options .
    But i want to execute that Program from within UCM (create a new jsp page in UCM OR provide link ? i am not sure .... ) , could anyone help on how i can execute/run the program from UCM ?
    thanks in Advance
    Plaxman

    If your jsp makes use of jars you may want to look into using a WAR instead. You can check the WAR into content server and there is even a link on the administration page for JSP Web App Admin. Treating the JSP(s) and jar(s) as an entity may be a more successful path for you.
    You can find some jsp examples and ever a war example in this directory: <install root>\samples\JspServer
    And the briefest of help about that stuff here: [http://localhost/idc/help/wwhelp/wwhimpl/js/html/wwhelp.htm|http://localhost/idc/help/wwhelp/wwhimpl/js/html/wwhelp.htm]

  • The requested resource (/DBTest/SearchInventory.jsp) is not available.

    Hi,
    I have a search screen (jsp page) which has four fields to base the search on. Once the "Search" button is clicked, i am going to a servlet which does a select based on the search criteria, and stores the result in a ResultSet object. I then use the setAttribute method to store the result set in a bean. Here is the code for what i've just described:
    rs=stmt.executeQuery(QueryStr); //get result set
    HttpSession session=req.getSession(true);//create session var
    session.setAttribute("s_resbean",rs);//set bean attribute
    After this is set, i want to forward/redirect (whatever works...nothin does right now...the reason for this post.) back to the search screen(jsp page), and display the query ResultSet in the bottom half of the screen. I use the following code to do this:
    String url="/DBTest/SearchInventory.jsp";
    RequestDispatcher dispatcher=getServletContext().getRequestDispatcher(url);
    dispatcher.forward(req,res);
    Unfortunately, this gives me the following error:
    The requested resource (/DBTest/SearchInventory.jsp) is not available.
    Why would this be happening?? Is there another way of doing this? I'm just trying to follow the example in chp.15 of the free coreservlets pdf...
    Thanks in advance,
    Aditya.
    P.S. Here is the code for my bean...don't know if it's needed...
    public class SearchBean extends HttpServlet{
         private int searchFlag=0;
         private ResultSet searchRS;
         public SearchBean(){
         public int getSearchFlag(){
              return searchFlag;
         public ResultSet getSearchRS(){
              return searchRS;
         public void setSearchRS(ResultSet rs){
              this.searchRS=rs;
         public void setSearchFlag(){
              this.searchFlag=1;
    }

    I assume DBTest is the context root for your webapp.
    ServletRequest.getRequestDispatcher(String url) is looking for a url relative to the context root. Therefore if my assumption is correct you want to use the url /SearchInventory.jsp, removing the DBTest.
    HTH.

  • The requested resource (/mytest/test.jsp) is not available.

    JSP and Java are NEW for me.
    I have prepared Linux server with Tomcat and Apache servers, connect it to using mod_jk.
    Apache and Tomcat are work fine following LINK.
    http://localhost/examples/jsp/
    But , when I access JSP from my folder which I made it same folder "examples" is not working.
    http://localhost/mytest/test.jsp (This is my folder which i want to call all my JSP file.)
    It display following error message:
    Apache Tomcat/4.0.4 - HTTP Status 404 - /mytest/test.jsp
    type Status report
    message /mytest/test.jsp
    description The requested resource (/mytest/test.jsp) is not available.
    What can i do, HELP ME.

    I STILL have some problem with JSP.
    I have prepared Linux server with Tomcat and Apache servers, connect it to using mod_jk.
    Apache and Tomcat are work fine following LINK.
    http://localhost/examples/jsp/
    But , when I access JSP from my folder which I made it same folder "examples" is not working.
    http://localhost/mytest/test.jsp
    (This is my folder which i want to call all my JSP file.)
    It display following error message:
    Apache Tomcat/4.0.4 - HTTP Status 404 - /mytest/test.jsp
    type Status report
    message /mytest/test.jsp
    description The requested resource (/mytest/test.jsp) is not available.
    What can i do, HELP ME ???

  • How to send mail using jsp program

    am very new to jsp and doing my final year project. i need to send mails using my jsp program.can anyone say wht to do that is wht to include to send mails using jsp program. n also a sample code to send mail using jsp program.
    Thanx in advance

    Use below script.
    <%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
    <%
    Properties props = new Properties();
    props.put("mail.smtp.host", "mailserver.com");
    Session s = Session.getInstance(props,null);
    InternetAddress from = new InternetAddress("[email protected]");
    InternetAddress to = new InternetAddress([email protected]");
    MimeMessage message = new MimeMessage(s);
    message.setFrom(from);
    message.addRecipient(Message.RecipientType.TO, to);
    message.setSubject("Your subject");
    message.setText("Your text");
    Transport.send(message);
    %>{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Jsp program on tomcat

    I am having trouble with a simple jsp program on tomcat. I have one Java bean class that the jsp cannot find. It is in the classes directory under WEB-INF. I have tried it with and without my web.xml file and I get the same error.
    org.apache.jasper.JasperEXception:  Unable to compile class for JSP:
    An error occurred at line: 5 in the jsp file: processFormData.jsp
    The import Inn cannot be resolved
    <%@page language="java"%>
    <%@page import="Inn"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitiional//EN />"
    <jsp:useBean id="inn" scope="request" class="Inn"/>
    <jsp:setProperty name="inn" property="*" />Julie

    Thanks. I'm not sure I understand why, but that was the problem.

  • HT5100 I have an ipod shuffle, obviously it does not play video, can i use my shuffle to play the audio part of an i-tune u course that normally comes in video format? To put it differently, if i-tunes course available as video can I download the audio po

    I have an ipod shuffle, obviously it does not play video, can i use my shuffle to play the audio part of an i-tune u course that normally comes in video format? To put it differently, if i-tunes course available as video can I download the audio portion of an itunes video?

    Welcome to the Apple Community.
    Unfortunately not.

  • I am not able to run JSP program

    hi
    I have done some jsp programs. i have installed tomcat 5. but when i tries to
    execute jsp program it gives error as " Unable to get jstl ". it is not getting jasper-comppile.jar file.
    Please any one can tell me how to specify path for jasper-compile.jar
    thanking you

    Set the proper classpath.
    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Configuration

  • How to run BC4J JSP programs generated by JDeveloper 9i?

    I used JDeveloper 9i to:
    Create a new Project Workspace
    Create New Business Components
    Click on Run, Run Project
    The Java application works perfectly alright.
    Click on New, BC4J JSP, Business Components JSP Application
    Then a full set of JSP source code is generated based on the Business Components Java Application.
    Right-click on main.html, Run main.html
    I can see that deployment of the JSP programs is OK but the Internet Explorer does not start the main.html.
    I enter address: http://localhost:8988/ in Internet Explorer and can see that OC4J is running.
    I would like to enter the path of the deployed JSP program.
    How can I know what is the path of the URL?

    I have change the settings in tools->preferences to point to the right location, i.e.
    C:\Program Files\Internet Explorer\IEXPLORE.EXE
    Internet Explorer does not start after it shows:
    C:\oracle\ora9ids\jdk\bin\javaw.exe -ojvm -classpath C:\oracle\ora9ids\j2ee\home\oc4j.jar -Dhttp.proxyHost=hqproxy.vtc.edu.hk -Dhttp.proxyPort=8080 com.evermind.server.OC4JServer -config C:\oracle\ora9ids\jdev\system\oc4j-config\server.xml
    [Starting OC4J using the following ports: HTTP=8990, RMI=23893, JMS=9229.]
    [waiting for the server to complete its initialization...]
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    ApplicationServer: appName = bc4j
    ApplicationServer: appName = current-workspace-app
    ApplicationServer: appName = bc4j
    ApplicationServer: appName = current-workspace-app
    ApplicationServer: appName = bc4j
    ApplicationServer: appName = current-workspace-app
    ApplicationServer: appName = bc4j
    ApplicationServer: appName = current-workspace-app
    ApplicationServer: appName = bc4j
    ApplicationServer: appName = current-workspace-app

  • Need jsp program

    I want JSP program to display Random image in my browser...Please someone help me ..
    NOTE: Only JSP program..No need Servlet pgm

    you already know how to. seriously, just combine the two. that's what programming is: knowing how to perform small coding tasks, and how to combine them to perform larger ones
    you really, honestly, I promise, already know how to do this. ok, a clue: have the url of all your images in a list, and choose which one to display at random

  • Can anyone clarify my doubt in a simple JSP Program ?

    when we write a simple jsp program such as helloworld.jsp does a
    class file or servlet be created when we run the jsp program using a
    web browser and Tomcat ? if so please tell the folder(path) in tomcat
    where this class file will be located or stored .Thankq

    JSPs will (usually) be compiled into class files representing Servlets, yes. But that's something that happens internally inside the application server and shouldn't concern you.
    Why would you need to know where it resides? It seems like a code smell if you need that information.
    If you're just curious, then look into the work directory of your tomcat.

  • How to run jsp program

    is i can able to run my jsp program by using appache server..

    To get JSP working in Apache HTTP Server you have to install Apache Tomcat.
    You can either choose to run JSP's solely on Apache Tomcat, or to use mod_jk2 to link Apache HTTP Server with Apache Tomcat so that the Apache HTTP Server can forward the JSP requests to the Apache Tomcat engine, because the Apache HTTP Server really doesn't know how to compile/run JSP's.

  • Hi i have a LG 3D SMART TV that i was runing nero home media 4 from my old windows laptop, this software wont now run from my macbook pro, does anyone know if a program is available i can use preferably for free

    HI i recently purchased a macbook pro to replace my old laptop running windows.
    the problem i have is i have a LG SMART 3D TV which i was running nero media home 4 on from my old laptop, i have tried to install this program on my macbook but is it not compatible.
    does anyone know which program is available to run from my apple product to smart tv in a similar way..... preferable free
    regards
    steven

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • Debug a jsp program in wsad

    Hi ,
    Plz tell me how to debug a jsp program in wsad and how to add a break point in it.

    Try a fresh install of JDeveloper 10.1.3.3
    And a new project with this JSP:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
        <title>untitled1</title>
      </head>
      <body>
      <% String a = "hello";
      if(a.equals("shay")){
      a="boo";
      %>
      </body>
    </html>breakpoints work for me.
    If they still don't work for you try running [jdev-root]\jdev\bin\jdev.exe and let us know if you see any errors on the command line window.

Maybe you are looking for

  • After Effects CS6 11.0.2 crashes when using the pen tool (Mac OS X 10.8.2)

    I'm using After Effects CS6 11.0.2 on Mac OS X 10.8.2. Whenever I use the pen tool to add a vertex, the application crashes. I've submitted several crash reports to apple (they get sent to apple automatically when the app relaunches). My specs: iMac

  • CALL TRANSACTION in user dialog

    Hi! I'm having problem to use syntax CALL TRANSACTION in user dialog (SE80).  My syntax is as follows: CALL TRANSACTION 'F-43' USING BDCDATA MODE 'N' UPDATE 'S'           MESSAGES INTO t_msg. My problem is I cannot execute this syntax in background m

  • Swf compilation Failed.

    How do I get rid of this error!!!! I have read through your discussion thread for hours and see tons of people with this issue. I see no explanation of how to resolve it. What good is this program if I can't use it? I have re-installed Captivate, Upd

  • [Solved] ADFBC validation when your data isn't normalized

    Hello - I'm working on a ADFBC/JSF app (using JDev 10.1.3.3) where I am developing a JSF page to edit data for a table whose data is denormalized. I'll explain using the EMPLOYEES table in the HR sample schema. Change EMPLOYEES to... a. Add a column

  • Validation Rule: Department cannot have more than 5 employees

    Say there is a LOV of departments. User will select one department, and employees connected with that department will be displayed in the table below. Then there will be a button to create an employee. Once entering the data, the user will press Save