Saturday, 29 October 2011

Servlets FAQ -Part5


Comments and alternative answers
Comments on E and F Page parsers have been written....
Author: Brett Knights (http://www.jguru.com/guru/viewbio.jsp?EID=8054), Jan 27, 2000
Comments on E and F Page parsers have been written. Go to http://www.docuverse.com/htmlsdk/index.html and you can download the pieces necessary to parse html files into a dom Document. You can then use dom methods to modify then emit the results. OR if you prefer F you can suck most of an html page into an xsl template tag and insert <xsl: tags to format your dynamic output. It's not great for really dynamic sites but it's an excellent way to have a page designer do a bunch of work then turn it over to you for installing dynamism (dynamicality? :-) Saxon is an excellent engine for this.

There's another option: use SSI for Java. It's an SSI...
Author: Joe Morse (http://www.jguru.com/guru/viewbio.jsp?EID=91113), Jun 29, 2000
There's another option: use SSI for Java. It's an SSI parser that runs in your VM, and it's open source (GPL). It also includes some cool utility classes (which you can mimic or extend) for creating stateful form elements and other things. There's even an iterator for printing variable-length collections (e.g. db recordsets, etc). Plus, it's portable; it will run on any web server with little or no changes. Check it out at http://www.freecode.com/cgi-bin/viewproduct.pl?8543.
XMLC
Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3), Oct 27, 2001
A great new "third way" solution -- with templates on one side, and servlets on the other -- is XMLC.
Faced with the problem of separating presentation from code, XMLC takes the radical step of... (drumroll please...) actually separating the presentation from the code!
The presentation "layer" is literally an HTML file. The code "layer" is a servlet (or any Java class) that reaches into the HTML file and changes its content, based on "ID" attributes embedded inside the HTML tags. (The way it accomplishes this is by compiling the HTML file into a Java class and data structure, but that's almost beside the point.)
How do I send email from a servlet?
Location: http://www.jguru.com/faq/view.jsp?EID=154
Created: Sep 3, 1999 Modified: 2000-07-25 12:18:54.284
Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3)

From: James Cooper (pixel@bitmechanic.com)
GSP and GnuJSP both come with SMTP classes that make sending email very simple. if you are writing your own servlet you could grab one of the many SMTP implementations from www.gamelan.com (search for SMTP and java). All the ones I've seen are pretty much the same -- open a socket on port 25 and drop the mail off. so you have to have a mail server running that will accept mail from the machine JServ is running on.
See also the JavaMail FAQ for a good list of Java mail resources, including SMTP and POP classes.
Comments and alternative answers
If you want to use the JavaMail API, get it and create...
Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7), Jul 24, 2000
If you want to use the JavaMail API, get it and create a program similar to the Hello World program.

See also
Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3), Sep 20, 2001
This thread: Re: Automatically send and get mails using servlet...

Some examples
Author: Chris Lack (http://www.jguru.com/guru/viewbio.jsp?EID=326717), Sep 21, 2001
I've written an "EMailClient" class for sending e-mails for my guestbook entries. I've also done an "InBox" servlet class that lists e-mails in your pop mail in-box so that you can delete or bounce them before downloading to your PC. Have a look at the code, it might help -
http://www.chris.lack.org and choose the java option on the professional menu.
By the way you'll need JavaMail and Java Activation foundation from Sun if you've not already downloaded them. You don't need your own mail server.
Are there any ISPs that will host my servlets?
Location: http://www.jguru.com/faq/view.jsp?EID=155
Created: Sep 3, 1999 Modified: 2003-04-04 10:57:05.916
Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3)

The Adrenaline Group maintains a list of over 50 ISP's who host Java Servlets (http://www.adrenalinegroup.com/jwsisp.html) . Another list is at http://www.servlets.com.
Those that our gurus (you) have had specific experience with include:
A few ISPs have also said that they can host Java applications:
Please report any experiences, good or bad, you have with these services to this thread.
See also What ISPs provide hosting services which include JSP support?
Comments and alternative answers
Horus Networks is very flexible on all services, and...
Author: Denis BUCHER (http://www.jguru.com/guru/viewbio.jsp?EID=7742), Jan 22, 2000
Horus Networks is very flexible on all services, and we would be pleased to host servlets... c.f. our own programmation tests under http://www.horus.ch/servlets.shtml http://www.horus-networks.com/servlets.shtml

Web Hosting
Author: dufunk Eugene Rozum (http://www.jguru.com/guru/viewbio.jsp?EID=1193732), Aug 17, 2004
Prokmu jsp hosting offers the best quality/price JSP/Servlet services!

Re: Web Hosting
Author: dufunk Eugene Rozum (http://www.jguru.com/guru/viewbio.jsp?EID=1193732), Sep 6, 2004
http://www.prokmu.com

Re[2]: Web Hosting
Author: Eugene Rozum (http://www.jguru.com/guru/viewbio.jsp?EID=1254770), Jul 24, 2005
Prokmu Jsp hosting http://www.prokmu.net

http://www.ebpcs.net is a very cool one too
Author: Steve Nguyen (http://www.jguru.com/guru/viewbio.jsp?EID=39558), Apr 24, 2000
http://www.ebpcs.net is a very cool one too

If anyone looking for free Servlet/JSP hosting check...
Author: Nilesh Shah (http://www.jguru.com/guru/viewbio.jsp?EID=1810), May 30, 2000
If anyone looking for free Servlet/JSP hosting check this out. http://www.mycgiserver.com
http://www.servlets.net http://www.tricreations.co...
Author: Melanie Munden (http://www.jguru.com/guru/viewbio.jsp?EID=138305), Aug 30, 2000

Check out www.wantjava.com They support Tomcat, O...
Author: James Ward (http://www.jguru.com/guru/viewbio.jsp?EID=242591), Nov 1, 2000
Check out www.wantjava.com They support Tomcat, Oracle, and mySQL! They also have great customer service!

Another good listing of ISPs that support Java Servlets...
Author: Bill Day (http://www.jguru.com/guru/viewbio.jsp?EID=135825), Dec 8, 2000
Another good listing of ISPs that support Java Servlets is at:
www.servlets.com
The listings include contact info and rates.

More more more
Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3), Jul 16, 2001


CWI Hosting (http://www.cwihosting.com)
Author: Scott Barstow (http://www.jguru.com/guru/viewbio.jsp?EID=226863), Oct 11, 2001
Do not use these guys. I have had nine kinds of grief with them, and their support is less than adequate. I have had outages of three days, and mail outages of three - four days.

Re: CWI Hosting (http://www.cwihosting.com)
Author: Joost Schouten (http://www.jguru.com/guru/viewbio.jsp?EID=581960), Jan 24, 2004
I just wanted to say that I use CWI hosting aswell, and do appreciate their service. They have provided me with good support, even on my own code at times.
Just wanted to give them a fair chance.
Joost

re: Webhosting for servlets
Author: richard freeman (http://www.jguru.com/guru/viewbio.jsp?EID=752499), Feb 8, 2002
Zetnet.com will host jsp, sql, mysql, etc. with all of their standard hosting packages (Ranging from UK£100 per annum).
Drop me a line on 01524 34918 if you are interested in doing so...

4Java.ca - inexpensive and reliable host
Author: support 4javaca (http://www.jguru.com/guru/viewbio.jsp?EID=804843), Mar 20, 2002
They host JSP, Servlet, J2EE. Very inexpensive, only USD$8.50/month! http://www.4java.ca

MyServletHosting.com
Author: Walter Meyer (http://www.jguru.com/guru/viewbio.jsp?EID=23642), Mar 27, 2002
I've been with MyServletHosting.com for over a year. The experience was great at first, but over that last 5 or 6 months, stability has really degraded.
When I contact tech support they always apologize and say they're in the middle of moving their clients to more stable servers.
Maybe they'll straighten everything out in the future, but for now, I'm looking for a new host.


Re: Scorpions.net
Author: John Colucci (http://www.jguru.com/guru/viewbio.jsp?EID=816265), Mar 28, 2002
I am with Scorpions.net for about 8 months now. I have personal and business sites there. They use Tomcat,iPlanet, Java web server. Oracle hosting is super cheap and no set up fees. So far I am happy with them. John.

Check out http://www.ragemedia.ca
Author: Alex Iljin (http://www.jguru.com/guru/viewbio.jsp?EID=894025), May 27, 2002
Check out http://www.ragemedia.ca They provide J2EE application hosting (including Servlets, JSP and EJB's) based on Tomcat/Jboss platform, plus PostgreSQL database is standard for all plans.
Rimu Hosting
Author: Peter B (http://www.jguru.com/guru/viewbio.jsp?EID=1071364), Mar 29, 2003
Try http://rimuhosting.com
Rimu Hosting provide Virtual Dedicated servers. That includes 128MB of memory, 8GB of disk space, and 30GB of transfers.
Accounts come with JBoss and include JDK1.4, JSP, EJB and servlet support. You don't share the Java VM and you get to configure JBoss the way you need it.
Other features include SSH root access, Webmin CP, MySQL, PHP, Redhat Linux.

Re: Rimu Hosting
Author: Peter B (http://www.jguru.com/guru/viewbio.jsp?EID=1071364), Oct 15, 2003
A customer who just signed up pointed that our plans now come with 4GB of disk.
Our Red Hat file systems have been updated to use Java 1.4.2, JBoss 3.2.1 as well a choice of a recent Tomcat or Jetty servlet engine.


RE: Java Hosting
Author: Alacarte Java (http://www.jguru.com/guru/viewbio.jsp?EID=1118665), Sep 29, 2003
I am with Alacarte Java Hosting (http://www.alacartejava.com) and we specialize in low cost Java JSP Hosting, Servlet Hosting, and much more. Checkout our Web Site at http://www.alacartejava.com

« previous
beginning
What is the difference between URL encoding, URL rewriting, HTML escaping, and entity encoding?
Location: http://www.jguru.com/faq/view.jsp?EID=156
Created: Sep 3, 1999 Modified: 2000-09-17 15:25:28.842
Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3)

URL Encoding is a process of transforming user input to a CGI form so it is fit for travel across the network -- basically, stripping spaces and punctuation and replacing with escape characters. URL Decoding is the reverse process. To perform these operations, call java.net.URLEncoder.encode() and java.net.URLDecoder.decode() (the latter was (finally!) added to JDK 1.2, aka Java 2).
Example: changing "We're #1!" into "We%27re+%231%21"
URL Rewriting is a technique for saving state information on the user's browser between page hits. It's sort of like cookies, only the information gets stored inside the URL, as an additional parameter. The HttpSession API, which is part of the Servlet API, sometimes uses URL Rewriting when cookies are unavailable.
Example: changing <A HREF="nextpage.html"> into
<A HREF="nextpage.html;$sessionid$=DSJFSDKFSLDFEEKOE"> (or whatever the actual syntax is; I forget offhand)

(Unfortunately, the method in the Servlet API for doing URL rewriting for session management is called encodeURL(). Sigh...)
There's also a feature of the Apache web server called URL Rewriting; it is enabled by the mod_rewrite module. It rewrites URLs on their way in to the server, allowing you to do things like automatically add a trailing slash to a directory name, or to map old file names to new file names. This has nothing to do with servlets. For more information, see the Apache FAQ 

(http://www.apache.org/docs/misc/FAQ.html#rewrite-more-config) . 

No comments: