Default web root and jsp compile error with Tomcat 5.5

  • Thread starter Jimi Hullegård
  • Start date
J

Jimi Hullegård

Hi all

I have just installed Jakarta Apache Tomcat 5.5 (jakarta.apache.org/tomcat),
and I am having troubles with the jsp-files. Apparently, the jsp-compiler
does not like when I write things like:
Vector<String> myStringVector;
This code works perfect with Orion web server (www.orionserver.com), but I
would like to use Tomcat.

If I remove the <String>, it works ok, but I don't want to have to do that.

I have java JDK 1.5 installed, and JAVA_HOME points to that directory. But
still it seems that a different JDK version is used for the jsp-files. Is
there a way to change that?

Also, I would like to be able to have the default web root to be in a
different directory. Now it's in C:\Program Files\Tomcat5.5\webapps\ROOT,
but I want something like c:\MySite.
I have search on google, but almost everyone talks about some httpd.conf
file, and I don't have any! And I have looked in all xml-files in the
tomcat/conf directory, but can't find anything that sets the default root
path.

Can anyone help me with these problems?

Regards
/Jimi
 
J

Jimi Hullegård

Jimi Hullegård said:
Hi all

I have just installed Jakarta Apache Tomcat 5.5
(jakarta.apache.org/tomcat), and I am having troubles with the jsp-files.
Apparently, the jsp-compiler does not like when I write things like:
Vector<String> myStringVector;
This code works perfect with Orion web server (www.orionserver.com), but I
would like to use Tomcat.

If I remove the <String>, it works ok, but I don't want to have to do
that.

I have java JDK 1.5 installed, and JAVA_HOME points to that directory. But
still it seems that a different JDK version is used for the jsp-files. Is
there a way to change that?

Well, I found the solution myself. On this page:
http://forum.java.sun.com/thread.jspa?threadID=579806&messageID=3044385
Also, I would like to be able to have the default web root to be in a
different directory. Now it's in C:\Program Files\Tomcat5.5\webapps\ROOT,
but I want something like c:\MySite.
I have search on google, but almost everyone talks about some httpd.conf
file, and I don't have any! And I have looked in all xml-files in the
tomcat/conf directory, but can't find anything that sets the default root
path.

But this I still havn't figured out... :(

/Jimi
 
J

Jimi Hullegård

JScoobyCed said:
You need to setup your server.xml <Context> section with the docroot and
workdir parameters

Well, there was no previous <Context> sections in server.xml, so I wasn't
sure where to insert one. So instead I used the context.xml file, and it
works great now. Thanks!

/Jimi
 
J

Juha Laiho

JScoobyCed said:
You need to setup your server.xml <Context> section with the docroot and
workdir parameters

From 5.0 onward, the recommendation has been to use separate "context.xml"
files for the server.xml <Context> elements. These files are located in
conf/Catalina/<hostname>/ . A good practice and recommendation is to name
these files uniformly with the context name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top