How to use the printing in jsp

S

steve

I am doing a final year project. It is using the JSP, but i don't know
how to use the printing with it.
 
T

Tony Morris

steve said:
I am doing a final year project. It is using the JSP, but i don't know
how to use the printing with it.

LOL!!!

--
Tony Morris
(BInfTech, Cert 3 I.T.)
Software Engineer
(2003 VTR1000F)
Sun Certified Programmer for the Java 2 Platform (1.4)
Sun Certified Developer for the Java 2 Platform
 
C

Chris Smith

steve said:
I am doing a final year project. It is using the JSP, but i don't know
how to use the printing with it.

JSP is a technology for generating web pages. It's not connected to
printing in any way.

You *could* print from Java code in a JSP scriptlet, but remember that
this code runs on the web server, not on the client, so this would only
work if *you* want a printed record of what the web server is doing. It
would not print anything your users could get to. This printing would
be done the same way you'd printing from Java outside of a JSP; probably
using the JPS API from 1.4.

You probably could also have the JSP generate JavaScript code that
prints the page. I don't know much about this, but JSP is merely
incidental here and not connected to the result; you could ask for
information on printing from JavaScript in an appropriate newsgroup for
that language (such as comp.lang.javascript).

The normal way to go about this, though, is to just generate the
resulting data in a simple HTML format so that it can be easily printed
by the user (simple because popular browsers tend to suck at fitting
nested tables to match the width of a sheet of paper). You'd then rely
on the user to print that page if they want to do so.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
S

steve

I am doing a final year project. It is using the JSP, but i don't know
how to use the printing with it.

well then do a search on the internet for "java printing jsp"

but if it is your final year , perhaps you don't have want is needed to
become a programmer.
 
M

mromarkhan

steve said:
I am doing a final year project. It is using the JSP, but i don't know
how to use the printing with it.

Peace.

<html>
<body>
Tested in Internet Explorer and Firefox
<input value="Print Preview" type="button" onClick="window.print();" />
</body>
</html>

Good Bye.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top