Configuring JSPs on an Xserve

For some time I’ve been researching this issue elsewhere and have yet to receive a clear response. Time now to ask here. The issue is only very indirectly related to Servoy.

My Xserve is running Servoy (including the headless client) and it’s also running the marketing website. I’d like prospective clients register themselves on a web form and have that data migrate into Servoy via the headless client. Based on advice from Servoy we’ve written this routine in a JSP. Our consultant has successfully created and tested the JSP in his Windows environment. And I’ve also brought it into my own Windows-based Servoy development environment. It works very nicely.

However the production environment is a Mac OS X Xserve. When the user clicks the web form’s submit button we get this error:

Method Not Allowed
The requested method POST is not allowed for the URL /CreateSession.jsp.
Apache/1.3.33 Server at www.website.com Port 16080

(Port 16080 is not blocked.)

The JSP consultant doesn’t have familiarity with Macs and this area of technology is beyond my comfort zone.

Some say mod_jk needs to be installed, but because Servoy is already installed mod_jk may already be there. The actual problem may be elsewhere. Others have said the httpd.conf file needs to be adjusted. Again, not sure.

Anyone with first-hand experience with JSPs in a Mac-based Servoy environment I’d appreciate hearing from you.

Kind regards,

We have several XServes, but haven’t messed with Servoy’s JSP yet. With Apple, the httpd.conf by defulat is pretty strict. I would start by modifying it to make sure it is allowing you to post to that folder. By Default, usually Apple restricts that and only allows posting to files within their own CGI folder. So, inside of the httpd.conf file, you’ll probably need something like this…

<Directory /users/websites/html/site1/>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

where /users/websites/html/site1/ is the full path to the CreateSession.jsp file.

The other option, which some people prefer, is to put your CreateSession.jsp inside of Apple’s CGI folder, and then alias back to that folder. It provides a little more security, but is kind of a hassle. It goes something like this

ScriptAlias /cgi-bin/ /users/websites/html/site1/cgi-bin/

Just thinking…you might try putting that jsp file inside of the main /cgi-bin/ folder (not inside of the virtual host’s cgi-bin), and then try to pull up yoursite.com/cgi-bin/CreateSession.jsp and see if it works.