Servlet broadcast

HI,
I have a project but do not know how to implement using servlet:
The servlet will initiate several applets as clients and broadcast msg every 10 seconds to these applets. How can I initialize these applets in servlet when this servlet gets hit? Each applet seems to pop up with its own browser.
Thank you very much.
Xin

This is a school project. The servlet needs to broadcast message to clients every 1 minutes. The clients must be applets. How can I implement this?
Thank you very much
Xin

Similar Messages

  • Could servlet broadcast message to connected clients

    hi ,
    i am working on applet to servlet environment, i want that when my one client applet update the db on servlet, then servlet broadcast message to all connected applet clients.
    i will be thankful

    Servlets work on a request response process, the only way to broadcast to all clients is for the applet to request any stored messages/broadcasts.
    You can store a Collection of messages at the application scope and allow the applets to query a MessageServlet every x minutes or so and the servlet can respond with any messages left behind.
    You can try keeping a constant connection open between the servlet and applet however it can get messy.
    Another option is to try another java technology like sockets (have a look at some of the chat programs available) or perhaps JavaSpaces may also help you in this respect (but don't quote me on that).
    Anthony

  • Information Broadcast Email File - Where is the file in Unix directory?

    Hi,
    I am using Information Broadcasting to email the BI report.   We use Unix as the application server.
    In transaction SOSV, I can get detailed information on the file (attachment) and the send status.  There is a requirement to encrypt the file in Unix server.   Does anyone know where the file resides in Unix when the report is generated from Information Broadcasting?   What's the Unix directory?
    Any information would be appreciated.
    Thank you.
    Rebecca

    I added the path of the servlet.jar to the CLASSPATH. Now my modified
    file content is as follows:
    WINDOWS 2000 Environmental variable changes:(CLASSPATH)
    C:\Program Files\PhotoDeluxe BE 1.1\AdobeConnectables;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;C:\jakarta-tomcat-4.1.12\common\lib\servlet.jar
    AUTOEXEC.BAT:
    set path=%path%;c:\onnet32
    SET PATH=C:\jdk1.3.1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
    SET JAVA_HOME=C:\jdk1.3.1
    SET CATALINA_HOME=C:\jakarta-tomcat-4.1.12
    SET CLASSPATH=.;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;C:\jakarta-tomcat-4.1.12\common\lib\servlet.jar
    With this I am executing the command: javac test.java. However, it is still giving lot of error messages
    All the messages are 'cannot resolve symbol' associated with the Servlet class, Servlet Request, Server Exception etc. In the very first error message it states that: 'package javax.servlet does not exist'.
    I would appreciate any help. Thanks in advance.

  • Wrong hostname in URL for broadcaster?!

    Hello all,
    we (almost) successfully installed BI broadcaster in our productive BI 7.0 (after an upgrade).
    But the URL in the mail contains the wrong hostname. Instead of the prd-host it contains the hostname of our BI development box.
    Replacing the wrong hostname with the hostname of our productive box brings up the right document.
    I could not find the place where to change the hostname. Does anybody have a hint where to look ?
    The URL looks like this, but instead
    http://hostname_dev.domain.com:50000/irj/servlet/prt/portal/prtroot/pcd!3a
    Thanks for you help !
    Chris

    Hi Satyabrat,
    What is the version of the Solution manager system ?
    Please delete the system in SLD and add it again using RZ70.
    if u r using solman 7.01 version , goto smsy_setup and synchnorize the system details in SLD.
    solman system version is 7.1 ,after system addition check the LMDB* job is completed.
    then goto  se38 -> RLMDB_SYNC_TECHNICAL_SYSTEM run the report and select the system.
    So it will delete all the old setting and synchronize and update the latest systen details.
    Then try the managed system configuration, it will solve the issue.
    Rg,
    Karthik

  • Information Broadcasting & Archiving: Query reports need to be Archived

    Hi All,
    The requirement is that , we need to broadcast query reports in Bex 7.0 to be archived as a pdf.
    Please note that this is not Data archiving. We need to archive only query reports.
    We need to make sure that pdf gets generated in Background and report selections variant can be used in Background.How can we achieve this?
    Alternatively ,Please suggest useful articles, that will be of help in this.
    Thanks in Advance ,

    archiving data is plausible -
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/asug-biti-03/sap%20bw%20archiving%20and%20data%20aging%20strategies
    Not sure why you want to archive the reports in PDF, also at what point?? is it on the application sever ???
    Hope it Helps
    Chetan
    @CP..

  • Broadcast Email (Bursting) - Information Brodcasting :: How it can be used?

    Hi Friends,
    Can you please tell me the steps for Broadcast E-mail (Bursting)?
    Whenever you select this option in the BEx Broadcaster Wizard in New Setting, we can see a Recipent Determination. Under this we can find many options such as Characteristic Determination, Filter etc.
    I don't understand the functionality here. On which case and what time these settings are determined? Could you please guide me with the step by step functinality of Email bursting of Information Broadcasting?
    Thanks a lot in advance.
    Best Regards,
    Sasi

    hi,
    here I am sending the link again try this,
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/289,1,SAP BW 3.5 Information Broadcasting: Overview">Broadcasting overview</a>.
    I am working on BW 3.5, so i need a seperate license for Broadcasting.So this is delayed.But I would like to discuss anything related to Information broadcasting and alert monitoring.

  • Layout problem with broadcasted BW report

    Hi all,
    a broadcasted BW report laying under /documents/Public Documents/TestReport looks good when opening the index.htm there... also the layout.
    Then I took an iView based on 'KM Document iView' (com.sap.km.cm.docs) and copied the path '/documents/Public%20Documents/TestReport/index.htm' into the property 'Path to Document'.
    A preview of this page shows the data but the layout of this page is missing.
    Viewing the source of this htm page shows the following stylesheet entry:
    <link rel="stylesheet" type="text/css" href="./StaticMimes/com.sap.portal.design.urdesigndata/themes/portal/fwtheme/ur/ur_ie6.css">
    So opening the index.htm in an iView can't find this stylesheet.
    Have somebody an idea what to do? Do I have to configure something else?
    We use NW2004s SP10. The report was made with the BEx Broadcaster Wizard.
    Thanks,
    Susanne

    The IE 6.0 which I use can handle .mht files. So the .mht link opened in the KM Content works:
    http://<host>:50000/irj/go/km/docs/documents/Public%20Documents/TestReport2.mht
    But why does this link works but not the preview in portal content area?
    I have to correct myself... I found out these effects trying to deposit different paths in the iView property:
    - path:  /documents/Public%20Documents/TestReport2.mht
      --> the preview shows the source code of the .htm in the browser. Saving this source code to a new .mht file and testing it locally works fine!!!
    - path:  /entrypoints/Public%20Documents/TestReport2.mht
      --> here the browser wants to know which programm the .htm file shall be opened. After choosing IE the source code was shown also like above.
    Therfore there is the same behavior after assigning the iView to a role.
    This url was generated for the iView
    http://<host>:50000/irj/servlet/prt/portal/prtroot/com.sap.portal.pagebuilder.IviewModeProxy?iview_id=pcd%3Aportal_content/nas/general/nas_every_user_role/de.cas.nas.general_ws/testfolder/TestReport2&iview_mode=default
    But also only the source code is shown in the browser.
    I looked at this side how to integrate a BI report as a document into portal:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/7efa40dd14f06fe10000000a1550b0/frameset.htm
    Do you have any other idea?
    Regards, Susanne

  • Issue with Broadcasting and Publish query to Portal from query Designer

    Dear all,
    I have created a standard template ZWT_STANDARD_TEMPLATE in WAD and I have added this for Adhoc Analysis in 'Set Standard Web templated' RSCUSTV27.
    For Broadcasting I have added 0BROADCASTING_TEMPLATE70.
    I have problems with my broadcasting as well as publishing the Query in Portal.
    When I use a Broadcast to Email - it opens a new window with my standard template(ZWT_STANDARD_TEMPLATE ) I have added. No data though.
    Same thing happens for publishing too...When I publish the query to portal from Query Designer or WAD it takes me to the same window with my standard web template. No data though.
    I think both are related to the same issue. Its with broadcasting.
    What is the default template for Broadcasting in NW2004s? Below is the url I have included when I do it from Query designer. Its actually starting the Command - START_BROADCASTER70 but I dont know if it has to do a SOURCE_QUERY=ZCOPA_C03_FAST_PAYABLES. Could anyone compare it with your urls
    http://pgdep00:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex3x?system=SAP_BW&CMD=START_BROADCASTER70&SOURCE_QUERY=ZCOPA_C03_FAST_PAYABLES&START_WIZARD=X&DISTRIBUTION_TYPE=PCD_EXPORT
    This is the url for publishing from WAD
    http://fndef00:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex3x?system=SAP_BW&CMD=START_BROADCASTER70&SOURCE_TEMPLATE=ZWT_FAST_PAYABLES&START_WIZARD=X&DISTRIBUTION_TYPE=PCD_EXPORT
    Any help would be highly appreciated.
    Thanks,
    KK

    Hi KK,
    Did you solve your problem, i am also having the same issue. Please let me know if you have solved this issue.
    Thanks,
    Kumar

  • The servlet weblogic.servlet.AsyncInitServlet init method failed

    I installed WLS 9.2.2 recently with my app being on 8.1.5 for a long time.
    I chose to create a new domain instead of upgrading my existing one.
    I use the eclipse 3.2.2 with the WL plugin.
    When I start the server and login to the console not using eclipse it works fine.
    Trying to start the server and login to the console gives a internal server error.
    Any idea what could be wrong? I bolded the parts where I have looked into.
    Here is the console output:
    <Nov 19, 2008 3:13:02 PM CST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    C:\bea92\weblogic92\platform\lib\p13n\p13n-schemas.jar;C:\bea92\weblogic92\platform\lib\p13n\p13n_common.jar;*C:\bea92\weblogic92\platform\lib\p13n\p13n_system.jar*;C:\bea92\weblogic92\platform\lib\wlp\netuix_common.jar;C:\bea92\weblogic92\platform\lib\wlp\netuix_schemas.jar;C:\bea92\weblogic92\platform\lib\wlp\netuix_system.jar;C:\bea92\weblogic92\platform\lib\wlp\wsrp-common.jar>
    <Nov 19, 2008 3:13:03 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.5.0_10-b03 from Sun Microsystems Inc.>
    <Nov 19, 2008 3:13:05 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 MP2 Mon Jun 25 01:32:01 EDT 2007 952826 >
    <Nov 19, 2008 3:13:10 PM CST> <Info> <WebLogicServer> <BEA-000215> <Loaded License : C:\bea92\license.bea>
    <Nov 19, 2008 3:13:10 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 19, 2008 3:13:10 PM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Nov 19, 2008 3:13:11 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea92\user_projects\domains\domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
    <Nov 19, 2008 3:13:15 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Nov 19, 2008 3:13:22 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Nov 19, 2008 3:13:22 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 19, 2008 3:13:30 PM CST> <Error> <HTTP> <BEA-101359> <The servlet weblogic.servlet.AsyncInitServlet init method failed while it was run in the background. The exception was: java.lang.NoClassDefFoundError: com/bea/p13n/management/ApplicationFilePoller$Handler.
    java.lang.NoClassDefFoundError: com/bea/p13n/management/ApplicationFilePoller$Handler
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         Truncated. see log file for complete stacktrace
    >
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Nov 19, 2008 3:13:39 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 127.0.0.1:7005 for protocols iiop, t3, ldap, http.>
    <Nov 19, 2008 3:13:39 PM CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "domain" running in Development Mode>
    <Nov 19, 2008 3:13:40 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Nov 19, 2008 3:13:40 PM CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    <Nov 19, 2008 3:22:04 PM CST> <Error> <HTTP> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@d6c6a0 - appName: 'consoleapp', name: 'console', context-path: '/console'] Servlet failed with Exception
    java.lang.NullPointerException
         at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:124)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         Truncated. see log file for complete stacktrace
    Edited by: user5384782 on Nov 19, 2008 1:42 PM
    Edited by: user5384782 on Nov 19, 2008 3:59 PM

    Thanks for your replies adrian and david.
    The only thing I see different is that eclipse has different arguments when calling the jvm at the top.
    startWebLogic.cmd:
    C:\bea92\JDK150~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000
    -XX:PermSize=48m -XX:MaxPermSize=128m -Xverify:none -da -Dplatform.home=C:\b
    ea92\WEBLOG~1 -Dwls.home=C:\bea92\WEBLOG~1\server -Dwli.home=C:\bea92\WEBLOG~1\i
    ntegration -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testC
    onsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\bea92\patch_weblogic922
    \profiles\default\sysext_manifest_classpath -Dweblogic.Name=AdminServer -Djava.s
    ecurity.policy=C:\bea92\WEBLOG~1\server\lib\weblogic.policy weblogic.Server
    eclipse:
    -hotspot -Xms32m -Xmx200m -Dweblogic.ProductionModeEnabled=
    Eclipse may be calling the cmd I dont know.
    I will try upgrading my eclipse like adrian said, but in the meantime I appreciate any further advice/tips.

  • Information Broadcasting on Portal and KM

    Hello all,
    We are about to implement a BI-Portal integration for information broadcasting soon. At present we are planning to integrate BI and it's BI runtime portal for information broadcasting - and our BI Portal does not have KM or TREX yet.
    I would just like to confirm one issue. I've read materials but I'm still not 100% sure on this issue: does Information Broadcasting require the KM installation together with the EP?
    It says on the FAQ:
    In addition, using Broadcasting not only using e-mail but also with the SAP NetWeaver Portal requires the additional installation of a J2EE Server with SAP NetWeaver Portal or KM.
    What I understand, do correct me if I'm wrong, is that when you publish into the Portal - it will reside on the PCD or in WebDAV (KM).
    Question: is it mandatory to install KM for this scenario? Or can information broadcasting live by without KM?
    I believe there are benefits on having KM - like subscriptions or have it accessible via BEx Portfolio under the business explorer role in the portal.. but I'm quite confused as to requiring to have KM installed.
    Thanks in advance all.

    Thanks for the prompt response.
    It does appear that KM is required.. but some articles I've read did not point out it be mandatory. So overall, this one's kind of confusing -- well at least for me having no experience on BI-Portal integration.
    But the SAP Note 830385 - [SAP Note 830385|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d383330333835%7d]though it's based on SAP BW 3.5 and SAP Enterprise Portal 6.0 - it stated that:
    "Knowledge Management and Collaboration must also be available on the portal because the required BW Java classes are also installed during this installation."
    Anyways, thanks again. And I will leave this thread open running and hopefully someone who has implemented Information Broadcasting can shed more light on this topic.
    -Jan

  • Tomcat crashes while running servlet chat in IE

    Hi all!
    I've seen similar problems posted about three years ago, but I didn't see an answer for it.
    I'd be very grateful if you could help me.
    I'm writing a chat, the code was taken from the J.Hunter "Servlet programming book" O'reilly, "absurdly simple chat", and adjusted (I only need the Http version). It's an applet-servlet chat.
    When executed in IE, Tomcat crashes after a few (usually 5) sent messages. When executed in a debugger (I use Forte, the last available version, 4 update 1) the program works just fine...
    Another question is about debugging an applet, executed in a browser - how do I do this?
    Here is the code for the servlet:
    =================================
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class TryChatServlet extends HttpServlet
    // source acts as the distributor of new messages
    MessageSource source = new MessageSource();
    // doGet() returns the next message. It blocks until there is one.
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();
    // Return the next message (blocking)
    out.println(getNextMessage());
    // doPost() accepts a new message and broadcasts it to all
    // the currently listening HTTP and socket clients.
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    // Accept the new message as the "message" parameter
    String message = req.getParameter("message");
    // Broadcast it to all listening clients
    if (message != null) broadcastMessage(message);
    // Set the status code to indicate there will be no response
    res.setStatus(res.SC_NO_CONTENT);
    // getNextMessage() returns the next new message.
    // It blocks until there is one.
    public String getNextMessage() {
    // Create a message sink to wait for a new message from the
    // message source.
    return new MessageSink().getNextMessage(source);
    // broadcastMessage() informs all currently listening clients that there
    // is a new message. Causes all calls to getNextMessage() to unblock.
    public void broadcastMessage(String message) {
    // Send the message to all the HTTP-connected clients by giving the
    // message to the message source
    source.sendMessage(message);
    // MessageSource acts as the source for new messages.
    // Clients interested in receiving new messages can
    // observe this object.
    class MessageSource extends Observable {
    public void sendMessage(String message) {
    setChanged();
    notifyObservers(message);
    // MessageSink acts as the receiver of new messages.
    // It listens to the source.
    class MessageSink implements Observer {
    String message = null; // set by update() and read by getNextMessage()
    // Called by the message source when it gets a new message
    synchronized public void update(Observable o, Object arg) {
    // Get the new message
    message = (String)arg;
    // Wake up our waiting thread
    notify();
    // Gets the next message sent out from the message source
    synchronized public String getNextMessage(MessageSource source) {
    // Tell source we want to be told about new messages
    source.addObserver(this);
    // Wait until our update() method receives a message
    while (message == null) {
    try { wait(); } catch (Exception ignored) { }
    // Tell source to stop telling us about new messages
    source.deleteObserver(this);
    // Now return the message we received
    // But first set the message instance variable to null
    // so update() and getNextMessage() can be called again.
    String messageCopy = message;
    message = null;
    return messageCopy;
    =============================
    The code for the applet is
    =============================
    import java.applet.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class TryChatApplet extends Applet implements Runnable {
    TextArea text;
    Label label;
    TextField input;
    Thread thread;
    String user;
    public void init() {
    // Check if this applet was loaded directly from the filesystem.
    // If so, explain to the user that this applet needs to be loaded
    // from a server in order to communicate with that server's servlets.
    URL codebase = getCodeBase();
    if (!"http".equals(codebase.getProtocol())) {
    System.out.println();
    System.out.println("*** Whoops! ***");
    System.out.println("This applet must be loaded from a web server.");
    System.out.println("Please try again, this time fetching the HTML");
    System.out.println("file containing this servlet as");
    System.out.println("\"http://server:port/file.html\".");
    System.out.println();
    System.exit(1); // Works only from appletviewer
    // Browsers throw an exception and muddle on
    // Get this user's name from an applet parameter set by the servlet
    // We could just ask the user, but this demonstrates a
    // form of servlet->applet communication.
    user = getParameter("user");
    if (user == null) user = "anonymous";
    // Set up the user interface...
    // On top, a large TextArea showing what everyone's saying.
    // Underneath, a labeled TextField to accept this user's input.
    text = new TextArea();
    text.setEditable(false);
    label = new Label("Say something: ");
    input = new TextField();
    input.setEditable(true);
    setLayout(new BorderLayout());
    Panel panel = new Panel();
    panel.setLayout(new BorderLayout());
    add("Center", text);
    add("South", panel);
    panel.add("West", label);
    panel.add("Center", input);
    public void start() {
    thread = new Thread(this);
    thread.start();
    String getNextMessage() {
    String nextMessage = null;
    while (nextMessage == null) {
    try {
    URL url = new URL(getCodeBase(), "/servlet/TryChatServlet");
    HttpMessage msg = new HttpMessage(url);
    InputStream in = msg.sendGetMessage();
    DataInputStream data = new DataInputStream(
    new BufferedInputStream(in));
    nextMessage = data.readLine();
    catch (SocketException e) {
    // Can't connect to host, report it and wait before trying again
    System.out.println("Can't connect to host: " + e.getMessage());
    try { Thread.sleep(5000); } catch (InterruptedException ignored) { }
    catch (FileNotFoundException e) {
    // Servlet doesn't exist, report it and wait before trying again
    System.out.println("Resource not found: " + e.getMessage());
    try { Thread.sleep(5000); } catch (InterruptedException ignored) { }
    catch (Exception e) {
    // Some other problem, report it and wait before trying again
    System.out.println("General exception: " +
    e.getClass().getName() + ": " + e.getMessage());
    try { Thread.sleep(1000); } catch (InterruptedException ignored) { }
    return nextMessage + "\n";
    public void run() {
    while (true) {
    text.appendText(getNextMessage());
    public void stop() {
    thread.stop();
    thread = null;
    void broadcastMessage(String message) {
    message = user + ": " + message; // Pre-pend the speaker's name
    try {
    URL url = new URL(getCodeBase(), "/servlet/TryChatServlet");
    HttpMessage msg = new HttpMessage(url);
    Properties props = new Properties();
    props.put("message", message);
    msg.sendPostMessage(props);
    catch (SocketException e) {
    // Can't connect to host, report it and abandon the broadcast
    System.out.println("Can't connect to host: " + e.getMessage());
    catch (FileNotFoundException e) {
    // Servlet doesn't exist, report it and abandon the broadcast
    System.out.println("Resource not found: " + e.getMessage());
    catch (Exception e) {
    // Some other problem, report it and abandon the broadcast
    System.out.println("General exception: " +
    e.getClass().getName() + ": " + e.getMessage());
    public boolean handleEvent(Event event) {
    switch (event.id) {
    case Event.ACTION_EVENT:
    if (event.target == input) {
    broadcastMessage(input.getText());
    input.setText("");
    return true;
    return false;
    =====================================
    HttpMessage
    ======================================
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class HttpMessage {
    URL servlet = null;
    String args = null;
    public HttpMessage(URL servlet) {
    this.servlet = servlet;
    // Performs a GET request to the previously given servlet
    // with no query string.
    public InputStream sendGetMessage() throws IOException {
    return sendGetMessage(null);
    // Performs a GET request to the previously given servlet.
    // Builds a query string from the supplied Properties list.
    public InputStream sendGetMessage(Properties args) throws IOException {
    String argString = ""; // default
    if (args != null) {
    argString = "?" + toEncodedString(args);
    URL url = new URL(servlet.toExternalForm() + argString);
    // Turn off caching
    URLConnection con = url.openConnection();
    con.setUseCaches(false);
    return con.getInputStream();
    // Performs a POST request to the previously given servlet
    // with no query string.
    public InputStream sendPostMessage() throws IOException {
    return sendPostMessage(null);
    // Performs a POST request to the previously given servlet.
    // Builds post data from the supplied Properties list.
    public InputStream sendPostMessage(Properties args) throws IOException {
    String argString = ""; // default
    if (args != null) {
    argString = toEncodedString(args); // notice no "?"
    URLConnection con = servlet.openConnection();
    // Prepare for both input and output
    con.setDoInput(true);
    con.setDoOutput(true);
    // Turn off caching
    con.setUseCaches(false);
    // Work around a Netscape bug
    con.setRequestProperty("Content-Type",
    "application/x-www-form-urlencoded");
    // Write the arguments as post data
    DataOutputStream out = new DataOutputStream(con.getOutputStream());
    out.writeBytes(argString);
    out.flush();
    out.close();
    return con.getInputStream();
    // Converts a Properties list to a URL-encoded query string
    private String toEncodedString(Properties args) {
    StringBuffer buf = new StringBuffer();
    Enumeration names = args.propertyNames();
    while (names.hasMoreElements()) {
    String name = (String) names.nextElement();
    String value = args.getProperty(name);
    buf.append(URLEncoder.encode(name) + "=" + URLEncoder.encode(value));
    if (names.hasMoreElements()) buf.append("&");
    return buf.toString();
    Those files are the only files needed to execute the program.

    The whole Tomcat crashes, and no exception
    displayed.
    Do I have to write the log file, or it's kept by
    Tomcat itself?yes, tomcat writes a log file, you find it in the tomcat dir. but it's just very highlevel. Having a look in it could help.
    Is there a way to write a log file by myself?sure. you could get the log file from tomcat by getting it from the ServletContext:
    ServletContext = getServletContext();
    ServletContext.log("text to log");
    When I view the output window in Forte, it doesn't
    even write that Tomcat crashed.
    I use Tomcat that is installed with the last version
    of Forte(Sun 1 Studio, update 1), I guess it's the
    last version of Tomcat also.No. The lastest is 4.1.12 and i guess it's 4.0.4 with forte.
    Get Tomcat standalone from jakarta.apache.org and try to run your servlet with the standalone tomcat. this could help since i also expirenced problems sometimes with the forte-integrated tomcat.

  • Error when clicked BEx broadcaster

    Hi All.
    We have enterprise portal only JAVA server SPS 10 patch 10
    This server integrated with SAP BW  system 7.0 version.
    when we try to click on BEx broadcaster link from portal we are getting the error.
    Portal runtime error.
    An exception occurred while processing your request. Send the exception
    ID to your portal administrator.
    Exception ID: 07:51_16/03/11_0035_37094450
    Can you please let me know how can i go forward with the resolution of this error.
    Thanks in advace,
    Ram.

    More detailed log of the above exception.
    Exception ID:06:00_21/03/11_0001_37094450
    [EXCEPTION]
    com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Portal Component
    Component : pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.bi_showcase/com.sap.ip.bi.allbi/com.sap.ib.bi.businessexplorer/com.sap.ip.bi.bex_broadcaster
    Component class : com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent
    User : rkotla
         at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:973)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:343)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Caused by: com.sapportals.portal.prt.runtime.PortalRuntimeException: Exception in SAP Application Integrator occured: Unable to parse template &#39;&lt;System.Access.WAS.protocol&gt;://&lt;System.Access.WAS.hostname&gt;/sap/bw/BEx?sap-client=&lt;System.client&gt;&amp;sap-language=&lt;Request.Language&gt;&amp;accessibility=&lt;User.Accessibility[SAP_BOOL]&gt;&amp;style_sheet=&lt;LAF.StylesheetUrl[url_ENCODE]&gt;&amp;&lt;TrayInformation[IF_true PROCESS_RECURSIVE]&gt;&amp;&lt;Authentication&gt;&amp;&lt;Report&gt;&amp;&lt;BusinessParameters&gt;&#39;; the problem occured at position 82. Cannot process expression &lt;System.client&gt; because Invalid System Attribute:
    System:    &amp;#39;SAP_LocalSystem&amp;#39;,
    Attribute: &amp;#39;client&amp;#39;.
         at com.sapportals.portal.appintegrator.AbstractIntegratorComponent.doContentPass(AbstractIntegratorComponent.java:123)
         at com.sapportals.portal.appintegrator.AbstractIntegratorComponent.doContent(AbstractIntegratorComponent.java:98)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    Category:  /System/Server
    Location:  com.sap.portal.portal
    Application:  sap.com/irj

  • Information Broadcaster  scheduling

    Hi all
    In BI 7.0 broadcaster settings, i want to include the schedule time which i created in SM36, but the thing is even if i made a Job setting created in SM36, i am not able to see the Job settings in Broadcaster scheduler drop down ( by clicking the overall settings i can change to direct scheduling or when data changes/ define the time), I have the required authorization, Am i missing anything here.
    Please let me know.
    Thanks
    NB

    Hi,
    Please check this link:
    https://www.sdn.sap.com/irj/sdn/bpx-analytics?rid=/webcontent/uuid/a8cd1f71-0a01-0010-4783-f119b6132d25
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c39fb990-0201-0010-abae-ba08ada8026b
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ca6de811-0c01-0010-43b2-c64584eef943
    http://help.sap.com/saphelp_nw04/helpdata/en/84/30984076b84063e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/84/30984076b84063e10000000a1550b0/frameset.htm
    the setting for IB:
    https://service.sap.com/~sapidb/012003146900000085752006E/HowtoInformationBroadcasting.pdf
    Hope this helps.
    Regards,
    CSM Reddy

  • Bex Broadcaster wizard

    Hi,
    I would like to know how to go to the Bex broadcaster Wizard in BW 3.5.... And how to check if the broadcaster is installed in our system.
    Regards,
    Shilpa

    Hi,
    You can call the BEx Broadcaster from various areas of the Business Explorer in order to distribute BW objects.Take a look at help.
    http://help.sap.com/saphelp_nw04/helpdata/EN/ce/faec40d3328531e10000000a1550b0/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c39fb990-0201-0010-abae-ba08ada8026b
    Regards.

  • Information Broadcasting - Precalculation III

    Hello,
    According to documentation there is the distribution type "Precalculation Store" in Information Broadcasting. Up to now I never managed to see that entry in the system.
    What are the pre-requisities to get that entry?
    Thank you + regards,
    Ingo

    Hi,
    I am giving you link of how-to document I had published on SDN for precalculation of web templates. This will help you understand the procedure of achieving this functionality. The document title is "Precalculation of Web Templates - Effective Query Distribution".
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a101b894-0b01-0010-6c90-e70766b33256
    Please note that I have not considered Information broadvcasting for precalculation in this document.
    For that please refer to this link -
    http://help.sap.com/saphelp_nw04/helpdata/en/3a/0e044017355c0ce10000000a1550b0/content.htm
    Hope it helps
    Regards
    Pavan Prakhya

Maybe you are looking for

  • Filtering the rows of a JTable based on JCombobox selection

    Hi,,, I write an application where I have a combobox contains the JTable first column data when i click on the item it should give me the rows, which contains the selected item as their first column data. I am enable to get the list like that, please

  • URGENT HELP in multilingual data saving

    Hi, We are trying to create a multilingual application using Java and Oracle. In the browser, my charset encoding is UTF8, then my database charset is defined as WE8ISO8859P1. If i try to send a data (latvian language) and save it in the database, th

  • PI 7.1 Jar Files

    Hi I have developed Mapping code in Java and I need PI 7.1 Jar files to include in the package,  How Can I get the PI 7.1 Jar files from the PI system Can anyone send me the details how to download the Jar Files to include in the Java Mapping Thanks

  • Shrinking photo to smaller than source

    Hi All, I'm trying to use photos for buttons in iDVD, but when I pull them from iPhoto they are too big for the button. When I go to iPhoto, the "source file" is already at minimum zoom. Any way to shrink photos down further in iPhoto (or in iDVD for

  • Mobile Application Builder 1.0

    Hi All, Where can I download Sun one mobile Application Builder software? Thanks in advance Regards, RajeshJV