my dog learned polymorphism*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Response-SetContentType Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Response-SetContentType" Watch "Response-SetContentType" New topic
Author

Response-SetContentType

Akhil Maharaj
Ranch Hand

Joined: Sep 29, 2007
Posts: 63
All ,
I am trying to run the Servlet code to down load the JAR , programme given in HFSJ-Chapter 4 , page 129 .

Where do I have to put the /bookCode.jar ? I keep getting the error that bookCode.jar is not found.

I am using Tomcat 6.0.14 .

Thanks
Akhil
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
Jar files are normally stored in de WEB-INF/lib directory in the webapplication.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Akhil Maharaj
Ranch Hand

Joined: Sep 29, 2007
Posts: 63
I just realized that the file needs to be in the root of the web-application as it is given as /bookCode.jar .

Now the code is working . However the size of the file , that I am downloading is 10.2MB where as size of the original source file is 86KB .
I don't understand why it is more after downloading ?

Thanks
Akhil
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Response-SetContentType
 
Similar Threads
Servlet Context theoretical doubt : HF book
some HFS doubts till chapter 7
Problem with Jar download code in servlet
Servlet code to download the JAR doubt
does the write() method of the OutputStream comit the respose before this call to forward()?