tags:

views:

7

answers:

0

I was trying to port an ASP.NET web application to run on Tomcat using MainSoft Grasshopper framework. My application takes advantage of custom HTTP handlers. Here's how I use them right now:

web.config:

...
<system.web>
    <httpHandlers>
        <add verb="*" path="*.xyz" type="App1.XyzHandler" validate="false"/>
...

XyzHandler.cs:

...
namespace App1 {
    public class XyzHandler : IHttpHandler {
        public bool IsReusable { get { return true; } }
        public void ProcessRequest(HttpContext context) {
            context.Response.ContentType = "text/plain";
            context.Response.Write("Xyz OK");
        }
    }
}

In ASP.NET, this makes it so, that when you load http:/xxxxxxx/xxxx/anything.xyz , the IIS will load XyzHandler class and pass request to ProcessRequest method. File anything.xyz doesn't have to even exist. Is there some way to get this feature working on J2EE with grasshopper?

Sorry, if this is a noob question, I'm very new to this grasshopper product