Out.println not works after connecting database

Hi,
I am not able to view the output after connecting the database. If i change the output bfr connect it is working fine.
any idea?
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.net.*;
import java.sql.*;
import java.util.*;
public class Login3 extends HttpServlet
public void doGet(HttpServletRequest req ,HttpServletResponse res)
throws IOException,ServletException
Connection conn = null;
Statement st;
ResultSet rs1,rs2;
Statement select = null;
ResultSet result = null;
try{
ResourceBundle config = ResourceBundle.getBundle("config");
String dbserver = config.getString("dbserver");
res.setContentType("text/html");
PrintWriter out = res.getWriter();
Class.forName("org.gjt.mm.mysql.Driver");
conn = DriverManager.getConnection("jdbc:mysql://192.168.1.20/test?user=saravanan&password=123456");
out.println("<html><body>hai</body></html>");
}catch(Exception e){e.printStackTrace();}
}

hi,
Thanks for ur reply. I didn't get any exception or error in the log files
Regards,
Saravanan

Similar Messages

  • System.out.println not working in Tomcat-4.1.x

    System.out.println not working in Tomcat-4.1.24. Any settings has to be enabled??? I am using tomcat for Solaris

    I think u can use ServletContext.log() to output info instased.

  • 32-bit JDK 7 System.out.println not working in IDE

    Hi folks,
    I have a 64-bit Windows 7 OS.
    Due to 3rd party library/jar dependencies, i had to install the 32-bit Java JDK 1.7 and Eclipse IDE.
    I also installed NetBeans.
    So i have a 64-bit OS and am running 32-bit Java JDK/JRE & IDEs.
    The problem I am having is that my program's System.out.println("...") statements are not outputting strings to either IDE debug console.
    Executing the compiled program from a command line/prompt produces the expected string output.
    The basic "Hello, World" program is enough to cause this behaviour to start occurring.
    I have not manually / intentionally changed any IDE-specific Debug Console or Windows environment settings.
    One caveat: This same environment has worked successfully in the past ?! Yes, this is one of those "..it worked last week & yesterday and today it isn't and i swear i didn't do anything..." issue.
    Thoughts ?

    Thanks for the reply.
    The 64-bit versions of Java & Eclipse were installed first.
    When i discovered I had to use the 32-bit versions, i un-installed the 64-bit ones & installed the 32-bits.
    Even after that initial un-install 64-bit/install 32-bit process, it was working.
    I have also been installing the Windows 7 64-bit OS updates when i am informed of them.
    I'm not sure if any of these would affect how the Eclipse / NetBeans IDEs behave.
    Behaviour has been inconsistent.
    Initially it was always working.
    But over the past several days, it has been working less and less.
    I don't have any large data structures.
    This isn't a large complicated program, couple hundred lines, so i highly doubt that i'm doing anything to the resources, but something has changed.
    The main project I am working on takes command line parameters, does some initial processing, produces output using System.out.printlns [SOP] then depending on the parameters, branches into 2 different processing paths, let's call them A & B. Each of these processing paths also use SOPs. When i run the program in the IDE going thru path A, sometimes the initial SOP statements will work and the SOP statements specific to path A will also work. If i immediately change the parameters to go thru path B & re-run it, not even the initial SOP statements before the branching decision work.
    I've tried doing System.flush()s too - no affect.
    I haven't tried the re-direction option to a file option you mentioned yet.
    It always works from a command prompt - that is telling me that the Java SOPs are working properly, correct ?
    Inside an Eclipse or NetBeans IDE, SOP output to the debug console is inconsistent.
    Running from a command prompt, the SOPs always work.
    It'd help to know if this an IDE issue, a Java issue, a Windows 7 issue so i can narrow down where to try and correct the situation.
    I have a Windows XP VM set up, i'll try running the program there and see if there's a difference.
    Thanks for your reply.

  • PL/SQL program not working when connect database via SqlNet

    Hi,
    This is a segment of a PL/SQL program before opening a cursor using input descriptor. It is working fine ( to get the value of unOutputCount ) without connect to a database via SqlNet, can anyone tell me why it is not working ( unOutputCount return 0)while connecting to a database via SqlNet and how to make it work without opening a cursor before DESCRIBE OUTPUT ...?
    EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'input_111'
    WITH MAX 100;
    EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'output_111'
    WITH MAX 100;
    EXEC SQL PREPARE STMT1 FROM :psSqlStatement;
    EXEC SQL DECLARE CURSOR1 CURSOR FOR STMT1;
    EXEC SQL DESCRIBE INPUT STMT1
    USING DESCRIPTOR GLOBAL 'input_111';
    /* Get count of input parameters in statement */
    EXEC SQL GET DESCRIPTOR GLOBAL 'input_111' :unInputCount = COUNT;
    EXEC SQL DESCRIBE OUTPUT STMT1
    USING DESCRIPTOR GLOBAL 'output_111';
    /* Get count of output parameters in statement */
    EXEC SQL GET DESCRIPTOR GLOBAL 'output_111'
    :unOutputCount = COUNT;

    Hi,
    Welcome to Oracle OTN Forums!
    I changed your code a little. I think this help you
    CREATE OR REPLACE
    PROCEDURE xx_test
    IS
      v_pid VARCHAR2(100);
      v_cn  VARCHAR2(100);
      v_id  VARCHAR2(1000);
      v_val VARCHAR2(1000);
      CURSOR C1
      IS
        (SELECT product_id, 'PRODUCT_ID'  cn
            FROM product1 );
      BEGIN
        FOR V1 IN C1
        LOOP
          FETCH C1 INTO v_pid, v_cn;
          dbms_output.put_line('==== '||v_pid||'==== '||v_cn);
          EXECUTE IMMEDIATE
          'SELECT product_id, DECODE(COUNT (product_id),1,MAX (product_id))||'''||V_CN||''' as val
            FROM product1
           WHERE product_id =:a
           GROUP BY product_id)' INTO v_id, v_val USING v_pid;
          dbms_output.put_line('==== '||v_id||'==== '||v_val);
          EXECUTE IMMEDIATE 'UPDATE product2 SET '||v_cn||' = ' ||''''|| v_val ||''''|| ' WHERE product_id = :b' USING v_pid;
          dbms_output.put_line('++++ '||v_cn||'++++ '||v_val||'++++ '||v_pid);
        END LOOP;
      END xx_test;

  • IPhoto not working after connecting to a new iPad

    I tried to move some photos using iPhoto from my iMac to a new iPad. Couldn't figure out how and when I went to open iPhoto later on my iMac it won't open and says I need to upgrade. Not sure what happened, any ideas? Do I really need to upgrade iPhoto or is it possibly confused?

    After you connect the iPad to the iMac, go to iPhoto and select the iPads icon in the sidebar under Devices.
    Then select Photos from the Summary bar along the top.
    Next check the Sync Photos from box and select iPhoto.
    Then choose a the Photos that you want from either the Events, Albums or Faces by checking the box next to them and then click the Sync button at the bottom.
    Also do the same for music and movies that you want to Sync to your iPad.
    Just remember that the iPad has limited space compaired to the iMac and that you will have to closely manage what you Sync to it, buy checking only certian items and then later unchecking older items to add new ones. 

  • Scamner not working after connecting to a new laptop

    connected c5180 to a new laptop.  installed the drivers from the HP website.  when I try to scan a document, I do through all the selections on the screen hit scan and nothing happens.  I get the impression it thinks it's scanning as the display on the laptop has the spinning circle.  afer about a minute the scanner is in a ready state, but nothing at all happens with the device.  The c5180 has a small display, does not show a acan is in progress. 
    now when I try to scan from the scan button on the 5180, the display show that a scan is in progress, but nothing happens in terms of a scan actually being done.
    Any help with the is much appreciated
    Rob

    Hello @Rob1216 , and welcome to the HP Forums, I hope you enjoy your experience!
    I see you are having issues scanning. I'd like to help!
    Does this issue occur when making a copy as opposed to a scan?
    I'd recommend starting with a power reset.  Disconnect the power cord from the printer and the power outlet, then wait 60 seconds. After 60 seconds, plug the printer back in. Ensure you plug the printer directly to a wall outlet. Make sure to bypass any sort of surge protector or power bar.
    I would also recommend downloading and running the HP Print and Scan Doctor.
    Good luck and please let me know the results of your troubleshooting steps. Thank you for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • My submit button on my PDF form is greyed out (will not work) after posting link to PDF on my WordPress website. It works in Acrobat Reader just fine.

    This is where you can see the form as clicked through to from the WordPress website page:
    http://pinetreeplayers.com/ptp_new/wp-content/uploads/2014/12/submit-a-play.pdf
    The PDF file was created in Acrobat 11, with a submit button. The submit button is actioned to send the form via email. It works perfectly by itself if the form is opened in Acrobat Reader, but once I upload the PDF to my WordPress site the submit button is greyed out, and will not complete the action to send on-click.
    How can I fix this please - can anyone offer advice?

    Yes. They need to download Reader and then disable Google Chrome's internal PDF viewer and enable Adobe Reader.
    FireFox should also be configured to use Adobe Reader and not the internal PDF viewer.
    The internal viewers are created to process PDF documents by not including the features and code to process PDF forms.

  • Hp 430 laptop touchpad is not working afternet connecting rj-45 cable

    hp 430 laptop touchpad is not working after connecting rj-45 cable, Please help me.

    Hello 9560030067, and welcome to the HP Forums.
    I see you are having issues getting your printer to be recognized.  I would be happy to help you with that!
    First, I would suggest disconnecting the USB cable, and Uninstalling the Printer Software.
    Once it is uninstalled, reinstall the software.  Be sure not to plug the USB cable back in until the software prompts you to connect it.  Also, when plugging the USB back in, I would suggest plugging it into a USB 2.0 port, not a 3.0 port.
    Good luck and please let me know the results of your troubleshooting steps. Thank you for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Macbook Pro 2011 DVI HDMI out does not work with TV when the power cable is connected

    My Macbook Pro (Early 2011) DVI HDMI out does not work with TV when the power cable is connected. If get the blue screen and then can use the macbook but nothing is displayed on the TV. If i go into display I can see that there are two screens but nothing displayed on the TV. If i take the power cable out at this point the TV shows the second desktop as expected. If i then reconnect the cable, the screen flickers, as though it is being affected by the power cable, and the screen goes blank on the TV. Only if i remove the DVI cable do i get the blue screen again. If i remove the power cable and reconnect it will do it every single time, so i cannot see it being a TV issue or a minor glitch.
    I have had this working previously but at the minute it seems to not be playing ball....any thoughts
    Thanks
    Dan

    BUMP
    Any ideas?

  • My wi-fi on my iPhone 4S is not working after updating to ios7 and is a few weeks out of warranty, the Apple store wants me to pay £160 for a new one, are they joking?!

    My wi-fi on my iPhone 4S is not working after updating to ios7 which was working perfectly fine before. It is a few weeks out of warranty now and the Apple store wants me to pay £160 for a new one, are they joking?!

    Hi there Juicy Guava,
    You may find the troubleshooting steps in the article below helpful.
    iPhone, iPad, iPod touch: Troubleshooting touchscreen response
    http://support.apple.com/kb/ts1827
    -Griff W. 

  • My 3G connection is not working after updating to iOS 6.1. I have tried all possible solutions like resetting the network, restarting the iPad

    My 3G connection is not working after updating to iOS 6.1. I have tried all possible solutions like resetting the network , restarting iPad , ...

    The same story. No 3G after updating to 6.1.  Told my daughter temporarily not to do an update on her iPad with 6.01. We've exchanged SIMs. I inserted her SIM in my iPad - 3G appeared immediately. And my SIM in her iPad with ios 6.01 also WORKS FINE. We use the same provider - Megafon Moscow. After attempting to revert SIMs to original configuration, 3G disappeared on my iPad again. Don't know what's going on with SIM during the update to 6.1

  • Zone Base Forewall for VPN connections does not work after IOS upgrade

    Hi all,
    We use cisco router 2911 as corporate gateway - there is Zone Based Firewall implemented - I upgraded IOS to last version (15.2(2)T1) - originaly version 15.1(4)M1 - to solve issue with Anyconnect connections (bug CSCtx38806) but I found that after upgrade the VPN users are not able to communicate with sources in other zones.
    More specific
    WebVPN use this virtual template interface
    interface Virtual-Template100
    description Template for SSLVPN
    ip unnumbered GigabitEthernet0/1.100
    zone-member security INSIDE
    There are other zones VOICE, LAB, ...
    In the policy any connection is allowed (used inspection of icmp, tcp and udp) from INSIDE zone to VOICE or LAB zone
    After VPN connection I am able to reach resources in INSIDE zone (which is the most important), but not in other zones. Before upgrade it worked.
    Once I changed zone in Virtual-Template interface to VOICE, I was able to reach sources in VOICE zone but not in any other. I searched more and found the stateful firewall is not working for connections from VPN as ping is blocked by policy on returning way - it means by policy VOICE->INSIDE, once I allowed communication from "destination" zone to INSIDE zone - the connections started to work, but of cause it is not something I want to setup.
    Does anybody has the same experiance?
    Regards
    Pavel

    It seems to me I should add one importatant note - if client is connected directly in INSIDE zone, he can reach resources in other zones without any issue - so the problem is only when the client is connected by VPN - not in ZBF policy setup.
    Pavel

  • TS3367 Hi, the FaceTime just did not work between my mom and I. It used to work weeks ago, but now it does not work after showing"connecting". I feel frustrated and try all the method I can think of. Still do not work. Hope u can help me. Thanks!

    Hi, the FaceTime just did not work between my mom and I. It used to work weeks ago, but now it does not work after showing"connecting". I feel frustrated and try all the method I can think of. Still do not work. Hope u can help me. Thanks!

    Was it just this one time?  Could be that you, or your mom, were experiencing network problems.  Try again at a later time.

  • Wifi connection with 4s not working after installing new software ios6

    wifi connection with 4s not working after installing ios 6.

    Go to Settings > WiFi > Select your network and hit the right arrow to "Forget Network"
    Then go to Settings > General > Reset Network Settings  and try connecting again when the phone restarts.

  • Zoom in and out is not working in folders after installing Lion OS

    Zoom in and out is not working in folders after installing Lion OS. Did not understand why?

    Feature has been removed AFAIK. As far as zoom is concerned, the new operating system has been..whatever the opposite of optimized is...pessimized?

Maybe you are looking for

  • How do I find 'open in' on ipad

    I cannot find 'open in' on my ipad. It is not under the action key. How do I find it.

  • Can i create different file for my movies

    I need to create diferent file for movies, but i don't know how to do it

  • Premier elements 11

    I have recently bought premier elements 11. I open the icon, click on new project, it looks to try and open but it then close. I then get a message... We have detected an incompatible display driver. To get a better and faster performance, please upd

  • Transmiting video captured from a webcam to another system on Intranet

    Hi Everybody, Need your help. I have created an application in SWINGS which transmit my live webcam video to client in the intranet and the clients receive the live webcam Video. Now I have modified my code to run the same thing in Applets i.e. in fo

  • Starting up an Oracle database in read only mode

    Is there a way to have an oracle database start up in "read only" mode every time the instance is shutdown and strated back up. I need to accomplish this without any sort of manual intervention? Is there a parameter that can be set in init.ora etc...