JSP vs. standard desktop java application

I'm designing an application to examine and analyse stock trading data and I'm trying to choose between writing a standard java application and writing a jsp. I was wondering if someone could help me get an idea of the disadvantages and advantages of choosing one over the other. i know that this is very vague, but i just wanted to get an idea of why you would choose one over the other
thanks,
ab

If you create a web application with JSPs/Servlets/etc., there are three main benefits:
-- You don't have to install it on everyone's computer, and therefore don't have to really worry about whether or not it's compatible. If they have a web-browser -- and everyone does -- then they can access your application.
-- Along the same lines as above, users can access the application anywhere, from any computer with a browser. Someone could access the application while on vacation across the world without having to install anything. This also helps if your application requires resources that are on an internal network -- as long as your web application server has access to that network, users don't have to be.
-- Very easy to update everyone's application. Simply update the server, and voila, it's updated for everyone using it.
If you alternatively create a desktop application, you get the following benefits:
-- Faster. Since everything's running on the JVM, your application doesn't have to rely so heavily on its Internet connection.
-- Cleaner interface. You can develop snazzier interfaces more easily using Swing/JFace. Interesting interfaces with bells and whistles are more difficult using JSPs because you're limited by what a browser can render and what DHTML (JavaScript, CSS, and HTML) can accomplish. One trivial example is, in Windows XP, letting an application have an icon in the taskbar. Little things like that can really endear an application to a user.
-- Probably a more elegant and efficient application design. This has to do with how web applications require you to conform to the Server-Client protocol. Everything is client-driven in web applications -- you cannot have the server initiate any conversation; the server can only answer client-requests. Desktop applications are also easier to debug.
Hope that helps a bit : )
Jim

Similar Messages

  • File Upload from a desktop java application

    Hi,
    what I want to achieve is, to upload a pipe-delimited text file from my desktop java application to my hosting server, and then on the server, I have a PHP page that would parse this file and insert records to the database.
    so, on the server, I can enable write access on the folder which I want to upload the file to,
    but how do I upload a file from my desktop application.
    Thanks

    HttpURLConnection conn = (HttpURLConnection) _url.openConnection();this code open a http connection, and what is left is to fill in http protocol things (e.g. content type, content length, POST/PUT or whatever method...etc). after you set the correct request header then open a output stream and pass your files and flush the connection then close it.... in theory (never tried sending files, only done handling POST http form requests with it but it shouldn't be too much different when it is http protocol)
    you may want to install Fiddler2 into your browser, it can filter out the browser outgoing and incomign information and you can take a little read in their header and see how they interact with each other

  • Connecting to desktop Java application from R/3

    I want to connect to a java application program in my desktop and return a parameter to R/3. I have installed Java connector and I want to call the java application from R/3 using Java connector.
    I was able to get few samples to setup the RFC destination for a remote server program, but I was not able to find anything for an application in the client system. How to setup the RFC destination for a Java connector to call the application in the desktop? Can anyone please answer this question.

    Hi Allam,
    1. Why do you need to connect from backend system to your desktop client? Did I understood it correctly that it's exacly what you want to do?
    2. I guess examples you saw are for JCO or JCA which is a part of SAP J2EE server. Simply speaking the server is waiting for a client request and your desktop application probably not. If you still are sure that server->desktop connection is what you need then you have to emulate the server on your self and then depending on what you need JCO/JCA you have to create a kind of container that will implement listening service.
    I'd like to hear your answer for question one to give you more detailed answer.

  • How to open JSP session from a java application or an applet?

    Hi,
    My problem is a bit challenging (at least for me) and its not about JSP but it is about a web application..
    I couldnt find a better place to post this question I am sorry if this is not the right place to post it..
    I need to enable users log into my website by checking username and password and reading and checking the data from a usb device located in client computer.
    I can read from the device thorough JNI using the third party DLL file for the device... I have no problem with that..
    Since I need to make native calls I am planning to develop a java application so I let the users open the application using web start.. Once my application is running on client side after reading the device and getting login password information (assuming login information correct), How can I open a web session for the that spesific user and a web browser and let the user browse the web site on his/her own session?
    I would appreciate any guidance..
    Thanks..

    add the values in the header using...
    response.addHeader("userNmae","XXXX");use it in all ur pages like say..
    if(!request.getHeader("userName")!=null && request.getParameter("userName").equlas(""))
    String username=request.getParameter("userName");
    }

  • Bluetooth desktop java application cant grap my USB bluetooth adapter

    Dear all, I want to develop an application that can use bluetooth to send file to mobile user. I have make use of aventana bluetooth classes to call for the LocalDevices.getLocalDevice()
    but unfortunately, the device that it return to me is not my USB bluetooth adapter (the device name called "localhost", which i think is just a virtual bluetooth devices)
    may i know how can i point my java program to make use of my usb bluetooth instead of that "localhost" ?
    my computer
    windows xp sp2
    jdk 1.5.0_09
    netbean 5.5 (with mobility pack)
    some other forum ppl, telling me that i can only use the winxp sp2 bluetooth stack, request me to remove the additional driver. I did that, and the result is....my usb bluetooth become an unrecognized device....
    Message was edited by:
    e-Biau

    Hi
    Take a look to this links:
    Developing Bluetooth Applications with LabVIEW
    http://zone.ni.com/devzone/conceptd.nsf/webmain/5E​B9312A6470F16A86256E7500726F15?opendocument
    Overview of Bluetooth Client/Server Networks
    http://zone.ni.com/devzone/conceptd.nsf/webmain/79​F65241EDB4F7C586256AB6006703CB?opendocument#3
    Let me know if you will have some problems.
    Beppe

  • Google Maps in a Java Application

    I currently have a setup involving MapViewer where we generate maps and display the images within a desktop Java application. I was asked to look into adding Google imagery to these maps. I know that you can use the Google map tiles in a javascript based map (discussed on the Oracle Maps blogspot), but I was wondering if anyone had attempted doing this in just a client side application?
    Basically has MVGoogleTileLayer been implemented in the Java library for MapViewer or is there something I can do to implement the same functionality in the same way? Any pointing in the right direction or confirming this either way would be greatly appreciated. Thank you.

    In Google's terms of service they say that the following would violate the license restrictions:
    "10.8 use the Static Maps API other than in an implementation in a web browser;"
    Am I just misinterpreting this?
    I would still need to show a layer from my database on top of any imagery I get from Google so I would still need to get the Google Static Map request to run through MapViewer. We currently have a few other services where we are using them as WMS themes and that's kind of what I was trying to explain that I was looking for.
    So I guess two follow up questions: 1) Is it possible to use the Google static maps to accomplish this 2) Is it legal to use the maps to accomplish this?

  • Playing Flash movie in my java application

    Hello All,
    I want to play mini flash movies in my desktop java application...
    is this possible ???
    Thanks in advance.

    similar with... these pages hope could be used for your answer...
    http://forums.sun.com/thread.jspa?threadID=506237

  • Running Java applications from within JSP

    Hi Folks,
    First of all, apologies if this post is either 1) in the wrong forum or 2) a horrendous mis-application of java/JSP :D
    I have a java test harness application that I have created, it runs from the command line, taking two arguments (the name of the app you want to test and the location of the properties file) and it then looks up the app in the properties file and tests the application - writing results to html reports and errors to logs... all pretty standard so far.
    The apps i normally test are usually on an app server (normally IBMs WAS), so I thought, why dont I create a Web Application with a nice JSP page listing all the applications that can be tested(extracted from the properties file) and allow the user to go to the jsp and just click the "test this service" button or "view results" button for any service - just to make it more manageable.
    So I have created the JSP page with the list of applications, and the links to all the result.html files - so now I just need to implement the functionality to be able to hit the link "Test now" and the test harness runs in the background.
    Does anyone please have any ideas?
    The best i came up with was creating a link to a new jsp page that had the code on it to create the main Test Harness object and then calling the execute() method - however, when i press the link i get taken to the page but my tests arent run? (this test was run on Tomcat if that makes any difference)
    Any ideas? of any better ways to approach the task?
    Thanks in advance guys!!

    Start with Java EE tutorial part II: [http://java.sun.com/javaee/5/docs/tutorial/doc/bnadp.html].
    To create a Servlet you basically just extend HttpServlet and implement the appropriate methods, such as doGet() for GET requests and doPost() for POST requests. To run it, you need to define it in the web.xml and map it on an appropriate url-pattern with which you want to invoke the servlet by URL.
    To fullfill your requirement, I think implementing doGet() ought to be sufficient. E.g.
    yourpackage.YourServlet.javaprotected void doGet(HttpServletRequest request, HttpServletResponse response) {
        YourJavaClass yourJavaClass = new YourJavaClass();
        Object someResult = yourJavaClass.doSomething();
        request.setAttribute("someResult", someResult);
        request.getRequestDispatcher("yourPage.jsp").forward(request, response);
    }yourPage.jsp<p>Result: ${someResult}</p>web.xml<servlet>
        <servlet-name>yourServlet</servlet-name>
        <servlet-class>yourpackage.YourServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>yourServlet</servlet-name>
        <url-pattern>/yourServlet</url-pattern>
    </servlet-mapping>Invoke it by [http://localhost:8080/yourContext/yourServlet].

  • Java-Application send a param value to a JSP

    Hi All
    I'd like to ask you if can possible to send a param value from Java-Application to JSP file, If yes please provide me with any example or notes. I know that there are a contribution for a communication with an applet to JSP, but with application i don't know.
    Thank you

    Check this out...
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets5.html#73895

  • Java Application working fine,JSP App. throwing error for same reference

    hi all
    i had written java(window) application and jsp(web) application with the same reference(third party reference)
    Java Application is working fine but when i try run JSP application the following error came up
    java.lang.NoClassDefFoundError: com/documentum/fc/client/DfClient
    could any one help me out of this issue? i am in very need of that one it will be very helpfull to me.
    Thank You
    Regards
    Oersla Afrzoe Ahmed

    hi thanks for reply
    cant i put the reference to the JAR Files(such as classpath e.t.c.,) so that all my JSP Application take a reference from thier?
    is that i have to copy all my jar files physically to al my each individual JSP application web-inf/lib folder?
    how to find out where my particular JSP App. web-inf folder exists?
    Regards
    Oersla Afroze Ahmed

  • Calling java application from jsp using onUnload

    I have tried to find the answer to this by searching many jsp, js and java forums, but have not had much luck. I hope someone here can help out. I have written a jsp page that passes a sql string to a java application when it loads. That application creates an xml file (a report) and returns the filename, which is the target of an onclick event. What I want to do, is to delete the file when the page unloads. I have written a separate application that will delete the file, but onclick and onunload events apparently only take JavaScript commands. I have tried to embed the jsp code into an onunload event, but it runs when the page is originally loaded. In addition, I created a separate jsp page that deletes the file, and I call that page onunload using window.open(). I can set that page to self.close(), but I can't get the page to not show itself. Even if I set the height and width to 0 (or 1), it seems to appear 100X100. Can anyone give me any suggestions on what to do in this situation? Thanks.

    When my jsp page loads, I create the file using this code:
    String filename = printtasktest.createxml(closed,encodedSQLString);
    printtasktest is a java application on the server, that
    creates a file on the server, and passes the filename back to the jsp page. Later I use this filename as a target of an onclick event:
    <div class="button" onclick="printTask('<%=filename%>')">Print This Page</div>
    printTask() is a javascript function that opens the printable page using window.print() and self.close().
    The problem I have is that the file hangs around after, and I want to delete it when the user leaves the page.

  • Removing removal of standard image from Top Left from java applications

    Hello All!
    i am working on java application. i have to remove image(standard java image in every frame , dialog box and JOption Pane etc....).
    I'll be very thankfull if anybody can help me.
    Looking forward for early response
    Asima

    Hi Asima ,
    you can use:
    setIconImage((new ImageIcon("yourIcon.gif").getImage())); for JFrame.
    For JOptionPane and others where setIconImage does not exist you have to use the constructor which specifies the owner (your JFrame with yourIcon) so it uses that same Icon. If you want to remove the Icon completely you have to create your own icon as a blue (0,0128) square and use that.
    HTH
    Phil

  • Best design running multiple instances of desktop based java applications b

    Hi,
    I am not sure if this is the right forum...
    Please suggest on what should be the best design for running 10 instances of same desktop based java applications (No Enterprise or Webcomponents) on different machines BUT still using the same database.
    Summary:
    a) Each application will do writes/updates to same database but will run from different locations.
    b) These applications will reside at different locations (example country, city) but same domain, so it will use separate JVM.
    c) How to tell application where it resides and what should be the best way to determine location automatically from the network? (we would like to avoid any property setting as update will require to change this file also), if database is good approach, what should be the best design.
    d) Best way to handle transaction...
    for example, if one component that writes to an Oracle table, then a downstream component reads the new insert from the table. In this case what should be the best practice in the code for transaction awareness, to avoid issues.
    Thanks
    Val

    Oracle runs a transaction control model on a thread--each login. All other threads will not be able to see the data that is updated or inserted until a commit is done. The same thread can, however, see the updated or inserted information as soon as the update or insert takes place a transaction commit is not needed for that to happen and it is not an error--you must do a commit to make the changes to the data visible to other users and persistent. If you do not commit the changes they will rollback once your session is terminated.
    If you turn autocommit on, then each update or insert will automatically commit and be available to all users, but each statement becomes a transaction and you loose the ability to rollback any changes.

  • Start java application from jsp?

    is there any way i can have a JSP, bean or servlet start a java application on the server? maybe a better question is: what can i do to make sure that some class is always running on my javaserver? im talking about the server app. for a chat program that im making that will be an applet in a JSP page along with a load of other JSP pages that do other things...
    sorry for my incoherence. i usually talk better than this. :)
    Laz

    just replying so the message comes to the top of the forum... can anyone help me here?
    Thanks
    Laz

  • Creating WSDL for Java Application/ JSP Page

    I am looking for creating a Webservice(WSDL) for a Java application which connects to the R/3 System Backend. I have tried to connect to the Backend using JCO in JSP page and was successful, but I need to generate a WSDL file which when consumed performs the connection and looks up for the data in the Backend. The FrontEnd can be a JSP application or a Java Application in NetWeaver.

    The easiest thing to do is put it in a JAR file with an appropriate manifest. That way it retains cross-platform functionality, which is kind of the point of writing things in Java. The JAR file will be double-clickable.
    If you absolutely must put it in an .exe for some reason, there are applications on the web that will do it.
    Either way, a google search is your next step.
    Drake

Maybe you are looking for

  • More than 2GB of RAM?

    I have a 20"2Ghz iMac ALS with 2GB of RAM. Can I upgrade to 4GB? Thank you.

  • Windows Media Player for Mac.  How do I install?

    I just bought a Mac (switching from Windows based machine). If I go to a website that has video, it keeps telling me that I don't have the proper plug-ins and directs me to the Microsoft site. When I try to download the Windows Media player from that

  • SAP Query Infoset

    Dear All, I have created a SAP Query Infoset with ldp pnp, i have a customer infotype added to that infoset. One of my field in the customer infotype consist of value and text(meaning values are stored in the infotype, which also has some text attach

  • Please tell me how can  declare an array of object.

    how to create a two dimentional array object of a class. let, class abc{ abc(){ is it posible-- abc ss=new abc[10][10] please tell me how can declare an array object.

  • Error with executable using ActiveX object in ver 7

    I have a top-level VI (version 7 in WindowsXP) that contains an ActiveX control. This ActiveX object further calls several DLL's, one of which controls the serial port. SubVIs in the top-level VI call this ActiveX object via Invoke Node and Property