Swing in JSP

Hi All,
I am having a .jar (swing) application need to make it web-base by jsp.
Does anybody have any idea how to display a swing application in jsp?
Thanks & Regards
Ritesh

It depends what kind of interactivity you want. Another possibility is to use the swing/awt graphics stuff to build an image file. The JSP then uses an IMG tag with the source pointing to a servlet which builds the image.
But it's essetial to understand that what a JSP does is to build an HTML page, which is delivered to the browser after the JSP has run. A JSP can't interact with the user. The user makes another, separate request to the server to move on.

Similar Messages

  • Swing and jsp

    hello world
    i have a projet web application with jsp. how integrate swing in jsp?
    thank you in advance

    hello world
    i have a projet web application with jsp. how
    integrate swing in jsp?
    thank you in advance1)You can Send a POST Request Using a URL
    http://www.javaalmanac.com/egs/java.net/Post.html
    2)You can get Text from the server
    http://www.javaalmanac.com/egs/java.net/ReadFromURL.html
    3)You can get Cookies
    http://www.javaalmanac.com/egs/java.net/GetCookies.html
    4)You can send cookies
    http://www.javaalmanac.com/egs/java.net/SendCookie.html
    5)You can view html pages using JEditorPane.
    also check
    http://www.javaalmanac.com/egs/java.net/pkg.html
    You need to write and handle everything

  • Swing or JSP

    Iam making a application for my company which will be accessed by more than 300 centers all over country. So the GUI I would make should use JSP or SWING . What are the pros and cons of each. The application will be dealing Finance matters.So at client end SWING or JSP ?
    Plz Help me

    To give you a good answer I would need a lot more information, but right now it sounds like your best bet is to use JSP. Here are two enormous reasons why:
    1) You will not have to deploy any software at the client end - as long as they have a web browser they will be able to connect. They do not even need Java support. This has several related advantages, including that you will never have to deal with "updating" the clients - you can change the code on your end freely.
    2) The total amount of work you put into it is probably going to be a lot less. Since you are just using HTML and not writing a GUI proper, it will be a lot easier.
    The main reason you might discover that you do NOT want to use JSP is that it limits your functionality. For example, if you decide you need an interactive chat room you are going to end up coming back to Swing and deploying either an applet, Java Web Start app, or standalone application... unless you do not mind it being a really crappy chat room.
    Drake

  • AWT/Swing in JSP

    Can we use Abstract Window Toolkit(AWT) or Swing classes in JSP? If is it so, is it preferable to use those in jsp?
    Details are welcome.
    Thanks

    Yes and no. It really depends what you are talking about. There is less than no point trying to run any of the AWT windowing stuff because you are not generating a Java front end you are generating an HTML front end. Java UI components would just not work in that context- the UI would only appear on the Server, not on the client side. Unless you wrote it as an applet, at which point it has nothing to do with jsp and becomes and applet programming question.
    If you are talking about the image processing APIs then yes, I have used those and it was quite tricky because I was trying to run it on a server that did not have X windows running on it and AWT needs that to run properly.

  • Swing or JSP/Struts application?

    I'm deploying an application for a public hospital in Argentina and i have doubts about the framework to use.
    The application will be used in very old computers (pentium I/II or older) but will count with a good server (bought specifically for this use).
    This limitation of hardware also has made me rethink the election of the framework of persistence. It would be appropriate to use hibernate?
    I'll appreciate if you can help me with this decisions.
    Adriana

    To give you a good answer I would need a lot more information, but right now it sounds like your best bet is to use JSP. Here are two enormous reasons why:
    1) You will not have to deploy any software at the client end - as long as they have a web browser they will be able to connect. They do not even need Java support. This has several related advantages, including that you will never have to deal with "updating" the clients - you can change the code on your end freely.
    2) The total amount of work you put into it is probably going to be a lot less. Since you are just using HTML and not writing a GUI proper, it will be a lot easier.
    The main reason you might discover that you do NOT want to use JSP is that it limits your functionality. For example, if you decide you need an interactive chat room you are going to end up coming back to Swing and deploying either an applet, Java Web Start app, or standalone application... unless you do not mind it being a really crappy chat room.
    Drake

  • Can i use swing under JSP?

    i have a JSP, now my question is, can I display swing components under JSP?

    A JSP is just a way to write HTML back to browser.
    It is a mix of HTML and java.
    A JSP is converted to a java source file, with code like:
    out.println(".... HTML code you wrote ...");In this way a java application writes back to the client browser on a page request.
    A totally different mechanism are either a java applet (embedded in an HTML page),
    or Java WebStart, which distributes entire java applications via the net.
    If you are familiar with Swing, or have an existing Swing application, or need a
    user friendly GUI, those are the ways.

  • Application UI Design using Swing or JSP

    I am in the Design phase of my first project. the technology involved is not defined and the team(of 2) is not sure what would be best to use. we got to work on a staging table. mostly updating it. one complete partition(can have as many as 100K rows) has to be displayed in the UI. once it is updated the effected rows need to be inserted/updated to another permanent table, both in Oracle.
    so in short, the GUI should allow sorting and filtering options to the user to work on the staging table records. I am not sure how JSP's will fit into this piture. the network traffic is a big concern here.
    we might go with Swing Jtable. will that be feasible for this kind of UI? also can this be implemented using MVC(can be struts?) or just Model 1 architecture should do?
    I thought of using hibernate for the ORM but the DBA told that the schema is a bit conplex to work with hibernate. so i might be using plain JDBC prepare statements.
    can anyone put some light based on there experience.
    suggestion and views are welcome!

    Triple-post:
    http://forum.java.sun.com/thread.jspa?threadID=5246519
    http://forum.java.sun.com/thread.jspa?threadID=5246518
    http://forum.java.sun.com/thread.jspa?threadID=5246520

  • Swings to JSP conversion

    We have a huge swing application which was developed long back, Is there any tool where in we can convert the swing GUI into JSP. We need only the frontend to be changed , the business logic remains same in the back end

    yeah, JSP is not a front end GUI... HTML is the front end GUI. And there's sure no simple way to convert Swing to HTML. There's not very many overlapping components, except labels, text fields and comboboxes. If you could write a converter to do that, I bet you could make some money off it.

  • Failed to open a swing JSP file but a dialog box prompt to download jsp

    Hi gurus,
    I have encountered one strange problem where previously I have installed JRE 1.4.2.0.6 for running my form 10g application.
    I 'm currently testing an ADF swing application in a 3 tier model using version 10.1.3 which require JRE 1.5 but when I try to load http://localhost/swing/oc4j.jsp, it will prompt up with the message:
    Some files can harm your computer. If the file information below looks suspicious or you do not fully trust the source, do not open or save this file
    would you like to open the file or save it to your computer?"
    In normal case, it will do a download of the jar file to the client machine and open the swing application using java web start but it seems the problem is related with my previous installation of 1.4 . Even though I have completely uninstalled JRE 1.4 and install JRE 1.5 , I cannot run the ADF swing in 3 tier which is seems to be in relation with the signed jar.
    Ana

    Ana,
    seems that the client doesn't recognize the Mime type for JavaWebstart. Try on a different client. JavaWebStart works for me when I test it on my machine with ADF Swing.
    Frank

  • JSP and Swing

    Hello friends,
    I am developing a web interface for a knowledge base. Now I have designed my interface in Java Swing. The main reason for choosing Swing is that I need JTree in my program.
    I would like to know whether we can use this swing files inside JSP? If not, How to create tree structure in JSP,in which nodes are added according to the values in the database?
    Another doubt is that, can we use swing for web applications?

    You can't use swing with JSP. JSP produces (mainly) HTML pages to run through the browser.
    With JSP no Java is run on the client machine, so Swing objects are out of the question.
    You have two options:
    1 - If you want to use swing, you will have to write it as an Applet / Application (run java on the client)
    2 - Investigate javascript/dhtml tree structures - there are several around. And it has been brought up several times on this forum.
    Good luck,
    evnafets

  • When JSP's when Swing

    Hello,
    a question has raised within our organisation. The question is very simple and has to do with intranets !!
    When does one use Swing, when JSP's. What are the strong points of both, what are advantages, disadvantages.
    f.i. With Swing (client) the application has to be installed on the clients computer, with JSP's (web) this is not neccesary.
    Perhaps somebody knows articles, or any answer to this,
    regards,
    Jettro

    Perhaps you gave your answer yourself: JSP or server applications in general are easier to maintain, because the have not to be installed at clients. Swing applications are more comfortable - nearly like native Windows applications.
    So if many people should use the application rarely, your choice should be JSP or Servlets. In the opposite case, your choice should be Swing.
    Anyway - the very best thing is to choose a strategy where you can do both by the same coding!
    Christoph

  • How to get the system time in a Swing application ?

    I know how to do it in JavaScript, but not java. Please help me, and also how to get the system time in an Applet. Thanks !!!

    Check this link, I hope it helps
    http://202.71.136.142:8080/globalleafs/Swing/View.jsp?slno=22&tbl=0

  • Ideas pls for a small application on java and jsp?

    hi ,
    I would like to create an application which for resume. I would like to codify the java code . The java code should be able to autogenerate jsp file's since the output of the resume would be on an jsp page. To add it simply a wizard for dynamic resume creation using java swings and jsp. Code for jsp should be autogenerated please note it.
    Ideas please!
    Thanks in advance

    I'd like to add more information to Patreck's suggestion.
    JSP pages are wonderful if you need the web server to perform some actions before sending you the final web page.
    Here, you don't need the web server to do anything because your Swing application can do it for you. As Patreck implies, Swing can make a connection to the database, retrieve any information you want, perform whatever logic you need, and write the output to an HTML file.
    To give you an example, you can use Internet Explorer to view a basic web page on your hard disk. You can also use Microsoft Word to view the same basic web page. They both do the same task and there is no need to force IE to use its Word plug-in in order to view the web page.
    JSPs are not necessary because Swing will do all of the work for you. You only need JSPs if you want people to use your program through a web browser because they can't do Swing inside a web browser. You should only use one or the other, not both. Understand now?
    If you really really must generate JSP code from a Swing application, then just write out the JSP stuff in the file. For example...
    public void createWebPage( Printwriter pw, String myName ) {
       pw.println( "<% String myJSPName = \"" + myName + "\" %>" );
       pw.println( "<HTML>");
       pw.println( "<HEAD>");
       pw.println( "<TITLE>My Resume</TITLE>" );
       pw.println( "</HEAD>");
       pw.println( "<BODY>" );
       pw.println( "<H1>My name is " + myName + " and my JSP name is <%= myJSPName %></H1>" );
       pw.println( "</BODY>" );
       pw.println( "</HTML>" );
    }As you can see, it's pointless to embed JSP when you can do all the programming within Swing first and just write out the correct response.

  • How to use Swing in a web Application

    Can you suggest me some good PDF/tutorial or some good site for reading about using SWING in a Web Application.
    In our web application we plan to use JSP/Struts for the presentation layer. However there are a few screens that require some advanced UI like color coded assets and a graphical version of Outstanding Vs Available limit. We are wondering whether we should use SWING for these screens. Do you think this is a good idea or is there a better apprach to deal with this
    What are the disadvantages of using SWING VS JSP/Servlet in a Web environment. Is there a site or pdf where i can get information about this.

    I'd say the biggest disadvantage is that your client machines have to download and install the bloody java plug in.
    What you write about your UI ain't half vague. What the deuce is a "color coded asset"? Is it
    interactive? If not, could it be represented by an image? If so, even if it is a non-static image, it is a simple
    matter for your webapp to generate the image on the fly. Many web app tutorials demonstrate that.

  • How to use Swing in a Web applicatrion

    Can you suggest me some good PDF or some good site for reading about using SWING in a Web Application.
    In our web application we plan to use JSP/Struts for the presentation layer. However there are a few screens that require some advanced UI like color coded assets and a graphical version of Outstanding Vs Available limit. We are wondering whether we should use SWING for these screens. Do you think this is a good idea or is there a better apprach to deal with this
    What are the disadvantages of using SWING VS JSP/Servlet in a Web environment. Is there a site or pdf where i can get information about this.

    Applet/HTML page combinations are used often when a portion of a page requires Swing/AWT capabilities, e.g. administration consoles for Weblogic and JBoss are designed this way. The page is typically divided with frames that contain either applet or HTML code.
    A

Maybe you are looking for

  • F4IF_INT_TABLE_VALUE_REQUEST- how to add Maximum No. of hits

    Hi Experts, I am using F4IF_INT_TABLE_VALUE_REQUEST. Can someone please help me. I am getting 2,100 hits I need to limit it to 500 hits. There is no Maximum number of hits when you click the Downward pointing arrow above the toolbar. How can I add th

  • Lync 2010 client asks for credentials when outside of corporate network.

    Hello,  We are running Lync 2010 Enterprise. Everytime our Lync users are outside of our network and they log in to their Lync client, they get a pop-up window asking for credentials. When they log into Lync inside our network the Lync client connect

  • Doubt I purchase another Insignia

    I purchased an Insignia television with DVD player built into the side. I am really wishing I would of bought a different brand. For starters the volume stinks! I can have it turned all the way up and still need it louder. I have never had surround s

  • HT201263 now when I try to restore from recovery I get a code 3014 and it will not restore?

    The screen only shows a usb cord to an itunes logo and it results in a code 3014 when i connect and try to restore from recovery mode. I am trying to get my phone back after trying to update today through itunes I-phone 3GS

  • Dynamically Declared Properties in PS CS3's plug-in

    Now Im developing a plug-in for Photoshop CS3, and I want to dynamically change its properties rather than statically define them in PiPL. But Photoshop never send message "SP Properties" to my plug-in, so I have no chance to handle SPPropertiesMessa