This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes IIS and TOMCAT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "IIS and TOMCAT" Watch "IIS and TOMCAT" New topic
Author

IIS and TOMCAT

ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
I can watch .jsp at http://localhost:8080/examples/jsp/index.html within TOMCAT. and http://localhost/examples/jsp/index.html within IIS.
When I created a folder named test in C: and copied the index.html to \test, I changed the server.xml in tomcat\congif.,
but I canot watch it at http://localhost/test/index.
Please give me some suggestion.
ruilin yang
Ranch Hand

Joined: Feb 25, 2001
Posts: 334
you have to register your application first with server. Otherwise the server will not know your application.
hope help
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Hi, Yang: could you give me a detail? Thanks a lot
ruilin yang
Ranch Hand

Joined: Feb 25, 2001
Posts: 334
Have you registered your html page as an application with server? You need to register (create) your application with server and during which your root directory is mapped to a url. After that the server will know your application and you should be able to display your page.
regards,

Ruilin
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Hi, Yang: Thanks a lot. But I still have no ideal how to register
the application.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Try this thread, and let us know if you have more trouble. http://www.javaranch.com/ubb/Forum7/HTML/003689.html I should add that you can ignore the apache stuff, since you're using IIS, and start reading at the first of my posts.
[This message has been edited by Mike Curwen (edited June 11, 2001).]
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Hi, Mike:
In fact, I add the context stuff within <contextmanager>.
<Context path="/test"
docBase="test"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
it is at c:java/tomcat/test.
I can get it at http://localhost:8080/test/file.jsp
But it still can not find it within IIN.
I do not know why. Since I can get it both http://localhost:8080/examples/jsp/file.jsp and http://localhost/examples/jsp/file.jsp, I think IIS works.
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
I still confuse, How can I decide the path and docBase in context.
for example:
<Context path="/examples"
docBase="webapps/examples"
crossContext="false"
debug="0"
reloadable="true" >
</Context>

Since file is in c:/java/tomcat/examples/jsp/file.jsp.
Which file do the mapping,so I just get it at localhost/examples/jsp/file.jsp
Please give me some help.
Thanks a lot.
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Does anyone want to help me?
Samith Nambiar
Ranch Hand

Joined: Mar 14, 2001
Posts: 147

<Context path="/test"
docBase="test" //CHANGE THIS TO c:java/tomcat/test
crossContext="false"
debug="0"
reloadable="true" >
</Context>

try this and let me know if it worked
Samth.P.Nambiar
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Hi,there:
I changed the docBase c:/java/tomcat/test
The problem is still there.
Venugopal nandikolla
Greenhorn

Joined: Feb 02, 2001
Posts: 22
Hi ellen,
If you have created a folder called test as c:\test then in ..tomcat/conf/server.xml just specify it as below

<Context path="test"
docBase="c:\test"
crossContext="false"
debug="0"
reloadable="true" >
</Context>

then restart your tomcat.

open the browser and type http://localhost:8080/test/index.html


if you have any doubts then mail me at venugopal.n@mailcity.com
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Hi, everyone;
Thanks for helping me. If you gugs find a good way, would you share it with me? I still can not get it at http://locahost/test/index.html
Ganesh Anekar
Ranch Hand

Joined: May 13, 2001
Posts: 36
Hello,
I have seen all replies.You follow the steps given below.You will get the output.
1.shut down tomcat.
2.stop IIS.
3.Edit your server.xml
4.Copy the context given below as it is
<Context path="/test"
docBase="c:\test"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
5.Edit tomcat.policy file in conf dir of tomcat and add following lines as it is ..(copy)
grant codeBase "file:${tomcat.home}/test" {
permission java.net.SocketPermission "localhost:1024-"listen"; permission java.util.PropertyPermission "*", "read";
};
6.Then go to IIS console create virtual dir name as test
7.Edit the properties for this dir in IIS
8.Set proper directory permissions..(if not file not found error)
9.In general tab,click configuration and add file extension as .jsp For excutebale give the path of Isapi_redirect.dll
10.Come out, save the console.
11.Start tomcat...(here u will see /test context is added)
12.Start IIS.
13.Go to browser http://localhost/test/ and enter it will show default document.
It should work...
Ganesh
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Hi, Ganesh :
Thanks a lot! I will try it. Hopefully everything is OK.
ellen
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Hi, Everyone
I did what the above (ganesh what he said) suggestion, but right now the jakarta service does not work. the error information is " could not start the service on local computer "when I want to start the service. Please give me some sugesstion? Thanks a lot.
Ganesh Anekar
Ranch Hand

Joined: May 13, 2001
Posts: 36
hello ellen,

The problem with context ...its not added properly in server.xml
check u r server.xml...
and check all the envirnoment variables r properly set?
TELL me which OS u r using?
Ganesh

[This message has been edited by Ganesh Anekar (edited June 20, 2001).]
ellen berry
Ranch Hand

Joined: Jun 10, 2001
Posts: 31
Hi, Ganesh
It is running now. That's great! I really do want to thank you and those guys that are warm hearted to help me like you. By the way, where can I find some documents about IIN and TOMCAT cooperating with each other.
Ellen:-)
Ganesh Anekar
Ranch Hand

Joined: May 13, 2001
Posts: 36
Hello ellen,
Thats nice to hear...Congrats!!!1
Good keep it up...
U can get the docs regarding IIS and Tomcat
here it is.. http://jakarta.apache.org/tomcat/tomcat-3.2-doc/index.html
Or
U can get this in u r harddisk where u installed Tomcat ..it is there in Tomcat directory.Find out it docs directory inside tomcat dir.
IIS-TOMCATHOWTO.HTML
Keep in touch.
Thankx,
Ganesh
[This message has been edited by Ganesh Anekar (edited June 21, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IIS and TOMCAT
 
Similar Threads
Tomcat not responding to 127.0.0.1
Servlet comilation without JSDK
how to invoke servlet
Apache -> Tomcat servlet problem
error with jakarta tomcat connector