By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,677 Members | 1,882 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,677 IT Pros & Developers. It's quick & easy.

Java Servlet counterpart in .Net?

P: n/a
Hi,

I am thinking about migrating an application of mine to .Net and have run
into this small "problem"
At the moment I would generally compare ASP.Net to JSPs in the Java world. I
know that this might not be 100% correct, but as far as addressing a page
from the browser it is. The real-path of an ASP.Net Site is equal to the
url-path. I would like to register a comonent as listener for an entire
portion of the url. For example let all urls starting with
http://hostname/app1/shop be handled by a servlet-like component.

Ist there a way to do this and if yes - what do I have to do?

Regards,
Chris

Dec 1 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
ASP.NET and JSP are not that well connected at a conceptual level and there
really isn't a direct equivalent to a servlet, you can probably equate
asp.net and ihttpmodules/handlers to the classic jsp/servlet model in the
scenario you describe below, but you'd be coding asp.net like JSP.

The closest you probably have to a true servlet is the code behind model but
only if you try and code it like a servlet, embedding html type responses
into it for example, which is not the most appropriate use of the
technology. The front controller model your probably eluding too isn't
heavily used in asp.net.

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Christofer Dutz" <ch*************@univativ.dewrote in message
news:eI******************@fe188.usenetserver.com.. .
Hi,

I am thinking about migrating an application of mine to .Net and have run
into this small "problem"
At the moment I would generally compare ASP.Net to JSPs in the Java world.
I know that this might not be 100% correct, but as far as addressing a
page from the browser it is. The real-path of an ASP.Net Site is equal to
the url-path. I would like to register a comonent as listener for an
entire portion of the url. For example let all urls starting with
http://hostname/app1/shop be handled by a servlet-like component.

Ist there a way to do this and if yes - what do I have to do?

Regards,
Chris


Dec 1 '06 #2

P: n/a
Hi,

I am trying to completely separate Url and File structure. I was just using
JSPs and Servlets as examples, because of their behaviour concerning Url
handling. Basically I want to create an application framework with wich I
can create a web application and decide if I will deploy it on Java or .Net
without this decision having effect on the code.

I found out about these HTTPModules and HTTPHandlers and am having a look at
them now.

Tanks to you all.

Chris

"John Timney (MVP)" <x_****@timney.eclipse.co.ukschrieb im Newsbeitrag
news:IO******************************@eclipse.net. uk...
ASP.NET and JSP are not that well connected at a conceptual level and
there really isn't a direct equivalent to a servlet, you can probably
equate asp.net and ihttpmodules/handlers to the classic jsp/servlet model
in the scenario you describe below, but you'd be coding asp.net like JSP.

The closest you probably have to a true servlet is the code behind model
but only if you try and code it like a servlet, embedding html type
responses into it for example, which is not the most appropriate use of
the technology. The front controller model your probably eluding too isn't
heavily used in asp.net.

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Christofer Dutz" <ch*************@univativ.dewrote in message
news:eI******************@fe188.usenetserver.com.. .
>Hi,

I am thinking about migrating an application of mine to .Net and have run
into this small "problem"
At the moment I would generally compare ASP.Net to JSPs in the Java
world. I know that this might not be 100% correct, but as far as
addressing a page from the browser it is. The real-path of an ASP.Net
Site is equal to the url-path. I would like to register a comonent as
listener for an entire portion of the url. For example let all urls
starting with http://hostname/app1/shop be handled by a servlet-like
component.

Ist there a way to do this and if yes - what do I have to do?

Regards,
Chris




Dec 1 '06 #3

P: n/a
Another alternative is to create your asp.net applications through
Grasshopper, which will compile them to run on java implementations like
Apache.
http://dev.mainsoft.com/Default.aspx?tabid=239

Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Christofer Dutz" <ch*************@univativ.dewrote in message
news:XW****************@fe30.usenetserver.com...
Hi,

I am trying to completely separate Url and File structure. I was just
using JSPs and Servlets as examples, because of their behaviour concerning
Url handling. Basically I want to create an application framework with
wich I can create a web application and decide if I will deploy it on Java
or .Net without this decision having effect on the code.

I found out about these HTTPModules and HTTPHandlers and am having a look
at them now.

Tanks to you all.

Chris

"John Timney (MVP)" <x_****@timney.eclipse.co.ukschrieb im Newsbeitrag
news:IO******************************@eclipse.net. uk...
>ASP.NET and JSP are not that well connected at a conceptual level and
there really isn't a direct equivalent to a servlet, you can probably
equate asp.net and ihttpmodules/handlers to the classic jsp/servlet model
in the scenario you describe below, but you'd be coding asp.net like JSP.

The closest you probably have to a true servlet is the code behind model
but only if you try and code it like a servlet, embedding html type
responses into it for example, which is not the most appropriate use of
the technology. The front controller model your probably eluding too
isn't heavily used in asp.net.

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Christofer Dutz" <ch*************@univativ.dewrote in message
news:eI******************@fe188.usenetserver.com. ..
>>Hi,

I am thinking about migrating an application of mine to .Net and have
run into this small "problem"
At the moment I would generally compare ASP.Net to JSPs in the Java
world. I know that this might not be 100% correct, but as far as
addressing a page from the browser it is. The real-path of an ASP.Net
Site is equal to the url-path. I would like to register a comonent as
listener for an entire portion of the url. For example let all urls
starting with http://hostname/app1/shop be handled by a servlet-like
component.

Ist there a way to do this and if yes - what do I have to do?

Regards,
Chris





Dec 1 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.