Redirect won't work, or is it something else wrong?

Java: html and servlet; not going to specified pages, don't know what's wrong
using websphere ide, when i "run on server" it displays the html, but when I click
on the submit button, "page cannot be displayed"
I don't think my syntax is wrong.
html code follows:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="GENERATOR" content="IBM WebSphere Studio" />
<title>OIISWelcomePage.html</title>
</head>
<body>
<form method="post" action="/MyWebApp/OIISWelcomeServlet">
<h2 style="text-align: center">Manufacturing Company<br/>
Inventory Query System</h2><hr />
<h3>
This application is used to query the inventory system. <br/>
Please make your selection to update the manufacturing database.
<br/><br/>
<input type="radio" name="order" value="Query" checked="checked" /> Query<br/>
<input type="radio" name="order" value="Add" /> Add<br/>
<input type="radio" name="order" value="Change" /> Change<br/>
<input type="radio" name="order" value="Delete" /> Delete<br/>
<br/>
<input type="submit" name="submit" value="Submit" /><br/>
<br/>
<input type="hidden" name="sw" value="" />
</h3>
</form></body></html>java servlet follows:
package myservlets;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class OIISWelcomeServlet extends HttpServlet
     public void doGet(HttpServletRequest req, HttpServletResponse resp)
          throws ServletException, IOException
          if(req.getParameter("sw")==null)
               resp.sendRedirect("http://localhost:9080/MyWebApp/OIISWelcomePage.html");
     public void doPost(HttpServletRequest req, HttpServletResponse resp)
          throws ServletException, IOException
          if(req.getParameter("order").equals("Query"))
                              resp.sendRedirect("http://localhost:9080/MyWebApp/OIISQueryPage");
          else if(req.getParameter("order").equals("Add"))
                    resp.sendRedirect("http://localhost:9080/MyWebApp/OIISAddPage");
          else if(req.getParameter("order").equals("Change"))
                    resp.sendRedirect("http://localhost:9080/MyWebApp/OIISChangePage");
          else if(req.getParameter("order").equals("Delete"))
                    resp.sendRedirect("http://localhost:9080/MyWebApp/OIISDeletePage");
     public void init() throws ServletException
          super.init();
}

one time i made a redirect servlet, and blogged about it here:
[http://forum.java.sun.com/thread.jspa?threadID=5286820&tstart=0|http://forum.java.sun.com/thread.jspa?threadID=5286820&tstart=0]
i suggest you start with my servlet, and add shit to it until you get what you need.

Similar Messages

  • Hi, I was just wondering how much it would cost to repair the rear camera of my iPhone 4s. I dropped it and it won't work and I hear something rattling inside when I shake it. How much would it cost to fix?

    Hi, I was just wondering how much it would cost to repair the rear camera of my iPhone 4s. I dropped it and it won't work and I hear something rattling inside when I shake it. How much would it cost to fix?

    If you have a tool, try removing the battery cover and chech out. Some times the camera pin may have been misplaced. If so, you can fix it yourself.

  • I have downloaded adobe flash and it won't work. What have I done wrong?

    I have downloaded adobe flash and it won't work. What have I done wrong? I have even downloaded it twice (different versions). Is this a mistake?

    What is your operating system, version & edition?
    What is your web browser?

  • My iphone 5c screen went out and its just a black screen ive tryed a hard reset and nothing still when i plug the charger in it dings and ive hooked it to itunes and restored it still nun do i need to buy a new screen or is something else wrong?

    My iphone 5c screen went out and its just a black screen ive tryed a hard reset and nothing still when i plug the charger in it dings every few secs and ive hooked it to itunes and restored it still nun do i need to buy a new screen or is something else wrong?

    If your iPod Touch, iPhone, or iPad is Broken
    Apple does not fix iDevices. Instead, they exchange yours for a refurbished or new replacement depending upon the age of your device and refurbished inventories. On rare occasions when there are no longer refurbished units for your older model, they may replace it with the next newer model.
    ATTN: Beginning July 2013 Apple Stores are now equipped to do screen repairs/replacements in-house on iPhone 5 and 5C. In some cases while you wait. According to Apple this is the beginning of equipping Apple Stores with the resources needed to do most repairs for iPhones, iPads, and iPod Touches that would not require major replacements. Later in the year the services may be extended as Apple Stores become equipped and staffed with the proper repair expertise. So, if you need a screen repaired or a broken screen replaced or have your stuck Home button fixed, call your local Apple Store to see if they are now doing these in-house.
    You may take your device to an Apple retailer for help or you may call Customer Service and arrange to send your device to Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes international calling numbers.
    You will find respective repair costs in the appropriate link:
    iPod Service Support and Costs
    iPhone Service Support and Costs
    iPad Service Support and Costs
    There are third-party firms that do repairs on iDevices, and there are places where you can order parts to DIY if you feel up to the task:
    1. iResq or Google for others.
    2. Buy and replace screen yourself: iFixit

  • My wife ran the battery down in her shuffle.  When I plug it in to the wall or computer, it will blink red solid for about 3 seconds and then shut off.  Is the battery that dead, or is something else wrong.  ITunes does not show the shuffle

    My wife ran the battery down in her shuffle.  When I plug it in to the wall or computer, it will blink red solid for about 3 seconds and then shut off.  Is the battery that dead, or is something else wrong.  ITunes does not show the shuffle

    Hi Jennsman40,
    Welcome to Apple Support Communities.
    If this symptom persists even after you charge your iPod Shuffle, see this page for some troubleshooting steps:
    http://www.apple.com/support/ipodshuffle/assistant/itunes/
    Best,
    Jeremy

  • HT5622 My App Store won't work, I would search something on the app stores search bar but doesn't do anything

    My App Store won't work, Help!

    Hello Arturo138
    Check out the first article to troubleshoot the internet connection that you have for your iPhone. If not check out the second article for troubleshooting access not only to the iTunes Store, but the App Store as well. 
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Regards,
    -Norm G.

  • Downloaded App and It Won't Go Away to Buy Something Else

    I downloaded an app from the App Store but now when I go back to the App Store the app window won't go away so that I can search and download something else.

    If you can't tap on the store's background to go back to the main part of the store then have you tried closing the App Store app via the multitasking bar and seeing if it works when you re-open it ? Double-click the home button to open the taskbar, and then swipe or drag the App Store app's screen from there up and off the top of the screen to close it, and click the home button to close the taskbar.
    If that doesn't fix it then you could try a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • HT1146 Just started using Apple mail.  Trying to set up email folders with Company/Company P.O. and it won't work.  Went to Edit and added special characters and it still won't work.  What am I doing wrong or can this not be done.

    Just started using apple mail.  Trying to set up email folders with example:  Company/Company P.O.  It won't let me do it.  It will not allow / or . .  What am I doing wrong or can this not be done.  I tried to use the Edit menu and adding the special characters, but it still won't work.  Please advise.  mmather

  • I am working in Qatar and bought my ipodtouch for this reason. I cannot connect to any wifi connections. Is it my pod or is something else wrong?

    I cannot connect to any wifi here in Qatar. Have i done something to my ipod or is it the area?

    - What happens when you try to connect to a network?  Messages such as incorrect password?  Can not connect?
    - Have you tried:
    -- Resetting your iPod:
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    -- Resetting network setting on the iPod: Settings>General>Reset>Reset Network Settings
    -- The troubleshooting here:
    iPhone and iPod touch: Troubleshooting Wi-Fi networks and connections
    -- Restoring your iPod, first from backup and if problem persist restore to factory defaults/new iPod.
    - Can you see the networks?  If not try:
    Unable to use Wi-Fi or Bluetooth with iPhone or iPod touch because there's no address listed for the device

  • My iPod randomly dies, sometimes it lasts an hour sometimes it lasts 5 minutes on a full charge. Is it time to replace the battery or is something else wrong?

    I have a 6th gen 160gb iPod that is almost 2 years old and just about 2 weeks ago i've been getting this problem. I've tried restoring it multiple times and have researched a little and im going on a limb to say my battery is shot. The iPod always shows a correct charge level but it just dies and it won't come back on until I plug it in to my computer or a dock. A few things I have randomly seen it do, when connected to my laptop it will go to the connect to power screen and stay there for awhile and once the display had a really messed up display (like a mixture of the normal display with the black and white lines you would see on an old TV with no signal.) 

    Another thingthat I noticed, when I charge it with headphones plugged in it seems to be fine and won't die for hours but if I plug in say some speakers, it will almost always die in like 5 minutes. So can it be something to do with the headphone jack or voltage change maybe?

  • I try to print a purchased ebook but the margins are not set correctly. Is there a way to adjust this or is something else wrong?

    I have the issue mentioned above. I cannot print the whole page. It seems there is a problem with the margins' settings.

    OK, well, when you print, use File > Print or Control-P on the resulting window click on Preferences, then on the Effects tab.  See if you are printing in Acutal Size, like this: 
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • ITunes 11.1.1 won't open even after OS update.  Is there something ELSE I'm missing?

    After I updated my iTunes to 11.1.1, it wouldn't open.  I found something on these forums that had a link to an OS update to fix the problem.  Downloading and installing the OS update took nearly 24 hours, and iTunes still won't open.  Is there something else I'm missing? 

    first of all you want to back up all music files before you uninstall itunes. if mavericks wont let you uninstall itunes then right click on itunes in your applications folder, then get info, then go to the bottom and change all permissions to read and write. then close and try to uninstall and reinstall. if that doesnt work then this does :
    open apps, go to utilities, open terminal and cut and paste or type in these 3 commands, hitting return after each one.
    (first type) killall iTunes
    (then hit return)
    (then type) killall "iTunes Helper"
    (then hit return)
    (then type) sudo rm -rf /Applications/iTunes.app/
    (and hit return)
    after the last one you will be warned and asked to enter your password. do it.
    once completed you will see on your itunes icon with a ? shadow inside it.
    drag it off the dock and it goes poof.
    then download itunes from apple.
    if they wont let you download 11.1.5 itunes then use 10.7 Download it from Apple here.
    and then install and upgrade to 11.1.5 from there. this is the method i used when my itunes just bounced after installing mavericks. it takes only minutes and your itunes will be as right as rain. enjoy.

  • BBM WON'T WORK PLEASE HELP?

    So I got a blackberry yesterday. I got a $15 dollar plan plus a $10 add-on called 'Blackberry Basic' with Unlimited Blackberry Messenger, Unlimited Text Messaging, Call Display and Voicemail. The guy asked if we wanted to block the internet and my mom said sure. I can't access BBM now.. is it because the internet is blocked or is something else wrong?

    nope.. when you basically have a BB plan.. BBM should work... try a hard reset onto ur phone (remove the battery, put it back again)... once the phone got restarted, send me a BBM req onto my phone.. I'll tell if I rec any.. : P
    (get my PIN on my profile)
    .RoCkInG dUdE.
    Trust Your Technolust | Do not PM for any support
    If a solution received, please hit on to show your support.

  • I bought an Apple TV but my HDTV has only one HDMI outlet.  What do I need to operate the Apple TV and my Uverse wireless network. I bought a four outlet hub at Best Buy but I can't't figure it out. Do I need something else?

    I bought an apple TV but my TV has only oine HDMI outlet, so I have to unplug it when I want to watch regular TV. I bought a four plug hub at Bestbuy but can't get it to work.
    Is there something else I can use?

    hdmi spillers and switches are hit or miss some work some don't

  • Since iOS 7.1 my phone won't turn on and is asking me to connect to iTunes. I connect to itunes and it says it needs to be restored. Not sure why. I try to restore it and then it says something went wrong and it won't work. So I've been without my phone

    Since iOS 7.1 my phone won't turn on and is asking me to connect to iTunes. I connect to itunes and it says it needs to be restored. Not sure why. I try to restore it and then it says something went wrong and it won't work. So I've been without my phone for a couple days now. It gives me error code (29). The phone almost reboots and then 3/4 of the way through it gives me the error message.

    If using windows...
    Temporarily disable your firewall and antivirus software and try again...
    http://support.apple.com/kb/TS1379
    See iTunes Connection Issues here...
    iTunes for Windows: Troubleshooting security software issues
    NOTE:
    Make sure you have the Latest Version of iTunes (v11.1.5) Installed on your computer
    iTunes free download from www.itunes.com/download

Maybe you are looking for

  • ITunes Music Store always asking for password

    I upgraded to iTunes 9, and now every time I open it, it asks for my account password. At first, it would say my password wasn't entered correctly. After several instances of that, I logged out of the store and then back in. It still asks for my pass

  • Blocking websites on it's own but letting ads through that should be blocked by my Add-On

    Firefox keeps blocking websites with the "mixed content". I can't watch Netflix and it is even blocking things on this website. I also have an Add-On to block ads but now ads keep getting through everywhere I go. I have ran multiple anti-virus and an

  • Word Format of Smart Forms Output

    Hi, We want the Smart Form output in DOC format. If we are using the function module 'CONVERT_OTF', the output is perfect when downloaded as PDF with all background pictures and formats but when we are downloading in DOC format all the formatting and

  • My IPAD 2 screen has stopped scrolling

    My IPAD screen has stopped scrolling

  • Programming your own workflow plugins

    Hey folks, I've seen people asking "how do I select all clips in the timeline downstream?" and get the answer: Track Selection Tool! Which is quite ok, but for me, the Avid Media Composer way is a bit faster: I hold Alt/Opt and press 2, and all clips