difference between servlet and jsp?
101176
a Servlet is a pure Java Class, and compiled to ByteCode, Jsp is embeded into Html Code, before execution, a JSP is must compiled to Servlet code.\nNormally a JSP is used to dynamically create a User Interface while servlet is used to implement Business Logic, and Data Access Logic.
218597
http://www.jsptut.com/
650833
Have you downloaded the latest Java version? If not get it here:\nhttp://www.java.com/en/download/manual.jsp
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.
308962
Not necessary.\n\nBut for the ease of maintenance it is useful to keep them segregated into a folder and use a hierarchy to represent their depth.\n\nAlso, if a certain JSP needs to be protected for direct access from outside world, keep it under the WEB-INF folder.
438439
please be specific in ur question\n\nif u mean JSP iam providing u the link which helps
275568
UPDATE 1:\n\nHere is a very clean and good tutorial on Java Servlets. Does this work for you?\n\nhttp://www.novocode.com/doc/servlet-essentials/\n\nUPDATE 2:\n\nIt looks like you simply put the HTML code inside the Java code. Look at lines 13 and 14 of this page: http://www.novocode.com/doc/servlet-essentials/chapter2a.html#ch_2_1\n\n13:      out.println("<HTML><HEAD><TITLE>Hello Client!</TITLE>"+\n14:                  "</HEAD><BODY>Hello Client!</BODY></HTML>");\n\nAs you can see, it shows the HTML being generated by the Java Servlet itself; not being linked to an HTML page or something. There is probably a way to "include" a section of HTML code within a servlet.\n\nUPDATE 3:\n\nHere are some good links. I think these are what you're looking for.\n\nhttp://javaboutique.internet.com/tutorials/JSP/\nhttp://www.sitepoint.com/article/java-servlets-1\nhttp://livedocs.macromedia.com/jrun/4/Getting_Started_with_JRun/servlettutorial.htm\n\nPersonally, I would recommend (if at all possible) using either JSP (kind of like Java embedded in an HTML page, rather than the other way around) or PHP, which is insanely easy to set up and use.
336798
You can get most of the resources related to java & sevlets from\n\nhttp://www.sun.com\n\nEclipse : http://www.eclipse.org\nStruts : http://www.apache.org\n\nYou can find tutorials & demos at http://www.sun.com
162532
Well, you'll need a web server that can run JSP:\n\nhttp://tomcat.apache.org/ (you need Apache and Tomcat)\n\nThen you'll need an application to write code:\n\nhttp://www.stylusstudio.com/jsp_ide.html\n\nAnd you'll need Java itself:\n\nhttp://java.sun.com/products/jsp/
298564
Consider this tutorial http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html.
113386
Yes, install the Web Developer Tools Plugin for Eclipse. \nAdds syntaxhighlighting and autocomplete for jsp code.
1068037
Hi, that is kinda a weak answer :) \n\nUsually it is like this from JSP you produce HTML, and when you navigate to a LINK link like http://localhost /MyApp/MyMainServlet\nThe WEB.XML file will tell it where to navigate. For example:\n======================================\n<servlet>\n<display-name> MainControllerServlet </display-name>\n<servlet-name> MainControllerServlet </servlet-name><servlet-class> bankapp.web.MainControllerServlet </servlet-class>\n</servlet>\n<servlet-mapping>\n<servlet-name> MainControllerServlet </servlet-name>\n<url-pattern> /MainController.do </url-pattern>\n</servlet-mapping>\n======================================\n\nWhat the above xml descriptor does is that whenever I visit http://localhost/BankApp/MainContoller.do It will goto the ServletName called MainControllerServlet which points to the servlet class: bankapp.web.MainControllerServlet\n\nNotice that is inside the package bankapp.web, Now inside that servlet you have your doGet and doPost and your computational within the beans and other yummy stuff :)\n\nTO RUN!\nNow If your using Eclipse IDE as your main IDE, you could download JBOSS from www.jboss.org, and download the server and the eclipse addon. It is pretty straight forward and you just right click on the project and make a package xml and deploy it. What is does is that it will automatically deploy it to the webserver. And you access it by doing http://localhost:8080/BankApp/\n\nBUT if your not using that, you need to download Apache Tomcat\nhttp://tomcat.apache.org/\nWhat that does, it is a EJB/JavaBeans/JSP webserver. When you package your Servlet it will produce either .war or .ear dpending if its a EJB or a JavaBeans. In your case if it is JSP and Servlets, then it is only WAR. You place that War in htdocs within Tomcat and you navigate to http://localhost:8080/BankApp/\n\nBut now you tell me how do you package the whole thing to a war. That requires some practice, you need to read up on that \n\nIf you need more help let me know.\nTake care
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.
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.
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! :^)
1090052
http://www.java.com/en/download/manual.jsp
1018459
<%! is a declaration tag, and it places a variable definition inside the body of the java servlet class. Static data members may be defined as well.\n\n<% is a scriptlet tag, and it places the contained statements inside the _jspService() method of the java servlet class