Who wants to help the rookie? MY FIRST SERVELT

Okay here'm my problem
Number one I've only seen a few functioning servlets and am feeling totally out of my depth here trying to write one. This is what I need to do:
I am creating a web site that has the following basic structure:
html code
html code
html code
java GUI
html code
html code
java GUI
I need to take information from the two GUI's and pass them to a separate class where the logic of the web site can work on them. I was thinking of declaring a variable in the servlet and passing it into the GUI to assign it variables but I realized I had absolutely no clue whether or not you could even declare variables in a servlet. If someone could offer me some advice? Maybe tell me the basics of sefvlet writing? I'm in a real bind here!

Ok, rookie :)
Imagine a servlet as just a regular java class that happens to be able to be called from a webpage using Jakarta-Tomcat or one of the other JSP/Servlet engines out there. If you are familiar with server-side programming then passing information from a Servlet to your GUI should be easy. As for passing info from a GUI to a servlet, I'm not too sure how, but that's just because I haven't written many applets in Java yet. I suggest highly "Using Java Server Pages and Servlets Special Edition" from Que as a good reference book for a technically minded programmer starting in Servlets. Now, enough of the rookie-speak, and on to the problem. If you want to pass information from a servlet to an applet, there are probably many ways to do this, but the first way I can think of is to:
a) create a servlet from scratch.
b) In the doGet() or doPost() methods, instantiate any variables you need to pass.
c) Attach these variables to the datastream using the method .setAttribute() in the HttpServletRequest object
d) Redirect your page to the page containing the <APPLET> tag using the following line:
getServletContext().getRequestDispatcher(URL).forward(request,response);     
e) Inside your page with the <APPLET>, use <% String blah = (String) request.getAttribute("Whatever"); %>
f) To reference the passed variable, use <%=blah%> and it will output a string in that place.
g) MAKE SURE YOU RENAME THAT PAGE FROM *.html to *.jsp IF IT HAS <% %> tags.
Thats about all the help I can give online.....if I've totally confused you, try looking in that book. It's really helpful....
Dan from Canada

Similar Messages

  • Who wants to help? - beta tester / apps / devs / needed

    Hello!
    Announcing the beta launch of ThunderCloud! Exclusively at - thundercloud.io
    Thundercloud is a PAAS solution which enables you to store, retrieve and share mobile app data in the cloud. This means, for the first time ever, you can:
    • Upload your app data.
    • Retrieve your app data at will.
    • Retrieve data from other apps at will.
    With ThunderCloud, the possibilities for app integration and data sharing are endless!
    Here's how it works:
    1. Add your app.
    2. Setup keys for what you want to store and share.
    3. Upload your data, per app and or per user.
    4. Retrieve your data whenever you want.
    5. Retrieve and utilize data from other apps.
    6. User-Spaced: If you provide a user email then you will retrieve user data.
    7. App-Spaced: If you don't provide a user email you will retrieve aggregated app-data.
    LIMITED TIME OFFER:
    While we are still in beta we will be offering you any plan of your choice 100% free of charge! Just join us and let us know how ThunderCloud has helped you supersize the impact of your app.
    Feedback welcome!
    Sincerely,
    Team ThunderCloud
    Questions?
    >> Use the feedback link to the right.
    Roadmap:
    More really exciting stuff coming soon!

    Hi,
    Just resolved this to my delight. I did a complete factory reset and had to upload all the apps and so on. However, my itunes ibrary for some odd reason didnt remember any of my apps so i had to re-download them from the store, took a while, but atleast ive got them back...

  • Want to help the USA medical community?

    I just read this article in the AARP (American Assoc. of Retired Persons) Bulletin. (yes, I'm a geezer)
    http://www.aarp.org/bulletin/yourhealth … gital.html
    What a perfect place for FOSS! The article states the cost for a doctor's office of implementing electronic recordkeeping runs $20,000 to $80,000 USD. If I were a competent programmer I'd jump all over a chance to reduce that cost to "zero plus hiring an install/support geek". All those costs are going to get passed on (with the usual markup, insurance company cut, etc.) to ordinary people who see their healthcare costs going out of their reach.
    Anyone interested? There are some systems out there being used, but no common standards or integration/compatibility that I can uncover. It's the ground floor, if you want to be a part of it.

    You will need to do a journal entry to reclass from the old account to the new account. Make sure you fill in the fields that are needed for the open item process. If the volume is large you will need to use  "developed"journal entry upload to accomodate.
    good luck
    pls assign points if helpful as a way to say thanks.

  • Who wants to help me with 35 MM film scans.

    Hey y'all,
    So, I own many old school film cameras,and I love using em, But with some I take some pretty out there pics, (anyone who owns a Diana knows what I am talking about)
    any way, the only development and printing shop around is in the supermarket, and lets just say there scanners cant really Handel my film.
    but sadly, like most employed students, I am rather poor, so I can afford to buy a proper scanner, nor can I afford to pay to have it sent off to be printed.
    so, I figure, why not use Photoshop?
    So here is where I need your help.
    I have scanned in my colour negative film and I need a way to adjust the colour to have it work, but have yet to figure out a way to do it.
    and help? I am working in CS3
    here is a sample of what I mean.
    [IMG]http://i1105.photobucket.com/albums/h345/Honestjohnny/scan0002.jpg[/IMG]

    Read the entire web site linked below:
    http://www.scantips.com/

  • Help The Rookie..!

    Hi guys..!
    I was very satisfied with my MacBook Pro, so I bought a new one to my wife and I also use a desktop PC. My wireless inet is a router AirTies (Air 5450).
    The problem is: I want to make a network, so I can share files, photos, music etc, between PC-MacBook Pro-MacBook-PC.
    I really dont know how can I do it. PLZ HELP..!!
    Thx in advance

    No, there shouldn't be any problems sharing files between Macs & PCs on your wireless network.
    Here are a few support articles to get you started:
    o Mac 101: File sharing
    o Mac OS X: Sharing your files with non-Apple computers
    o Sharing files between a Windows Vista Home Edition PC and a Mac running OS X Leopard 10.5

  • I want personal help, the articles I see do nothing to fix (Not Responding) slowdowns with virtually every click.

    It takes about 37 seconds to delete a message. Sometimes the screen goes white, but I can see text in a light yellow shadow. My gmail accounts are quicker but my @SHAW.CA account is very slow - unfortunately it is the first listed (can I move it to the end of my 3-email account list?)
    I am very, very frustrated by the slowness (it was not that way before) my computer is new & has an Intel core i7 - other progs run fast and smoothly (big fan of Firefox).

    Windows safe mode is what I would select at this point.
    Standard safe mode text follows.
    To diagnose problems with Thunderbird, try one of the following:
    *Restart Thunderbird with add-ons disabled (Thunderbird Safe Mode). On the Help menu, click on "Restart with Add-ons Disabled". If Thunderbird works like normal, there is an Add-on or Theme interfering with normal operations. You will need to re-enable add-ons one at a time until you locate the offender.
    *Restart the operating system in '''[http://en.wikipedia.org/wiki/Safe_mode safe mode with Networking]'''. This loads only the very basics needed to start your computer while enabling an Internet connection. Click on your operating system for instructions on how to start in safe mode: [http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-including-safe-mode Windows 8], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7 Windows 7], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-vista Windows Vista], [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/boot_failsafe.mspx?mfr=true" Windows XP], [http://support.apple.com/kb/ht1564 OSX]
    ; If safe mode for the operating system fixes the issue, there's other software in your computer that's causing problems. Possibilities include but not limited to: AV scanning, virus/malware, background downloads such as program updates.

  • Who wants to help 100 students create something amazing at CeBIT?

    Dear SAP Mentors.
    This year at CeBIT, Ann Rosenberg and SAP University Alliances want to showcase their commitment to transform the perception of SAP towards students and are organizing an InnoJam for university students.
    The event will be held in parallel to CeBIT on March 6/7 in a media school close to the exhibition grounds, with the winner(s) presenting their results on the big stage in the SAP area at CeBIT.
    We will use Design Thinking, just like we did for the pre-TechEd InnoJams.
    Students will come from universities in the DACH region, plus Poland (CeBIT focus country 2013) and Russia.
    The theme is addressing the CeBIT theme of "shareconomy" and the SAP CeBIT theme "true dreams". We are thinking along the lines of "fair and sustainable solutions for a better future in our connected digital society of the 21st century". We got in contact with Betterplace (http://www.betterplace.org) and concrete topics are likely going to focus on social responsibility, the work of NGOs, etc.
    More infos here: http://wiki.sdn.sap.com/wiki/display/events/SAP+InnoJam+at+CeBit+2013
    In order to give students an exceptional experience, we are looking for as much expert support as possible. These students are most likely unfamiliar with SAP technologies. DT coaches are also needed (Hester Hilbrecht from TIP DevEx is coordinating that). In general, I think that having people there mentoring these young minds during the event would be a great addition to the event. If you are interested to contribute to that experience or if you are travelling to CeBIT anyways, we would be delighted to add you to our list of attendees.
    Contact me on SCN or via email: [email protected]
    I hope I can count on you!
    Kind Regards,
    Uwe
    (TIP Developer Experience)

    Dear SAP Mentors.
    This year at CeBIT, Ann Rosenberg and SAP University Alliances want to showcase their commitment to transform the perception of SAP towards students and are organizing an InnoJam for university students.
    The event will be held in parallel to CeBIT on March 6/7 in a media school close to the exhibition grounds, with the winner(s) presenting their results on the big stage in the SAP area at CeBIT.
    We will use Design Thinking, just like we did for the pre-TechEd InnoJams.
    Students will come from universities in the DACH region, plus Poland (CeBIT focus country 2013) and Russia.
    The theme is addressing the CeBIT theme of "shareconomy" and the SAP CeBIT theme "true dreams". We are thinking along the lines of "fair and sustainable solutions for a better future in our connected digital society of the 21st century". We got in contact with Betterplace (http://www.betterplace.org) and concrete topics are likely going to focus on social responsibility, the work of NGOs, etc.
    More infos here: http://wiki.sdn.sap.com/wiki/display/events/SAP+InnoJam+at+CeBit+2013
    In order to give students an exceptional experience, we are looking for as much expert support as possible. These students are most likely unfamiliar with SAP technologies. DT coaches are also needed (Hester Hilbrecht from TIP DevEx is coordinating that). In general, I think that having people there mentoring these young minds during the event would be a great addition to the event. If you are interested to contribute to that experience or if you are travelling to CeBIT anyways, we would be delighted to add you to our list of attendees.
    Contact me on SCN or via email: [email protected]
    I hope I can count on you!
    Kind Regards,
    Uwe
    (TIP Developer Experience)

  • HELP THE ROOKIE AND LEAVE UR 2 PENNIES!

    HEY EVERYONE, JUST GOT AN M.AUDIO AXIOM 49, TO USE WITH LE7. Does anyone have pointers on the most knowledgable and efficent way to set it up, use enigma, save presets, etc... this is my 1st MIDI controller, and I have read myself to death and have tried to fiqure it out on my own but stuck at the moment. PLEASE HELP, any opinions are greatly welcomed, esp. If you use a simalir setup and know have it up and running. Also does anyone know if the novation remote 25 automaps to Logic express? THANKS FOR THE TIME
    PEACE
    imac G5 powerpc   Mac OS X (10.4.7)  

    These are user-to-user forums, they are not monitored by Apple and they don't reply here - I've asked for your id and password to be removed from the post (as these are public forums you should change your password immediately)
    You can contact iTunes support here : http://www.apple.com/support/itunes/contact/ - click on Express Lane, then iTunes > iTunes Store

  • HT201272 Hi, My name is Angelina. I don't know how to download my old purchases that i bought from iTunes store. I lost all my music when i tried to update my iPhone. I feel really lost, and i really need my music back. Is there somebody who wants to help

    Hi,
    I really need some help, with my loved and lost musoc. I really need to get it back. I lost all my music after i trid to update my Iphone. Can anybody help me with this? Im really desperate and i really need som help with this. It would really safe my day!

    The article from which you came provides step-by-step instructions on re-downloading purchases. Where in those instructions are you encountering difficulty?

  • Who wants to help me?.......Please

    Ok so I dropped my ipod (doh!!) and now it doesn't work 100%.
    It shows up in the desktop and I can copy all my songs off onto my HD, which I've done. I then updated it (iPod Updater 2005-11-17) and then reset it.
    iTunes doesn't see it and it's icon is now a disk and not an Ipod
    So now I seem to have a 20Gb Hd and not a MP3 player
    Anyone had this problem......is it broken??
    oh yeah my ipod is a 2dn Gen, I'm running 10.3.9 with itunes 6.0.1 (3)

    I could be wrong, I believe that during the dropping, your iPod's hard disk, caused some bad sectors and corrupted files, therefore it be treated as a disk not a iPod. If I were you, I will do the following and hope it can get it fixed:-
    1. plug the iPod with the Mac
    2. Open the Disk Utility, and highlight the iPod (disk)
    3. Go to Tab "Partition", and do a delete
    4. Go to Tab "Erase" and do a erase (format in Mac extended journaled)
    5. Eject your iPod and open the iPod updater and click Restore.
    Bear in mind, it will erase all your data in your iPod

  • Can't open photoshop after 6 months of use. Can't upgrade account. Can't find my way to an actual human who wants to help.

    Adobe. It is incumbent upon YOU to solve account issues; not a user forum.

    Well, rather than getting all agitated and ranting off, why don't you just explain what's going on and we try to help? As a start, read this:
    Sign in, activation, or connection errors | CS5.5 and later
    For anything more you will have to provide proper system information and other details.
    Mylenium

  • I have downloaded and installed creative cloud yesterday and wanted to use the free trial first, but when I go to open photoshop it says my trial has expired

    This is a totally new account, and I dont understand why my trial has expired when its a new account.

    NOthing you can do. Sometimes this happens - technical glitches on your system or attempts at tampering. It can't be fixed. You have to buy the software or try tomrun the trial on another machine.
    Mylenium

  • In Finder in Documents i want to show the folders first and individual documents second and it is the other way at the moment. Cant seem to see where i would change this

    In Finder in Documents i want to have the folders show first and the individual documents second. At the moment it is the other way and i can't seem to find how to change it
    [email protected]

    Why do we have to install 2 add ins for something that should be built in? Please add this to the next version or an update to this one even. We should see the full path of a bookmark when we search for it. Show Parent Folder alone isn't enough if you have sub folders, so I installed Go Parent Folder as well in case of sub folders.

  • HT201363 Sir/Madam,  can I ask for help to know what's my secret questions and answer in my apple ID? Coz i'm not the one who make my apple ID when i first buy my phone. I can't ask my friend On what he put in my secret questions coz i'm already here in p

    Sir/Madam,
    can I ask for help to know what's my secret questions and answer in my apple ID?
    Coz i'm not the one who make my apple ID when i first buy my phone. I can't ask my friend
    On what he put in my secret questions coz i'm already here in philippines right now and my friend who made my apple ID is still in bahrain.. I wish i could get a feedback through this matter. Thanks and i'm kyztle Romanes . Thanks you so much i wish i'd get any feedback to your side.. I wanna purchase a builder in my clash of clans account coz my clanmate philip sent me a gift card for 25$ that's why i need your help.. Thanks again Apple company..
    Sent from my iPhone
    On Jan 1, 2014, at 4:53 PM, iTunes Store <[email protected]> wrote:
    $25
    Buy that builder
    Philip sent you an iTunes Gift
    You can redeem this gift on your iPad, iPhone, iPod touch, or on your computer using iTunes. Once you redeem your gift and verify your Apple ID, you will be credited with $25 and can purchase the latest music, apps, and more.
    Valid only on iTunes Store for U.S. Requires iTunes account and prior acceptance of license and usage terms. To open an account you must be 13+ and in the U.S. Compatible software, hardware, and Internet access required. Not redeemable for cash, no refunds or exchanges (except as required by law). Code may not be used to purchase any other merchandise, allowances or iTunes gifting. Data collection and use subject to Apple Customer Privacy Policy, see www.apple.com/privacy, unless stated otherwise. Risk of loss and title for code passes to purchaser on transfer. Codes are issued and managed by Apple Value Services, LLC (“Issuer”). Neither Apple nor Issuer is responsible for any loss or damage resulting from lost or stolen codes or use without permission. Apple and its licensees, affiliates, and licensors make no warranties, express or implied, with respect to code or the iTunes Store and disclaim any warranty to the fullest extent available. These limitations may not apply to you. Void where prohibited. Not for resale. Subject to full terms and conditions, see www.apple.com/legal/itunes/us/gifts.html. Content and pricing subject to availability at the time of actual download. Content purchased from the iTunes Store is for personal lawful use only. Don’t steal music. © 2012 Apple Inc. All rights reserved.
    Apple respects your privacy.
    Information regarding your personal information can be viewed at https://www.apple.com/legal/privacy/.
    Copyright ©2014 Apple Inc. All rights reserved.
    <Email Edited by Host>

    It is a phishing attempt to get your Apple ID and Password.
    You should forward it to Apple : [email protected]

  • HT6114 Joined problem labels Labels to color everyone in the line archives mp3 and selection in dots as it exists now can be anyone who wants to do what HELPS of how thoroughly enjoyable.

    Joined problem labels Labels to color everyone in the line archives mp3 and selection in dots as it exists now can be anyone who wants to do what HELPS of how thoroughly enjoyable.

    Sp188585 wrote:
    Joined problem labels Labels to color everyone in the line archives mp3 and selection in dots as it exists now can be anyone who wants to do what HELPS of how thoroughly enjoyable.
    Sorry, you will have to outline your issues more clearly.
    Thanks
    Pete

Maybe you are looking for

  • Audio levels automation in real time?

    Hi, Is it possible to automate the audio levels in REAL TIME? (using the mouse or an external mixer controller) (automating one audio level at a time would be enough) Thanks!

  • UK delivery times for photbooks?

    Hi Can anyone give me an idea, based on experience, of delivery times for photobooks ordered from the UK? I noticed that when you order, it says international orders dispatched in 2 working days, which made me think they are coming from the USA and m

  • Display null values in crosstab report.

    I have a crosstab that will be sparsely populated.  The datatype of the cells in the crosstab are numeric.  I would like to have the cells that contain no data to have no value, but Crystal Reports inserts a zero there instead. Is there anyway to tel

  • Can pages read a word 97 document?

    I have a word 97 file on my flash drive.   If I buy pages, will it be able to read it and print it out?

  • My quicktime won't accept the new update

    When I try to update my quicktime, it comes up with an error message. The older version of Apple software cannot be removed. Contact your technical support group. The quicktime player will work with videos that I have already used. But I can't access