Java support?

Discussion in 'HOWTO-Related Questions' started by ctroyp, Jan 21, 2006.

  1. ctroyp

    ctroyp New Member HowtoForge Supporter

    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!
     
  2. ctroyp

    ctroyp New Member HowtoForge Supporter

    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.
     
  3. falko

    falko Super Moderator Howtoforge Staff

    I'd love to help you, but I don't have much experience with JSP... :(
     
  4. ctroyp

    ctroyp New Member HowtoForge Supporter

    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!
     
  5. mphayesuk

    mphayesuk Member HowtoForge Supporter

    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
     
  6. ctroyp

    ctroyp New Member HowtoForge Supporter

    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 .

    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?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  8. ctroyp

    ctroyp New Member HowtoForge Supporter

    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.
     
  9. falko

    falko Super Moderator Howtoforge Staff

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

    ctroyp New Member HowtoForge Supporter

    Thanks falko, I will look into that. ;)
     
  11. ctroyp

    ctroyp New Member HowtoForge Supporter

    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:
    Code:
        
        <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.
     
  12. falko

    falko Super Moderator Howtoforge Staff

    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?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  14. ctroyp

    ctroyp New Member HowtoForge Supporter

    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.
     
    Last edited: Jan 25, 2006
  15. ctroyp

    ctroyp New Member HowtoForge Supporter

    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?
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  17. ctroyp

    ctroyp New Member HowtoForge Supporter

    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?
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Sure its a nice feature :)
     
  19. ctroyp

    ctroyp New Member HowtoForge Supporter

    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...
     

Share This Page