PDA

View Full Version : Java support?


ctroyp
21st January 2006, 05:03
Could anyone tell me what would be involved in setting up my server for server-side scripting support such as JSP or servlets? If so would that be through Tomcat or something else like JSWDK?

FYI, I am running Debian Sarge with ISPConfig.

I have a client that wants me to host his site but he wants the ability to run these scripts.

Thanks in advance!

ctroyp
23rd January 2006, 16:48
What I am looking for are any brief guidelines and pitfalls for doing this with my current system. I have some understanding of how to do it, but I am not so sure as to how to do it on this setup.

Any help is appreciated.

falko
24th January 2006, 09:03
I'd love to help you, but I don't have much experience with JSP... :(

ctroyp
24th January 2006, 14:27
I'd love to help you, but I don't have much experience with JSP... :(

Hey, there's never been a better time to learn. ;)

Actually, this would be a nice additional module for ISPConfig and your Perfect Setup How-to's.

This is something that I WILL have to dive into so if I am successful, I will give you some feedback. My main concern here is for ISPCongif and how it would need to be installed so I can turn the JSP/Servlet feature on/off per customer--similar in the way you can turn on/off ofher features such as MySQL, SSI, etc.

Thanks for the response!

mphayesuk
24th January 2006, 15:35
I dont think that you would be able to turn it off per customer, unless you can integrate it into ispc... so it might be something that would just run and you create a seperate account on your linux box for those customers who wanted jsp and then that should give your customers access to jsp. This is something I was going to look into at some point, post what you find out, and if I find anything else out myself I will post as well.

Thanks

ctroyp
24th January 2006, 16:44
I dont think that you would be able to turn it off per customer, unless you can integrate it into ispc...

This would be ideal. The ISPConfig team needs to consider this in one of the next versions of ISPConfig. I am suprised that this topic has not come up yet. JSP can be a bit of a demand in the world of hosting .

...so it might be something that would just run and you create a seperate account on your linux box for those customers who wanted jsp and then that should give your customers access to jsp. This is something I was going to look into at some point, post what you find out, and if I find anything else out myself I will post as well.

Thanks
I think Tomcat would be the best solution for me. I am still reading the docs... It doesn't sound like its going to be too difficult to install. I am just concerned that I may break something in the current setup.

What o/s are you running?

till
24th January 2006, 19:32
This would be ideal. The ISPConfig team needs to consider this in one of the next versions of ISPConfig. I am suprised that this topic has not come up yet. JSP can be a bit of a demand in the world of hosting.


The ISPCofig team has very few active developers and a very large feature request forum :) So it might be a good idea if someone needs a special feature to either code it and submit it to the ISPConfig SVN repository or find someone who codes it and submits it. Tomcat integration will not be trivial and as none of the core developers uses tomcat, we would have to become familar with tomcat first before we can integrate it in ISPConfig.

ctroyp
24th January 2006, 19:40
The ISPCofig team has very few active developers and a very large feature request forum :) So it might be a good idea if someone needs a special feature to either code it and submit it to the ISPConfig SVN repository or find someone who codes it and submits it. Tomcat integration will not be trivial and as none of the core developers uses tomcat, we would have to become familar with tomcat first before we can integrate it in ISPConfig.

I would love to take the bull by the horns on a project like this. It would be great to make such a contribution for the project, but I am not sure my level of expertise could support such a task. I am going to look into it though. It would be a great addition...

Thanks for the response till.

falko
24th January 2006, 19:55
This is something that I WILL have to dive into so if I am successful, I will give you some feedback. My main concern here is for ISPCongif and how it would need to be installed so I can turn the JSP/Servlet feature on/off per customer--similar in the way you can turn on/off ofher features such as MySQL, SSI, etc.

For now you could use ISPConfig's "Apache Directives" field to paste in your JSP directives.

ctroyp
24th January 2006, 19:58
For now you could use ISPConfig's "Apache Directives" field to paste in your JSP directives.
Thanks falko, I will look into that. ;)

ctroyp
24th January 2006, 23:02
I dont think that you would be able to turn it off per customer, unless you can integrate it into ispc... so it might be something that would just run and you create a seperate account on your linux box for those customers who wanted jsp and then that should give your customers access to jsp. This is something I was going to look into at some point, post what you find out, and if I find anything else out myself I will post as well.

Thanks

I believe I found what I was looking for to get Servlets and JSPs running on the system. This resource shows how to do it using Tomcat with Apache and virtual hosting.

Look here:http://tomcat.apache.org/connectors-doc-archive/jk2/jk2/vhosthowto.html

I believe a similar directive as the following example could be used (as falko mentioned) in the Additional Directives section on the basis page of ISPConfig for the sites that you would want to give the Servlet/JSP scripting ability to:

<Location "/*.jsp">
JkUriSet worker ajp13:localhost:8009
</Location>


Or it can be manually entered into the default virtual hosts section.

This should be a good start...

Let me know what you think.

falko
25th January 2006, 07:29
Or it can be manually entered into the default virtual hosts section.

But then every web site has JSP support. I'd put it into the "Apache Directives" field for each web site that needs JSP support.
Does what you described above work? Or haven't you tried yet?

till
25th January 2006, 11:31
I believe I found what I was looking for to get Servlets and JSPs running on the system. This resource shows how to do it using Tomcat with Apache and virtual hosting.

Look here:http://tomcat.apache.org/connectors-doc-archive/jk2/jk2/vhosthowto.html

I believe a similar directive as the following example could be used (as falko mentioned) in the Additional Directives section on the basis page of ISPConfig for the sites that you would want to give the Servlet/JSP scripting ability to:

<Location "/*.jsp">
JkUriSet worker ajp13:localhost:8009
</Location>


Or it can be manually entered into the default virtual hosts section.

This should be a good start...

Let me know what you think.

I think this should work. But its not really comfortable and if you want to enable jsp for your resellers you will have to give them acces to the apache directives field.

ctroyp
25th January 2006, 12:59
But then every web site has JSP support. I'd put it into the "Apache Directives" field for each web site that needs JSP support.
Does what you described above work? Or haven't you tried yet?

Yeah, that is what I mean. Put in default vhost for all (if one would chose), but I would need to enable the respective reseller and provide them with the directive. This seems like it will work, but I have not tried it yet. I have been overly busy trying to complete my Software Eng. degree. I should be able toget to is pretty soon and will let you know how it comes out.

ctroyp
25th January 2006, 13:04
I think this should work. But its not really comfortable and if you want to enable jsp for your resellers you will have to give them acces to the apache directives field.

It shouldn't be too difficult to add this option for the websites without enabling the directives should it. Really, all it would require is the check box which adds the necessary code for the respective vhost. Does this sound right?

till
25th January 2006, 14:33
It shouldn't be too difficult to add this option for the websites without enabling the directives should it. Really, all it would require is the check box which adds the necessary code for the respective vhost. Does this sound right?

Its a bit more complicated

- add the checkbox to the reseller form.
- add the checkbox to the clients form.
- add the checkbox to the hosting plans.
- add code to hide the checkbox in websites when not enabled for this reseller.
- add code that enables the checkbox when it is enabled in the hosting plan.
- If the checkbox is not the last input field in the web form, you might have to change the code for hiding the fields taht are below the check box too, as the input fields where hidden by their index value.
- Add the code in the server part that writes the directives in the vhost configuration file.

ctroyp
25th January 2006, 14:53
Its a bit more complicated

- add the checkbox to the reseller form.
- add the checkbox to the clients form.
- add the checkbox to the hosting plans.
- add code to hide the checkbox in websites when not enabled for this reseller.
- add code that enables the checkbox when it is enabled in the hosting plan.
- If the checkbox is not the last input field in the web form, you might have to change the code for hiding the fields taht are below the check box too, as the input fields where hidden by their index value.
- Add the code in the server part that writes the directives in the vhost configuration file.
Yeah, I figured there would be more to it. Really, it doesn't sound too bad though. I may try and work on it this weekend and see what I can come up with. This would be a really nice feature for ISPC. Don't you agree?

till
25th January 2006, 15:02
Yeah, I figured there would be more to it. Really, it doesn't sound too bad though. I may try and work on it this weekend and see what I can come up with. This would be a really nice feature for ISPC. Don't you agree?

Sure its a nice feature :)

ctroyp
8th February 2006, 04:58
Just to update on my progess...

Although I have not even looked at the ISPConfig part to automate adding the JSP/Servlet ability to site, I have been able to successfully run the scripts by setting up the sites manually. Right now I am trying to figure out how to get the scripts to run from the respective web directories created from ISPConfig hosted sites. Once I finish this section I am going to compile a tutorial that shows how I accomplished this for Debian since there is such little documentation on the web right now.

After I complete that document, I will post it here so that others may be able to help me get modify ISPConfig so that we will have the ability to select which sites will be allowed to use the JSP/Servlet function. Although it will take some time, this would be an awesome addition in a future release for ISPConfig.

Wish me luck...