Can I use AWT and Applets in a J2EE project???

Hi,
I adore applets and the package AWT... And I would like to know if some way exists to integrate my applet with my application J2EE... I want to use these in the vision tier in a J2EE(EJB) project...
How can I make that my applet acts as an observing process of my model??? If the JVM will be informed on any alterations in the model will be the JVM of the server while my applet will be being executed for the JVM of browser...
[]'s
Ary Junior

I have a J2EE application, for which I have a module which is used by system administrators. this module is completly written in Java swing.
and it does talk to my EJBs.
If you don't have a firewall in your application, then you can directly make your applications in awt, swing and applets talk to EJBs. if you do have a firewall, then just write a web-service wrapper over your EJBs and other J2EE components and use them from desktop applications.
It seems that you want to implement a kind of a applet based monitor application for your J2EE EJBs on the server. Applets cannot directly monitor your EJBs.
Create a new module which has a service which acts as an event listener on the server. each j2ee component on the server notify it if there is a change to them. this service, can then write the data realted to the modification on a socket which is continiously being read by the applet. So you can implement a kind of a monitor for J2ee apps with applets.
hope this helps.
regards,
Abhishek.
PS:How did you manage to adore the AWT ;-) ? I found that it sucks (good performance.. very poor lnf) ... java swing sucks too (very poor performance ... avaerage lnf).

Similar Messages

  • Can I use AWT elements in a JSP, and so could I generate events with them?

    This is because I�m doing a simple JSP that showing a button, my JSP is:
    <html>
    <%@ page import="java.awt.*" %>
    <%! Button b = new Button("Hola!!!"); %>
    <% add(b); %>
    </html>
    But when I tried to see the button in the browser, my JSP generates the following:
    Compilation of '/RAID5/weblogic/myserver/classfiles/jsp_servlet/_gep/_alterno/_23_mayo/__mr4.java' failed:
    /RAID5/weblogic/myserver/classfiles/jsp_servlet/_gep/_alterno/_23_mayo/__mr4.java:79: cannot resolve symbol
    probably occurred due to an error in /gep/alterno/23_mayo/mr4.jsp line 7:
    <% add(b); %>
    Could somebody help me please?.....
    Can I use AWT elements in a JSP, and so could I generate events with them?
    Thanks!!!

    There are 2 ways to run a web page dynamically:
    1) Reload the page via use of javascript or some other scripting language.
    2) Use an applet to regularly check a URL for the data
    Remember, as Paul pointed out, JSP's only generate HTML output. AWT components need to run inside a JVM not a just the browser.
    I could recommend an applet but you may have problems with IE6 not supporting java. Otherwise there shouldn't be too much of a prob.
    If you prefer to use an AWT/Swing setup (for example an application) rather than a JSP setup, Webstart is good for delivering online applications which operate standalone or remotely.
    When you consider that the Java-Plugin and the Webstart puligin are about the same size it's just a matter of weighing up who your target clients are and whats easiest.
    Cheers,
    Anthony

  • Can I Use Jce in applet

    Hi all,
    Thanks for everybody first if you look at my question and try to help me to find out the problem.
    I need to write a applet which can let people to use
    the jce's des function to encipher the user's password and
    id from the homepage.
    I write a applet already. It work fine as a application.
    But it doesn't work when I run it as a applet. Does the problem come from the security problem because I need
    to Load a sun_jce provider in a clien machine ?
    Can I use JCE in applet ?
    If it is ok to use jce in developing applet do I need to sign the applet before run it in web and which file I need to sign.
    Btw, I use the archive tag in html file to make user get the whole jce jar file. does it Ok.
    Followin is my source code
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.security.*;
    import sun.misc.*;
    import java.applet.*;
    import java.awt.*;
    public class DesApplet extends Applet{
         public static void main(String[] arg) throws Exception{
              DesApplet des = new DesApplet();
              des.CallDes();
         public void init(){
              CallDes();
         public void paint(Graphics g){
         public CallDes(){
              Cipher desCipher;
              int i;                              
              try{
                   Security.addProvider(new com.sun.crypto.provider.SunJCE());
                   KeyGenerator keygen = KeyGenerator.getInstance("DES");
                   SecretKey desKey = new SecretKeySpec("11111111".getBytes(),"DES");
                   System.out.println("Hello");
                   desCipher = Cipher.getInstance("DES/ECB/NoPadding");
                   desCipher.init(Cipher.ENCRYPT_MODE,desKey);
                   byte[] cleartext = "00000000".getBytes();
                   String value = convert_int_to_hex(cleartext,8);
                   System.out.println("cleartext is:"+value);
                   byte[] ciphertext = desCipher.doFinal(cleartext);
                   value = convert_int_to_hex(ciphertext,8);
                   System.out.println("ciphertext is:"+value);
                   desCipher.init(Cipher.DECRYPT_MODE,desKey);
                   byte[] cleartext1 = desCipher.doFinal(ciphertext);;
                   value = convert_int_to_hex(cleartext1,8);
                   System.out.println("cleartext1 is:"+value);
              }catch(Exception e){System.err.println(e);}
         public String convert_int_to_hex(byte[] value, int len) {
         int i;
         int j;
         byte tmp;
         byte[] temp = new byte[len*2];
         char[] chars = new char[len*2];
         String result = new String();
         for (i=0; i<len; i++)
         if (value[i] < 0)
         temp[i*2] = (byte)((value[i] & 0xF0) >>> 4);
         temp[i*2+1] = (byte)(value[i] & 0x0F);
         else
         temp[i*2] = (byte)(value[i] / 16);
         temp[i*2+1] = (byte)(value[i] % 16);
         for (i=0; i<len*2; i++)
         if (temp[i] > 9)
         chars[i] = (char)(temp[i] - 10 + 65);
         else
         chars[i] = (char)(temp[i] + 48);
         result = result.concat(result.valueOf(chars));
         return result;

    I have a server and a client.
    Server has jdk1.4. client is an applet. I need to encrypt the username and password that are sent from client to the server.
    I am able to encrypt and decrypt using JCE's DES on server side, since jdk1.4 has JCE provider installed by default. Since the applet may be running on any browser which may not have JCE supported. Is it possible for me to send the JCE jar file along with the applet and somehow enable the client applet to encrypt the user name and password and send to server.
    Thanks a lot,
    Gagan.

  • How can I use OmniPortlet and Web Clipping Portlet?

    How can I use OmniPortlet and Web Clipping Portlet?

    You find information on OmniPortlet and Web Clipping in the Portal Developer's Guide.
    o Building Portlets with OmniPortlet
    o Building Content-Based Portlets with Web Clipping
    Peter

  • How can I use excel and word on the IPAD2

    How can I use excel and word documents on my Ipad 2

    There are apps such as Documents To Go which support reading/editting/creating those sorts of documents :
    standard version  -  http://itunes.apple.com/us/app/documents-to-go-office-suite/id317117961?mt=8
    premium version  -  http://itunes.apple.com/us/app/documents-to-go-premium-office/id317107309?mt=8

  • How can I use undo and redo with run time menu?

    Hi..I try to built my own menu for graphic programming. How can I use undo and redo in labview with run time menu?

    filozof-
    During runtime, by default, LabVIEW has undo/redo data changes under the edit menu. This will undo/redo changes made to controls during runtime. If you want a more extensive undo/redo (custom for your application), you are going to have to do quite a few things
    1) Create a custom runtime menu (Edit>>RunTime Menu) and place your own undo/redo controls on it
    2) Keep an action history in your program
    3) Catch the Shortcut menu event for your custom undo/redo controls
    4) Reverse the last action in your histroy when you catch the event
    This method would allow you undo entire operations (like resize, move, or whatever kind of functionality you are building into your application) unstead of just undoing data changes.
    Xaq

  • Hi, I have already bought Adobe Photoshop and Lightroom for 1 year. Now I will change my PC to Mac. Can I use Photoshop and Lightroom in my new Mac?

    Hi, I have already bought Adobe Photoshop and Lightroom for 1 year. Now I will change my PC to Mac. Can I use Photoshop and Lightroom in my new Mac?

    Yes.
    Mylenium

  • I am from turkey and Iphone4 can be used Turkcell and vodafone(carriers) in turkey but i bought my iphone in usa and it only works with at&t.Is there anything i can do to use my iphone with turkcell or vodafone?

    I am from turkey and Iphone4 can be used Turkcell and vodafone(carriers) in turkey but i bought my iphone in usa and it only works with at&t.Is there anything i can do to use my iphone with turkcell or vodafone?

    No. Return it and get your money back if still within the 30 day return window. All US iPhones are carrier locked and cannot be officially unlocked.

  • While using my Iphone 5, all of a sudden  black and white stripes where on the screen. I have tryed to turn the phone off and on again, but there are only the stripes. I can't use it, and nothing happens when I push the buttons. Can someone help me?

    While using my Iphone 5, all of a sudden  black and white stripes where on the screen. I have tryed to turn the phone off and on again, but there are only the stripes. I can't use it, and nothing happens when I push the buttons. Can someone help me?

    Try resetting your phone, hold the home and sleep/wake button down until the apple symbol comes up, then release. If that doesnt work, you may have damaged your phone and need to take it to an apple genius bar.

  • Can we use overload and overwrite concept in OO-abap

    hi
    can we use overload and overwrite concept in OO-abap

    Hi
    CLASS zl_lcl_vehicle DEFINITION.
    PUBLIC SECTION.
    Signature of method
    METHODS: set_make
    IMPORTING value(im_make) TYPE string " Pass by value
    im_model TYPE string," Pass by reference
    ENDCLASS. "zl_lcl_vehicle DEFINITION
    CLASS zl_lcl_vehicle IMPLEMENTATION.
    Implementation of method.
    METHOD set_make.
    IF im_make IS NOT INITIAL
    AND im_model IS NOT INITIAL.
    gv_make = im_make.
    gv_model = im_model.
    ENDIF.
    ENDMETHOD. "set_make
    ENDCLASS. "zl_lcl_vehicle
    Overloading means changing signature as well as implementation of a method.
    Overriding is changing only implementation of method with signature unchanged.
    From ABAP perspective, only the CONSTRUCTOR method can be overloaded in a subclass i.e both the signature and implementation can be adapted in subclass.
    Any other method can't be overloaded. It can only be redefined/overridden i.e implementation changed with signature unchanged.
    In ABAP  there is something called a redefinition.
    When you inherit a class from a super class, you can redifne a method. You cannot chnage the signature( Interface) of the method. It will remain the same as that of the super class.You must redefine a method in the same visibility section in which it appears in the superclass.
    Eg.
    CLASS C_SUPER_CLASS DEFINITION .
    PUBLIC SECTION.
    METHODS: DRIVE ,
    STOP.
    PROTECTED SECTION.
    DATA SPEED TYPE I.
    ENDCLASS.
    CLASS C_SUPER_CLASS IMPLEMENTATION.
    METHOD DRIVE.
    SPEED = 0.
    WRITE: / 'Bike speed =', SPEED.
    ENDMETHOD.
    ENDCLASS.
    CLASS C_SUB_CLASS DEFINITION INHERITING FROM C_SUPER_CLASS.
    PUBLIC SECTION.
    METHODS DRIVE REDEFINITION.
    ENDCLASS
    CLASS C_SUB_CLASS IMPLEMENTATION.
    METHOD DRIVE.
    SPEED = SPEED + 10.
    WRITE: / 'Bicycle speed =', SPEED.
    ENDMETHOD.
    ENDCLASS.
    Regards
    Vasu

  • Can we use exceptions and conditions at the same time?

    can we use exceptions and conditions at the same time? Are there any dependencies between exceptions an conditions?

    Exceptions are used when there are some mistakes , or exceeds the supposed values, we can highligt that in different colours for enabling the validator to notice easily. In this we are giving conditions for considering the value as exceptions. suppose, if the values is out of the range -1 to +1 then exception.
    But conditions can be considered as the restrictions given in measure level also. So please elaborate what you meant by conditions

  • Can i use safary and watch on the tv

    I bought the apple tv device
    from my ipad can i use safary and watch on the tv

    If you want to mirror you need iPad 2 (or later)
    http://support.apple.com/kb/HT5209?viewlocale=en_US&locale=en_US

  • If i download windows with bootcamp does that mean i can still use Macintosh and if so how

    if i download windows with bootcamp does that mean i can still use Macintosh and if so how

    Welcome to Apple Support Communities
    If you installed Windows properly, you can still start in OS X and use it whenever you want. However, Boot Camp changes the startup partition to Windows, so you may note that you can't use Mac OS X.
    There are two ways of starting in OS X:
    1. Hold the Option (Alt) key while your computer is starting until you see all the bootable partitions in the screen, and choose your OS X partition.
    2. Hold the X key while your computer is starting.
    If you have a iMac or a Bluetooth keyboard, make sure you hold the key after hearing the startup chime.
    If you want to start in OS X by default, after starting in OS X, open System Preferences > Startup Disk, and choose the OS X partition

  • Can't use Hosting and Business Catalyst

    I have full CC-Membership, but can't use Hosting and BC.
    Following messages appearing on my CC-Account:
    On the apps-Page:
    "Full Creative Cloud Membership comes with hosting for up to 5 sites. View and manage these sites from the sidebar on the Creative Cloud home page."
    On the sidebar
    "Full Creative Cloud Membership comes with hosting for up to 5 sites."

    Same. This had me perplexed too for a while. And the 'help' pages aren't particularly 'helpful', so I did little poking around in the apps themselves.
    As it turns out, if you open up Dreamweaver and go to the 'Site' menu, there's an option to create a Business Catalyst test site from there (Dreamweaver helpfully crashed for me while doing this, but upon reopening it was all working). You pick a  site name and subdomain, assign a local folder, it asks for your CC/Adobe credentials (because it would make too much sense to just sign in automatically) and you should be good to go.
    After doing this and uploading a dummy test page, when I reloaded the Creative Cloud homepage it was now listing my test site undeneath the aforementioned confusing text in the sidebar.
    Hope that helps.

  • Can't use 'save' and 'save as' in Id, Ia and Ps.

    I can't use 'save' and 'save as' in Id, Ai and Ps. The window flips away. I've got Adobe CC. The Dutch version.

    Yes, it's executable; it tries to execute either way.
    The Unix LF through Smultron seemed to work. However, I don't see such an option in nano - only Mac and DOS. (I'm not too concerned, I'm pretty sure I"ll use Smultron on a regular basis to edit these files.)

Maybe you are looking for

  • Not able to update single file in a non ejb Module related jar

    Hey all, I have depoyed my j2ee application <b>.ear</b> on NW webAS .        This application apart from having all the ejb Modules related jar, <b>also has a jar which has all my properties files</b> being accessed by my application. Very often is i

  • HP Photosmart C6300 printer/scanner not working after Snow Leopard install

    HP Photosmart C6300 printer/scanner not working after Snow Leopard install Reinstalling etc does not work - does anyone else have the same problem or a clue as to how to fix this?

  • NSS326 SFTP and SSH Key

    Hi, anyone have idea how to configure SFTP with SSH public/private key (without promt password) for non admin accounts on NAS NSS326 ? I have tried to generate with Putty and Puttygen a key but works only for admin user. Pls help me. Thanks Rudi

  • Acknowlegment of PO sent through E mail & report for the same

    Hi SAP Experts, We have started sending PO through E Mails.Now our client have requirement that they should receive acknowledgement from vendor about the receipt of PO & also should able to generate report vendor wise about the receipts of PO.Current

  • Changing the order of report columns

    Hi I am using Application Express 4.1.1.00.23 and have created a report. What I can't seem to alter however is the order of the columns generated by the report. It's not based on the SQL query because for example the 'Surname' field is 2nd in the sel