Java/JSP Back End Processing

S

Scott

I am new to both Java & JSP and am working on a project. I've found
that the best way to learn about a new language is to get involved in
a project and work your way through it.
What I am doing is this:

I am working on a JSP based shopping cart that will be run on a local
server. What I need to do is when the order is placed, prepare a
receipt and print it out for shipping purposes.

What approach would be best to go with this sort of task? Should this
be coded into a JSP page or should I venture into the use of Java
Beans? Or am I totally off base? Any direction here would be most
helpful. I have done this sort of thing in the past using CGI and Perl
but I am really interested in using JSP for this project due to it's
scaleability and stability.

Thanks for any and all suggestions.

Scott.
 
C

Chris Smith

Scott said:
I am working on a JSP based shopping cart that will be run on a local
server. What I need to do is when the order is placed, prepare a
receipt and print it out for shipping purposes.

What approach would be best to go with this sort of task? Should this
be coded into a JSP page or should I venture into the use of Java
Beans? Or am I totally off base? Any direction here would be most
helpful. I have done this sort of thing in the past using CGI and Perl
but I am really interested in using JSP for this project due to it's
scaleability and stability.

Web application code in Java runs on the server, so printing from the
server is fairly simple. You're better off isolating that code outside
of a JSP -- in fact, this is part of the processing step and should
occur before the request ever sees a JSP. (See any description of the
JSP "model 2" architecture for more details.)

As for the printing itself, in Java 1.4 or later the javax.print package
should be an easy way to accomplish this. There's a good bit to it, so
your best bet is to read the API package-level documentation for the
package, and follow the links from there to more detailed information
and tutorials.

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top