Printing part of displayed Jsp

Hi,
I am using the Windows Print function to print (displayed in browser) Jsp page
Problem is when print button is clicked it prints all of the Jsp page, top to bottom.
Actually, the Jsp display has 3 parts
1>Header
2>Main Content
3>Footer
My requirement is, I want to print only the Main Content on Print button click
How can I tell Print button that dont print 1 2 3
but only Main Part ?
I am using following code for Print
<INPUT class="button btnPrintC2 btnLink" type=button value=Print name=prntr onclick='Javascript:window.focus();window.print();'>

Use Frames in html and then print

Similar Messages

  • How to print new line in jsp page

    hi
    how to print new line in jsp page
    thanks

    \n - new line character is in java specific not HTML
    specific.Well, if the correct line separator sequence (by far not always \n) would be used, it does add a new line to the HTML output. Too bad that you don't want to see HTML but formatted text. The BR tag is a formatting element for the displayed text, not a line break in HTML. ;)

  • How to disable Format Warning when displaying JSP in Excel under MS-Office

    We have an application running in WebSphere 6.0 container, the application displays jsp data in Excel, it had no problem before MS-Office 2007 was install. However, after MS-Office 2007 is used, following format warning dialog box is always displayed:
    The file you are trying to open, ’Requests[1].xls’, is in a different format than specified by the file extension.
    Verify that the file is not corrupted and is from a trusted source before opening the file.
    The user has to click the "Yes" button before the Excel report can be successfully displayed. This is not acceptable by our production users, and I need your helps to get rid of this dialog box.
    The application uses struts. The Action class retrieves data from database and the data is forward to the result jsp
    in an data object set in an attribute of the session's Request object. The Action class also set the display info, such as the contentType,etc., in session's Response object (please see below for details).
    The result jsp retrieves data from the data object and display in Excel according to the display info provided in the
    session response object.
    To eliminate any possible problem that may be caused by the data, I have simplified the result jsp by removing original
    codes (such as data object forwarded from Action, and Tag Library, etc.), and just hardcoded few data for displaying in Excel, however, the same format warning box still always shows up.
    My Action class set display info as below:
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Expires", "0");
    response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
    response.setHeader("Pragma", "public");
    response.setHeader("content-disposition","attachment; filename=Requests.xls");
    My simplified result jsp is listed below:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <!-- <%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt'%> -->
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <TABLE border="1">
         <TBODY>
         <TR>
         <td><p align='left'>myData1</p></td>
         <td><p align='left'>myData2</p></td>
         <td><p align='left'>myData3</p></td>
         <td><p align='left'>myData4</p></td>
         </TR>
         </TBODY>
    </TABLE>
    </BODY>
    </HTML>
    So, I reduced the result jsp to contain only few hardcoded data, but the format warning always shows up. Is it caused by inconsistency between the MS-Office 2007 browser and the JSP engine in WebSphere 6.0 Web container? Need your help to resolve this problem.
    Thanks in advance.

    That's the caveat of fooling your webbrowser and Excel with a plain HTML page along an Excel content-type and Excel extension.
    Don't do that. That's plain stupid. Provide a real binary Excel file. You can create one using Apache POI HSSF or Andy Khan's JExcelAPI. Alternatively -and more recommended in case of large reports-, just use the CSV format. It's easy to create a CSV file in 20 lines of code and Excel perfectly understands CSV formats. Don't forget to change content-type to CSV.

  • How to get "Calendar in the View" displayed on the page where Calendar web part is displayed?

    I have a calendar with overlay set up for 5 views. When the calendar list is open in full page, the "Calendars in View" is displayed on the left pane with all 5 views listed by colors.
    1) I want to display the calendar right on the home page, so I added the calendar web part to the page. But the problem is the "Calendars in the View" does  not show up on the quick launch on home page, it only shows up in calendar list view.
    How can I get "Calendars in View" displayed on left pane when calendar web part is displayed? so that users can select different views?
    2) Also it will be better if the "Calendars in View" can display all components of the overlay when not in the default view, so user can toggle thru different views to see each one on the main pane.
    Currently, only the default view has all colored views displayed under "Calendars in Views", once you click another view on the list, it just displays the current view, and you have to click the "Calendar" to see all and select another
    one.
    Really appreciated if someone can give a solution for at least the #1 problem. great if you have a solution for #2 as well!

    Hi,
    According to your post, my understanding is that you wanted to know how to add iFrame via Content Editor web part.
    There are two articles for your reference.
    How to insert an iFrame into a SharePoint web page
    Embed YouTube video in SharePoint 2010
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • My Deskjet D1660 won't print part of my Word document

    Please help me!
    Yesterday I struggled for three hours to print black until I found out the cartridge ink was clogged, I cleaned it and that solved it.  I've got a HP Deskjet D1660 and my laptop is Windows 7.
    But today I was printing part of a Word document (page 24 onwards) and it just printed a couple of pages. It won't print page 26 onwards! printer says there is nothing in the queue and that the printer is ready. I've tried everything I could think of...... please help me; I think the problem is not the printer as it would printer anything else, including other Word documents. It must be something else, I just don't know what! :'(

    Hello Moyo1,
    Welcome to the HP Support Forums!
    First off, I am glad to hear you have been able to clear the clogged ink jet that was preventing the Photosmart D1660 from printing black. Regarding the current issue, not printing past a set page number, let's try and fix this for you.
    Since you have a Windows Operating System, run the HP Print and Scan Doctor. This will look into driver, software and communication problems that could be causing this.
    Let me know the results, what passes, fails, etc and I will be looking forward to hearing back from you.
    Cheers,
    JERENDS
    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" to the left of the reply button to say “Thanks” for helping!

  • Data view web part to display the most frequently accessed pages based on the user that is logged in

    I am working on a project in which I would like to display the top 5 most accessed pieces of content as links, based on the user that is logged in. Our MOSS 2007 implementation has subsites for all regions that we do business in, as an example North, South, East, and West. When a user visits the North region homepage, I would like a web part to display:
    Hello, <username>, here is a listing of your most accessed content:
    Link to One
    Link to Two
    Link to Three
    Link to Four
    Link to Five
    So each user would get a customized list based on their content access. We are not using my sites, but these would not work as we want the list to display on the home page of the region site.
    I am thinking that a data view may work here, but I am not sure. Any help is greatly appreciated.

    If you are running MOSS you may want to take a look at the Relevant Documents web part too.
    http://office.microsoft.com/en-us/sharepointserver/HA102410251033.aspx
    The Relevant Documents Web Part helps you create a personalized view of the documents that you create, check out, and change. In a large Document Center, the Web Part can save you time and effort by making files easier to find and use. The following figure shows the Web Part:

  • How to configure search results web part to display results only after a query is generated from user?

    Hi All,
    I am crawling documents from a file server. I created a new content source and crawled the documents. All documents are crawled successfully.
    Then I went to my enterprise search center site collection and created a new result source. I have added the query to use above content source.
    After that, on a page I am trying to configure the search results web part to display documents using this result source. Now the problem is:
    It displays all the documents that are crawled without searching for anything. I mean first it should not display any results. If a user searches for something , then according to that search it should display results.
    Any idea how to do this in the web part? I am using SharePoint 2013 on premise enterprise edition. No code. Totally OOTB.

    Hi Mohan,
    What did you use for the Query text in the result source?
    I could reproduce this issue when I used Query text like: {searchTerms} Path:”http://sps2k13sp/sites/First/Shared%20Documents”
    Then I changed the Query to
    {?{searchTerms}
    Path:"http://sps2k13sp/sites/First/Shared%20Documents"}
    , then Search result web part didn’t return results without searching.
    So , check your result source, and use the Query like the above(adding "{?...}").
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • The requested URL /pls/portal/display.jsp was not found on this server.

    Hi,
    I managed to get ultrasearch running now. The crawling process seems to run smooth. Executing a search gives me the correct result. However, i can not display the documents that are listed in the resultpage.
    The link to the document is like this:
    http://myportal/pls/portal/display.jsp?type=file&f_url=C:\ultra_docs\sultan\filetransfer\htc\site.doc
    The path in the url seems ok to me.
    Cliking on this link gives me the following error:
    The requested URL /pls/portal/display.jsp was not found on this server.
    Please, help me out here :/
    mvg
    Bram

    I just tested it by accessing the search page with the following url:
    http://myportal/ultrasearch/query/search.jsp
    This gives me the same result and the links to the actual documents work fine now too! But it is not working from within portal, the links generated by the ultrasearch portlet give me an error.
    The requested URL /pls/portal/display.jsp was not found on this server.
    Please Help me Out
    thx

  • Officejet Pro 8600 Plus prints part of page and quits

    My brahd-new Officejet Pro 8600 Plus prints part of page and quits.  The manual said to clean the print heads and align the printer.  I did both of those.  It made the problem worse.   I'm printing on photo paper - HP Premium Plus.  It happens about 1/2 the time. 

    Hi beantowner2,
    I would like to begin with a few questions,
    Does this happen when you copy a photo, or only when you print form the computer?
    Do you have the printer connected directly to a wall outlet or a surge protector?
    What operating system and version is on the computer?
    Is the printer connected to the computer with a USB cable or wirelessly?
    If you have a WIndows operating system please download and install the latest firmware version for the printer. HP Officejet Pro 8600 N911g_n Firmware.
    If you are using a surge protector, I suggest disconnecting and connecting the power directly to a wall outlet.
    Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector
    In this document you will see,
    ISSUE:
    Problems or issues may arise when an HP LaserJet series printer is connected to an uninterruptible power supply (UPS), a power strip, or a surge protector
    This is not limited to Laserjet printers.
    I look forward to hearing back from you.
    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

  • Print part of image in CS4?

    I recently upgraded from CS3, and I seem to have lost the ability to print part of an image.
    I'm sure that in CS3, if you tried to print an image that was larger than the paper, you got a warning saying it would be cropped, but you could still move the image in the print preview to get the part you wanted. How do I do this in CS4, without cropping?

    You can still do this in CS4.
    In the Print dialog,  Center Image and Scale to Fit Media must both be unchecked, and Bounding Box must be checked.
    Then you can slide the image around in the preview window as much as you like.
    You can also drag the corners of the bounding box in the preview to manually scale the image.
    Unfortunately, many printers will not print an image that extends past the printable area. If this is the case, you'll be able to go past the warning message, but the page will probably come out blank. If you can set your printer to print bleeds, then you can probably print the portion of the image that falls within the printable area.
    (I was also going to explain how to set a pre-sized selection and then print just the selected area, but the "print selected" checkbox in the print dialog seems to be broken at the moment. So here's a pretty useful work-around that you may need to use if bleeds are a problem.)
    1. Select the Crop tool (C / Shift-C) and enter the width and height of your printer's printable area. You can enter "8.27 in" or "2750 px" etc. If you don't know your printer's official printable area, just allow about 1/4 to 1/2 inch of border (e.g., 8 in x 10.5 in for letter size).
    2. Then, in the settings bar, enter a reasonable pixels per inch for your printer (300 should work fine) in the Resolution field.
    3. Then drag the crop marquee over your image and position or size it as you like. Because the Width and Height are not blank, the crop area will retain the correct proportions. Note that whatever size crop area you create, the crop operation scales that portion of your image to the specified Width and Height.
    4. Then press Enter or Return or click the big checkbox on the settings bar. Don't save your document!
    5. Print the cropped document as usual, and after the print dialog closes, press Ctrl-Z (Command-Z) or choose Edit / Step Backwards to undo the crop.

  • Use a Content Search Web Part to Display a Picture

    Hello -
    Is there a way to use the Content Search Web Part to display the most recently added picture to a specified application?
    Please let me know if you need additional information to answer this question.
    Thanks,
    Jordan

    Hello Jordan,
    I believe you could do this :
    filetype:jpg OR filetype:png OR  (and so on for all
    images types)
    AND path:"http://yoursite/youlibrary"
    Regards
    Samuel
    Sharepointerie.com

  • Content search web part to display only lists and libraries

    Hi,
    I want to configure Content Search Web Part to display only the names of lists and libraries inside my site collection. I tried adding Keyword filter "Only return lists and libraries", however it is also returning list items. Any idea on this issue?

    Hi John,
    Thanks.
    Agree with your point. I can't use any code (that is client requirement). Also, still I use, I can't use it in this scenario. I want to display most visited lists and libraries (in last month or lifetime). I can use managed properties such as ViewsLifeTime
    and ViewsRecent to sort it If i get the names of lists and libraries. Let me know if this clarifies the question more and you have an idea about it.

  • Problem with printing debug statements in JSP page

    Hi all,
    I am debugging an application with System.out.println() statements - my debug statements in the *.java class printed just fine, but when I do the same thing in my JSP page, nothing gets printed out.
    I am already wrapping my System.out.println() statements inside the <% %> tag.
    Does anyone know what may be causing this? Any help will be greatly appreciated!
    - JL

    Where do you expect to see the output?
    System.out.println will write to the console/logs
    They WON'T write to the JSP page.
    If you check your error/output logs you will probably find the statements there.
    If you want to print things into the JSP page, just use out.println.
    "out" is an implicit reference to the current JSPWriter.
    Cheers,
    evnafets

  • How do I print part of a document, say a paragraph?

    I am a newcomer to Macdom, being ex-PC. Can anyone tell me how, in iWrite, I can print part of a document, say a paragraph. At present all I can do is print everything on the page, sometimes pages long.

    Some applications have a choice for this in the print window. For those applications that do no offer this option, I recommend using Print Selection available from http://www.schubert-it.com/free/
    Matt

  • SQL Report Viewer Web Part Not displaying Report

    I have just completed updating an old report using report builder 3.0. I have added it to SharePoint Designer but have not replaced the old report file. 
    Any help is greatly appreciated!!
    All I did was export the old report from sharepoint designer to my desktop. Then opened it with Report Builder 3.0- made changes to the report and saved it with a different name (for safety in case i break things) and then upload it back to the same place where
    the old report was located using SP Designer. I then went back to the site in sharepoint that is displaying the old report, and changed the URL path in the SQL report viewer to the new report. 
    Now the SQL Report Viewer web part isn't showing anything (blank)

    Dear Form Moderator,
    This question is already asked in sharepoint forum so please don't move this sharepoint forum. Here is link of thread:
    https://social.technet.microsoft.com/Forums/en-US/3796da85-fbb4-4722-a5d0-724859f7d4ae/sql-report-viewer-web-part-not-displaying-report?forum=sharepointgeneralprevious
    Here is the one more duplicate thread link in same forum. So either you can merge both OR delete one.
    https://social.technet.microsoft.com/Forums/en-US/259d2586-ed4a-4f47-a808-877d4621d9f2/report-builder-30-sql-report-viewer-web-part-not-displaying-report-in-sharepoint?forum=sqlreportingservices
    [SharePoint Forum Moderator]
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

Maybe you are looking for

  • Removing signatures in a digital signature field

    Hi all, I have a question relating to the topic above that i hope you guys can help me with; 1) Is it possible to remove digital signatures from form? For instance if you have a form going thru several approval steps that requires signatures, and the

  • Transfer Speed

    Is there any way I can speed up the transfer rate between my iTunes and my iPod? Its awefully slow, and I have school tomorrow. Thanks. 8) -Pete

  • Downloaded elements 12 and now wont open

    downloaded elements 12 and now wont open

  • Convert mp3 to to play in a car CD

    Help  is need it, I like to convert Audios MP3 to a format that will play in home Bose and CD player in the Honda Element, none play MP3 or wav. thank you in advance olmo47

  • Image field on acrobat professional x.

    I'm trying to create an image field in a form that i've already done. Javascript action isn't working at all. Any suggestions? How can i do that? Or i really MUST HAVE acrobat livecycle designer, a windows software, from more than 4 years ago because