Jsp to get info out of servlet question

Hey, I'm looking for a good site or tutorial with examples in how to get info out of a bean or servlet.
for example I have a bean that querys a db for info. how do I print that info to a jsp page with out using the out.printWriter? I know I need to use the <jsp:useBean...
but after I instantiate the bean how do I pull info off of it?

The Sun Java Developer site has a tutorial for almost everything. Check out the J2EE tutorial at http://java.sun.com/j2ee/tutorial/1_3-fcs/index.html
There is a section on using JavaBeans in JSP pages.

Similar Messages

  • Getting info out of an excel file like a database

    Hi,
    The problem i have is that i have to get info out of an excel file like a database. So i have to be able to perform a kind of query, but to an excel file. Is this possible?
    lay-out excel file:
    number | request | chemical composition
    | | C | Mn | Si | ....
    125654 | |0.20%|0.10%|0.05%|.....
    i should have to be able to search on the number and read the differend % (C, Mn, Si). This % are used in a formula to calculate a value that is used for DAQ
    I can do this action with an acces DB, but not with excel. The problem is that they used excel for some years now (where i work) and changing the excel file to a DB would be a very long w
    ork.
    If someone could help i'd appreciate it
    thx

    I tried it like you said, but i get the error: -2147217865
    exception occured.
    [Microsoft][ODBC Excel Driver] The microsoft jet database engine could not find the object 'Sheet1'. Make sure the object exists...
    So he doesn't seem to recognize a datasheet as a table (if i may compare it like this) when i choose the microsoft Excel driver with the workbook as described in your answer.
    Any ideas?
    i putted some attachements, maybe they make it easier to understand
    Attachments:
    test_excel_query.vi ‏37 KB
    test_query_excel.xls ‏90 KB

  • Problems by getting info out of XML file with a HTTP request

    Hi,
    I have a litte question. I'm working on an application that works together with google maps. In my java code, I get general information about address out of one database table, and I want to add some geographic information like coordinates that I want to retrieve from Google Maps through HTTP:
    Right now my code is like:
    while (resultSet.next())
                             title = resultSet.getString("title").replaceAll("'","''").toUpperCase();
                             author = resultSet.getString("author").replaceAll("'","''").toUpperCase();
                             location = resultSet.getString("location").replaceAll("'","''").toUpperCase();
                             straatnaam = resultSet.getString("straatnaam").replaceAll("'","''").toUpperCase();
                             nummer = resultSet.getString("nummer");
                             landcode = resultSet.getString("landcode").replaceAll("'","''").toUpperCase();
                             address = straatnaam + " " + nummer + " , " + location + " " + landcode;
                             url = "http://maps.google.com/maps/geo?q=" + address + "&output=xml&key=+key+";
                             String query = "INSERT INTO data2 VALUES ('" + i + "','" + title + "','" + author + "','" + resultSet.getString("date1") + "','" + resultSet.getString("date2") + "','" + location + "','" + resultSet.getString("postcode") + "','" + straatnaam + "','" + resultSet.getString("nummer") + "','" + landcode + "','+something like url.getCoordX+','something like url.getCoordY')";
                             success = sql2.executeUpdate(query);
                             i++;
    Now I don't know how I can handle that. Is it possible to do an HTTP request in Java without using Java Script of servlets? I just want to get the X and Y coordinates out of the XML file.
    The XML file will be something like:
    <kml xmlns="http://earth.google.com/kml/2.0">
    <Response>
    <name>1600 amphitheatre mountain view ca</name>
    <Status>
    <code>200</code>
    <request>geocode</request>
    </Status>
    <Placemark>
    <address>
    1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA
    </address>
    <AddressDetails Accuracy="8">
    <Country>
    <CountryNameCode>US</CountryNameCode>
    <AdministrativeArea>
    <AdministrativeAreaName>CA</AdministrativeAreaName>
    <SubAdministrativeArea>
    <SubAdministrativeAreaName>Santa Clara</SubAdministrativeAreaName>
    <Locality>
    <LocalityName>Mountain View</LocalityName>
    <Thoroughfare>
    <ThoroughfareName>1600 Amphitheatre Pkwy</ThoroughfareName>
    </Thoroughfare>
    <PostalCode>
    <PostalCodeNumber>94043</PostalCodeNumber>
    </PostalCode>
    </Locality>
    </SubAdministrativeArea>
    </AdministrativeArea>
    </Country>
    </AddressDetails>
    <Point>
    <coordinates>-122.083739,37.423021,0</coordinates>
    </Point>
    </Placemark>
    </Response>
    </kml>
    many greetings and thanks in advance
    Mathias

    Hi, sorry for being not so clear. My question was actually if it is possible to do a HTTP request in Java without using servlets or being in Java Script. Actually my question was more specific for Google maps, because it didn't seem to work. It was my mistake, and already solved, to forget to make the webservice-call "URL-encoded". Because of that, I always received a HTTP 400 error, and that's why I thought it wouldn't be possible.
    But now I have another, perhaps for you guys stupid question. The result I get from the webservice URL is of the form:
    <?xml version="1.0" encoding="UTF-8"?>
    <kml xmlns="http://earth.google.com/kml/2.0">
    <Response>
         <name>nieuwelaan 38, Hamme</name>
         <Status>
              <code>200</code>
              <request>geocode</request>
         </Status>
         <Placemark id="p1">
              <address>Nieuwelaan 38, 9220 Hamme, Hamme, Belgium</address>
              <AddressDetails Accuracy="8" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
              <Country>
                   <CountryNameCode>BE</CountryNameCode>
                   <AdministrativeArea>
                        <AdministrativeAreaName>Vlaams Gewest</AdministrativeAreaName>
                        <SubAdministrativeArea>
                             <SubAdministrativeAreaName>Oost-Vlaanderen</SubAdministrativeAreaName>
                             <Locality>
                                  <LocalityName>Hamme</LocalityName>
                                  <DependentLocality>
                                       <DependentLocalityName>Hamme</DependentLocalityName>
                                       <Thoroughfare>
                                            <ThoroughfareName>Nieuwelaan 38</ThoroughfareName>
                                       </Thoroughfare>
                                       <PostalCode>
                                            <PostalCodeNumber>9220</PostalCodeNumber>
                                      </PostalCode>
                                 </DependentLocality>
                            </Locality>
                        </SubAdministrativeArea>
                   </AdministrativeArea>
             </Country>
             </AddressDetails>
             <Point>
                   <coordinates>4.126295,51.097724,0</coordinates>
             </Point>
         </Placemark>
    </Response>
    </kml> Now I want to get the value of the coordinates field.
    This is my code:
    address = URLEncoder.encode(address, "UTF-8");
    urlString = "http://maps.google.com/maps/geo?q=" + address + "&output=xml&key=ABQIAAAA9fEXNK-q6vKpPU0JCmPPkxQjbVBpjtblJJYkDfbMo0e51afwehRmujfvBtJqx1Qehg6e6QgCRY8poA";
    url = new URL(urlString);
    XPath xPath = XPathFactory.newInstance().newXPath();
    Document domDoc = processData(url);
    path = "/kml/Response/Placemark/Point/coordinates";
    coord = xPath.evaluate(path, domDoc);
    System.out.println("coord : " + coord);Now, in the last line, by writing out the value of coord to my screen, I get the value "1", instead of "4.126295,51.097724,0" I would expect, anyone knows what I'm doing wrong?
    greetings
    Mathias

  • Get Info--Info Tab--All information is grayed out....can't change anything

    In iTunes, right click on a song in the library, click on Get Info, click on Info, All information is grayed out and cannot be accessed and/or changed. Question: How do I correct this situation? I uninstalled and re-installed iTunes to no avail. I am on a PC with Windows 7.

    Hi, I'm just brand new to the forum and Itunes and had the same issue with an album I had imported (no track or album info)and likeyrself could not get the Advanced "get track name" as it was greyed out.
    After a lot of searching on this forum, with no luck, I changed the VIEW mode from GRID to LIST and then bingo, the option ("get track name") was no longer greyed out!!
    Hope this helps. Cheers Dennisg
    PS: As a first time user, I'm fast becoming UNHAPPY - I imported a Rod Stuart album and the Bloody Itunes made 4 albums out of the one, because he sang a few duets - HOw silly is that!!

  • GET INFO Questions

    Greetings. 'Get Info' can be a very useful area, (Finder/File/Get Info), but I wonder if there is somewhere that there is data on how to actually use this feature? I mainly use it for checking the size of files, but there is obviously much more that can be done in there. For example, when I go to Get Info, the 'Locked' indicator is greyed out and the square to the left of it is Empty. Does this mean the file is locked or does being greyed out mean something else. Thanks for any assistance. Cheers.

    You're Welcome whiskey sour!
    Repost if you have additional questions or problems.
    And thanks for the !
    ali b

  • How do i get credit card info out of app store on phone

    I bought my son an app now i want to get my card info out so he can not continue buying apss??

    You can disable purchases in Restrictions on the phone, requiring a password to do so.
    You can buy an iTunes card for a predetermined amount.
    You can log into iTunes on your computer and change your billing information.

  • When I download a movie from iTunes the cover art disappears. I try get info and add the art, it doesn't show up. So it's just gray. It opens and plays fine. Apple can't figure it out. It's an nas drive. When I use a firewire drive I get the art

    When I download movies from iTunes to my NAS drive, I don't get the cover art. It shows up while its downloading, but when it's finish it disappears. If it has an iTunes extra the cover art is there. I tried get info and add the cover art, it never shows. Regardless of how I add it. Funny thing is, if I download the same movie to my external firewire drive, no problem its there. I've called Apple with no success. I've even tried copying the movie with the art from the firewire drive to replace the file on then NAS drive I still loose the movie cover art. I also tried several times to re download it, no luck. Any ideas? I'm out of ideas.

    Do you have any videos/movies in the video app?
    In iTunes if you right click on the video and select Get Info and go to the Option tap what Media Type is shown?

  • I just purchased a few songs from Itunes and could not edit the information in the Get Info section of the file.  It's greyed out.  Any ideas?  Has ITunes changed and no longer allows editing.

    Has ITunes changed its editing feature for songs, etc.?  I just purchased a few songs and found that I could not edit them using the "Get Info" feature.  The information is greyed out and does not allow editing.  Among other things, I usually like to eliminate the word "THE" from group names for easier alphabetizing in my library.  Thanks for any help. 

    Check permissions and ownership of the files. Maybe this helps....
    How to Take Ownership and Grant Permissions in Windows Vista

  • After reinstalling, some of the songs in my library have 'get info' greyed out

    This is really bizarre and getting me really frustrated. Like so many other people apparently tonight I got a notice to update and it screwed up iTunes. So I uninstalled everything and reinstalled iTunes. I made sure that I saved my library beforehand and reinstalled iTunes exactly where it used to be, which is D:\Program Files (x86)\iTunes. Media folder has not changed, it is under my iTunes program folder in D:\Program Files (x86)\iTunes\iTunes Media.
    After I reinstalled, I copied back my library file iTunes Library.itl, the Album Artwork and CD configuration folders in D:\Program Files (x86)\iTunes. Then I held the Shift key, restarted iTunes, selected my library file, and I was happy to see my library open again (and iTunes was working). All my settings have apparently been kept, including my Apple ID, CD import settings, etc...
    But what has changed however is that some tracks (but not all, which is weird) are now apparently 'locked', meaning if I select a song and do "get info" all the information is greyed out and cannot be edited. But it's not all tracks. A lot of tracks are fine and normal. Even weirder, sometimes it's tracks from the same album that are mixed: so within an album, I can edit some tracks, and not others, info is greyed out.
    This is really puzzling me and really ticking me off at the same time. It was working just fine last night. And now... my account has admin rights. I run Windows 7 64 bits, iTunes is 64 bits 11.1.4.62.
    Even weirder: some tracks that 5 minutes ago were greyed out are now OK. ??? Could it be that it takes a while for iTunes to scan everything again and make everything available for editing? My library is rather big (150 gigs)... Can anybody help? Thanks very much in advance.

    You need to find the file you want associated with that track.  It should be in a logical structure in your Media folder.  If you don't know how to find files or navigate the directories on your computer ask the IT person.  Once you have found the file iTunes may ask if you want it to find others, and if you're lucky it can.

  • This problem showed up last year spent 2 months with apple senior supervisor for tech support no solution. When the "new" itunes came out problem fixed its self. Just did an update last week or so and back to the problem. In "get info" missing all rt side

    Last year upon an update some of my itunes media was not working. Then the new version came out and it fixed itself.
    Well another update and we start over with the problem. In the itunes store you can not preview any tv show, music video, or movie.
    In your itunes library none of the purchased movies, tv shows, or music videos play. The element the same is in the get info tab. The information in the right side pane in the middle is gone. The left side information is still present. The right side info is the purchase info. Even an item downloaded today had the missing info and will not play. After dealing with apple support with the first go around last year. I uninstalled and reinstalled itunes 8 or more times, in the proper order. I deleted my itunes library and reinstalled it. We deleted all types of program files and program data. nothing worked. I was trying things on my own and foung nothing. Please help I am so frustrated with this. It seems to be a codec error that I can not solve.

    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you.
    Please go to your profile page for the forum, and look in the middle, right at the top where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under “My Support Cases” you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions.
    To ensure you know when they have responded to you, at the top of your support case there is a drop down menu for support case options. Open that and choose "subscribe".
    Please keep all correspondence regarding your issue in the private support portal.

  • I am going to trade in my iPad 1st gen and get a new iPad Air.  What do I need to do to my old iPad to clear all my info out?

    I am going to trade in my Ipad 1st Gen and get a new Ipad Air.  How do I clear all the info out of my old Ipad?

    How to Transfer Everything from an Old iPad to New iPad
    http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    http://support.apple.com/kb/HT2109
     Cheers, Tom

  • ITunes 11 - Get Info greyed out for movies on external drive

    With iTunes 10, my itunes movies and TV shows grew to about 1.2TB of data, and I shifted them to an external drive.
    I was able to edit the information via 'get info' until upgrading to iTunes 11.
    Now all the information, bar the 'five stars' field are greyed out. If I shift a particular movie back to the internal drive, I can edit (genre, for example). Shift away again, get info greys out.
    Any advice? It feels like iTunes thinks it has the wrong permissions.

    When you add a movie to iTunes you have to make sure it makes a copy of the file in the iTunes Media folder.  Otherwise, you can't edit any of the information on the movie or video.
    In iTunes 12, go to Edit-->Preferences
    In Preferences, go to Advanced and make sure the "Copy files to iTunes Media folder when adding to library".
    Unfortunately, you will now have to re-import the movie files into iTunes using "Add File To Library..." Once imported, the movie will sometimes appear under "Home Movies" instead of "Movies" but if you right click on the movie file it will list a menu item called "Get Info" where you can change the "Options" to "Movie". 
    Hope that helps.

  • Get Info - file and extension greyed out

    .dmg image which contains several folders and files. If I do a "Get Info" against any of the contents - they are all greyed out and not editable.
    Also I can't add any more file to the .dmg
    I know it's something simple or I've missed
    TIA

    Found an answer in this post: <https://discussions.apple.com/message/1406506#1406506>
    Herman1's answer (second reply to post) did the trick for me even though he is mentioning 10.4.x and I'm using 10.6.x. It still worked like a charm

  • Can't edit movie artwork (greyed out on Get Info tabs)

    All I need to know is how to be able to add artwork to my movies that are being read form an external hard drive. When I press CMD+I for the get info window the option to even select the Artwork tab is greyed out and unavailabe. How do I get it to add artwork that I have found online?
    I did not have this problem when itunes was reading the movies from my actual mac computer it only started when I made itunes read the movies from my external drive. I can still edit the artwork for the ones that are not on my external drive yet and are only on my actual mac computer. Why is this happeneing?

    When you add a movie to iTunes you have to make sure it makes a copy of the file in the iTunes Media folder.  Otherwise, you can't edit any of the information on the movie or video.
    In iTunes 12, go to Edit-->Preferences
    In Preferences, go to Advanced and make sure the "Copy files to iTunes Media folder when adding to library".
    Unfortunately, you will now have to re-import the movie files into iTunes using "Add File To Library..." Once imported, the movie will sometimes appear under "Home Movies" instead of "Movies" but if you right click on the movie file it will list a menu item called "Get Info" where you can change the "Options" to "Movie". You should also be able to click the "Add Artwork" button. 
    Hope that helps.

  • Song order in itunes is out of order, can't fix with get info as apple suggests

    I recently got a new 160gb Ipod and noticed when i synced with my itunes library that a lot of my albums are out of order. looked around trying to fix myself, but the suggestion to go to 'get info' tab and fix song order is not working. Noticed that the date on a lot of the albums is 1969 despite the fact that they are newer albums

    See Grouping tracks into albums, towards the bottom.
    tt2

Maybe you are looking for