Try to print something from Servlet on JSPages help out pls :(
hi guys
im new to servlets so as a learning process i try to create a method call write() in make_menu.java
the codes goes like this
=========================
import javax.servlet.*;
import javax.servlet.http.*;
public class make_menu extends HttpServlet
public void write() {
System.out.println("lalala");
==========================
so when i call write(), its suppose to print out "lalala" on my jsp page where i call it.
Here is my jsp page code
==========================
<%@ page import="make_menu" %>
<jsp:useBean id="beanie" class="make_menu" scope="session"/>
<%
beanie.write();
%>
=========================
i assume when i load this page, beanie.write() is invoked and hence is suppose to print out "lalala" on my webpage
but all i got is a blank page :(
how do i write the print in my servlet ?
is it not System.out.println ?
pls help thanx alot
alright changed the codes abit
imported java.io.* for the printerwriter
================================
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class make_menu extends HttpServlet
public void write() {
//System.out.println("lalala");
PrintWriter out = response.getWriter();
out.println("lalala v2");
================================
howeverr upon compiling got this error :((
================================
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\make_menu.java:10: cannot resolve symbol
symbol : variable response
location: class make_menu
PrintWriter out = response.getWriter();
^
1 error
===============================
is there any library to be imported to solve this response thingy?
Similar Messages
-
When I try to copy, save, & download photos to Photobucket and just recently when I try to print anything from a website (using their print function) Mozilla freezes up.
http://kb.mozillazine.org/Unable_to_save_or_download_files
-
I need to enlarge the print when I print anything from online. Entirely too small. Does anyone know the answer?
hi there,
could you provide the community with a little more information to help narrow troubleshooting? what browser and operating system?
You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too. -
I have downloaded the latest pages update on my iPad, but my iMac still has Pages version 4.3, and I cannot find out how to update it on my desktop. When I try to send something from my iPad pages via email to be opened on my desktop in Pages, it won't open in Pages. I get a message that it can't be opened because the version is too old. I sent the document as a PDF and it worked. But I want to be able to use Pages back and forth. HOw do I update the Pages version on my desktop iMac?
The file format used by the iOS versions of the iWork apps can only be read by the new iWork apps on your Mac - i.e. Keynote 6, Pages 5 & Numbers 3. Those versions for the Mac require Mavericks, OS X 10.9. The "too old" error on a Mac comes if you are trying to open an iWork '08 or earlier file in the newest apps. If you do have the newest apps you can open the files from your iPad.
If you can't or don't want to upgrade to Mavericks & the newest iWork apps your best option would be to export/share the files from the iPad to a type an older version of iWork can read such as Word, text, Excel, etc.
Or contact AppleCare. They made this mess, let them fix it. -
Help me Please.. I can log on to the Apple website to manage my account and all the information is correct, but I get “Your Apple ID has been disabled” when I try to get something from App Store on my iPad3
I'm from poland.
Thx
BalbiContact iTunes Customer Service and request assistance...
Use this Link > Apple Support iTunes Store Contact -
I can log on to the Apple website to manage my account and all the information is correct, but I get “Your Apple ID has been disabled” when I try to get something from App Store on my iPhone.
You need to contact Apple Support, particularly iTunes Store support team. Cheers!
-
My new iPad, when I try to get something from the Apple Store it tells me that My account i snot vlaid for use in the U.S.store. And to switch to the Australian store before purchasing, how do I do this? I am in Australia?
There are instructions on this page for creating an account without a credit card : http://support.apple.com/kb/HT2534
You can download a copy of the iPad manual from here : http://support.apple.com/manuals/ipad/ -
my mac keeps freezing when i try and print anything from preview. any ideas as to what the issue is or how to fix it?
Please read this whole message before doing anything.
This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
Step 1
The purpose of this step is to determine whether the problem is localized to your user account.
Enable guest logins and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
Test while logged in as Guest. Same problem(s)?
After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. Create a new account in which to test, and delete it, including its home folder, after testing.
Step 2
The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. The instructions provided by Apple are as follows:
Be sure your Mac is shut down.
Press the power button.
Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
Test while in safe mode. Same problem(s)?
After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2. -
I have an iPhone 4S. When I try to print pictures, from my Windows computer, it doesn't work. Open Office also gives me an "unknown graphic" message. These are JPEGs, aren't they? Why can't I print and what is the unknown graphic?
Hi,
"A day after the name change became official my built in skydrive app stopped working"
Did you point that SkyDrive changed to OneDrive?
Did you move your OneDrive to another location or change its name?
Please login OneDrive with web-based to check if you could access it successfully.
Please refer to the following article to try the troubleshooter and check the service status:
SkyDrive: FAQ
http://windows.microsoft.com/en-in/windows-8/skydrive-app-faq
Karen Hu
TechNet Community Support -
Why every time i try to get something from itunes store i can't?
every time i try to get something from itunes store it ask for password and after i tipe it it sais its imposibile to connect to itunes store,but when i try it on pc it works.And now i can't get anything on my ipod.what should i do?
Can't connect to the iTunes Store
-
The print is too big when I print something from a website
This is probably the fault of my computer & not Firefox but when I print something from a website the print size is too big. How can I change this...
File > Page Setup = '''Scale''' <br />
100% is usually best
If you can't see the Menu Bar with File, Edit, View, etc - hit the '''Alt''' key to temporarily reveal the Menu Bar. -
Every time i try to buy something from the AppStore on my iPad or iPhone 4S i cant because i most answer the security question but I don't remember my security question answer, when I try to go change it from my Apple account he ask me the security questions agin and I don't know the answer help plzzz, note: I can't call the apple support because I live in Saudi Arabia
If you don't see the 'send reset info' button on the page where you can change them then I assume that you don't have a rescue email address (which is not the same thing as an alternate email address) set up on your account. As you won't be able to add one until you can answer 2 of your questions, you will need to contact iTunes Support or Apple to get the questions reset. You could try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
-
My Canon MP620 appears to be connected, yet every time I try to print something, it says error. I have tried to unplug and track the error, but I cannot figure out why. Please help! this is such an inconvenience!
What Mac model? What Mac OS version?
FYI, this forum is for Apple hardware made before 1999. -
I try to bay something from dream acuaruom game from my visa and they took the many but I didn't get any thing?
this is a user helping user forum apple or the developer of your game don't really read
I would conect the game developers at their website -
For some reason every time I try to buy something from the App Store I receive a message that says to contact apple support and I can't purchase anything what should I do?
iTunes Support -
http://www.apple.com/support/itunes/
Maybe you are looking for
-
My itunes won't recognize my ipad on windows 7 with itunes 64 installed
I have itunes 64 installed with windows 7 and i just purchased a new ipad. When i plug in the ipad and open itunes, itunes says i need the itunes 64 version...i have uninsatalled and reinstalled the 64 version 3 TIMES..restared my ipad and computer e
-
< MODERATOR: Message locked. Please post this message in the [Asset Accounting forum|SAP ERP Financials - Asset Accounting;. > Hi, Iam getting an error during the time of (AUC)asset posting in F-90.I have mentioned the error below Error :(Asset 90
-
Display issue with some browser : OnMouse based on An Application Process
Hello, I am playing a little bit with the Application Process and I tried to create something like the Aria Demo (onmouseover="ARIA_DETAIL(this, '#PERSON_ID#')") Indeed, no problem to make it work (using a default template among the 20 provided by Ap
-
Need to remove video clip and save audio track.
We are trying to remove a segment of video clip and save the audio track that goes with it. We intend to fill that open segment with transitions of still photos, all the while allowing the narrator, who has now been "clipped" to keep speaking. We
-
How does one remove duplicate versions of the same songs on an iPhone5?
How does one remove duplicate versions of the same songs on an iPhone5?