difference between servlet and jsp?
608685
The Java Servlet API allows a software developer to add dynamic content to a Web server using the Java platform. The generated content is commonly HTML, but may be other data such as XML. Servlets are the Java counterpart to dynamic web content technologies such as CGI, PHP or ASP. Servlets can maintain state across many server transactions by using HTTP cookies, session variables or URL rewriting.\n\nThe Servlet API, contained in the Java package hierarchy javax.servlet, defines the expected interactions of a web container and a servlet. A web container is essentially the component of a web server that interacts with the servlets. The web container is responsible for managing the lifecycle of servlets, mapping a URL to a particular servlet and ensuring that the URL requester has the correct access rights.\n\nA Servlet is an object that receives requests (ServletRequest) and generates a response (ServletResponse) based on the request. The API package javax.servlet.http defines HTTP subclasses of the generic servlet (HttpServlet) request (HttpServletRequest) and response (HttpServletResponse) as well as an (HttpSession) that tracks multiple requests and responses between the web server and a client. Servlets may be packaged in a WAR file as a Web application.\n\nMoreover, servlets can be generated automatically by JavaServer Pages (JSP), or alternately by template engines such as WebMacro. Often servlets are used in conjunction with JSPs in a pattern called "Model 2", which is a flavor of the model-view-controller pattern.
394941
Its not easy get it straight!\n\nStart with JSP.
608819
Is this on an MS Windows system? If it is, then it should be as simple as going here:\n\nhttp://java.com/en/download/index.jsp\n\n...and downloading and installing the latest Java Runtime Environment.
218597
http://www.jsptut.com/
791556
this one is known a url rewriting. usually these kind of things will be there in .jsp,.asp,.php kind files.
858221
JSP stands for Java Server Pages. these is used for server side programming.\nthe different types of tags are:\n1) action related tags\n2) directory tags\n3) code related tags\n\nhope this answers ur question.
713943
The differences between Java and .NET is mostly of the syntax and libraries.\n\nBecause both of them work on same architectural concepts and frameworks.
138634
I don't think that JSP got antkind of browser compaitablity issue it's just a simple html page on client end so it depends on which version of HTML you are using.
225309
Im not a Java pro but I heard from my friend that this website has quite some info/code for JSP. Check it out..\n\nwww.jspin.com
679698
using the JDBC api to attain this in the jsp.Using this api u can connect to the database and get the information from the data base and can display in the same jsp.The only thing that needs to be done with refreshing the entire page just refresh the frame in which the information needs to be displayed.Or if you want to go fro a very high level design use the Dcache object this mainly caches the information for the database as a result of this you can retrive the information form the decache object itself with out going to the database.
1057610
Great little PDF here for you..\n\nhttp://www.oracle.com/technology/sample_code/tutorials/jsp20/files/jsp2.pdf
1074404
java is a programming language\nhtml is a language to build webpage\nfrontpage is a program/ tool to help build a webpage
998225
From a logical point of view, a Servlet/JSP session is similar to an EJB session. Using a session, in fact, a client can connect to a server and maintain his state.\n\nBut, is important to understand, that the session is maintained in different ways and, in theory, for different scopes.\n\nA session in a Servlet, is maintained by the Servlet Container through the HttpSession object, that is acquired through the request object. You cannot really instantiate a new HttpSession object, and it doesn't contains any business logic, but is more of a place where to store objects.\n\nA session in EJB is maintained using the SessionBeans. You design beans that can contain business logic, and that can be used by the clients. You have two different session beans: Stateful and Stateless. The first one is somehow connected with a single client. It maintains the state for that client, can be used only by that client and when the client "dies" then the session bean is "lost".\n\nA Stateless Session Bean doesn't maintain any state and there is no guarantee that the same client will use the same stateless bean, even for two calls one after the other. The lifecycle of a Stateless Session EJB is slightly different from the one of a Stateful Session EJB. Is EJB Container's responsability to take care of knowing exactly how to track each session and redirect the request from a client to the correct instance of a Session Bean. The way this is done is vendor dependant, and is part of the contract.
1149037
http://java.sun.com/j2se/1.5.0/download.jsp
498557
change the action of the form using javascript.\n\nsay ur form name is form1\n\nthen ,\n function doSubmit(var action){\n  document.form1.action = action;\n  document.form1.submit();\n}\n\nin the link give doSubmit('Servlet1'),doSubmit('Servlet2')\nand mapping for Servlet1 and servlet2 is given in web.xml.
307784
The XSQL Servlet is a tool that processes SQL queries and outputs the result set as XML. This processor is implemented as a Java servlet and takes an XML file containing embedded SQL queries as input.\n\nHere is the way it goes from client to servlet:\n    *  The user enters a URL through a browser, which is interpreted and passed to the XSQL Servlet through a Java Web server. The URL contains the name of the target XSQL file (.xsql) and, optionally, parameters such as values and an XSL stylesheet name. Or, the user can invoke the XSQL Servlet from the command line, bypassing the browser and Java Web server.\n\n    * The servlet passes the XSQL file to the XML parser for Java, which parses the XML and creates an API for accessing the XML contents.\n\n    * The page processor component of the servlet uses the API to retrieve the XML parameters and SQL statements (found between the <xsql:query> and </xsql:query> tags). The page processor also passes any XSL processing statements to the XSLT processor.\n\n    * The page processor then constructs a database DOM by sending the SQL queries to the underlying Oracle8i database, which returns the query results. The results are embedded in the XML file in the same location as the original <xsql:query> tags.\n\n    * If desired, the query results and any other XML data are transformed by the XSLT processor using a specified XSL stylesheet. The data can be transformed into HTML or any other format defined by the stylesheet. The XSLT processor can selectively apply different stylesheets based on the type of client that made the original URL request. This HTTP_USER_AGENT information is obtained from the client through an HTTP request.\n\n    * The XSLT processor passes the completed document back to the client browser for presentation to the user.
727916
If I understand your question correctly, I would suggest abandoning the "public static void main" approach and invoke your socket program from the servlet.\n\nIf you want the program executed when the servlet is deployed, you simply have to override the init() in your servlet. The init() method is called by the servlet container once the servlet is placed into service (so it is only called once).\n\nIf you need help with configuring servlet... you might need to post a followup question.  \n\nGood Luck! :^)