Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Ray Chang

Greenhorn
+ Follow
since Nov 12, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ray Chang

http://www.zdnet.com/eweek/stories/general/0,11011,2646052,00.html
ZDnet recently had some comparisons of JSP/ASP/PHP/CF. I have to agree with the article's productivity statement about ColdFusion. I know I can build a website faster on ColdFusion than someone else on another platform. I also like JSP/Servlets because of the full power of the Java language. Allaire is working on merging ColdFusion and JRun so soon I'll have the best of both worlds :-)
http://www.zdnet.com/eweek/stories/general/0,11011,2646052,00.html
19 years ago

Originally posted by maha anna:
Hi Ray, We can't redefine the 'implicit' object 'out' to be different type. Your try is correct. You just have to change the var name. I slightly modified your code. It is working fine (Zipped output with Internet Explorer browser). Please check.


Hi Maha..
Maybe because I'm on JRun, but your code gave me an error (see below). But even assuming the JSP code works for you, your solution still involves wrapping everything inside a scriptlet? Which means we might as well be using a servlet.. One of the advantages of JSP over servlets is that JSP doesn't require coding HTML tags/text in the format:
out.println("<HTML_stuff_here>");
If I have to build a whole website with the out.println(""); syntax just so I can use the gzip sniffer, it's sort of like taking one step forward but two steps back.. If this is the case, I'd probably drop the whole gzip idea, and just build the website on standard JSP.. Quicker to build, and easier to keep my sanity.. Big thanks either way for your help and feedback!


19 years ago

Originally posted by maha anna:
We can do this in jsp also. But since the 'out' var in jsp page is a 'JspWriter' which is NOT zip enabled, we have to get the GZIPOutputStream(outVar) where OutputStream outVar = response.getOutputStream(); Also we have to set the response header as shown in your code.


Hi Maha,
I tried many variations. The closest I got was the code below.. but I got an error: "Error: The type of the left-hand side in this assignment, "javax/servlet/jsp/JspWriter", is not compatible with the type of the right-hand side expression, "java/util/zip/GZIPOutputStream".


Originally posted by William Brogden:
It looks to me like you would have to customize the JSP engine in order to get a GZIP compression output stream instead of the JspWriter. You could certainly do this with the Tomcat source code.
Bill


Hi Bill,
Since I am just learning servlets & jsp, this might be something I don't want to mess with. If you do happen to know how to make the configuration change to the JRun server (what I'm using), that'd be helpful. But in truth, I'm not sure I would want the gzip sniffer to occur in ALL the jsp pages on a website.. just the certain selected JSP pages.
19 years ago
Hi Bill,
For example, the below servlet code 'sniffs' the client browser. If the browser accepts gzip encoding, the servlet sends the html output via gzip encoding. If the browser is old (ex: Netscape 3.0) and doesn't accept gzip encoding, the html output is sent normally.
I imagine that delivering html content in gzip-compressed format can make a big difference to clients using 28/56k modem connections.. a massive html page can be delivered to a browser as 2k rather than 500k..
Do you (or anyone) know how I can do this with jsp pages? Thanks..


[This message has been edited by Ray Chang (edited November 25, 2000).]
19 years ago
Does anyone know how to send a JSP page as compressed GZIP encoding? From reading "Core Servlets and JavaServer Pages" I know that servlets can send their HTML content as GZIP format, but I can't seem to get the technique to work for JSP pages (where it would help the most). Any help would be greatly appreciated. Thanks! -Ray
19 years ago

Originally posted by qionghua yang:
Hi,
I am working on the project that we will switch to use the java technology. Can someone make some sugestions about how to choose IDEs and compare different IDEs for me?
Thanks a lot!
qionghua yang


I highly recommend JPadPro/SitePadPro from www.modelworks.com. I wrestled with JBuilder for the longest time, but fell in love with SitePadPro as soon as I tried it. SitePadPro is lightweight, non-restrictive (doesn't use it's own classes like JBuilder), and easy to use. Just install, target your JDK, set your standard classpaths, and your ready to go. Definitely try it out.. SitePadPro is shareware.
Hi everyone,
I'm wondering if some people might be able to share their knowledge of Java Native Code compilers (which turn .jar files into platform specific .exe files).
I tried the Jet compiler at www.excelsior-usa.com and it did ok.. but the resulting .exe file was rather big.
The usefulness of a Native Code compiler is so that if I have a cool java desktop app, I can send an .exe version to a friend who may not have the JRE installed on their machine.
Any info on availabe Java Native code compilers would be greatly appreciated.. thank you. -Ray
19 years ago