0
votes

I have inherited a couple established links ending in .jsp. The domain of these links is pointing to my coldfusion 9 / iis 7.5 server.

I have rewritten the functions in cf. I just need the cf/web server to run link with .jsp as a .cfm.

I was unsuccessful using a url rewrite.

I tried to add .jsp to the Handler Mapping using the same config settings as .cfm.

The 500 error that came back in both cases said: You tried to access a restricted feature for the Standard edition: JSP

I don't want to "run" jsp with Coldfusion which from the error is not in the Standard license. I would like it to run like a cfm file.

Is there a setting in CF Admin to turn off the .jsp recognition?

Thanks, Gary

Issue resolved:

The first step was to disable *.JSP references in all the default-web.xml files

Then apply a url rewrite. ^(.*)jsp$ which redirects to {R:1}cfm{R:2}

Thanks for your comments and help. Gary

1
I was unsuccessful using a url rewrite. How? Exactly what did you try and what was the result? URL rewriting sounds like the simplest and cleanest option. Failing that, rather than trying something akin to subverting the licensing restrictions, have you tried an alternative engine like Lucee? A quick search suggests it can run .jsp pages. Though honestly it does sound like a rather convoluted alternative to rewriting ;-)Leigh
After additional testing, it appears that Coldfusion is processing the file before it gets to a url rewrite on the web server. I have removed the *.jsp reference from the default-web.xml. Now, instead of the License error, I receive a 403:Forbidden from a page titled JRun Servlet Error.GaryV58
Requests hit the web server first, so it sounds like a problem with how you have implemented the rewrite rules or possibly the configuration. However, since you have not posted the actual rules, that is just speculation. I do not have an answer, but in order for anyone to assist, you need to update your question with details about the rewrite rules used and the IIS configuration.Leigh
You could always just delete the file and use onMissingTemplate() or onRequestStart() in your application.cfc to take over. Better yet, if the location of these .jsp files is in a subfolder, it could have its own application.cfc file with its own handlers. You'd have to configure IIS to hand off .jsp files to CF or have a custom 404 handler for that virtual directory.rodmunera
use onMissingTemplate().... Depends on whether the request even makes it that far. IF the license restriction kicks in at the servlet level, then the Application.cfc is never even invoked. In which case it is a non-starter.Leigh

1 Answers

0
votes

The first step was to disable *.JSP references in all the default-web.xml files

Then apply a url rewrite. ^(.*)jsp$ which redirects to {R:1}cfm{R:2}