I come from a Java background - so i have just one lame question :

G

Guest

Hi,

I would like to know if there is a C# version of a servlet, or of J2EE
equivalent.

If not how do i write in C# a small "servlet" that simply parses some HTML
code into text, that in turn interfaces with a database, does the .NET
platform support these operations, or is there a special version like J2EE ?

Thanks,
dan
 
Y

Yunus Emre ALPÖZEN [MCAD.NET]

surely better is possible in .NET :)

U can use web services as previous post indicates. But my advice u to use
COM+ objects which supports transaction security etc...
Or u can use Web Service Enhancement(WSE), which has both's advantages...
 
J

Joe

asp.net is the .Net attempt of servlets, aka JSP pages.

But, even though I really love C# and .Net desktop winforms apps, if I have
to do web apps I stick to Java.

There is a namespace in .net; System.EnterpriseServices, That has some
transaction / queue (J2EE) stuff.
For object persistence you need to go non-ms at the moment, I use developers
express XPO objects. MS efforts in this are seemed to have been stalled,
but was known as 'object spaces'.

It really is a different world though - have fun learning / playing with
..net web stuff, but stick to java for paying clients.
 
J

Jon Skeet [C# MVP]

Joe said:
asp.net is the .Net attempt of servlets, aka JSP pages.

There's a big difference between servlets and JSP pages. ASP.NET is
similar (in many ways) to JSPs, but servlets are a much lower level
construct, and don't assume that you're using HTML. (Heck, servlets
themselves don't even have to be HttpServlets, although most certainly
are.) There are various situations where you might want to use servlets
but the idea of a "page" isn't really appropriate - you can easily use
them for a primitive kind of web service, for example.

Unfortunately I haven't seen anything particularly close to bare
servlets in the .NET world, although I believe .NET 2.0 makes it
easier.
 
G

Guest

Jon Skeet said:
There's a big difference between servlets and JSP pages. ASP.NET is
similar (in many ways) to JSPs, but servlets are a much lower level
construct, and don't assume that you're using HTML. (Heck, servlets
themselves don't even have to be HttpServlets, although most certainly
are.) There are various situations where you might want to use servlets
but the idea of a "page" isn't really appropriate - you can easily use
them for a primitive kind of web service, for example.

Unfortunately I haven't seen anything particularly close to bare
servlets in the .NET world, although I believe .NET 2.0 makes it
easier.

although in this case, you can implement a custom IHttpHandler that is the
equivalent of HttpServlet (I think, don't know much about java).
 
J

Jon Skeet [C# MVP]

Daniel Jin said:
although in this case, you can implement a custom IHttpHandler that is the
equivalent of HttpServlet (I think, don't know much about java).

Yes, I suspect that's about right - it's the kind of thing that's a bit
of a pain to set up, I suspect, as it's rarely done :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top