Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Run a Java or a JSP ?

Status
Not open for further replies.

CodeLover55

Programmer
Oct 16, 2002
16
0
0
US
I am a C++ programmer but have been asked to test a small Java application. Since I don't know much about Java, I am looking for some help from the Java gurus. :eek:)

1) If I have a few *.java programs on my machine, what all do I need to compile and run it ? Is JRE sufficient ? All I know is that I have to use javac to compile and then java to interpret it.
2) I have a JSP code on my computer but don't have any IIS or any web services running on my computer. How can I run that JSP then ? What do i need to install on my computer ( preferably FREE software !! ) ?

Thanks.
 
Is this package a web application? The *.java files might be servlets.

1) First of all you need the JDK (Java Developers Kit). Go to to get that. Yes, you are correct on the programs.

2) Tomcat is the most popular open-source server for serving JSP and servlets. ( No need for additional webservers for it to work. Mike Wills
IBM iSeries (AS/400) Programmer
[pc2]
 
I installed IIS on my machine and now am able to run JSP on my localhost. However I have a small problem with a JSP which uses <jsp:include...> to include another jsp. The include doesn't seem to do anything. When I cut n paste the stuff from the included jsp, it shows up fine but when i use the include instead, it doesn't. What could be wrong here ?
 
Do you mean Microsoft Internet Information Server ??!!!

I've never heard it's capable of running JSPs.

First of all you need a JSP compiler, which
compiles a JSP into a .java program.

All Java application servers capable of running JSPs
have such a compiler.

Microsoft's IIS would be capable to execute a JSP
as long as it has pure HTML tags, but more likely
it will have a problem with any JSP-syntax.

 
IIS is capable of redirecting JSP files to an attached Tomcat without the extra mess of pre-compiling the code by hand.
make sure your include path is correct. It is possible that tomcat is looking for the included file in relation to it's own directory or in relation to the original requested address. My bet would be that wherever the file is now is not the location that the server is looking for it :). Sorry i can't be more specific I haven't used JSP in quite a while.

-tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top