MVC Design Help, Single Servlet, How do I access the Model and DB

Hi all. New here and looking for some help.
I am currently writing a website that allows the creation of users, that may upload articles and post comments on articles. Im trying to develop using MVC. I have a single controller servlet that processes POST actions throughout the site (eg. InsertArticle, DeleteArticle, ModifyArticle, etc..)
Now my problem is, just how do I retrieve the articles from the database? .. for example, if I load up a page http://localhost/articles.jsp which should display all the articles currently in the site.. I would have a function say getAllArticles() which should return a collection of all the articles. I can then iterate through the articles in the jsp page.
I am trying to use <jsp:useBean...etc.> BUT.. my articles bean constructor takes a databaseconnection object as a parameter. If I use useBean I cant pass the databaseconnection object to the bean and I get an error because it cannot create the bean.
Any help on this would be appreciated as well as any tutorial links. I also looked at the petstore blueprint program on the sun website, but that program has me completely lost with all the xml. I would prefer not to use custom tags or struts for now. I would like to keep it simple with snippets of java code in the jsp pages for data retrieval and display while keeping all the business logic in the beans of the model. I would also like to keep this relatively secure. I am developing using Oracle Jdeveloper 10g.
Thanks
Jazz

Hey steve, thanks for that.. but thats exactly what i
dont want to do. I also realize that ive been writing
the ejb's incorrectly to begin with and have begun to
rewrite them. However maybe I can make it easier..
what im trying to do is precisely what is in this
diagram..
http://gsraj.tripod.com/jsp/jsp.html
the problem im having is where it passes data back to
the jsp page.. entity beans cant (or shouldnt?) be
accessed directly from jsp pages.. which means i
create a session bean which interacts with the entity
bean and can return information to the jsp page.. i
understand what i have to do.. i just dont know how to
do it.. been searching for google for tutorials and
etc.. this site is the closest ive come but .. as you
can see it says "more to come" ..
thanks again guys really appreciate itAhhh. EJBs. Enterprise Java Beans and JavaBeans are two completely different beasts. I know nothing about EJBs, except:
1) They are much harder to use (and serve a different purpose I assume) then JavaBeans
2) Tomcat (the server I use) doesn't support them.
Sorry I can't be of more help.

Similar Messages

  • How do I see the model and manufacturer of my wifi card?

    how do I see the model and manufacturer of my wifi card?
    MacBook Pro 13-2011

    Shootist007 wrote:
    That is not correct. Apple really doesn't build any parts. They are all made by some other manufacturer and then installed in Mac computers as Add-on cards or soldered onto the motherboard, Apple Speak Logic board, before it is installed in the computer.
    As to the WiFi card Broadcom makes most of the chips and they are then soldered onto a Duaghter card that is then inserted in a socket. The socket for the WiFi card is near the back of the system just behind the Superdrive. That is on the standard MBP. On the Retina models I'm not sure where it is placed.
    Strebsjig wrote:
    As far as I know, Apple only uses their own AirPort 'cards' (they aren't really cards anymore, but integrated chips). So the manufacturer is Apple, and the model is just AirPort.
    Technically, you are correct. The original manufacturer is Broadcom, but all the WiFi chips Apple is using are rebranded as Apple, Inc. AirPort Extreme.

  • How do I access the photos and videos from my computer that I backed up from my phone to verizon backup assistant plus?

    how do I access the photos and videos from my computer that I backed up from my phone to verizon backup assistant plus?

    You can download the PC (or mac) desktop application. 
    http://support.verizonwireless.com/clc/devices/knowledge_base.html?id=54607
    or you can sign into My Verizon ( http://www.verizonwireless.com/myverizon ) then navigate to MyVerizon/Manage & Store media.

  • In iBooks if I have more bookmarks than can fit on a single page, how do I access the second page of bookmarks?

    In iBooks when I access the Table of Contents and select Bookmarks sometimes my list of bookmarks and Highlites & Notes is larger than can be displayed on a single page of the screen. How can I access the list of additional Bookmarks and Notes that are were not displayed? Trying to tap for the next page gives no response. Am I limited to a list that only fits on one page of the screen?

    oops! yes scrolling works if I first scroll down and then up. thanks

  • HT3500 I keep getting an error message that the "spools are full".  How do I access the spools and how do I empty them?

    I keep getting an error message that the "spools are full". Where do I find them and how to empty them?

    You may be able to determine the reason for this error by examining your Mac's logs with Console. To do that find the Console app - it is in your Utilities folder and looks like this
    You can find it by selecting Utilities from the Finder's Go menu.
    Open Console.
    If the log list column on the left is not already displayed, show the log list by selecting Show Log List from Console's View menu.
    Locate system.log in the list and select it. Many date and time-stamped entries will appear, hundreds of them, and you must find the entries relevant to your Mac's problem. To do that choose Clear Display from Console's toolbar. Leave Console running while you choose Print from iPhoto again. Examine any new entries logged in Console. If there are any, copy and paste them in a reply.

  • I have an ipod that we put a password on and she forgot the password. How can I access the information and the password?, I have an ipod that we put a password on and she forgot the password. How can I access the information and the password?

    How can I fix this problem?

    You have to connect the iPod to here computer and restore the iPod via iTunes on the computer.  You may have to place the iPod in recovery mode to allow the restore. For rcovery mode:
    iPhone and iPod touch: Unable to update or restore

  • How do I access the cloud and moreover, why are my pictures not on my Itunes, even though they're backed up on the cloud?

    In trying to sync my Iphone 4, I noticed that none of my pictures are not my Itunes, even though they've been backed up on the Cloud.  My Itunes also states that I'm over my space by .4 GB although my phone says i still have 2.7 GB of space left.  I'd like to delete my pics off my phone, but not until I know they're backed up properly.  Any help would be greatly appreciated!

    photos taken on your iphone and show up in photostream on your ios device can be automatically downloaded to your computer.
    if you have a mac, the photos in photostream automatically download into your iphoto application
    http://www.apple.com/icloud/setup/mac.html
    if you have a pc, the photos in photostream can automatically be downloaded into a folder called "photostream" in your photos folder on windows.
    http://www.apple.com/icloud/setup/pc.html
    you no longer are required to ever hook up your ios device to your computer to extract photos again (you will have to if you want to get videos off of your iphone).  Simply connect your computer to the internet at least once a month, and all photostream photos will download into the proper place (outlined in the above links). 

  • How can I access the username and password entered into an https IPlanet login so that it may be passed to an LDAP to obtain additional security classification information for that user?

     

    Have you tried simply using the REMOTE_USER environment variable which is accessible via CGI by the following:
    $customer = $ENV{"REMOTE_USER"};
    Once you have that (which will correspond to the uid attribute in your LDAP server) you can do a query for the other things. The password shohuld not be required to lookupu other info since you know at this point that the are already authenticated.

  • How do I use the counter and digital signals of the 6071E while it is connected to SCXI modules?

    I am contemplating using a PCI 6071E with SCXI. We have the boards (6071E), we would need the cable (I suppose SH1006868) and the SCXI system. I would like to know how would you access the counter and digital line capabilities of the board. I will be using a SCXI-1314 with a SCXI-1520 Module for strain measurements but will need to use the counter and digital lines of the board as well. Can this be done? If so, how and/or what else do I need?

    I think this KnowledgeBase will answer the question for you.
    Accessing DAQ Board Counter Pins with an SCXI System
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • How to group all the reports and execute like single application ?

    Hi,
    I am trying to develop some reports in Crystal Reports XIR2 , here i have Design and Preview options that is for every report i should see , how to group all the reports and execute like single application?
    any option is there to run the report
    i mean is it possible to have a home page from there have links to each report and when i click on the link corresponding report should be shown , if it is possible , How?
    Regards,
    kathyaini

    You will want to look into Crystal Reports Server, it does exactly what you describe and more:
    http://www.businessobjects.com/product/catalog/crystalreports_server/
    Download a trial of CR Server here:
    http://www.businessobjects.com/product/freetrials.asp

  • In my ipad mini sound is there but somehow display turned off....please help...how to turn on the display

    In my ipad mini sound is there but somehow display turned off....please help...how to turn on the display

    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Home button not working or unresponsive, fix
    http://appletoolbox.com/2013/04/home-button-not-working-or-unresponsive-fix/
    Fixing an iPad Home Button
    http://tinyurl.com/om6rd6u
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • I have tried to connect and purchase on my iTunes Store, but forgot security questions. Not even Customer service is able to help me. How can I spend the 20 bucks I have on my account now if even the phone assistants can't help me?

    I tried to Purchase on the i Tunes store, but forgot security questions. Not even Customer Service is able to help me. How can I spend the 20 bucks I have on my account now if even the phone assistants can't help me? I can't rememeber any answer to any of mu questions and I can't even register my product (iPod Classic) even though I purchased it 6 months ago. Customer Service held me on the line for 30+ minutes asking me all the time if I rememeber one anwer to my questions (to which I repeatedly said no) and there seems to be no way to circumvent that security system, not even with my second email, also registered on My Itunes. Isn't there any way for me to get those 20 dollars back I already have in your store or at least reset my security questions if I don't rememeber?
    Thank you very much.

    qwerqsr, Please contact 1-800-My-Apple, about this issue. The account security team should be able to assist you. Please have your password and the ability to log into your account via appleid.apple.com.
    Thanks,
                A2Q

  • Help with purchased music w/ old apple ID no longer in use... how do i access the music?

    i purchased music with an apple id i no longer use and no longer have the email address/or password -- had to shut email down years ago. how do i access the music in itunes that I purchased on my new computer with my current apple id (which I have also now had for some years)? thank you for any help.

    buddsct wrote:
    I can not acces that apple ID...
    Why not?
    -> https://iforgot.apple.com/appleid

  • Hello my iphone 3gs just been stolen how can i block the iphone and how could i track it i don't know for sure if i have find my iphone? please help i got many accounts on it and i don't have a passcode :((

    hello my iphone 3gs just been stolen how can i block the iphone and how could i track it i don't know for sure if i have find my iphone? please help i got many accounts on it and i don't have a passcode :((

    It was never free for the 3GS.
    It is if the initial sign-up is done on an iPhone 4, iPad or iPod touch 4th gen.
    From http://support.apple.com/kb/HT4436:
    After I sign up for Find My iPhone for free, can I use it on other iOS devices?
    Yes, if your devices are running iOS 4.2. For example, you can sign up for Find My iPhone for free on your iPad and use the same account information to sign in to MobileMe on your iPhone 3GS and turn on Find My iPhone.

  • Please someone could help in explain how calenders are related among icloud and my imac ?

    please someone could help in explaining how calenders are related among icloud and my imac in terms of backuping and recovery ?
    Thanks
    JBS

    Open GarageBand's preferences, and under Audio/MIDI set the Input popUp menu to the iMic. You can also set the Output popUp to the iMic if you have headphones plugged into it, otherwise set it to Built-In.
    Create a New Basic Track, and you're ready to record.
    --HangTime [Will Compute for Food] B-|>

Maybe you are looking for