Servlet problem (Urgent)

Hi Friends,
I have servlet which takes time to execute the sql queries to get data to be send to the browser.
Can it possible to dispaly a waiting page (with some GIF on it)to the user while the servlet is executing Sql
Thanx
SV

You might be able to do it using frames or a popup window. Take a look at this post for more info.
http://forums.java.sun.com/thread.jsp?forum=45&thread=138530

Similar Messages

  • J2EE StartUp Problem, URGENT.

    Hi all!
    I'm having a problem since friday with the J2EE Engine Startup. The problem is that MMC says me that the server is running but i can access to the server by anyway. The developer trace of the jcontrol process is:
    [Thr 2968] Tue Aug 09 13:59:50 2005
    [Thr 2968] JControlICheckProcessList: process server0 started (PID:1544)
    JStartupStartJLaunch: program = C:\usr\sap\J2E\JC00/j2ee/os_libs/jlaunch.exe
    -> arg[00] = C:\usr\sap\J2E\JC00/j2ee/os_libs/jlaunch.exe
    -> arg[01] = pf=C:\usr\sap\J2E\SYS\profile\J2E_JC00_toshiba-user
    -> arg[02] = -DSAPINFO=J2E_00_sdm
    -> arg[03] = -file=C:\usr\sap\J2E\JC00\SDM\program\config\sdm_jstartup.properties
    -> arg[04] = -nodeName=sdm
    -> arg[05] = -nodeId=2
    -> arg[06] = -syncSem=JSTARTUP_WAIT_ON_2964
    -> arg[07] = -jvmOutFile=C:\usr\sap\J2E\JC00\work\jvm_sdm.out
    -> arg[08] = -stdOutFile=C:\usr\sap\J2E\JC00\work\std_sdm.out
    -> arg[09] = -locOutFile=C:\usr\sap\J2E\JC00\work\dev_sdm
    -> arg[10] = -mode=JCONTROL
    -> arg[11] = pf=C:\usr\sap\J2E\SYS\profile\J2E_JC00_toshiba-user
    -> lib path = PATH=C:\j2sdk1.4.2_08\jre\bin\server;C:\j2sdk1.4.2_08\jre\bin;C:\oracle\WAS\92\bin;C:\oracle\WAS\92\jre\1.4.2\bin\client;C:\oracle\WAS\92\jre\1.4.2\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\j2sdk1.4.2_08\bin;C:\oracle\WAS\92\Appache\perl\5.00503\bin\MSWin32-x86;C:\usr\sap\J2E\SCS01\exe;C:\usr\sap\J2E\JC00\exe;C:\usr\sap\J2E\SYS\exe\run
    -> exe path = PATH=C:\j2sdk1.4.2_08\bin;C:\usr\sap\J2E\JC00\j2ee\os_libs;C:\oracle\WAS\92\bin;C:\oracle\WAS\92\jre\1.4.2\bin\client;C:\oracle\WAS\92\jre\1.4.2\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\j2sdk1.4.2_08\bin;C:\oracle\WAS\92\Appache\perl\5.00503\bin\MSWin32-x86;C:\usr\sap\J2E\SCS01\exe;C:\usr\sap\J2E\JC00\exe;C:\usr\sap\J2E\SYS\exe\run
    [Thr 2968] Tue Aug 09 13:59:51 2005
    [Thr 2968] JControlICheckProcessList: process SDM started (PID:1556)
    [Thr 1188] Tue Aug 09 14:01:01 2005
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] Tue Aug 09 14:01:58 2005
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] JControlMSMessageFunc: receive command:6, argument:1213679940 from Message Server
    [Thr 1188] Tue Aug 09 14:10:25 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    [Thr 1188] Tue Aug 09 14:15:45 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    [Thr 1188] Tue Aug 09 14:20:46 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    [Thr 1188] Tue Aug 09 14:26:06 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    [Thr 1188] Tue Aug 09 14:31:07 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    [Thr 1188] Tue Aug 09 14:36:27 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    [Thr 1188] Tue Aug 09 14:41:28 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    Then i try to login the visual admin gives me a windows error and the msg_server process shuts down alone. Then i restart that node and agregate the following lines to the trace:
    Thr 1188] Tue Aug 09 14:42:25 2005
    [Thr 1188] *** ERROR => MsINiRead: NiBufReceive failed (NIECONN_BROKEN) [msxxi.c      2488]
    [Thr 1188] *** ERROR => MsIReadFromHdl: NiRead (rc=NIECONN_BROKEN) [msxxi.c      1652]
    [Thr 1188] Tue Aug 09 14:42:27 2005
    [Thr 1188] ***LOG Q0I=> NiPConnect2: SiPeekPendConn (10061: WSAECONNREFUSED: Connection refused) [nixxi_r.cpp 8588]
    [Thr 1188] *** ERROR => MsIAttachEx: NiBufConnect to toshiba-user/3601 failed (rc=NIECONN_REFUSED) [msxxi.c      633]
    [Thr 1188] *** WARNING => Can't reconnect to message server (toshiba-user/3601) [rc = -100]-> reconnect [jcntrms.c    295]
    [Thr 1188] Tue Aug 09 14:42:32 2005
    [Thr 1188] *** ERROR => MsIAttachEx: NiBufConnect to toshiba-user/3601 failed (rc=NIECONN_REFUSED) [msxxi.c      633]
    [Thr 1188] *** WARNING => Can't reconnect to message server (toshiba-user/3601) [rc = -100]-> reconnect [jcntrms.c    295]
    [Thr 1188] Tue Aug 09 14:42:38 2005
    [Thr 1188] *** ERROR => MsIAttachEx: NiBufConnect to toshiba-user/3601 failed (rc=NIECONN_REFUSED) [msxxi.c      633]
    [Thr 1188] *** WARNING => Can't reconnect to message server (toshiba-user/3601) [rc = -100]-> reconnect [jcntrms.c    295]
    [Thr 1188] Tue Aug 09 14:42:44 2005
    [Thr 1188] *** ERROR => MsIAttachEx: NiBufConnect to toshiba-user/3601 failed (rc=NIECONN_REFUSED) [msxxi.c      633]
    [Thr 1188] *** WARNING => Can't reconnect to message server (toshiba-user/3601) [rc = -100]-> reconnect [jcntrms.c    295]
    [Thr 1188] Tue Aug 09 14:42:49 2005
    [Thr 1188] JControlMSConnect: reconnected to message server (toshiba-user/3601)
    [Thr 1188] Tue Aug 09 14:48:11 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    [Thr 1188] Tue Aug 09 14:53:12 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    [Thr 1188] Tue Aug 09 14:58:32 2005
    [Thr 1188] JControlMSReadMessage: NiPeek() returns -5 NIETIMEOUT
    I try to login the visual admin again and gives me the following error: "Cannot open connection on host: 191.9.6.22 and port: 50004"
    Looking the log and trace files i see the following errors:
    - SAPEngine_System_Thread[impl:5]_5##0#0#Error#1#/System/Server#Plain###Encomi: failed to connect to toshiba-user/3201(Connection refused: connect)#
    - java.net.SocketException: socket closed
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
         at java.net.ServerSocket.implAccept(ServerSocket.java:448)
         at java.net.ServerSocket.accept(ServerSocket.java:419)
         at com.sap.engine.core.port.impl0.ServerSocketListener.run(ServerSocketListener.java:87)
    - erver socket listener opened by service on socket encountered error. The listener will be stopped.#2#p4#ServerSocket[addr=/0.0.0.0,port=0,localport=50004]
    I dont know whats happening, if somebody knows i hope that helps me. Please is urgent.
    Thx and Rgds.
    Gregory

    Hi, thx a lot both.
    Respect the link
    http://<hostname>:50<instanceno>00/sap/monitoring/SystemInfo , i cant access it. I cant access by telnet, by visual admin.
    In the work folder under \usr\sap\<sid>\JC00 i found that the last updated files are:
    - available.txt that contains the following data:
        Unavailable 08.08.2005 10:46:53 - 08.08.2005 10:58:54
        Available   08.08.2005 10:59:54 - 08.08.2005 13:52:54
        Unavailable 08.08.2005 13:53:54 - 08.08.2005 13:53:54
        Available   08.08.2005 13:54:54 - 08.08.2005 14:03:54
        Unavailable 08.08.2005 14:04:54 - 08.08.2005 14:04:54
        Available   08.08.2005 14:05:54 - 08.08.2005 14:34:54
        Unavailable 08.08.2005 14:35:54 - 08.08.2005 14:39:44
        Unavailable 08.08.2005 14:56:17 - 08.08.2005 16:24:13
        Unavailable 08.08.2005 16:28:07 - 08.08.2005 16:29:07
        Unavailable 08.08.2005 16:34:36 - 08.08.2005 17:17:58
        Unavailable 09.08.2005 08:13:36 - 09.08.2005 08:54:33
        Unavailable 09.08.2005 08:57:04 - 09.08.2005 12:46:25
        Available   09.08.2005 12:47:25 - 09.08.2005 13:26:25
        Available   09.08.2005 13:43:56 - 09.08.2005 13:55:56
        Unavailable 09.08.2005 13:56:40 - 09.08.2005 14:04:57
        Available   09.08.2005 14:05:57 - 09.08.2005 16:16:57
        Unavailable 09.08.2005 16:17:57 - 09.08.2005 17:27:12
        Unavailable 10.08.2005 08:10:30 - 10.08.2005 08:35:39
        Available   10.08.2005 08:36:39 - 10.08.2005 09:16:39
        Available   10.08.2005 12:33:51 - 10.08.2005 14:01:51
    - dev_jcontrol that contains the information displayed in the developer trace of jcontrol process(and y mentioned above)
    - dev_dispatcher that contains the following info:
        [Thr 2664] Wed Aug 10 08:33:04 2005
        [Thr 2664] JHVM_RegisterNatives: registering methods in com.sap.bc.proj.jstartup.JStartupFramework
        [Thr 2664] JLaunchISetClusterId: set cluster id 5761000
        [Thr 2664] JLaunchISetState: change state from [Initial (0)] to [Waiting for start (1)]
        [Thr 2664] JLaunchISetState: change state from [Waiting for start (1)] to [Starting (2)]
        [Thr 3320] Wed Aug 10 08:33:21 2005
        [Thr 3320] JLaunchISetP4Port: set p4 port 50004
        [Thr 3528] Wed Aug 10 08:33:26 2005
        [Thr 3528] JLaunchISetTelnetPort: set telnet port 50008
        [Thr 3528] JLaunchISetTelnetPort: set telnet port 50008
        [Thr 3584] Wed Aug 10 08:33:55 2005
        [Thr 3584] JLaunchISetHttpPort: set http port 50000
        [Thr 2664] Wed Aug 10 08:34:02 2005
        [Thr 2664] JLaunchISetState: change state from [Starting (2)] to [Running (3)]
        [Thr 2568] Wed Aug 10 08:34:08 2005
        [Thr 2568] JHVM_RegisterNatives: registering methods in com.sap.mw.rfc.driver.CpicDriver
        [Thr 3660] Wed Aug 10 08:35:07 2005
        [Thr 3660] JLaunchISetP4Port: set p4 port 50004
        [Thr 3600] Wed Aug 10 08:36:34 2005
        [Thr 3600] JLaunchISetHttpPort: set http port 50000
        [Thr 3612] Wed Aug 10 12:43:40 2005
        [Thr 3612] JLaunchISetHttpPort: set http port 50000
        [Thr 3612] JLaunchISetP4Port: set p4 port 50004
        [Thr 3612] JLaunchISetTelnetPort: set telnet port 50008
    - dev_server0 that contains:
        [Thr 2676] Wed Aug 10 08:33:06 2005
        [Thr 2676] JHVM_RegisterNatives: registering methods in com.sap.bc.proj.jstartup.JStartupFramework
        [Thr 2676] JLaunchISetClusterId: set cluster id 5761050
        [Thr 2676] JLaunchISetState: change state from [Initial (0)] to [Waiting for start (1)]
        [Thr 2676] JLaunchISetState: change state from [Waiting for start (1)] to [Starting (2)]
        [Thr 4296] Wed Aug 10 08:34:58 2005
        [Thr 4296] JHVM_RegisterNatives: registering methods in com.sap.mw.rfc.driver.CpicDriver
        [Thr 4296] Wed Aug 10 08:35:00 2005
        [Thr 4296] JHVM_RegisterNatives: registering methods in com.sap.mw.jco.util.SAPConverters
        [Thr 4296] JHVM_RegisterNatives: registering methods in com.sap.mw.jco.util.SAPCharToNUCByteConverter
        [Thr 4296] Wed Aug 10 08:35:01 2005
        [Thr 4296] JHVM_RegisterNatives: registering methods in com.sap.mw.jco.util.SAPNUCByteToCharConverter
        [Thr 2676] Wed Aug 10 08:35:07 2005
        [Thr 2676] JLaunchISetState: change state from [Starting (2)] to [Starting applications (10)]
        [Thr 208] Wed Aug 10 08:36:34 2005
        [Thr 208] JLaunchISetState: change state from [Starting applications (10)] to [Running (3)]
    I still dont know whats happening. And i need to solve the problem urgent. I hope u can help me.
    Thx and Rgds.
    Gregory.

  • DATE FIELD PROBLEMS - URGENT

    I´m having trouble with FormsCentral.
    My form is running about 8 months with no problems.
    Yesterday people started to complain that the system doesn´t accept any date.
    That means the date field restricts date entries, from date dd/mm/aaaa (brazilian format) to another dd/mm/aaaa, but every date that users input in, is considered by the system as invalid, even it´s a correct and valid date right between the interval specified!
    I need Help Urgent!!!
    I depend on these forms to finish the payrol service from here.
    Thanks
    I´ll be waiting.
    Maurício Galletti
    Message was edited by: SNOWMAUSS
    It look like the system accepts just dates starting from the date of today.
    I´m testing.
    Please help.
    Thanks
    Message was edited by: SNOWMAUSS
    It looks like the system have some problem just with the date 20/10/2013?!
    I´ve fixed the problem change the interval from 20/10/2013 to another date  and used  21/10/2013 to another date and it works!
    But I think something is wrong with the 20/10/2013 date?!
    To reproduce the erros just create a new form with date feature with this exaclty configurations and the bug appears:
    I´ll keep waiting
    Message was edited by: SNOWMAUSS

    Hi
    I´ve concluded that the problem persist if the date interval starts at the
    specific date "20/10/2013". Don´t know why?!
    Look at the screen capture above, you aks for
    Thanks a lot
    image: Imagem inline 1
    Maurício P. Galletti
    Contador
    [email protected]
    ( 55 11 3331-5567
    www.cadt.com.br
    2013/10/29 Genevieve Laroche <[email protected]>
       Re: DATE FIELD PROBLEMS - URGENT  created by Genevieve Laroche<http://forums.adobe.com/people/Genevieve+Laroche>in
    FormsCentral - View the full discussion<http://forums.adobe.com/message/5797083#5797083

  • Details:  i can not buy any thing from the app store and any thing from in side any games pls fix my problem urgent and as soon

    Details:
    Hi i can not buy any thing from the app store and any thing from in side any games pls fix my problem urgent and as soon
    Note this is second email pls answer and fix my problem
    <Email Edited by Host>

    These are public forums, you are not talking to iTunes Support here (most of the people here, including myself, are fellow users) - I've asked the hosts to remove your email address from your post
    If you are getting a message to contact iTunes support then you can do so via this page and ask them why the message is appearing (we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If it's a different problem ... ?

  • Need urgent help on file download servlet problem in Internet Explore

    I have trouble to make my download servlet work in Internet Explore. I have gone through all the previous postings and done some research on the internet, but still can't figure out the solution. <br>
    I have a jsp page called "download.jsp" which contains a URL to download a file from the server, and I wrote a servlet (called DownloadServlet) to look up the corresponding file from the database based on the URL and write the file to the HTTP output to send it back to the browser. <br>
    the URL in download.jsp is coded like <a href="/download/<%= currentDoc.doc_id %>/<%= currentDoc.name %>">on the browser, it will be sth like , the number 87 is my internal unique number for a file, and "myfile.doc" is the real document name. <br>
    in my web.xml, "/download/" is mapped to DownloadServlet <br>
    the downloadServlet.java looks like
    tem_name = ... //read DB for file name
    // set content type
    if ( tmp_name.endsWith(".doc")) {
    response.setContentType("application/msword");
    else if ( tmp_name.endsWith(".pdf")){
    response.setContentType("application/pdf");
    else if ( tmp_name.endsWith(".ppt")){
    response.setContentType("application/vnd.ms-powerpoint");
    else if ( tmp_name.endsWith(".xls")){
    response.setContentType("application/vnd.ms-excel");
    else {
    response.setContentType("application/download");
    // set HTTP header
    response.setHeader("Content-Disposition",
    "attachment; filename=\""+tmp_name+"\"");
    OutputStream os = response.getOutputStream();
    //read local file and write back to browser
    int i;
    while ((i = is.read()) != -1) {
    os.write (i);
    os.flush();
    Everything works fine in Netscape 7.0, when I click on the link, Netscape prompts me to choose "open using Word" or "save this file to disk". That's exactly the behavior I want. <br>
    However in IE 5.50, the behavior is VERY STRANGE.
    First, when I click on the URL, the popup window asks me to "open the file from its current location" or "save the file to disk". It also says "You have chosen to download a file from this location, ...(some url).. from localhost"
    (1) If I choose "save the file to disk", it will save the rendered "download.jsp" (ie, the currect page with URL I just clicked, which isn't what I want).
    (2)But if I choose "open the file from its current location", the 2nd popup window replaces the 1st, which also has the "Open ..." and "Save.." options, but it says "You have chosen to download a file from this location, MYFILE.doc from localhost". (notice it shows the correct file name now)
    (3) If I choose "Save..." on the 2nd window, IE will save the correct file which is "myfile.doc"; if I choose "Open ...", a 3rd replaces the 2nd window, and they look the same, and when I choose "Open..." on the 3rd window, IE will use Word to open it.
    any ideas?
    </a>

    Did you find a solution to this problem? I've been wrestling with the same issues for the past six months. Nothing I try seems to work. I've tried setting the contentLength(), inline vs. attachments, different write algorythms, etc. I don't get the suggestion to rename the servlet to a pdf file.

  • Help... Super Urgent. Servlet Problem

    Anyone can help me this? My servlet wants to connect to another servlet. My supervisor tells me to use socket. This is my code.
    Socket socket = new Socket(location, 8210);
              OutputStream os = socket.getOutputStream();
              boolean autoflush = true;
              PrintWriter out = new PrintWriter(socket.getOutputStream(), autoflush);
              ObjectInputStream objIn = null;
              Object obj = null;
    BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
              out.println("GET "+dir+"?class="+className+"&method="+method+"&machine="+request.getServerName()+"&port="+random+" HTTP/1.1");
              out.println("Host: localhost:8080");
              out.println("Connection: Close");
              out.println();
    boolean loop = true;
              StringBuffer sb = new StringBuffer(8096);
              while (objIn==null)
                   objIn = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));
                   try
                        obj = objIn.readObject();
                        //Thread.currentThread().sleep(50);
                   catch (Exception e)
                        e.printStackTrace();
    My supervisor say that as my servlet opens socket connection to the other servlet, the other servlet just have to do outputstream then my servlet can received. I try but can't. Anyone can help me?? Very Urgent. tomorrow is the dateline.

    Hi MelonSeed,
    I believe that the other servlet needs to open a ServerSocket in order for the two servlets to communicate via a Socket.
    Although I haven't tried it, you can open a URLConnection to the other servlet and then open an InputStream for reading the response from the other servlet.
    Depending on the URL you use to connect to the other servlet, you will (as I'm sure you know) invoke its "doGet()" or "doPost()" methods.
    Also, you may find some relevant examples in Jason Hunter's book, Java Servlet Programming, which are available online.
    Good Luck,
    Avi.

  • DEPLOY PROBLEM URGENT

    Hi,
    using JDeveloper 10.1.3.3 ADF BC & JSF. Until today we have deployed all our applications to: Standalone Oracle Enterprise Manager 10g Application Server Control 10.1.3.1.0 throught JDeveloper, I would right click on web.xml, create War deployment profile... and then right click test.deploy and Deploy to AppServer, and everything worked fine.
    But today we tried to move to:
    Oracle Enterprise Manager 10g Application Server Control 10.1.2.0.2
    Supported Target Application Servers 10.1.2.0.2
    and we cannot deploy any of our applications through JDeveloper, so we tried to do it manually through OC4J Home -> Applications -> Deploy WAR file... browsed and selected test.war entered Application Name and Map to URL... and got following error:
    Failed to deploy web application "Test". Failed to deploy web application "Test". . Nested exception
    Resolution:
    Base Exception:
    java.rmi.RemoteException
    deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Unknown assembly root-tag attribute: xmlns:xsi. deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Unknown assembly root-tag attribute: xmlns:xsi
    I've googled a bit and found that I should change following tag in web.xml
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee">
    with
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    since I've read:
    "To be more precise, deployment descriptors which refer to XML Schema definitions are
    only used in J2EE 1.4 and later, but not in J2EE 1.3 or earlier.
    OC4J 9.0.4.x and 10.1.2.x support J2EE 1.3 while OC4J 10.1.3 supports J2EE 1.4."
    Changing that tag underlines following in web.xml and says Element dispatcher not expected, but I can compile and run application without problems:
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    So I've, rebuilded and created .war and .ear files, and tried to deploy again, but this time I've got the following error:
    Failed to deploy web application "Test". Failed to deploy web application "Test". . The evaluate phase failed. The Adapter used in the evaluate may have thrown an exception.
    Resolution:
    Please call Oracle support.
    Base Exception:
    java.lang.NoClassDefFoundError
    oracle/adf/share/logging/ADFLogger. oracle/adf/share/logging/ADFLogger
    I don't know what changes need to be done in my applications (which files to modify) to be able to deploy to Oracle Enterprise Manager 10g Application Server Control 10.1.2.0.2, if anyone has any suggestion or knows what should be done please help, this is quite urgent & important since we plan to migrate all of our applications to this new application server.
    Thanks in advance,
    Tomislav.

    No success at all.
    So far what I gathered from the link you posted and tried:
    Note:
    "J2SE 1.4.2 is in its Java Technology End of Life (EOL) transition period. The EOL transition period began Dec, 11 2006 and will complete October 30th, 2008, when J2SE 1.4.2 will have reached its End of Service Life (EOSL). Customers interested in learning more about Sun's Java Technology Support and EOL policy"
    I cannot find the version 1.4.0. so I've downloaded j2sdk1.4.0_04 and installed it.
    To configure JDeveloper to build projects with JDK 1.4:
    1.Install J2SE 1.4 on the machine running JDeveloper.
    2.Configure JDeveloper with the J2SE 1.4 that you installed:
    a.In JDeveloper, choose Tools > Manage Libraries. This displays the Manage Libraries dialog.
    b.In the Manage Libraries dialog, choose the J2SE Definitions tab.
    c.On the right-hand side, click the Browse button for the J2SE Executable field and navigate to the J2SE_1.4/bin/java.exe file, where J2SE_1.4 refers to the directory where you installed J2SE 1.4.
    d.Click OK.
    3.Configure your project to use J2SE 1.4:
    a.In the Project Properties dialog for your project, select Libraries on the left-hand side.
    b.On the right-hand side, click the Change button for the J2SE Version field. This displays the Edit J2SE Definition dialog.
    c.In the Edit J2SE Definition dialog, on the left-hand side, select 1.4 under User.
    4.Click OK in the Edit J2SE Definition dialog.
    5.Click OK in the Project Properties dialog.
    did that.
    When you run an Oracle JDeveloper 10.1.3 application using the Embedded OC4J server, the application is configured for JDK 1.5. If you then try to switch to JDK 1.4, you will see JSP compile failures. To remedy this you need to force the application files to be re-compiled when OC4J is restarted with JDK 1.4. To configure Embedded OC4J to JDK 1.4:
    1.Configure JDeveloper 10.1.3.4 according to the steps above.
    2.Stop the embedded OC4J server instance.
    3.Delete the following directory:
    ORACLE_HOME/j2ee/instance/application-deployments ( I guess this is the following directory: C:\JDeveloper\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\application-deployments)
    4.Start the embedded server again.
    did that.
    After doing the steps mentioned above I've created new test app with just one page and tried to run, got following error:
    OC4J startup failed
    org.xml.sax.SAXException: META-INF/boot.xml in C:\JDeveloper\j2ee\home\oc4j.jar, line 241: Shared loader 'oc4j.internal' cannot be found.
         at oracle.classloader.util.XMLConfiguration.fail(XMLConfiguration.java:1279)
         at oracle.classloader.util.XMLConfiguration.addImport(XMLConfiguration.java:1253)
         at oracle.classloader.util.XMLConfiguration.startElement(XMLConfiguration.java:630)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534)
         at org.apache.crimson.parser.Parser2.parse(Parser2.java:318)
         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
         at oracle.classloader.util.XMLConfiguration.configureLoaders(XMLConfiguration.java:277)
         at oracle.oc4j.loader.boot.XMLPlusClassPathBootConfiguration.configureLoaders(XMLPlusClassPathBootConfiguration.java:84)
         at oracle.classloader.util.InitialLoadersFactory.populateLoaders(InitialLoadersFactory.java:389)
         at oracle.classloader.util.InitialLoadersFactory.initLoaders(InitialLoadersFactory.java:230)
         at oracle.classloader.util.InitialLoadersFactory.create(InitialLoadersFactory.java:167)
         at oracle.oc4j.loader.boot.BootStrap.main(BootStrap.java:26)
    Process exited with exit code 0.
    Also what do you mean by
    Did you install the ADF Runtime libraries from 10.1.3 on the OAS 10.1.2?
    In the document you linked to, it says:
    Before you can deploy applications that use ADF on third-party application servers, you need to install the ADF runtime libraries on those application servers. You can perform the installation using a wizard or you can do it manually:
    *For WebLogic, JBoss, and Tomcat, you can install the ADF runtime libraries from JDeveloper using the ADF Runtime Installer wizard. See Section 34.12.1, "Installing the ADF Runtime Libraries from JDeveloper".
    *For WebSphere, you have to install the ADF runtime libraries manually. See Section 34.12.2, "Configuring WebSphere 6.0.1 to Run ADF Applications".
    *For all application servers, you can install the ADF runtime libraries manually. See Section 34.12.3, "Installing the ADF Runtime Libraries Manually".
    but we're not using third party app servers since this is not standalone version, we used tomcat before, now colleague that installed OAS told me it doesn't use third party app servers.
    What do you mean by this:
    "If you did try including the ADF logger library in your deployment file."
    How do I do that?
    So now I cannot run embbed app server and test locally using j2sdk1.4.0_04 no matter what I try, and still no luck with deploy. I'm afraid that if I cannot do this with newly created test apps without any complexity, what kind of problems will I have to deal with real production apps...
    I'll keep trying and I'll post if I figure out anything,
    suggestions and help is more than aprechiated,
    thanks in advance,
    Tomislav.

  • Delete data dynamically with JSP and servlet (Very Urgent)

    Hi,
    I am new with servlets and JSP. On my jsp page I am populating customer names in a drop box from database and I have 3 buttons ADD, DELETE and EDIT.
    Now when I press DELETE buttong I am calling delete function which is writen in Javascript on my jsp file only,now I want to pass these selcted values ehich I have stored in an array to be pass to servlet,so I can write Delete query for it and delete.
    Could anyone help with sample code>
    Here what I am trying to say:
    <HTML>
    <HEAD>
    <script language="JavaScript" type="text/javascript">
    <!--
    function remove()
    var u = confirm("Are you sure you want to Delete Selected names?")
    if (u==true)
         var selectedArray = new Array();
         var selObj = document.getElementById('CUSTOMER_NAME');
         var i;
         var count = 0;
         for (i=0; i<selObj.options.length; i++) {
         if (selObj.options.selected) {
         selectedArray[count] = selObj.options[i].value;
         count++;
         alert("names to be deleted are:"+selectedArray);
         // selectedArray has the selected items stored
         alert("Items Deleted!")
    else
    alert("No data were deleted!!You pressed Cancel!")
    //-->
    </script>
    </HEAD>
    <BODY>
    //calling servlet on action tag of form
    <FORM METHOD= 'POST' ACTION='Remove_Customer'>
    <form ><INPUT TYPE='submit' NAME='DELETE' VALUE='DELETE' onclick="remove()"></TD></form>
    <form><INPUT TYPE='submit' NAME='MODIFY' VALUE='MODIFY' onclick="modification()" ></TD></form>
    </BODY>
    </HTML>
    PLEASE HELPME,it's very urgent.
    Since the selected Array is in javascrip language , I don't know how can I pass that to servlet.
    request.getParameter is not working,since it's an array
    Many thanks in Advance.

    Hey,
    I am having problem deleting multiple values.
    If I just select one value,it deletes it
    But for multiple values the code is not working right.
    If there 2 values selcted then the last value gets deleted,if there are more than 2 values selected none values delete.
    Could plese check the code,and let meknow what mistake am I doing?
    Please help
    String delName="";
    int pos = tStr.indexOf(",");
    System.out.println(pos);
         if (pos != -1)
                   delName = tStr.substring(0, tStr.indexOf(","));
              tStr = tStr.substring(tStr.indexOf(",") + 1 );
                   System.out.println("DElName:"+delName);
                   System.out.println("tStr::"+tStr);                              
                        delName = tStr;
                        delete_Customer(delName);
    Thanks
    ASH

  • Request.getParameter() values in servlet? Urgent

    String str=request.getParameter();
    I am facing a problem when i submit the arabic values from hidden form fields using javascript.
    In servlet when i tries to retrive the arabic values stored in the session, it displays only
    garbage values(ie. ?????????).
    How to solve this problem?
    Please clarify and if possible give some samples.
    Thanks & Regards,
    Govindaraman

    Hi Govindaraman,
    in O'Reilly's Servlet book in the internationalization section it describes how. You have to change the String returned into bytes using the proper enconding, then back into a String to it will convert to Unicode.
    The basics are this:
    String parameterName="your param name";
    String encoding = "your charset encoding on the page";
    String value = request.getParameter(parameterName);
    value = new String(value.getBytes(), encoding);
    value is now a Unicode string that should be correctly interpreted.
    You can use new String( oldString.getBytes(), encoding) to convert between charsets.

  • Crystal report display problem--urgent

    i am trying to display to display crystal report in jsp page..
    i have mentioned the entries in web.xml as below
    <env-entry>
              <env-entry-name>clientSDKOptions</env-entry-name>
              <env-entry-value>C:\ProgramFiles\Common Files\Crystal Decisions\2.0\jars\clientSDKOptions.xml</env-entry-value>
              <env-entry-type>java.lang.String</env-entry-type>
         </env-entry>
         <env-entry>
              <env-entry-name>crystal_image_uri</env-entry-name>
              <env-entry-value>/crystalWeb/crystalreportviewers/</env-entry-value>
              <env-entry-type>java.lang.String</env-entry-type>
         </env-entry>
    crystalWeb is webproject folder.
    waiting for an earlier response.
    thanks to all
    krish..
    [11/05/04 11:01:33:164 GMT+08:00] 41c3089e WebGroup I SRVE0180I: [crystalWeb] [crystalWeb] [Servlet.LOG]: /CrystalReportsInteractiveViewer.jsp: init
    [11/05/04 11:01:40:404 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/css/default.css has not been defined
    [11/05/04 11:01:40:444 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/js/search.js has not been defined
    [11/05/04 11:01:40:515 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/js/fw_menu.js has not been defined
    [11/05/04 11:01:40:525 GMT+08:00] 41c3089e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mlogo.gif has not been defined
    [11/05/04 11:01:40:555 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mviewlist.gif has not been defined
    [11/05/04 11:01:40:575 GMT+08:00] 41c3089e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mfirstgrey.gif has not been defined
    [11/05/04 11:01:40:585 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mprevgrey.gif has not been defined
    [11/05/04 11:01:40:595 GMT+08:00] 41c3089e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mnextgrey.gif has not been defined
    [11/05/04 11:01:40:655 GMT+08:00] 41c3089e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mprevgrey.gif has not been defined
    [11/05/04 11:01:40:675 GMT+08:00] 41c3089e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mgotopage.gif has not been defined
    [11/05/04 11:01:40:685 GMT+08:00] 41c3089e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mexport.gif has not been defined
    [11/05/04 11:01:40:655 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mfirstgrey.gif has not been defined
    [11/05/04 11:01:41:015 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/msearch.gif has not been defined
    [11/05/04 11:01:41:045 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mprint.gif has not been defined
    [11/05/04 11:01:41:055 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mzoom.gif has not been defined
    [11/05/04 11:01:41:065 GMT+08:00] 6d40488e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mhelp.gif has not been defined
    [11/05/04 11:01:41:015 GMT+08:00] 41c3089e OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mlastgrey.gif has not been defined
    [11/05/04 11:02:21:463 GMT+08:00] 20668882 OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mhelpover.gif has not been defined
    [11/05/04 11:02:25:940 GMT+08:00] 20668882 OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/mhelp.gif has not been defined

    Possibly it's a path problem try to rewrite env-entry-value for clientSDKOptions with either double backslashes or simple slashe.
    Furthermore the blanks in the path migth be a reason for your problem.
    David

  • Mildet connect to oracle DB using servlet problem ,help please

    hi guys i have a problem am tring to connect my midlet to databse through midlet but i don`t know what is the problem so far the midlet already connect to my servlet url but the servlet cant read the parameters to open the connection for database
    my servlet code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.text.*;
    * @author freddy
    public class getconnection extends HttpServlet {
        Statement statement;
    ResultSet rs=null;
    String bstr=null;
    String bstr1=null;
    String bstr2=null;
    public void init()
        * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
        * @param request servlet request
        * @param response servlet response
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                /* TODO output your page here
                out.println("<html>");
                out.println("<head>");
                out.println("<title>Servlet getConnection</title>"); 
                out.println("</head>");
                out.println("<body>");
                out.println("<h1>Servlet getConnection at " + request.getContextPath () + "</h1>");
                out.println("</body>");
                out.println("</html>");
            } finally {
                out.close();
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        * Handles the HTTP <code>GET</code> method.
        * @param request servlet request
        * @param response servlet response
        @Override
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
      doPost(request,response);
        * Handles the HTTP <code>POST</code> method.
        * @param request servlet request
        * @param response servlet response
        @Override
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
            DataInputStream in = new DataInputStream(
                    (InputStream)request.getInputStream());
            String sid = in.readUTF();
            String user = in.readUTF();
            String pwd = in.readUTF();
          //  "jdbc:oracle:thin:@localhost:1521"+": "+sid
            String message = message = "Name:"+bstr+" telephone:"+bstr1+" burthday:"+bstr2;
             try {
                connect(sid,user, pwd);
                message += "100 ok connected";
            } catch (Throwable t) {
                message += "200 " + t.toString();
            response.setContentType("text/plain");
            response.setContentLength(message.length());
            PrintWriter out = response.getWriter();
            out.println(message);
            in.close();
            out.close();
            out.flush();
        private void connect(String sid, String user,String pwd)
        throws Exception {
            // Establish a JDBC connection to the MYSQL database server.
            //Class.forName("org.gjt.mm.mysql.Driver");
            Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
            Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:"+sid,user,pwd);
            System.out.print("connected");
            try{
               statement =conn.createStatement();
                rs=statement.executeQuery(" Select*from WOH.P_DEMGRAPHICS where P_ID='P1000 '");
            catch(SQLException e)
            System.err.print(e);
           try{
    while (rs.next()) {
    bstr=rs.getString(2);
    bstr1=rs.getString(3);
    bstr2=rs.getString(4);
    statement.close();
       catch (SQLException e) {
    //bstr += e.toString();
    System.err.println(e);
    System.exit(1);
            // Establish a JDBC connection to the Oracle database server.
            //DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
            //Connection conn = DriverManager.getConnection(
            //      "jdbc:oracle:thin:@localhost:1521:"+db,user,pwd);
            // Establish a JDBC connection to the SQL database server.
            //Class.forName("net.sourceforge.jtds.jdbc.Driver");
            //Connection conn = DriverManager.getConnection(
            //      "jdbc:jtds:sqlserver://localhost:1433/"+db,user,pwd);
        * Returns a short description of the servlet.
        public String getServletInfo() {
            return "Short description";
        // </editor-fold>
    }Midlet code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    import java.io.*;
    import java.util.*;
    import javax.microedition.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    * @author freddy
    public class testOrcl extends MIDlet  implements CommandListener {
       protected String url;
        private String username;
        private Display display;
        private Command exit = new Command("EXIT", Command.EXIT, 1);;
        private Command connect = new Command("Connect", Command.SCREEN, 1);
        private TextField tb;
        private Form menu;
        private TextField tb1;
        private TextField tb2;
        DB db;
        public testOrcl() throws Exception
            display=Display.getDisplay(this);
            url="http://localhost:8084/getConnection/getconnection";
        public void startApp() {
            displayMenu();
        public void displayMenu()
        menu= new Form("connect");
         tb = new TextField("Please input database: ","",30,
                    TextField.ANY );
            tb1 = new TextField("Please input username: ","",30,
                    TextField.ANY);
            tb2 = new TextField("Please input password: ","",30,
                    TextField.PASSWORD);
            menu.append(tb);
            menu.append(tb1);
            menu.append(tb2);
            menu.addCommand(exit);
            menu.addCommand(connect);
            menu.setCommandListener(this);
            display.setCurrent(menu);
        public void pauseApp() {
        public void destroyApp(boolean unconditional) { }
        public void commandAction(Command command, Displayable screen) {
            if (command == exit) {
                destroyApp(false);
                notifyDestroyed();
            } else if (command == connect) {
                db  = new DB(this);
                db.start();
                db.connectDb(tb.getString(),tb1.getString(),tb2.getString());
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    import java.io.*;
    import java.util.*;
    import javax.microedition.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.lang.*;
    * @author freddy
    public class DB implements Runnable  {
        testOrcl midlet;
         private Display display;
            String sid;
            String user;
            String pwd;
            public DB( testOrcl midlet)
            this.midlet=midlet;
            display=Display.getDisplay(midlet);
        public void start()
        Thread t = new Thread(this);
                t.start();
        public void run()
         StringBuffer sb = new StringBuffer();
                try {
                    HttpConnection c = (HttpConnection) Connector.open(midlet.url);
                   c.setRequestProperty(
                       "User-Agent","Profile/MIDP-2.1, Configuration/CLDC-1.1");
                    c.setRequestProperty("Content-Language","en-US");
                    c.setRequestMethod(HttpConnection.POST);
                    DataOutputStream os =
                            (DataOutputStream)c.openDataOutputStream();
                    os.writeUTF(sid.trim());
                    os.writeUTF(user.trim());
                    os.writeUTF(pwd.trim());
                    os.flush();
                    os.close();
                    // Get the response from the servlet page.
                    DataInputStream is =(DataInputStream)c.openDataInputStream();
                    //is = c.openInputStream();
                    int ch;
                    sb = new StringBuffer();
                    while ((ch = is.read()) != -1) {
                        sb.append((char)ch);
               showAlert(sb.toString());
                    is.close();
                    c.close();
                } catch (Exception e) {
                    showAlert(e.getMessage());
         /* This method takes input from user like db,user and pwd and pass
                to servlet */
            public void connectDb(String sid,String user,String pwd) {
                this.sid = sid;
                this.user = user;
                this.pwd = pwd;
            /* Display Error On screen*/
            private void showAlert(String err) {
                Alert a = new Alert("");
                a.setString(err);
                a.setTimeout(Alert.FOREVER);
                display.setCurrent(a);
       

    Comment out process request or rewrite & move it to a position after you read the parameters and connect to the db. Decide where you want to write to the output stream. Also, you have some superfluous casting.
    I take it that you are using netbeans? If you debug and step through the code you will get an idea of the flow. The steps should be, midlet connects with POST, doPost is called, server reads parameters, server opens connection, executes query, releases/closes connection, and writes a response to the midlet.
    Some notes about the connect method; The scope of rs may cause problems. It is unlike you will have a valid result set if you have a problem with create statement or execute. Take a look at connection pooling and be mindful how the connections are opened, used, and closed; put all the important cleanup operations in a finally. Remove system.exit from your servlet. Actually I would suggest limiting the scope of all your vars;
    If you store the username, password, and sid on the midlet, you may have trouble updating the installation base if you need to change the values for any reason. Also, you have clients which contain your database u/p, susceptible to snooping and decompilation. Use the servlet to abstract the db from the client. And use a datasource (with connection pooling) for obtaining connections to db.

  • Report server run problem (urgent plz)

    i am using developer9i, xp opereting system but i am not able to run report server . infact i dont know where report server reside and how configure report server. otn discussion forum gave me below instructions but i need step by step detail to run report server.
    pls help me.
    i want to see (Please reffer to Note:204538.1 on
    Metalink ) but i could not access metalink.
    registration does not alow me. i have no country on
    country list and no Support Identifier (CSI, SAC,
    Access Code etc.) . but i need access.
    please help me. access with path
    thanks
    mostafizDear see this information this is metalink information
    Note:204538.1
    Subject: Common Reasons & Troubleshooting: "Unable to communicate with the Reports Server"
    Type: BULLETIN
    Status: PUBLISHED
    Content Type: TEXT/X-HTML
    Creation Date: 22-JUL-2002
    Last Revision Date: 08-MAR-2005
    PURPOSE
    ========
    The main purpose of this document is to list the known causes of the "Unable to
    communicate with the Reports Server" error. The terms Reports Server, CGI,
    Reports Servlet are also described briefly for a better explanation of this error scenario.
    This document includes the following sections :
    I. Brief summary on the architecture of Reports Server, CGI and Reports
    Servlet
    II. Sources of errors encountered when running a report with Reports Server
    III. How the CGI (or the Reports Servlet) communicates with the Reports
    Server
    IV. Possible reasons which lead to "Unable to communicate with the Reports
    Server" error.
    1) Reports Server is up and running
    2) tnsnames.ora and sqlnet.ora problems
    3) Effect of parameter "ORACLE_HOME"
    4) Effect of parameter "maxconnect"
    5) Passing very large parameters to reports server
    6) A case specific to OAS 4.0.8.2
    7) A case specific to WEBDB version 2.1.0.9.3
    V. References
    I. Brief summary on the architecture of Reports Server, CGI and Reports Servlet
    =================================================================================
    In order to understand the causes of the error "Unable to communicate with the
    Reports Server", let's first briefly review the Reports Runtime Engines, Reports
    Server, the Reports CGI, and Reports Servlet architecture.
    There are 4 important layers in Reports Server architecture which should be
    understood in order to clearly understand the error "Unable to communicate with
    the Reports Server" :
    1) The Runtime Engines : This is the main layer where the reports are actually
    executed. On unix systems there are "rwrun60" and on NT systems there are
    "rwrun60.exe" processes.
    2) The Reports Server : The Reports Server recieves the job request and queues
    it. When one of its runtime engines becomes available, it sends the
    command line to that runtime engine for execution. On Unix systems it is
    the "rwmts60" executable and on NT systems it is "rwmts60.exe".
    3) The Reports CGI : The Reports Web CGI passes the request to the Reports Server.
    The Reports CGI or Servlet converts the request to a command line that can be executed by the Reports Server and
    submits it to the specified Reports Server. On Unix platforms this executable
    is "rwcgi60" and on NTs it is "rwcgi60.exe.
    4) The Reports Servlet : Its functionality and function is just the same as "Reports CGI", but it is
    a program written in Java as difference to the CGI program (which is
    written in C programming language).
    The Reports Server may be running on the same server with the CGI program (or
    servlet) OR may reside totally on another machine which does not necessarily have
    the same Operating System. For instance CGI may reside in a Windows NT machine
    while the Reports server may reside on a Unix box, or any other combination with
    Unix-Linux-NT-2000, etc.
    The reports are called with a URL similar to below with the CGI :
    http://fully.qualified.server.name:PORT/dev60cgi/rwcgi60.exe?server=<REPSERVER>&other_parameters=...........
    where fully.qualified.server.name is the name of the server where the Reports CGI
    reside, and <REPSERVER> is the name of the server.
    II. Sources of errors encountered when running a report with Reports Server
    ============================================================================
    The Reports Web CGI (or the Reports Servlet) makes a call to the Reports Server
    and asks it to place the output into some destination (defined by DESTYPE and
    DESNAME parameters), then gives back the necessary response to the calling
    program. For example if the DESTYPE is "cache", then the Reports server generates
    the report to a file in a temporary place and gives it back to CGI and the CGI gives
    it back to the calling program. Otherwise, if the DESTYPE is "file", the Reports Server
    generates the report output to the requested file and the CGI replies back the
    following message : "Report output was successfully written to requested
    destination.".
    If there is any error in this process, the related error message is returned. The
    possible sources of errors can be categorized as follows :
    1) The errors that are returned from Reports Server; like the Reports Server can
    not find the requested RDF file or the report may be run to file and the
    directory where the reports output is asked to be placed does not occur or
    similar errors. (Usually the REP-XXXX errors)
    2) Another possible cause of error is the errors returned by the RDBMS to the
    Reports Server, for example a table not found error or things like that. Of
    course from the CGI point of view these errors are again transmitted from the
    Reports Server but in fact the error originates from the RDBMS. (Usually the
    ORA-XXXX errors)
    3) Another possible cause of errors is the CGI itself, for example when the CGI
    executable can not connect to the requested Reports Server, then we get the
    famous "Unable to communicate with the Reports Server". In this document we will
    diagnose the common reasons of this last error.
    III. How the CGI (or the Reports Servlet) communicates with the Reports Server
    ===============================================================================
    Having said that "Oracle Reports Server CGI - Unable to communicate with the
    Reports Server." error is returned back from the CGI itself, let's discuss the
    issue of how the Reports CGI connect to the Reports Server. The name of the
    Reports Server given in the URL with "server=....." parameter is, in fact, just
    a special tnsnames alias, similar to aliases for database connect strings. As it is
    important for the CGI to resolve the alias, the CGI needs to know the HOST name (or the
    IP) of the machine where the Reports Server is running and the port on which the
    Reports Server is listening. So a typical Reports Server alias is defined as follows :
    REP60_<MACHINE>=(ADDRESS = (PROTOCOL = tcp)(HOST = <MACHINE>)(PORT = <PORT>))
    This is defined in tnsnames.ora file, and the sqlnet.ora file is also used in
    the name resolving operation.
    IV. Possible reasons which lead to "Unable to communicate with the Reports Server" error.
    ==========================================================================================
    The possible reasons for the "Unable to communicate with the Reports Server" error :
    1) Reports Server is up and running :
    Make sure that the Reports Server is really running on the specified server
    and listening on the specified port. For details have a look at above
    explanations for tnsnames alias of the reports server. And because of this the
    CGI could not establish a connection to the Reports Server.
    2) tnsnames.ora and sqlnet.ora problems :
    As described above, the CGI resolves the details for the reports server using
    the "tnsnames.ora" and "sqlnet.ora" files. There may be a problem with them,
    here are the possible configuration problems :
    a) There is no alias in the tnsnames.ora file for this Reports Server
    b) The CGI looks into the wrong directory for the "tnsnames.ora" and "sqlnet.ora"
    files. By default the CGI checks the $ORACLE_HOME/net80/admin directory for
    these scripts, where the $ORACLE_HOME is the home of the Forms & Reports
    installation. Please note that in a typical 9iAS 1.0.X installation there
    are two ORACLE_HOME's, one is for the iAS and the other is for the tools,
    usually the home for the tools is a directory with name "806" on NT and
    "6iserver" on unix systems. By defining TNS_ADMIN in the environment, one
    can override the search path for these two files.
    The TNS_ADMIN variable can be defined in one of the following places :
    i) In the environment : On MS Windows platforms check the "Settings
    --> Control Panel --> System". On NTs check the environment TAB and in
    Win2K systems check the "Environment Variables" button on Advanced tab.
    ii) In "6iserver.conf" file. Details are as follows : The main configuration
    file for Apache server is "httpd.conf" file which resides in
    $IAS_HOME/Apache/Apache/conf directory. In this file there is a line to
    include "oracle_apache.conf" and in this "oracle_apache.conf" file
    there is a line to include "$ORACLE_HOME/conf/6iserver.conf" file. And
    in this file the TNS_ADMIN variable could be defined as follows :
    SetEnvIf Request_URI "rwcgi60" TNS_ADMIN=c:\orant\network\ADMIN
    Please note that by defining it this way, the TNS_ADMIN will only be defined
    for "rwcgi60" calls, so the other parts of the 9iAS will not be affected by
    this setting.
    c) In sqlnet.ora the "names.default_domain" is set but in tnsnames.ora the
    domain is not defined in the alias description. For example if the
    "names.default_domain=world" is present and active in "sqlnet.ora" file
    then in the "tnsnames.ora" the alias of the reports server should also have
    the ".world" extension appended at the end. And another cause is of course
    the vice versa for this. If there is no "names.default_domain" is defined
    in the "sqlnet.ora" then the alias in "tnsnames.ora" should not have the
    domain extension.
    Another important point that should be checked is, if TNS_ADMIN is defined
    as described above then the search path is as follows, first the directory
    defined by TNS_ADMIN is searched, if the "tnsnames.ora" file is not found in
    this directory then $ORACLE_HOME/net80/admin is checked. (And on unix systems
    /var/opt/oracle is also checked). These directories are only checked if the file
    is not present, so if the "tnsnames.ora" file is present in TNS_ADMIN directory
    but the alias is not present, then the other directories are not checked at all.
    Let us assume that the tnsnames.ora file is present in the TNS_ADMIN directory but
    there is no "sqlnet.ora" files here, then the sqlnet.ora file is checked in
    $ORACLE_HOME/net80/admin directory, which could cause the same problem if the
    "names.default_domain" is defined in this file.
    All the above will result in, CGI to unable to resolve the alias in tnsnames.ora
    file so it will not be able to establish a connection to the Reports Server.
    3) Wrong "ORACLE_HOME" setting :
    Wrong ORACLE_HOME setting. This is usually the case for Reports Servlet,
    because the environment settings are defined in "jserv.properties" file for the
    servlets and the setting here will effect both the Reports Servlet and the
    setting for Oracle JSP and other servlets. So the other servlets or Oracle JSP
    may need to set ORACLE_HOME to home of HTTP server while the reports server needs
    it to be set to the TOOLS_HOME directory. In this case the best alternative is
    not to set ORACLE_HOME in this directory and leave it to registry or defined the
    ORACLE_HOME in "6iserver.conf" file just like the TNS_ADMIN defined above. For
    details please have a look at the following document :
    Note 179609.1 "Getting an error Unable to communicate with the Reports Server
    using RWSERVLET"
    4) Effect of parameter "maxconnect" :
    Another common case for this error is that the CGI request reaches the Reports Server but
    the Reports Server refuses connection. The main cause for this case is, that the Reports Server
    configuration parameter "maxconnect" is defined too low, there are long running reports on the
    server or the server is too busy at that time. Usually a second try some
    later time results in a successful connection. If this is the case, the end user
    may think that the problem is occasional. For details on this case please
    have a look at the following document :
    Note 125265.1 "Unable to communicate with the Reports Server"
    5) Passing very large parameters to reports server :
    Another known reason for this error is, if you are passing large parameters
    to the Reports Server which exceeds sqlnet transmission blocks then the request may
    end up with this error. To test it try with small parameter values. If you hit
    this case, the solution is to increase the SDU (Session data unit size) and the TDU
    (Transport unit data size) parameters in tnsnames.ora file, for details please
    have a look at the following document :
    Note 197358.1 "Passing large parameters to Reports show up a Reports Server
    error"
    6) A case specific to OAS 4.0.8.2 :
    If you are using OAS instead of iAS, and the error appeared after
    upgrading to 4.0.8.2 then this is caused because the 4.0.8.2 is using RSF
    (Required Support Files) version 8.1.6 and the Reports 6i is using 8.0.6 and the
    two could not reside in the same ORACLE_HOME directory. So the solution for this
    problem is to create a new batch file and use it from which the actual CGI
    executable is called. For details please see the following document :
    Note 116754.1 "After applying OAS 4.0.8.2 CGI and Cartridge cannot communicate
    to report server"
    7) A case specific to WEBDB version 2.1.0.9.3 :
    Another known case for this error is with WEBDB version 2.1.0.9.3 or less.
    If you are using these old versions of WEBDB as HTTP listener, please have a
    look at the following document :
    Note 95426.1 "URL Not Found When Calling Oracle Developer Report from WebDB Site"

    On Windows you can create a Report Services:
    rwserver -install server=repserverYou have to choose different names for all servers, like your collegue cannot create a server with the same name. You can start/stop this Report server in Services (control panel). Configuration files can be found under $ORACLE_HOME/reports/conf
    Martin

  • Servlet problem: (Shay Shmeltzer / Steve Muench / Frank Nimphius)

    Dear sirs... (Shay Shmeltzer / Steve Muench / Frank Nimphius)
    I hope you can give me an answer.
    I created an ADF UIX application using JDeveloper 10.1.2. I have created a servlet to download files. my problem is that it works just fine using jdeveloper, while when deployed into oracle application server it causes errors.i am calling this servlet by storing filename and data in the session, then sending redirect request to the browser.
    the servlet code is:
    package view;
    import java.io.OutputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    public class FileDownload extends HttpServlet
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    try
    String DownloadFileName=(String) request.getSession().getAttribute("downloadfilename");
    byte data[]=(byte []) request.getSession().getAttribute("downloadfiledata");
    if (DownloadFileName==null)
    return;
    request.getSession().removeAttribute("downloadfilename");
    request.getSession().removeAttribute("downloadfiledata");
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition", "attachment;filename="+DownloadFileName);
    response.setContentLength(data.length);
    OutputStream OS=response.getOutputStream();
    OS.write(data);
    catch (Exception e)
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    try
    String DownloadFileName=(String) request.getSession().getAttribute("downloadfilename");
    byte data[]=(byte []) request.getSession().getAttribute("downloadfiledata");
    if (DownloadFileName==null)
    return;
    request.getSession().removeAttribute("downloadfilename");
    request.getSession().removeAttribute("downloadfiledata");
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition", "attachment;filename="+DownloadFileName);
    response.setContentLength(data.length);
    OutputStream OS=response.getOutputStream();
    OS.write(data);
    catch (Exception e)
    and the error is :
    java.lang.IllegalStateException: Response has already been committed
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindHttpServletResponse.resetBuffer(EvermindHttpServletResponse.java:1902)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:213)
    this error is stored in the log file. if i am running this code from JDeveloper I can download the files using either FireFox or Internet Explorer without any error.
    but if i am running this code using Oracle Application Server 10g Realse 2, i can not download the files using either FireFox or IE.
    so i created another solution, instead of redirecting from a datapage into the servlet, i put the following code in a data page as follows:
    public void onDownload(DataActionContext ctx)
    String DownloadFileName=getfilename();
    byte data[]=getdata();
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition", "attachment;filename="+DownloadFileName);
    response.setContentLength(data.length);
    OutputStream OS=response.getOutputStream();
    OS.write(data);
    OS.flash();
    this time the application works fine when deployed into Oracle Application Server if you use FireFox, but if you use IE, it causes problem, i can not save the file or view it.
    what is the problem?
    how can i fix this?
    i am certin that the second method is not correct and it should not be used.
    thanks for everyone in advance
    best regards

    Dear Sir...
    Thanks alot for your replay
    regarding the reset method. Itried it and it does not give any good.
    I discovered the following problem:
    If you are redirecting from with struts dataaction page to the servlet, you get the error
    Otherwise if you called the servlet from directly or redirected to a servlet from within a servlet, you get no problem.
    can any one help me please??
    Is it possible that the problem is in IE itself? The file is downloaded perfectly fine with firefox(but the error log still appear)?
    best regards

  • Pricing problem-Urgent

    Hi all,
    iam getting a problem regarding pricing.
    When i make a Sales doc. with reference to an invoice,
    everything is being copied from invoice to the sales doc.-customer, material  and its no. , sales area, payment terms, incoterms, and material qty. also.
    But the pricing of the invoice is not getting copied on to the sales doc.
    I have maintained all checks available in the sales doc. type and the item category of the sales doc. type i.e
    Pricing: X
    and then in OVKK , i have maintained the doc. pric. procedure of the sales doc. type  with the pricing procedure of the invoice
    and again in the copy control measures, i have maintained
    Pricing type: D
    But i still not able to copy pricing procedure from the invoice to the Sales doc.
    I want the soltn. urgently.
    Thanks in advance
    Sourav

    run VTAF for your sales doc type/bil type
    and check item category
    set flag for "update doc flow"
    and pricing type B

  • HTML Link problem (Urgent!)

    I'm writing a prrogram that displays an HTML file. I used a JEditorPane. I tryed using the hyperlinkListener but it doesn't work! here's the class I wrote...
    can anyone help please?
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import browser.*;
    import java.net.*;
    import javax.swing.event.*;
    * Classe :
    * Description :
    * Societe : Medias France
    * @version 1.0
    public class Aide extends JFrame implements HyperlinkListener
         BrowserInterface bI;
         URL url1;
         static Interface parent;
         public Aide(String titre, Interface i)
              super(titre);
              parent = i;
              getContentPane().setLayout(new BorderLayout());
              //bI = new BrowserInterface(jp);
              setBounds(10,10,800,600);
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                   quit(null);
              try
                   url1 = new URL("file:/home/darkazan/java/BDO/tablegen-1.8/help/help.html");
                   //bI.URL_Process(url1);
              catch (MalformedURLException e)
                   System.out.println("probleme " + e.toString());
              JEditorPane editorPane = new JEditorPane();
         editorPane.setEditable(false);
         try
         editorPane.setPage(url1);
         catch (IOException e)
         System.err.println("Attempted to read a bad URL: " + url1);
         JScrollPane editorScrollPane = new JScrollPane(editorPane);
              editorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
         editorScrollPane.setPreferredSize(new Dimension(800, 600));
         getContentPane().add(editorScrollPane, "Center");
         pack();
         setVisible(true);
         public void hyperlinkListener(HyperlinkEvent e)
              if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
         // do something on HL click
    System.out.println("ouverture");
              if (e.getEventType() == HyperlinkEvent.EventType.ENTERED)
              // do something on mouse over HL
         // do something on HL click
         System.out.println("bbbbbbbbbbbbbbbbbbbb");
    if (e.getEventType() == HyperlinkEvent.EventType.EXITED)
    // do something on HL click
    System.out.println("ggggggggggggggggggg");
    // do something on mouse moved away from HL
         public void hyperlinkUpdate(HyperlinkEvent e)
         public static void main(String[] args)
              Aide aide1 = new Aide("Help", parent);
         * Quitter l'application
         * @param     e L'evenement recu
         * @return     Sans objet.
         void quit(ActionEvent e)
              parent.bAide.setEnabled(true);
              dispose();
    }

    also check your file protocol it should look like this: file:/// with three slashes(i think?)
    here Mr. Urgent, my html viewer: (and it works) ;P
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import javax.accessibility.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.io.IOException;
    public class iROCHelp extends JPanel implements HyperlinkListener{
    //ATTRIBUTES
    JEditorPane html;
    private static boolean HelpShowing = false;
    private static JFrame selTopic;
    //METHODS
    //Constructor
    public iROCHelp(java.net.URL URLstr){
    //setBorder(new EmptyBorder());
    setLayout(new BorderLayout());
    try{
    URL url = URLstr;
    if(url != null){
    html = new JEditorPane(url);
    html.setEditable(false);
    html.addHyperlinkListener(this);
    JScrollPane scroller = new JScrollPane();
    JViewport vp = scroller.getViewport();
    vp.add(html);
    vp.setBackingStoreEnabled(true);
    add(scroller, BorderLayout.CENTER);
    catch (MalformedURLException e){
    System.out.println("Malformed URL: " + e);
    catch (IOException e){
    System.out.println("IOException: " + e);
    }//HelpTopic CONSTRUCTOR
    public void hyperlinkUpdate(HyperlinkEvent e){
    if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED){
    linkActivated(e.getURL());
    }//hyperlinkUpdate
    protected void linkActivated(URL u){
    Cursor c = html.getCursor();
    Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
    html.setCursor(waitCursor);
    SwingUtilities.invokeLater(new PageLoader(u, c));
    }//linkActivated
    class PageLoader implements Runnable{
    PageLoader(URL u, Cursor c){
    url = u;
    cursor = c;
    public void run(){
    if (url == null){
    // restore the original cursor
    html.setCursor(cursor);
    Container parent = html.getParent();
    parent.repaint();
    else{
    Document doc = html.getDocument();
    try{
    html.setPage(url);
    catch (IOException ioe){
    html.setDocument(doc);
    finally{
    // schedule the cursor to revert after
    // the paint has happended.
    url = null;
    SwingUtilities.invokeLater(this);
    }//else
    }//run
    URL url;
    Cursor cursor;
    }//PageLoader
    public static void spawnHelp(java.net.URL URLStr){
    if (!HelpShowing){
    selTopic = new JFrame();
    selTopic.getContentPane().setLayout(new BorderLayout());
    selTopic.getContentPane().add(new iROCHelp(URLStr),BorderLayout.CENTER);
    Dimension dim = selTopic.getToolkit().getScreenSize();
    selTopic.setLocation((int)dim.getWidth()/2-selTopic.getWidth()/2,(int)dim.getHeight()/2-selTopic.getHeight()/2);
    selTopic.setSize(500, 400);
    selTopic.setTitle("Remote Operators Console Help");
    selTopic.addWindowListener(new WindowAdapter(){
    public void windowClosing(WindowEvent e){
    closeHelp();
    }//windowClosing
    selTopic.show();
    HelpShowing = true;
    }//if help showing
    }//spawnHelp
    public static void closeHelp(){
    if (HelpShowing){
    selTopic.dispose();
    HelpShowing = false;
    }//closeHelp
    }//HelpTopic CLASS

Maybe you are looking for

  • Purchase order no not getting displayed in FBL3N for doucment type RE

    Dear all, We have done a settings in FBL3N t.code. We have added BSEG-EBELN in the special fields and saved the layout. The purpose is to make the purchase order number to display when we are executing line item display for GR/IR clearing and Cenvat

  • Floppy disk for mac ii ci

    Hi Downloaded a game on to my macbook (Factory) about 8oo k. I want to get it on an old IIci- but no floppy drive! Before I go to the bother of doing this would the II ci accept a floppy produced from a newer Mac? Thanks

  • Populate date fields when closing or canceling document

    When any document closes or is canceled, populate the existing close date and cancel date with the date of the transaction. This would greatly help custom reporting.

  • Validating xml with external schema

    Hi, I want to validate a xml against an external schema using java and the xml WILL NOT contain any reference to the schema. Any help in the matter is most welcome. A typical example of such an xml is given below: <Envelope > <Body> " Some content he

  • How do I contact Apple for Job Application status?

    Hi everyone, I have applied for a job at Apple locally (Minnesota), A few days later a recruiter emailed me asking for my availability the next couple of weeks for a phone interview.  I replied twice so far, the 2 week span has passed, and I have yet