ok, I have done that and I have a arrow at
Images.getinstance.
How do I proceed? Thanks for the help.
A
Main Topics
Browse All TopicsHello, I am trying to capmpile a java file and I keep getting this message:
Note: C:\Program Files\apache-tomcat-5.5.17
Note: Recompile with -Xlint:deprecation for details.
What does this mean? My file is not being compiled. Thank you for the help.
A
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
These are the packages I have imported:
import Bean.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.ByteArrayOutputStr
import java.io.PrintWriter;
import java.awt.Color;
import java.io.*;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
import com.lowagie.text.pdf.PdfPT
There seems to be a issue with the pdf pacage. The errrs I am getting are at:
new Font(Font.HELVETICA,9,Font
FontFactory.getFont(FontFa
,Font.ITALIC);
Any suggestions pls...
The initial part of the script is a follows:
public class Invoice_PDF extends HttpServlet
{
/**
*
*
*/
public InvoicePDF()
{
super();
}
/**
*
*
* we implement doGet so that this servlet will process all
* HTTP GET requests
*
* @param req HTTP request object
* @param resp HTTP response object
*
*/
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws javax.servlet.ServletExcep
{
DocumentException ex = null;
ByteArrayOutputStream baosPDF = null;
CommonUtility CommonUtility = new CommonUtility();
try
{
baosPDF = generatePDFDocumentBytes(r
StringBuffer sbFilename = new StringBuffer();
sbFilename.append("filenam
sbFilename.append(System.c
sbFilename.append(".pdf");
//////////////////////////
// Note:
//
// It is important to set the HTTP response headers
// before writing data to the servlet's OutputStream
//
//////////////////////////
//
//
// Read the HTTP 1.1 specification for full details
// about the Cache-Control header
//
resp.setHeader("Cache-Cont
resp.setContentType("appli
//
//
// The Content-disposition header is explained
// in RFC 2183
//
// http://www.ietf.org/rfc/rf
//
// The Content-disposition value will be in one of
// two forms:
//
// 1) inline; filename=foobar.pdf
// 2) attachment; filename=foobar.pdf
//
// In this servlet, we use "inline"
//
StringBuffer sbContentDispValue = new StringBuffer();
sbContentDispValue.append(
sbContentDispValue.append(
sbContentDispValue.append(
resp.setHeader(
"Content-disposition",
sbContentDispValue.toStrin
resp.setContentLength(baos
ServletOutputStream sos;
sos = resp.getOutputStream();
baosPDF.writeTo(sos);
sos.flush();
}
catch (DocumentException dex)
{
resp.setContentType("text/
PrintWriter writer = resp.getWriter();
writer.println(
this.getClass().getName()
+ " caught an exception: "
+ dex.getClass().getName()
+ "<br>");
writer.println("<pre>");
dex.printStackTrace(writer
writer.println("</pre>");
}
finally
{
if (baosPDF != null)
{
baosPDF.reset();
}
}
}
/**
*
* @param req must be non-null
*
* @return a non-null output stream. The output stream contains
* the bytes for the PDF document
*
* @throws DocumentException
*
*/
protected ByteArrayOutputStream generatePDFDocumentBytes(
final HttpServletRequest request,
final ServletContext ctx)
throws DocumentException
{
Document doc = new Document();
ByteArrayOutputStream baosPDF = new ByteArrayOutputStream();
PdfWriter docWriter = null;
//fonts declared
Font font8 = FontFactory.getFont(FontFa
Font fontbold8 = FontFactory.getFont(FontFa
Font font1 = FontFactory.getFont("Helve
Font fonterr = FontFactory.getFont("Helve
Font font = FontFactory.getFont("Helve
Font font3 = new Font(Font.HELVETICA,9,Font
Font fontItalic = FontFactory.getFont(FontFa
Font fontBlue= FontFactory.getFont(FontFa
Font fontBlueItalic= FontFactory.getFont(FontFa
Font font0 = FontFactory.getFont("Helve
oops! sorry forgot to add that part of the code'
String path = request.getContextPath();
String split_path[] = path.split("/");
path = request.getRealPath(split_
Image jpeglogo=null;
Image jpegbillpay=null;
Image jpegdue=null;
Image jpegactsummary=null;
Image jpegaccdetails=null;
Image jpegnews=null;
Image jpegcut=null;
Image jpegpay=null;
Image jpegplz=null;
Image jpegplzindicate=null;
Image jpegpayenc=null;
try{
jpeglogo = Image.getInstance(path+"/I
jpegpconecable.setAlignmen
jpegpconecable.scalePercen
jpegbillpay= Image.getInstance(path+"/I
jpegbillpay.setAlignment(I
jpegbillpay.scalePercent(8
jpegdue= Image.getInstance(path+"/I
jpegdue.setAlignment(Image
jpegdue.scalePercent(80);
jpegactsummary= Image.getInstance(path+"/I
jpegactsummary.setAlignmen
jpegactsummary.scalePercen
jpegaccdetails= Image.getInstance(path+"/I
jpegaccdetails.setAlignmen
jpegaccdetails.scalePercen
jpegnews= Image.getInstance(path+"/I
jpegnews.setAlignment(Imag
jpegnews.scalePercent(80);
jpegcut = Image.getInstance(path+"/I
jpegcut.setAlignment(Image
jpegcut.scalePercent(75);
//jpegcut.scaleToFit(450, 1000);
jpegpay = Image.getInstance(path+"/I
jpegpay.setAlignment(Image
jpegpay.scalePercent(70);
jpegplz= Image.getInstance(path+"/I
jpegplz.setAlignment(Image
jpegplz.scalePercent(80);
jpegplzindicate= Image.getInstance(path+"/I
jpegplzindicate.setAlignme
jpegplzindicate.scalePerce
jpegpayenc= Image.getInstance(path+"/I
jpegpayenc.setAlignment(Im
jpegpayenc.scalePercent(80
the errors (they are actuallu only warnings) mean that you are using deprectaed classes/methods in your code.
http://mindprod.com/jgloss
they are only warings so u can ignore them.
Ooops. I thought I posted a split here.
Split points: rrz@871311{#19167291} & objects {http:#19169537}
Business Accounts
Answer for Membership
by: rrz@871311Posted on 2007-05-28 at 06:47:31ID: 19167291
So, at command line, you should type \webapps\b illinb\WEB -INF\class es>javac -Xlint:deprecation Invoice_PDF.java
C:\Program Files\apache-tomcat-5.5.17