Out.print problem!!

hi
i'm new to the magic world of jsp, but this problem is very stupid!
this is my page code:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" import="javax.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%!
public void connect()
    for(int i=0; i<10; i++)
        out.print("ciao");
}%>
%>
<%
connect();
%>
<body>
</body>
</html>and i get the following exception: "cannot resolve simbol: variable out"
i followed all the examples, but i don't know where i'm wrong
thanx all
sandro

Hi!
If you want to print on your web server's console you should write:
System.out.print("ciao");
But if you want to write it on the generated html page you should do something like this:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" import="javax.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
for(int i=0; i<10; i++){       
%>ciao<%}%>
<body></body></html>
just a question: how do yo do to write here in the forum with colours?
bye!
:)

Similar Messages

  • Odd Printing Problem from BO 6.5.1

    Hi, I have been asked to support BO 6.5.1 users and some of them create .pdf files which don't print correctly. The heading boxes, table structures and formatting are retained but the text is replaced with random characters. The docs look fine on screen, it is only when they are printed out that the problem occurs. I am sure I have ruled out printing problems, email problems and Adobe 8.0 problems, particularly because this is only happening with pdf's from BO sent to any printer and so I feel it must be a fault with BO. Has anyone seen this before? Grateful for any advice

    Hi Greyhat,
    as you refer to the legacy technology VB6 I recommend to post this query to the [Legacy Application Development SDKs|SAP Crystal Reports - Legacy SDKs; forum.
    This forum is dedicated to topics related to legacy SDKs, including the Report Designer Component (RDC), OCX, VCL, and Crystal Reports Print Engine (CRPE).
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Legacy Application Development SDKs queries remain in one place and thus can be easily searched in one place.
    Thanks a lot,
    Falk

  • HT4356 My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    hi
    could you tell us what the other app is please

  • Problem with national characters calling System.out.print(...)

    I need to develop an application printing spanish characters like "�" (ce trencada) "�", "�", etc.
    The problem is when I type
    System.out.print("�")in my application, I get "plus-minus" symbol while executing it.
    Anyone can help me, please?
    Thank you in advance.

    check the list of fonts available. You can use the following code for the purpose.
      public static void main(String args[])
            String fonts[] = getFontNames();
            for(int i = 0; i < fonts.length; i++)
                System.out.println(fonts);
    public static String[] getFontNames()
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    return ge.getAvailableFontFamilyNames();

  • Problem with this out.print(status.equals(

    Hi i've got another problem.
    The following codes is as follows:
    String status = (String)rs.getString("Status"); //status is either "O" - Open or "C" - closed
    out.print(status)
    out.print(status.equals("O"));
    it returns me FALSE even in my database it is O... I am not sure why.. can someone enlighten me? and it works if i use
    out.print(status.charAt(0) == ('O');
    I am not sure why..
    please reply asap... thanks

    try follows
    out.print(status) ;
    status.trim();
    out.print(status.equals("O"));That won't change anything. status.trim() won't actually change status; it just returns a substring. If you actually want it trimmed, you should do this:
    status=status.trim();
    out.print(status);
    out.print(status.equals("O"));

  • Out.print performance problems?

    Hi
    I'm facing strange performance problems I would not expect generating long html pages on the fly.
    I have a page that is approximately 30 to 40Kb long. Profiling code generation I obtain a 30 second time to process. I have excluded every server-side processing activity since I have also used a StringBuffer to accumulate all the html code to be flushed: generating the StringBuffer content require less than 1ms... flushing out the content with:
    out.print(stb);
    out.flush()
    is taking 5 to 6 seconds. The same happens both on a development environment using CQ servlet engine, both in production where we are using CQ with JBoss as app server.
    I tried the same operation on a simple tomcat installation with a JSP... less than 10 ms to generate the full page.
    This problem is slowing down a lot performances.
    The contents are generated inside a nested component included with a <cq:include> tag.
    Anyone can give me suggestions on how to cut down a so big delay in html content generation?
    thanks

    I made further analysis and now I can give a clearer scenario.
    The *very low* performances has been registered on CQ 5.2.1 when generating html code full of relative links. Every link *cost* big processing time. With 60-70 links the component ends up paying 3 to 4 seconds (too much!).
    The same component on a CQ 5.4 instance takes approximately 500 milliseconds, still too much considering that without link the same html code is generated in less than 10 milliseconds.
    The reason is clearly in the filters applied in the output pipeline --> link checker? remapping on links based on etc/map configurations?
    How can I change configurations in order to avoid these performance problems?
    thanks
    Ignazio

  • J2me sdk 3.0  problems in System.out.print

    Hi
    I can not use println to print Chinese .
    First I just use System.out.print("test") to print some debug information , and I surprised to find it print nothing.
    Then I try System.out.println("test") and it worked well. But there still problem when print Chinese,
    like System.out.println("&#27979;&#35797;") and it just print a mistake string as "??" !
    Can some tell me how to solved it, thanks .

    Note: This thread was originally posted in the [Sun Java Wireless Toolkit|http://forums.sun.com/forum.jspa?forumID=82] forum, but moved to this forum for closer topic alignment.

  • Ever since Firefox did an update I have printing problems. Prints partial pages and spreads out over several sheets. I use Mac OS X 10.4.11

    Ever since Firefox did an update I have printing problems. Prints partial pages and spreads out over several sheets. I use Mac OS X 10.4.11

    See this: <br />
    http://kb.mozillazine.org/Problems_printing_web_pages#Prints_to_a_small_portion_of_the_page

  • Canon 860 Series (Pixma) Printer Problems with OSX 10.8 (Mountain Lion) – links to Canon Support Site with Drivers and Software with install tips

    After spending several hours sorting out Canon Pixma OSX problems here are my thoughts:
    Canon 860 Series (Pixma 868) Printer Problems with OSX 10.8 (Mountain Lion) – links to Canon Support Site with Drivers and Software with install tips
    Problem:
    - New imac and MacBook Pro 2012 (OSX 10.8.2) had a problem using Canon Pixma 868 printer on network and would not scan or print using Canon Pixma software (Pixma MP Navigator 2.1 & Photo Print), which has advanced scanning and photo printing functions. 
    - When I connected the canon printer to my imac, OSX 10.8.2 automatically downloaded and installed drivers for Canon 860 series printer. I could then add the new printer (select ‘apple menu’ / ‘system preferences’ / ‘print and scan’ / “+”) and printer would work while connected via USB but could not get to print or scan over network wifi. 
    - The original Canon 860 Series CD does not work with 10.8 and the manual / online instructions did not make sense (as based on CD install). 
    Solution:
    1) Install Canon Printer Drivers and Software (from official Canon site)
    Go to canon support site, review FAQ, then download and install following Pixma 860 Series software & drivers for OSX 10.8 (links see below). The version I downloaded is in brackets but check for updated version. Full instructions are below.
    Canon 860 Series Drivers & Software  for OSX 10.8 Mountain Lion:
    The base software and drivers needed for using Canon 860 Series on Mac OS X 10.8 (USB) are
    1 Printer Driver
    (Canon MX860 series CUPS Printer Driver Ver. 10.67.1.0 (03-Aug-2012))
    2 Scanner Driver
    (Canon MX860 series Scanner Driver Ver. 14.11.4a (03-Aug-2012))
    3 Network Tool
    (Canon IJ Network Tool Ver. 4.1.0 for Intel Mac (27-Dec-2012)
    Canon Software for using advanced printing and scanning functions (while connected to network)
    4 Solution Menu
    (Canon Solution Menu Ver. 1.4.1 (27-Jul-2012 ))
    5 MP Navigator EX
    (Canon MP Nav EX Ver. 2.1.3 (02-Auf-2012))
    6 Easy-PhotoPrint EX
    (Canon Easy-PhotoPrint EX Ver. 4.1.6 (21-Jan-2013 ))
    Canon Support (HK) – check your local site
    http://www.canon.com.hk/en/download/main/index.do
    Select Product and drivers from support site eg http://support-hk.canon-asia.com/
    1. Choose a product category
    Multifunctional Printers
    2. Choose a product series
      Pixma
    3. Choose a product model
      Pixma MX868
    4. Choose type of document
    Downloads or FAQ
    If you have problems installing the software under 10.8, see the FAQ on Canon site. You will need to allow software installs from “unidentified developers by using “Control” Key or by changing your system preferences)
    2) Check Canon Printer and Software Working while connected via USB
    Once you have downloaded and installed drivers and software and restarted computer, check that the printer and Canon Pixma software (Pixma MP Navigator 2.1 & Photo Print) are working via USB.  Open the Canon IJ Network Tool App (Applications / Canon Utilities /IJ Network Tool / Canon IJ Network Tool App) and make sure you can see the Canon MX 860 series (xx.xx.xx.xx.xx.xx) and that it shows the correct SSID Wifi settings (under the Canon IJ Network Tool App ‘Setup menu’).  This is normally done as part of the automatic install but worth double checking
    3) Add new network printer using ‘apple menu’ / ‘system preferences’ / ‘print and scan’ / “+”).
    After you have checked USB printing turn off printer, unplug the USB cable and shutdown the Canon IJ Network Tool App.
    Then turn the printer back on and wait 30s. Then add a new printer using ‘apple menu’ / ‘system preferences’ / ‘print and scan’ / “+”). Once you select “+” (add new printer), wait 10-30s for the Wifi Networked Canon MX 860 Series printer to appear in the new window eg Canon MX 860 series (xx.xx.xx.xx.xx.xx) (Kind: “Canon IJ Network”)
    DO NOT ADD THE MX 860 SERIES BONJOUR SCANNER (the Bonjour Scanner is the built-in software, is not needed and often appears first on the add printer list).  The Canon scanner can be accessed used through the MP Nav EX Ver. 2.1.3 software (which has much better functions)
    You will now have two Printer Canon MX860 (USB) and Canon MX860 (Wifi / Network). Set the Canon MX860 (Wifi / Network) as default and test print and scan
    If the Wifi Networked Canon MX 860 Series printer does not appear, check the printer and make sure that the printer can see the wifi network. On the printer select Menu / Settings / Device Settings / Lan Settings / WLAN Setting List.  It should say WLAN Active, identify the SSID and have an IP address
    If the printer can not see the Wifi Network, plug the USB cable back in, then open the Canon IJ Network Tool App (Applications / Canon Utilities /IJ Network Tool / Canon IJ Network Tool App). Make sure you can see the Canon MX 860 series (xx.xx.xx.xx.xx.xx) and that it has your SSID settings (under setup), if it has this info, restart the computer and the printer and try again

    Hi, thaks for response, meant to post as a discussion (not question), wanted to save others time if they get the same problem

  • Print problem. trying to print a document in Preview, the start of the text prints half way down the page not at the top of the page?

    Print problems.  Printing out an email the text starts half way down the page.  I tried taking a picture of the text I wanted to print, tried to print from Preview and have the same problem.  If anyone has any ideas I would really apreciate it. Thanks Penny

    One more thing to check:  System Preferences/Print & Scan.  Make sure your printer is set as Default.
    I'm using OS X 10.8 and I don't see Page Setup anymore. If you have access to Page Setup, check to see if there are any adjustments to make there.

  • My "fix" to print problems in LR (using MS XP)

    Having had the same problems printing from LR as many others are complaining about, I thought that I might give my 2 cents to what I did to solve (?) the problem. I have to run with current setting in a while to be convinced that it is not just an intermittent fix though ;-)
    My problem when printing from LR was that the print came out much too Cyan-Green and somewhat dark when color management where handled by LR. When the same photo was exported to PS Elements (PSE) in Tiff with the Pro-photo color profile embedded, adjustments from LR, and printed using the same driver setting and color management, the print came out fine.
    I must mention that I have had fine printout in previous LR versions but I'm not sure when the problem started. But at least from LR version 1.3, 1.3.1 I have had problems printing a proper print.
    As I'm not 100% sure what caused the fix, I don't want to leave much info un-documented, so I start by describing my system etc.:
    - Athlon 64 3500+ with 2 GB RAM
    - Lacie 119 LCD monitor (calibrated with a ColorVision Spyder 2)
    - Epson Stylus Photo 890 printer; an old (6-7 years) 6 color dye-sub printer, but it can still produce very good prints. (It is BTW, the A4 printer version of Epson 1290).
    - Microsoft XP service pack 2
    - Adobe Photoshop Lightroom 1.3.1.
    - Adobe Photoshop Elements 5
    - Latest Epson 890 printer drivers ver. 5.21/P (from 2004)
    - ICC profiles for various Epson printer paper
    - Paper used: Ilford Printasia Photo Glossy Paper (but I have tried Epson Premium Glossy Photo Paper as well with same results)
    I used following setting:
    - In printer driver: "No color management" was selected
    - LR and PSE color management; printer profile: Epson Stylus Photo 890 Premium Glossy Photo Paper, Rendering Intent: Perceptual
    . LR Print sharpening: High
    - LR Print resolution: 360ppi
    When the photo was opened in PSE and I had printed a small print with above mentioned printer driver/color management settings. The print looked good, but with a little magenta color cast, so I thought that if I used a different printer profile this might help (I have no ICC profile for the Ilford paper). So I chose the "Epson Stylus Photo 890 Photo Paper" instead and printed again, and this time the photo looked as it did on my calibrated monitor. I have to admit I was a bit delighted even though it was from printed from PSE and not from LR, but seeing that color management worked in other applications was a relief.
    In PSE, I also I tried changing to a different Rendering Intent before changing printer profile, but with no success.
    Another thing that helped further was to change Media Type in printer driver from "Premium Glossy Photo Paper" to "Photo Paper".
    After the print success in PSE I went back to LR and changed the Printer Profile to "Epson Stylus Photo 890 Photo Paper" (still with "No color management" and "Photo Paper" selected in printer driver) and printed the photo again. Now the photo looked as good as it did in PSE (!!!???).
    Now I have made a few printer preset in LR for various print sizes, and the prints look fantastic. Every time! Do I have to mention that I am a happy guy ? :-)
    BTW, remember that a printer preset also saves the printer driver settings. Forgetting this can easily cause some unexpected results.
    The only thing is that, I still do not know what fixed the problem, and I am a bit worried that the problem might come back again. Maybe the print related changes made in PSE and the following selection of the same settings in LR did - somehow - "synchronize" LR to a proper color management. Sounds weird, but if it works...
    I hope this long explanation was useful to - at least - some of you, who experience printer problems in LR. LR is a fantastic application, and I enjoy using it, but the printer problems has really been frustrating.
    Good luck!
    /Per

    Little unclear about the border thing- you say it prints with a too wide border, but also say:
    When I print the image with this set up, it still is printed without a border.
    It's a factor of your printer, though; some can never print without a margin around all sides; this can be a border, or cut off. Good news, though; you can have a 5 x 7 borderless, or with any size border you wish if you print on larger paper, and trim to taste.

  • Printing problems with HP Laserjet P1005

    everything seems to be ok with my printer HP Lasejet P1005, but it just  doesn't print. The works are in the gueue and error messages continually is "set the new toner cartridge"  althrough I've changed the cartridge already.  Also there is a message "HP:s part number"
    What can or should I do??? Help!!!

    Hi @rlp48,
    I see by your post that you are getting the error message "set the new toner cartridge" and you have already changed it with a HP toner. I would like to help.
    I would do a hard reset to see if that will resolve the issue.
    Leave the printer on and unplug the power cable from the printer and wall outlet for 60 seconds.
    Then reconnect the power cable to the printer and wall outlet rather than a surge protector.
    This ensures the printer is receiving full power and may help this situation.
    Try and print a hardware self test on the printer to find out if it is a hardware or software issue.
    Open and close the lid 5 times quickly. It should print out a page with lines on it.
    Did it print the self test?
    If the self test page printed, clear the Spool folder and restart the Print Spooler and try printing again.
    How to Clear Current Print Queue In Windows Vista & Windows 7.
    Download and run the Print and Scan Doctor. It will diagnose the issue and might automatically resolve it. Find and fix common printer problems using HP diagnostic tools for Windows?
    What operating system are you using? How to Find the Windows Edition and Version on Your Computer.
    Are you using Genuine HP Toner?
    What were the results when you ran the Print and Scan Doctor? (did it print or scan, any error messages)
    Please provide in detail the results if you are still having issues.
    Have a nice day!
    Thank You.
    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!
    Gemini02
    I work on behalf of HP

  • Printing problem using HP Laser 3015 with OS 10.4.11 on MacBook

    Pauses when printing a set of PDF files on my HP Laser 3015. It takes forever to print a set of documents. This is not working for my business where sometimes I have anywhere from 60 to over 100 pages to print out 2 sets! Last week I printed out the first set that took a long time and copied the second set. Printer worked fine with the old reader. I would like to have that back!! But can't find it in my application folder. Can someone tell me how to get an old reader if there is not a solution to this printing problem.
    I reviewed all the settings on the print box and can't find the problem. I've read what to do in Adobe's help but it didn't tell me anything I already was doing. Does anyone have a solution to my problem? I sure would appreciate it.
    Diana

    I have had printing problem too many days ago.
    As far as I am concerned you may try the following: -
    - Verify your acrobat reader is up to date.
    - Verify your printer drivers if missing any.
    - Verify there shouldnt be any paper jam in the printer.
    - Verify your printer is connected properly.
    Verify that you have ink colors
    - In the printer.
    [spam link deleted by host]
    If these didnt help than it may be your printer problem, you may fix it show it to any hardware shop.

  • HP 7960 printing problem

    Until recently, my HP 7960 was printing just fine.  Then, about half way through the printing process, the pics started turning green.  I've cleaned the cartridges, replaced the cartridges using only new original HP ink cartridges, adjusted the print settings, reverted to the default print settings, and the problem persists.  My OS is Windows Vista, which I've had for 3 years and never had a printing problem with the 7960.  So, I doubt it's the OS.  Someone suggested that I may have clogged nozzles but if so, why the color change only during the last half of the printing process?
    Any assistance with this problem is greatly appreciated, and thank you in advance.

    Hi there sarge. Click on the link below to check on your issue. Hope this helps.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01430567&cc=au&lc=en&dlc=en&product=3571753
    What I noticed is that you've been printing an alignment page everytime you take out and put those cartridges back in.
    When the alignment page was printed were you able to scan it on the scanner glass?
    You can check on the link below on "How to Align the Print cartridges"
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01419346&cc=au&lc=en&dlc=en&product=3571753
    or
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01065136&cc=au&lc=en&dlc=en&product=3571753
    Let me know what happen after then. Thanks

  • HP Officejet Pro 8600 Plus "unspecified printer problem"

    I just set up my HP Officejet Pro 8600 Plus e-All-in-One.  The set-up seemed to go okay, but when I go to the "devices" tab for "HP Connected" it has a yellow yield sign and says that I have a problem with my printer.  When I click on the yield sign symbol, the box says that "An unspecified problem was reported. Please check your printer."   When I check the printer pannel, there are no problems reported.  The machine seems to print okay, but I'd like to clear up this error that is shown.  Any ideas?
    Also, I've already done the restart and sign-off/sign-in stuff, so we can move on to second-order trouble shooting.  Thanks.
    This question was solved.
    View Solution.

    HELP!
    I am having exactly the same problem. I am simply swapping out an existing Deskjet 3512 that worked perfectly at all levels, so i KNOW i dont have router/port/network issues. eprint was and is flawless. I just plugged it back in to check and it still works just fine with eprint.
    Using my new Pro8600, I send emails to my eprint address and they seem to go...and then nothing. they just don't print.
    I get the"Officejet Pro 8600 Plus "unspecified printer problem"" message but my front panel reports no issues.
    I'm a step away from taking this back and buying an Epson.
    My experience with their support has bee stellar at a commercial printer level.
    This seems to be a very common problem and I just dont have hours to monkey around with something that should work out of the box.
    any help will be appreciated.

Maybe you are looking for

  • Interrupts on a NI-6602

    I want to get interrupt from my 6602 board, e.g. on a rising or falling edge of an output. I do register level programming. The RLPM does not fully describe all related registers. Does anyone have experience with this, or has the related register-lay

  • How to change location of the file?

    Hi All, I am using this code to convert infopath view to html, everything working fine but i want to change the file location public string ConvertViewToHtml() try byte[] sourceFile = null; XPathNavigator root = MainDataSource.CreateNavigator(); //st

  • Why change from flash to flex?

    hi everyone I'd like to know why is flex a better alternative to build RIA applications then flash itself, because i can't find anywhere the reasons to change, since flash can do almost anything that flex can to, so please explain it to me. thanks

  • [CS4]  save on a local file without  user intervention

    hey,...sorry for my english... i work with a other application who need to have the information written in the local file without an user intervention so... i would like to know if it s possible to write or rewrite on a local file without interventio

  • Is it possible to make the text in these forum webpages darker?

    Thanks.