SearchEngines.java Servlet that redirects requests to various search engines. Uses the SearchSpec helper class. Accessed by means of SearchEngines.html. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.net.*; /** Servlet that takes a search string, number of results per * page, and a search engine name, sending the query to * that search engine. …
Category: FromSitesTree.com
Apr 27
ServletTemplate.java Starting point for servlets. #Programming Code Examples #Java/J2EE/J2ME #Servlet
ServletTemplate.java Starting point for servlets. import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Servlet template. * * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems Press, * . * May be freely used or adapted. */ public class ServletTemplate extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws …
Apr 27
HelloWorld.java Simple servlet that generates plain text. #Programming Code Examples #Java/J2EE/J2ME #Servlet
HelloWorld.java Simple servlet that generates plain text. import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Very simplistic servlet that generates plain text. * * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems Press, * . * May be freely used or adapted. */ public class HelloWorld extends HttpServlet { …
Apr 27
HelloWWW.java Servlet that generates HTML. This and all remaining servlets are in the cwp package and therefore should be installed in the cwp subdirectory. #Programming Code Examples #Java/J2EE/J2ME #Servlet
HelloWWW.java Servlet that generates HTML. This and all remaining servlets are in the cwp package and therefore should be installed in the cwp subdirectory. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Simple servlet that generates HTML. * * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems …
Apr 27
ServletUtilities.java Utility class that simplifies the output of the DOCTYPE and HEAD in servlets, among other things. Used by most remaining servlets in the chapter. #Programming Code Examples #Java/J2EE/J2ME #Servlet
ServletUtilities.java Utility class that simplifies the output of the DOCTYPE and HEAD in servlets, among other things. Used by most remaining servlets in the chapter. package cwp; import javax.servlet.*; import javax.servlet.http.*; /** Some simple time savers. Note that most are static methods. * * Taken from Core Web Programming Java 2 Edition * from Prentice …
Apr 27
SimplerHelloWWW.java Servlet that uses ServletUtilities to simplify the generation of the DOCTYPE and HEAD part of the servlet. #Programming Code Examples #Java/J2EE/J2ME #Servlet
SimplerHelloWWW.java Servlet that uses ServletUtilities to simplify the generation of the DOCTYPE and HEAD part of the servlet. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Simple servlet that generates HTML. This variation of * HelloWWW uses the ServletUtilities utility class * to generate the DOCTYPE, HEAD, and TITLE. * * Taken from Core …
Apr 27
ShowMessage.java Servlet that demonstrates the use of initialization parameters. #Programming Code Examples #Java/J2EE/J2ME #Servlet
ShowMessage.java Servlet that demonstrates the use of initialization parameters. Remember that, to use this servlet, you have to do three things: * Put the modified web.xml file in the WEB-INF directory. * Restart the server. * Use the registered servlet name (i.e., the URL http://host/servlet/ShowMsg), not the raw servlet name (i.e., the URL http://host/servlet/cwp.ShowMessage). package …
Apr 27
ThreeParams.java Servlet that reads and displays three request (form) parameters. Uses the ServletUtilities class. #Programming Code Examples #Java/J2EE/J2ME #Servlet
ThreeParams.java Servlet that reads and displays three request (form) parameters. Uses the ServletUtilities class. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Simple servlet that reads three parameters from the * form data. * * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems Press, * . * …
Apr 26
Javascript : Miscellaneous Code #Programming Code Examples #Javascript #JavaScript
var browser=navigator.appName; var b_version=navigator.appVersion; Note: Brought from our old site: http://www.salearningschool.com/example_codes/ on Jan 2nd, 2017 From: http://sitestree.com/?p=10180 Categories:Programming Code Examples, Javascript, JavaScriptTags:JavascriptJavaScript Post Data:2017-01-02 16:04:23 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) Shop Online: https://www.ShopForSoul.com/ Medium: https://medium.com/@SayedAhmedCanada
Apr 26
JavaScript Code #Programming Code Examples #Javascript #JavaScript
var browser=navigator.appName; var b_version=navigator.appVersion; <a href="http://www.justetc.net" target="_blank"> <img border="0" alt="hello" src="b_pink.gif" id="b1" width="26" height="26" onmouseover="mouseOver()" onmouseout="mouseOut()" /> Place the following code under script tag/in a javascript file function mouseOver() { document.getElementById("b1").src ="b_blue.gif"; } function mouseOut() { document.getElementById("b1").src ="b_pink.gif"; } <map name="planetmap"> <area shape ="rect" coords ="0,0,82,126" onMouseOver="writeText(‘You are over the target area’)" href ="target.htm" target …
