In . Net, HTTP handlers (.ashx) are probably the closest thing to a servlet. As for applets, there isn't a direct equivelent, but siverlight is probably the closest (although its closer to Flash/JavaFX).
HTTP handlers are more equivalent to Servlet fitlers and not Servlets per se. Read the MSDN documentation on the same. – Sandy Apr 2 '09 at 10:26 I agree with Sandy.
AciveX controls are more like Applets than Silverligth – OscarRyz Apr 15 '09 at 2:15 @Sandy: Do you mean Http Handlers or Http /Modules/. It is the later that provides the capability to "dynamically intercepts requests and responses to transform..." (java.sun. Com/products/servlet/Filters.
Html). – Richard Apr 16 '09 at 9:58.
I agree with Sandy, ASP. Net is best compared to a JSP (which is really nothing more than a specialized servlet). The .
Net servlet analog appears to be the base class System.Web.UI.Page. This sums up the comparison nicely (examples below blatantly plagiarized) import javax.servlet. *; import javax.servlet.http.
*; import java.io. *; public class SimpleServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io. IOException { response.
SetContentType("text/html"); PrintWriter out = response.getWriter(); out. Println(""); out. Println("Simple Servlet Body"); out.
Println(""); out.close(); } } //-----------------// using System; using System. Web; using System.Web. UI; public class SimpleServlet : System.Web.UI.
Page { private void Page_Load(object sender, EventArgs args) { Response. ContentType = "text/html"; Response. Write(""); Response.
Write("Simple Servlet Body"); Response. Write(""); } }.
1 nice example showing servlet as System.Web.UI. Page with no markup in the aspx - th eother way around seems to be HttpHandler – JohnIdol Apr 15 '09 at 8:21.
Java applets would seem to have their best analogies to WPF Browser Applications in . NET, if not Silverlight 2.0. There's no perfect mirror between Java and .
NET in this respect - some technolgoies seem to be more similar to each other in certain respects and others in different respects. Given that Java was developed largely for the purpose of applets, and the . NET Framework for desktop applications, there are naturally going to be fundamental difference.
Although WPF browser applications are of course restricted to the Windows platform (unlike Silverlight), they perhaps resemble applets more greatly in the respect that they can utlise the entire . NET Framework, among other things. Also, as has been pointed out, Silverlight is more analogous to JavaFX.In terms of servlets, the equivalent is effectively the whole of ASP.
NET (moreover the Web Application side as opposed to websites), though that is being slightly vague. Perhaps more accurately, JavaServer Pages most resembles ASP.NET (either WebForms or MVC Model-View-Controller for that matter). In the case of the former (Java), content is compiled into Java servlets, whereas in the case of the latter (.NET), content is compiled into .
NET URL3 maybe . NET assemblies of web applications are most akin to servelets - though to be honest I don't know enough about the Java side of things to make much of a conclusion. Interestingly, the histories of .
NET and Java began somewhat differently (admittedly they were both VM frameworks, and Java inspired . NET), nonetheless in many aspects they have converged over time so that nowadays you'll pretty much find an equivalent technology in either of the two frameworks, though often in one there has been significantly more development and/or success (Silverlight is one example in favour of Microsoft, whereas applets are perhaps in favour of Sun). Anyway, hopefully I've at least provided an overview of where the similarities and differences lie in the two technologies.
What about servlets as . NET HttpHandlers? – JohnIdol Apr 9 '09 at 20:01 As someone already pointed out in JonoW's answer, I believe Servlet filters are more alike to HttpHandlers.
– Noldorin Apr 9 '09 at 20:08.
The counterpart to Applets in . NET were ActiveX controls. Silverlight is meant for RIA, something analogous to Adobe Flash runtime.
Servlets can be compared to ASP. NET pages. On how they compare end-to-end read the following article on MSDN, msdn.microsoft.com/en-us/library/aa47898....
No I guess, ASP. NET is more like JSP, or may be even more like JSF. – Adeel Ansari Apr 2 '09 at 8:32 I'd say the classic was basically ASP is the equivalent of JSP – JohnIdol Apr 2 '09 at 10:21 With codebehind model ASP.NET more or less comes equivalent to the Servlet structure where in you can generate everything via the code.
The link above explains the subtle difference. But yes, ASP is best compared to JSP. – Sandy Apr 3 '09 at 8:11.
If you are trying to do a demo and you want to show some similarities between . NET and servlets/applets then you may be able to do this: 1) Servlet demo: Create a . Aspx file that just goes directly to the codebehind class.
Using a browser, call the . Aspx file and have the codebehind class respond. I use servlets as a way to communicate with javascript ajax calls frequently, and in terms of behavior there isn't any difference, my javascript function doesn't know what language or technology it is communicating with.2) Applet demo: This one is a bit trickier as Silverlight was designed, it seems, to compete with Flash, but you could just make a clock widget and put it up on a webpage, but then you can explain that with some good design either can run outside of the browser as well.
What would be great would be to do your demo in both languages just for a comparison to show that there are multiple ways to approach a problem, and there are trade-offs in which technology to use.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.