All on one page

Hi I need to do all these in a page..
1. Page with a List button.
2. After pressing the List button, a table appears but without the List button. These are all done in the same page.
How do i include 'Back' button to go back to Part 1?
public class MainPage extends HttpServlet {
     public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
     res.setContentType("text/html");
     PrintWriter out = res.getWriter();
     out.println("<html>");
     out.println("<body>");
     out.println("<H3>View All Records</H3>");
out.println("<FORM Action='MainPage' METHOD='POST' >");
     out.println("<INPUT type='submit' value='List'>");
     out.println("</form>");
     out.println("</body>");
     out.println("</html>");
     public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
     res.setContentType("text/html");
     PrintWriter out = res.getWriter();
     out.println("<html>");
          out.println("<body>");
          out.println("<center>");
          out.println("<H3>List of All Records</H3>");
          out.println("<TABLE BORDER='1'>");
          out.println("<TR><TH>DeptName</TH><TH>Boss</TH><TH>Owes</TH></TR>");
          try {
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          Connection connection = DriverManager.getConnection("jdbc:odbc:Depts");
          Statement statement = connection.createStatement();
          String query_dept = "SELECT * FROM Depts";
          ResultSet resDept = statement.executeQuery(query_dept);
          while(resDept.next()){
          String dname = resDept.getString("DeptName");
          String dboss = resDept.getString("Boss");
          int dowes = resDept.getInt("Owes");
          out.println("<TR><TD ALIGN='center'>"+dname+"</TD>");
          out.println("<TD>"+dboss+"</TD>");
          out.println("<TD ALIGN='right'>"+dowes+"</TD>");
          out.println("</TR>");
          out.println("</center>");
          out.println("</body>");
          out.println("</html>");
          }// while
}catch (ClassNotFoundException cnfe){
System.err.println(cnfe);
}catch (SQLException ex ){
System.err.println( ex);
}catch (Exception er){
er.printStackTrace();
}

try replacing those lines :
out.println("</center>");
out.println("</body>");
out.println("</html>");by :
out.println("</TABLE>");
out.println("</center>");
out.println("<FORM Action='MainPage' METHOD='GET' >");
out.println("<INPUT type='submit' value='back'>");
out.println("</form>");
out.println("</body>");
out.println("</html>");
regards.

Similar Messages

  • When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page.

    When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page. I don't want to have to check off an additional 5 or 6 attributes each time I print out contact information. Is there a way to change the default setting for printing lists, so it is not just "phone," "photo," and "job title?"

    I have a user who wants to do this same thing. I did not find any way either to default the attributes to anything other than what you see the first time. Seems like such a trivial thing, hard to believe they do not allow it. I did find a program for this called iDress but I can't seem to download it from any links on the Internet. Not sure if it is free or not, but it was recommended by a link on the Mac support site.

  • How to select all of one page in a spread?

    If I select all (Cmmd A) in a view showing Spreads, all the content of both pages are selected. Is there a fast way to select all the content of only one page?

    Choose the Selection tool. Drag a marquee rectangle around the edges of the page whose content you want to select.

  • Payment check Sapscript prints all in one page

    Hi;
    we are facing a problem, days ago we printed payment checks with no problem, we prepare N amount of payment checks and send them to print and work ok.
    Now, if we do the same all payment checks are printed in the first check.
    We already did word documents with payment check size 8.5" x 8.5" page, and prints ok with N pages.
    Any help.
    David Fúnez
    Tegucigalpa, Honduras

    Hi,
    Check whether you are using the same output device for printing or whether some changes have been done in the output device or device type.
    Before printing, check the print preview of the payment cheque, whether it is correctly alligned or not.

  • C5140 All-In-One - page in queue won't print (Vista)

    After hard drive crashed in July, got new hard drive (OS Vista still). Installed printer - fine . Used recently, wouldn't print - the page would get held up in the queue. Reinstalled printer disk, message said I needed new driver, installed one 11/15, everything worked fine. Today, 11/16, went to print from MS Word, page stuck in queue again.
    Suggestions? Thanks! Sue

    Hi Sue,
    It sounds like an issue with the print spooler in the services. I would suggest running the HP Print and Scan Doctor. The HP Print and Scan Doctor (PSDR) was designed by HP to provide users with the troubleshooting and problem solving features needed to resolve many common problems experienced with HP print and scan products connected to Windows-based computers.
    Please let me know the outcome of the PSDR. I will respond back with the specific troubleshooting steps depending on what the PSDR says. With any luck the PSDR will resolve the issue and you'll be printing in no time.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • How can I load the foxstar all in one page

    '''bold text'''
    Dear Sir/Madam
    I bee to try to load the uk foxstar but I can not fine how to load can you help please because soon I inter the name it gos direct to open the web page before load.

    Sorry I forgot that I had change the code:
    DataSource ds=(DataSource)pageContext.getAttribute(Action.DATA_SOURCE_KEY);
         conn=ds.getConnection();
              stm=conn.createStatement();
              rs=stm.executeQuery(insertsql);
    to the code:
    DataSource ds=(DataSource)pageContext.getAttribute("mydatasource");
         conn=ds.getConnection();
              stm=conn.createStatement();
              rs=stm.executeQuery(insertsql);
    mydatasource is the struts datasource in "struts-config.xml". I couldn't work

  • G55 all in one - page size

    Page size defaults to "letter" size on switch-on and doesn't "remember" being set to A4.
    Memory/battery problem?
    Any help on disassembly welcomed
    Thanks
    Dave

    That printer looks like it would have a battery that powers the memory in it. Unfortunately there is no documentation on how to change that battery. If you figure out how to change the battery please let me know.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • I am copying and pasting into a new, Pages document (from the word processing menu), and I paste in text that is longer than one page, it doesn't continue onto the next page.  I can't see the end. How do I get it to show everything I paste in?

    I want to copy an extensive amount of text from a web page into a Pages word processing document, but it seems to chop it up into text boxes, some of which aren't long enough to show all of the lines of text.  I can't get hold of a bottom edge of the boxes to drag them to make them longer.  I tried several times starting over with a new, blank page (and I made sure to choose from the Word Processing part of the dropdown menu, since I read about a similar problem that said not to use the layout menu.  It keeps doing the same thing.  What do I have to do to get long text pasted to multiple pages, instead of it trying to be all on one page?
      In the long run, what I want is to create this as an ePub book.  Is there a better way to go about this?

    Hi Ellen,
    Copying from web pages can include some weird formatting. Instead of Paste, use Paste and Match Style (Edit Menu).
    Regards,
    Ian.

  • Using eprint to print photos with email text on one page

    I have been using Presto eprint services for several years for my Dad, and I really like how it works and allows me to print the email (from, to, text in the body of the email), plus any attachments, all on one page using full letter size paper  However, my parents would like to get rid of their land-line phone, so I'm looking for options to replace the Presto printer.  I was thinking that HP eprint might be a good option, but based on some initial tests with a friends printer, it seems to just print photos as full page images, without the email content.  Is there anyway to confirgure the HP eprint function to print the email text and photos or PDF file attachment on one page?  Thanks.

    Hello @Joseph_TX ,
    Welcome to the HP forums.
    I understand that you want to know if a way to configure the HP ePrint.
    I would like to help.
    Unfortunately there is no way to reconfigure the ePrint.
    When you send an email to the printers ePrint address, it will print the body of the email and any attachments.
    It will not print the subject line or who the email is from.
    Also the ePrint feature will not resize pictures sent.
    What you send is what you get.
    You can get more control over ePrint with the ePrint app, but I don't believe that will suit your needs.
    Please call our Cloud Services at 855-785-2777.
    If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    Hours:
    Mon-Fri. 8am - 11pm, Sat. 9am-8pm - EST
    Mon-Fri. 7am - 10pm, Sat. 8am-7pm - CST
    Mon-Fri. 6am - 9pm, Sat. 7am-6pm - MST
    Mon-Fri. 5am - 8pm, Sat. 6am-5pm - PST
    Aardvark1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!

  • How can I print mulitple different .ai files onto one page in Illustrator CS6?

    How can I print mulitple different .ai files onto one page in Illustrator CS6? I have all of the files organized by Arrange Documents>Tile All in Grid and I would like to print the files in this format so that they can all be seen at once when printed out onto one page.
    Some background is that I have 16 different cad drawings that I have converted and edited in illustrator. I'd like to basically make a contact sheet with all 16 drawings so that they can be reviewed on one sheet of paper after printing. But each drawing is in it's own unique file, and I have not figured out how to put them all onto one page for printing.

    You can place them (linked) into a new Illustrator file and print from there.
    The original files will need pdf compatability.

  • Using multiple collections on one page.

    I have three collections TRIP, CATCH, EFFORT.
    I am trying to have them all on one page as three separate tabular forms.
    Do I understand this correctly, regardless of how many collections on a page, I can only use a total of 50 columns.
    So, TRIP can reference c001...c030
    EFFORT c031..c040
    CATCH c041...c050

    I have three collections TRIP, CATCH, EFFORT.
    I am trying to have them all on one page as three separate tabular forms.
    Do I understand this correctly, regardless of how many collections on a page, I can only use a total of 50 columns.
    So, TRIP can reference c001...c030
    EFFORT c031..c040
    CATCH c041...c050

  • Data Merge specific cells, multiple (unlimited) entries on one page

    HELP!
    I've used the mail merge in the past with publisher to create labels and the like....in it on a single page I would code
    <<address>> and in another part of the page <<next entry, address>> <<next entry, address>>
    and so on and it would fill every area with the next entry in the excel file ad nauseum till complete. It was a simple way to extract specific continuous bits of information and apply it to a document on a single page.
    I haven't been able to find anything similiar with Data Merge but there must be a way since InDesign has been more powerful than publisher in every way so far. Here is a sample of what I am creating
    https://www.dropbox.com/s/7ewkwgmerz89ggf/Sample.pdf
    Basically I have a book where every year my boss has been hand retyping the ENTIRE calendar not just into what you see in the sample above but through out an entire day planner also. I'd like to streamline the process but everytime I try and place a data point it says (for example) <<Day of Month>> and page 1 will ONLY take data point 1. I'm aware of the multiple selections per page function but it wants to lay it out in a grid that doesn't match my document and I have 365 data points to plug in to 2014 and another 365 for page 2 (2015)
    Is there anyway to tell indesign I want <<Day of month, row 2, column 2>> in one box and <<Day of Month, row 3, column 2>> ....<<Day of Month, row 366, column 2>> All on one page so that I can place them precisely through out the document? This would allow me to make a simple adjustment to the CSV each year and then fill in the remainder with nothing more than a click.
    Any help would be appreciated because I'd LOVE to save 20 hours of work every year and huge numbers of mistakes. This has to be something SUPER simple but no tutorial I've found covers it, they all mention the multiple entries per sheet option and that does NOTHING like what I want. I'd have to create 12 documents, data merge them, and then place them into the primary document and that is terrible workflow.  Through out the final document not everything is in a comfortable grid like this so it would be even less useful.
    We use CS3 in case that is relevant for the topic.
    Thanks,
    Tinker

    I'm looking now but not finding anything promising. The calendar scripts all were for formatting very specific calander shapes and I need to be able (on one page) to have 7 entries in a non symmetrical layout (5 works days, then the weekends one over the other). Do you have any recommendations for scripts you like?
    Maybe I'll create a document the holds the information a few date entires per page then place that into the master cropped and moved around as needed. I'm still looking through the exchange for something that makes the tool a little more powerful for me. I'll post it here if I find something that does what I need as that doesn't sound like a very efficient workflow.

  • Why can I not get the normal firefox start page instead of the "yourall-in-one page I currently have

    why can I not get the normal firefox start page I had with my old computer (operating XP) instead of the "your all-in-one page" I have now I have moved onto windows 7

    I have looked as suggested under the Firefox tab but find the following listed as my homepage
    http://uk.foxstart.com/?rls=en:uk:zp
    Have I actually installed firefox program/start page or have installes something else?

  • Numbers document to fit to one page

    Is there an easy way to fit my numbers spread sheet one one page? right now when i print it wants to make it 4 pages. thanks.

    Oops - I spoke too soon. Open the Numbers Inspector and select the second tab. There you'll see *Content Scale* and *Page Layout*. If the Page Layout icons don't make sense, the first icon represents portrait view and the second landscape. You can also adjust scale with the Content Scale slider to fit more columns. You'll see how this affects your spreadsheet if you use Print View. When push comes to shove it may not be possible to fit it all on one page. (I hate that.)

  • How to print all columns in one page

    Hi,
    Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
    Can anyone explain me  how to print ALL COLUMNS IN ONE PAGE  .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
    Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
    Edited by: kotha123 on Oct 11, 2010 5:58 PM

    Hi,
    Your best bet is to use a workbook template or else Excel to pdf option...Thanks

Maybe you are looking for

  • How can I display the correct enum ring value from a parameter file?

    A user will make selections based on the menu ring (there are several of these) and then the values are saved for later use as a parameter (text) file. I have several menu rings which I write out to a parameter (text) file. How can I take these text

  • Direction Not Available Error -ios6

    Maps are not working on my iphone4 after ios6 upgrade I am getting "Direction Not Available" error even though it is able to search the place if I just give search. I was using maps successfully with ios5. Please let me know what is the solution.

  • Reset Pocket Media Drive to factory defalts?

    I have a HP PD6400z Pocket Media Drive for my  Pavilion Elite HPE.  I have successfully used the Pocket Mdeia Drive many times, but have encountered a small problem.  I have files saved on Pocket drive that are unremovable, and unlocatable!  I cannot

  • How can i get the previous version of iTunes back

    I have a MacBook with a DVD/CD drive, Mac OS X (10.7.5). I recently updated to iTunes version 12.0.1.26. It seems to be designed for Macs without a DVD/CD drive. How can I get the previous version back? I don't have a back up or use time machine.

  • Vat% in Accounting Entry

    Hi All, I have a requirement related to accounting entry, i have one process where i need to maintain 0% vat on sales item. it is for this reason i had maintain one tax code with 0% condition record at when i m creating invoice the accounting entry i