Why can't I select mysql'data?

Hi everyone:
I have a javabean that has a executequery method.I use it in jsp file.I use "select * from statement" for query data in the mysql.But I get nothing in browser!The IE is blank!My javabean code is:
/////////////////////////////Mydata.java////////////////////////////////////////////
��������������������������������������������������������������������
������������������������������������������������������
public class Mydata {
ResultSet rs;
Statement stm;
Connection conn;
String sql="select * from statement";
String connStr="jdbc:mysql://lyo:3306/test";
String uri="org.gjt.mm.mysql.Driver";
public Mydata(){
public ResultSet executequery(String sql){
try{
Class.forName(uri).newInstance();
conn=DriverManager.getConnection(connStr,"lyo","qijiashe");
stm=conn.createStatement();
rs=stm.executeQuery(sql);
rs.close();
}catch(Exception e){
System.out.println("Exception:"+e.toString());
return rs;
����������������������������������������������������������������������������
/////////////////////////////////main.jsp/////////////////////////////////////////////////
<%
String sql="select * from statement";
ResultSet rs;
rs = lyo.executequery(sql);
String id="";
String title="";
String statement="";
String name="";
String time="";
String fatherid="";
while(rs.next()){
%>
<td><%=rs.getString("id")%></td>
<td><%=rs.getString("title")%></td>
<td><%=rs.getString("content")%></td>
<td><%=rs.getString("name")%></td>
<td><%=rs.getString("time")%></td>
<td><%=rs.getString("fatherid")%></td></tr>
<%
rs.close();
Can anyone help me?Where do I mistake? :(

I don't get any errors!The database table have data!The data can be output using commandline in win2000.But why it can't be output use jsp?

Similar Messages

  • Where is Verizons email for CONTACT?Why can't I select the date to make a payment?

    How come when I pay my Bill with a credit card & Or debit card I cannot chose a date in advance for paynent?  99.99% of the bills I pay online (AT&T included) when I schedule a bill payment with a credit card &/or debit I can schedule payment 2 months to a year in advance. Why not Verizon? Perhaps I wouldn't have any late fees if they had it setup that way? Perhaps that IS why they do so they can get those extra fees? Also why is it so difficult to contact Verizon, why don't they have an email addy? I have an acct with verizon for my Hub and a wireless acct with AT&T. I am looking for a new carrier for my wireless phone & most likely my hub now for I've crossed Verizon off my list  of a new carrier if they make things this difficult on such easy problems. Apparently they don't want to be customer friendly!

    You bill due date is the same date every month. It is not all that difficult to pay on time.
    Set up a monthly notification on your device to pay your bill.

  • Why can I NOT select March 2013 Month Display in iPad's calendar ?

    Why can I NOT select March 2013 Month display in iPad's calendar ?

    Just found out that I had subcribed for a calendar which shows the numbers of the calendar weeks. Turned this off and no crash anymore.
    How can I get the number of calendar weeks in a different way. So that no crashes occur?

  • Why can't I see the data in the spreadsheet ?

    why can't I see the data in the spreadsheet file in Which I wrote my output data? I set the format of write to spreadsheet file to be %.11f. Though I can see only colums of zeros, I can plot out the data.

    I tried th "%.11f" format and it worked in the attached VI (6.1). Please respond and attach a small example VI that demonstrates your problem.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect
    Attachments:
    array_test.vi ‏15 KB

  • Why can't I select STUDEN adobe CC plan?

    I tried to buy adobe CC student and I could not even select. Why can I not select student / teacher plan
    Best regards
    Urh

    Athellionn then please contact our support team at http://adobe.ly/1d3k3a5 if a new web browser has not given you the correct option.

  • Why can't I select preferred wifi networks

    why can't I select preferred wifi networks

    I don't know how to block the other wireless access points to show on the list, but from what you said, you want to let it connect to one of your preferred network whenever one is available, connect it automatically.
    before you change anything, let run the following command in Terminal to show your Mac current settings:
    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airp ort en1 prefs
    copy what it returned.
    mine returned:
    AirPort preferences for en1:
    DisconnectOnLogout=NO
    JoinMode=Preferred
    JoinModeFallback=Prompt
    RememberRecentNetworks=YES
    RequireAdminIBSS=NO
    RequireAdminNetworkChange=YES
    RequireAdminPowerToggle=YES
    WoWEnabled=NO
    That's the default behaviour of OS X, we don't care for what reason it was changed on your Mac. Lets reset it.
    in Terminal, run the following command:
    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/air port en1 prefs JoinMode=Preferred JoinModeFallback=Prompt RememberRecentNetworks=YES
    it may ask you to put admin password, and do so, press enter to continue.
    Explain a little bit.
    The JoinMode=Preferred means, it will connect your preferred network when it's available.
    JoinModeFallback=Prompt: if no preferred network around, it will prompt you to choose. if you want you can select other options:
         JoinOpen
         KeepLooking
         DoNothing
    RememberRecentNetworks=YES: it will remember whatever network it joined before, put it in your preferred network. If you want, set it to No.
    you can get the details of airport command by run:
    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airp ort
    Hope this help.

  • Why can't I select and drag addresses from contacts to mail

    Why can't I select and drag addresses from contacts to mail

    Re: can't drag email addresses from contact list

  • Why can't I select shuffle slide order in my settings?

    Why can't I select shuffle slide order in my settings. . . I see it there as an option, but it won't let me choose it.  I don't want to manually shuffle 329 slides!

    It's only available in slideshow that are generated from a album.  There you can select the Shuffle checkbox.  You can also save the settings for that specific album to be used on any set of photos that you might put in there.  Name the album something like Slideshow and reuse it.  Just remove the last batch of photos from it and add the new ones.  That will save you having to set all of the settings each time or just one setting like music.
    OT

  • Why can I not select SD versions of SD programs I purchased?

    Why can I not select SD versions of SD TV programs I purchased? When I go to my program to download it. I click the SD button, that is what I paid for. It will not move over to the SD version to allow me to download it even though I have received notification that I have a new program waiting.

    I found my own solution. While in the Itunes store I did a search for the program by name of the current season. It brought up a list of the current season and it showed that I had an undownloaded episode of the program. I hit the download ad it completed the SD download.

  • Why is select calendar and address book greyed out? Why can we not select these options?

    Why can we not select address books or calendars? Why is this option greyed out in ITunes 12?

    You have to make the selection active.
    Go to Select>all, then Select>modify>border.
    Another way is to use a stroke:
    Open your picture file
    Go to Select>all
    Open a blank layer above this
    Go to Edit>stroke(outline) selection. In the  dialog, enter the width of the stroke, choose color, place it inside, ok it.
    If you don't like the border, delete the layer with the stroke, and adjust to suit, then do it over starting with step #3

  • Why can't I set the Date format in English for Malaysia Region for my iPhone and iPad?

    Why can't I set the Date format in English for Malaysia Region for my iPhone and iPad?

    Apple should change the settings to Malaysia -> Malay / English / Chinese / Tamil

  • Why can't I set month,date and time on my imessage?

    Why can't I set month, date and time on my imessage?

    The way the date/time was displayed was changed in iOS7. There had been numerous complaints about not having a date/time stamp on all posts, so it was changed to display the time for all by sliding the post to the left. They left the date stamp to show differently. I couldn't tell you what it does for posts more than a week old, as I never save my messages that long.
    Meg's post provides for software where you could move the SMS to the computer and it should contain a full date/time stamp on it.

  • TS3771 Why can't I select "get info" from the file area so I can change the setting to "open in 32-bit mode" ?

    Why can't I select "get info" from the file area so I can change the setting to "open in 32-bit mode" ?

    It may be because of your settings. You can modify that setting in System Preferences > Trackpad. Another way of making right-click is to click the app icon while holding the Control key

  • Why can I not see the date messages are sent anymore

    Why can I not see the date messages have been sent anymore

    Drag your finger from right to left to reveal the time

  • Why can't I select a Music Source - iPhoto 9.1.3?

    I can't stand that awful jazzy piano accompaniment when I start a slideshow, but every time I try to change the music, ie here:
    ...I click on the arrows where it says "Source" & nothing happens. I've tried trashing the pref file, but it still resolutely refuses to show anything at all. I deselected "Play music during slideshow" because that jazzy piano was doing my head in!! Why can't I select some other music source?

    Try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your Home()/  Library/Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your Home()/ Library/Caches/com.apple.iPhoto folder. 
    3 - reboot and launch iPhoto to try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    If that doesn't help try deleting the com.apple.iApps.plist file from the same folder as the iPhoto preference file.
    OT

Maybe you are looking for

  • Photoshop Touch 4Phone: EPIC FAIL

    I have downloaded Adobe Photoshop Touch Phone from Play Store for Samsung Galaxy SIII (in perfect working order). No works: cannot open a new blank document or open any photo gallery. So I read on Play Store I'm not the only one affected by a poorly

  • IGS chart caption for multibype-languages

    Hi I am working on a problem with wrong Chinese display of captions in web query chart, everything displays fine in web query except the captions in chart(even mouse-over on the captions works fine for Chinese display in chart), the captions display

  • Nested Sub Reports - is it possible?

    Hi, Please could someone tell me if it is possible to have a sub report within a sub report. I have tried without success. If not what is the alternative? Thanks in advance Amir

  • Error 1904 in Windows 7....

    Hi, In include the CrystalReports11_5_RDC_Designtime.msm and CrystalReports11_5_RDC_Runtime.msm in an installshield setup project. When I run the setup in Windows7 I get this error: "Error 1904. Module C:\Programs Files\Business\Objects\Common\3.5\bi

  • Dynamic JSP's includes from JSF Java Beans

    Hi! I�m David from Barcelona.I'm testing different JSF components. I'm working with MyFaces components, with Tabs, binding the component like this to create sub tabs dynamically: <t:panelTabbedPane binding="#{editorPanelBean.pane}"/> Now, in the bean