Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Tomcat

Options
  • 10-05-2002 1:09pm
    #1
    Closed Accounts Posts: 16


    Howya,
    I'm trying to install tomcat on a windows machine so I can run a servlet. However it requires me to install the Java Development Kit as well.
    Is there anyway that I can get around this or are there any other applications similar to tomcat that will allow me to do so?

    I dont want to install anymore than the JRE (Java Runtime Environment).

    suggesions please?


Comments

  • Registered Users Posts: 1,994 ✭✭✭lynchie


    AFAIK, the JRE only comes with the runtime enginer, i.e. it can only run java code. It does not have the compiler built into it.

    You want to use tomcat which uses jsp/servlets. JSP's have to be compiled into servlets hence the need for the java compiler. I think tomcat has its own compiler but it needs the java one too afaik. I think you are going to need to install the JDK. Why dont you want to install the JDK?? Short on disk space or what :rolleyes:


  • Closed Accounts Posts: 16 Koo


    Originally posted by lynchie
    AFAIK, the JRE only comes with the runtime enginer, i.e. it can only run java code. It does not have the compiler built into it.

    You want to use tomcat which uses jsp/servlets. JSP's have to be compiled into servlets hence the need for the java compiler. I think tomcat has its own compiler but it needs the java one too afaik. I think you are going to need to install the JDK. Why dont you want to install the JDK?? Short on disk space or what :rolleyes:

    Well I had to do a bit of cleaning up on the C drive alright :D

    But at the same time it's not feasible to have to go around and inform every customer that they have to install the JDK environment as well.

    It's part of a client/server package and the client is a java application and only needs the JRE.

    do you know of any other applications similar to tomcat that don't need JDK?


  • Registered Users Posts: 1,994 ✭✭✭lynchie


    But at the same time it's not feasible to have to go around and inform every customer that they have to install the JDK environment as well

    If clients are using the servlets/jsps they would be using http to connect and hence would not need the jdk installed on their machine. Are you saying that every client is running tomcat??


  • Closed Accounts Posts: 16 Koo


    Originally posted by lynchie


    If clients are using the servlets/jsps they would be using http to connect and hence would not need the jdk installed on their machine. Are you saying that every client is running tomcat??

    No every server/servlet is running tomcat (I only chose tomcat cos I didn't know what else to use)

    I need tomcat to run the servlet so the client can connect to it.

    The client is a standard java application which opens a URLConnection to the servlet.


  • Registered Users Posts: 1,931 ✭✭✭Zab


    If your distributing the server, you can't redistribute the sun jdk anyway, so each customer would have to download it. However, you can precompile each of your jsp pages, and distribute the precompiled version: each customer would then only need the JRE installed ( which you can redistribute ). Tomcat includes the basic scripts for precompiling jsp pages.

    Zab.


  • Advertisement
  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Originally posted by Koo
    do you know of any other applications similar to tomcat that don't need JDK?

    Seems to be confusion as to what TomCat is doing and JRE/JDK.

    JDK is the Java Development Kit. While I might be wrong I'm pretty sure you do not need this to run on the tomcat server. A developer would write the servlets and compile them then upload them to the server.

    You would need a JRE to run the servlets, however it should only be on the server end as thats the end the servlets run (They don't run on the client). If your pages being created had applets in them then the clients would need a JRE which most browsers have built in.

    The fact you don't know this means you probably need to read up a lot more on how TomCat, servlets work as it's a pretty basic requirement. (I don't mean that in a rude way)


  • Closed Accounts Posts: 16 Koo


    Originally posted by Zab
    If your distributing the server, you can't redistribute the sun jdk anyway, so each customer would have to download it.

    I knew there was a good reason why I couldn't use it ;)

    However, you can precompile each of your jsp pages, and distribute the precompiled version: each customer would then only need the JRE installed ( which you can redistribute ). Tomcat includes the basic scripts for precompiling jsp pages.

    It's not a jsp I've it compiled as a .war with jbuilder.
    All th servlet does is accept requests from the client and processes them. There's no frontend to it at all


  • Closed Accounts Posts: 16 Koo


    Originally posted by Hobbes


    Seems to be confusion as to what TomCat is doing and JRE/JDK.

    JDK is the Java Development Kit. While I might be wrong I'm pretty sure you do not need this to run on the tomcat server. A developer would write the servlets and compile them then upload them to the server.
    I need JDK to install the Tomcat server which is my problem :(

    You would need a JRE to run the servlets, however it should only be on the server end as thats the end the servlets run (They don't run on the client). If your pages being created had applets in them then the clients would need a JRE which most browsers have built in.

    The fact you don't know this means you probably need to read up a lot more on how TomCat, servlets work as it's a pretty basic requirement. (I don't mean that in a rude way)


    I need the servlet to be as portable as possible which is another problem, It could be running on a number of different machine not just one.

    No offence taken, it's all new to me and I've to find a solution by this evening :(


  • Registered Users Posts: 1,931 ✭✭✭Zab


    Originally posted by Koo

    It's not a jsp I've it compiled as a .war with jbuilder.
    All th servlet does is accept requests from the client and processes them. There's no frontend to it at all
    A war file is basically just a zipped version of other files... they can be compiled or not. Tomcat just unzip's war files into a directory and runs them from there. If there are .jsp or .java files in the WAR, then tomcat will try to compile them when they are used.

    Zab


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    I need the servlet to be as portable as possible which is another problem, It could be running on a number of different machine not just one.

    Are all machines going to be servers? If so then just supply the servlet and it's required files that you made, the adminstrator should be able to run it fine.

    If you are trying to package something up that an end user is to use (The person connecting to the servlet) then creating a servlet is overkill. You could just create an java application or applet instead.


  • Advertisement
  • Closed Accounts Posts: 16 Koo


    Originally posted by Hobbes


    Are all machines going to be servers? If so then just supply the servlet and it's required files that you made, the adminstrator should be able to run it fine.

    If you are trying to package something up that an end user is to use (The person connecting to the servlet) then creating a servlet is overkill. You could just create an java application or applet instead.

    Not all, some, just want it to be as transparent as possible.
    Plus want the servlet to run as a background application too


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Originally posted by Koo


    Not all, some, just want it to be as transparent as possible.
    Plus want the servlet to run as a background application too

    You wouldn't run a servlet on a client machine. I'd be less worried about having to have a JRE then I would be having a client have to install a HTTP server and web services. In some companies it is against the security policy to have a web server running on your machine.

    You seem to be going overkill for what you want to do.

    More information here


  • Registered Users Posts: 1,994 ✭✭✭lynchie


    JDK is the Java Development Kit. While I might be wrong I'm pretty sure you do not need this to run on the tomcat server. A developer would write the servlets and compile them then upload them to the server

    Hobbes, the JDK is required for Tomcat. While servlets would run fine using just the JRE, JSP pages would not as tomcat may need to recompile them at some future point. Even though you may not be using JSP pages, im pretty sure tomcat will complain if you use just the JRE only.


    From what I understand, each client will be using a java app to connect to the server. Each client would only need the JRE on their PC.

    The server running tomcat (with the servlets on it) would need the JDK on it.


Advertisement