Link to home
Start Free TrialLog in
Avatar of i_am_diablo2000
i_am_diablo2000

asked on

IIS with JSP step by step setup. What's wrong?

I am trying to setup my IIS in Win2000 to serve my Jsp application. I follow all the instructions from documentations but it is just not working. Sorry I am not an IT folk and I think I must have make mistake somewhere. I put up my step by step (images) setup procedure on my webpage for better narration.

Please view the page at

http://www.geocities.com/kong_hingc/iis.html

140 points are all that I have. If the problem is solved, I promised to give more.
Please help. Thank you.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Doesn't look like the dll is loaded.
we use a different dll here, isapi_redirector2.dll.
the link I posted in your previous question included step by step instructions for installing isapi_redirector2.dll.
Avatar of i_am_diablo2000
i_am_diablo2000

ASKER

Hello objects,

I followed your instruction from  URL you posted previously. I now changed to use the isapi_redirector2.dll. But it is still the same result. Any idea? Any log file to trace what happen and why the dll is not loaded?
> Any log file to trace what happen and why the dll is not loaded?

Does it still say it's not loaded?

If it's not a big hassle if you can update iis.html to what things now look like it'll make helping you a lot easier.
Ok. Please give me a few minutes. I will let you know.
Hello Objects,

I have already updated the page. It is now at :

http://www.geocities.com/i_am_diablo2000/iis.html

Please note that in regedit, I still use 1.0 instead of creating 2.0. But I am more concerned why the dll is not loaded.

Please help and thank you very much.
> Please note that in regedit, I still use 1.0 instead of creating 2.0.

You need to add the relevant entry for 2.0

> But I am more concerned why the dll is not loaded.

That could be the reason it's not loading :)
Hi Objects,

I created entry 2.0. Please visit the page again for latest images.

Is there any log file for me to check what went wrong?

Also my uriworkermap.properties only consists these lines :

/jakarta/*.jsp=worker1  
/jakarta/servlet/*=worker1

Is that OK?

Strangely, my Php forum which also uses IIS to host, is working, eventhough filter shows arrow down sign. Why?

Please help Thanks.
i looked at page and still didn't see a "2.0" entry in the registry.

uriworkermap.properties is not used afaik (we don't have one here), workers2.properties is used to config the mapping (i included an example in previous post).
from the link posted in previous q:

Locate the top of the Tomcat 4 installation, by default this should be c:\program files\apache group\tomcat 4.1.
Copy the isapi_redirector2.dll to the top of the Tomcat 4 installation.
Copy the worker2.properties file to the conf directory at the top of the Tomcat insallation.
Edit the worker2.properties file, specifically looking for the two lines containing ${serverroot}.  Replace that ${serverroot} with the path to the Tomcat directory.  Forward or backwards slashes are OK, we normally choose forward slashes to remain consistent with the prototype entries.
Edit the registry, and make sure the key “HKEY_LOCAL_MACHINE\Software\Apache Software Foundation\Jakarta Isapi Redirector\2.0” exists.  Create the key if it does not exist.
In the key, create the following strings.  Replace ${serverroot} with the path to the Tomcat directory (as in step 4), but use a Windows path with backslashes:
 
String Value
serverRoot  
 ${serverroot}
 
extensionUri  
 /Jakarta/isapi_redirector2.dll
 
workersFile  
 ${serverroot}\conf\workers2.properties
 
logLevel  
 < debug | info | error >
 

The logging level should be set to error unless there is a problem that needs troubleshooting.  Log messages go to the Windows application event log, not into a file.

Close the registry editor.
Open the Internet Information Services management console from Administrative Tools.
In the appropriate Web site (probably the “Default Web Site”), create a virtual directory named “jakarta”.  This needs to be connected to the Tomcat directory where the isapi_redirector2.dll file is located.  Assign execute permission to the new entry.
Open the properties of the Web site, and click on the “ISAPI Filters” tab.
Click on the add button to add a new filter entry.
Name the filter “Jakarta”.
Set the location of the filter to the path of the isapi_redirector2.dll file.
Click OK to add the filter, and OK again to save the changes.
Open the properties dialog for the Web site again and check the ISAPI Filters page to make sure the filter loaded correctly (it should have a green arrow pointing upwards).  If it did not load correctly, then check the registry and the workers2.properties file for errors.
Close the properties page if it is open, and close the Internet Information Services management console.
Check the jsp and servlet engine by using the URLs http://localhost/examples/jsp/index.html, and http://localhost/examples/servlets/index.html.
Make sure regular pages are still working.
Hi Objects,

Thank you for your patient and effort. I forgot to update the image. It is there now.

Do I need to delete 1.0? I am afraid to change too much the regedit as I am not an IT folk.

I also if I enable directory browsing, I am able to go into
http://localhost/jakarta/webapps/examples/jsp/

But when I click "execute", I got "You are not authorized to view this page" error.

Please help. I am extremely desperate.
registry entries are sill incorrect.

it should have the following attributes:

extensionUri
logFile
logLevel
serverRoot
workersFile
Not too sure about your worker2.properties file either. Where did u get it from?
Perhaps try the one I posted in previous q.
Which instructions are following?
You don't appear to be following the link I posted earlier.
Wow, in the filter tab, the Jakarta finally shows green arrow up. A big break through!

However, the web page is still not shown properly.

I also updated workers.properties except changing the 'file' value at the 3rd line.

Come on please . I think I am almost there.
Sorry Objects. The filter dll not loaded problem is my fault. My PC already have a 1.0 entry. So I actually copy and paste the values from 1.0 to 2.0, without realising that the string values are different.
try the workers2.properties i posted in other q.
i'm knocking off form the day now, will check on how u went tomorrow.
any success?
Good morning.

I am not an IT folk. So something trivial might seem difficult for me. I re-look everything again.

Well, from the URL you gave me : http://smallrock.net/resources/technotes/030925_tomcatconfig.htm

I read that I am supposed to launch "http://localhost/examples/jsp/index.html" page after everything is configured properly.

I don't understand this part. Isn't "examples" located under ../tomcat/webapps ?

I thought all the configuration and setting was started from top most directory ../tomcat ?

So isn't URL should be "http://localhost/jakarta/webapps/examples/jsp/index.html? 
I think I need to understand from the bottom up. Please enlighten me. I will empty my points as rewards.

Thanks
It depends on how you want it configure. Thats just to test your config.

What workers2.properties file are you currently using?

What urls do you want to be handled by tomcat?
I am using the workers2.properties you gave me in the previous post.

I updated the images in my homepage  at http://www.geocities.com/i_am_diablo2000/iis.html

You can view my workers2.properties from the page.

I have an application under my tomcat/webapps called toto. Currently, using Tomcat, I need to type "http://localhost:8080/toto". Ultimately and eventually, I would like to have "http://localhost/toto" handled by my IIS.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh my god. It is working! I access http://localhost/toto/index.jsp and it works!

BUT! This works only if I started tomcat, i.e., I run the startup.bat. Yup, instead of http://localhost:8080/toto, now I only need to type http://localhost/toto.

So all that I have done so far is only re-direct? I still need to start up my tomcat to order for everything to work.

At least some progress, though. But my ultimate goal is to start IIS only without Tomcat to serve my Jsp application. Is this possible, after all?

Great thanks for  your help. I will give you all I have.
you can set tomcat to run as a Windows service so its always running.
But that defeats the original purpose. Tomcat actually has both webserver and servlet engine. I only need the servlet engine and my webserver should be IIS. Is t hat a way to start servlet engine only?
you just need to change your tomcat config so it no longer listens on port 8080.
I am getting a bit confused. I thinnk I need a break.

By making tomcat config not to listen to port 8080 means Tomcat web server is not running? Or it is listening to default port 80? Oh, I think this task is too difficult for me. I am going to thrash with boss now.

Thank you anyway.
> Tomcat web server is not running?

Sort of, its not listening for http connections.

> Or it is listening to default port 80?

No, IIS is listening on 80.

When it recieves a request it checks the URL and passes any relevant ones on to be handled by Tomcat.
Thank you. I commented the following lines from my server.xml and it still works fine. I guess this is an archivement.

 <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080"               minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="100" debug="0" connectionTimeout="20000"
               useURIValidationHack="false" disableUploadTimeout="true" />

However, my images from my Jsp application are not displayed properly. Previously they are ok when served by Tomcat. I guess this has something to do with the redirect.dll location.

Do you have any idea?
>  I commented the following lines from my server.xml and it still works fine.

We'll make a techie out of you yet :)

> my images from my Jsp application are not displayed properly.

That is because the request is being handled by IIS.
Only URL requests that end in .jsp are being passed to Tomcat with your current configuration.

You'll need to either make any non-jsp resources required available on IIS, or configure it so the requests are redirected to tomcat.
>> You'll need to either make any non-jsp resources required available on IIS, or configure it so the requests are redirected to tomcat.

I guess what you meant by "configure it so the requests are redirected to tomcat." is doing the following thing in workers2.properties file?

# Uri mapping - redirect all .jsp files to Tomcat server
[uri:/*.jsp]
worker=ajp13:localhost:8009

[uri:/*.gif]
worker=ajp13:localhost:8009

Since my *.gif files exists in many different directories, I might need to know about how to make any non-jsp resources required available on IIS. Please teach me.

Thanks
Problem with that is that then all gif requests will be sent to tomcat which is probably not what you want.

Personally I'd use IIS to serve the image requests for performance reasons.
If both tomcat and IIS were accessing the same directory tree then there shouldn't be a problem.
I hope I kind of understand that. Thanks and good day.
Well the solution is here...

http://jspisapi.neurospeech.com , we had similar problem and trying to find solution but too complex method of tomcat's documentation lead us to develop our own solution called JspISAPI. The details of installation is given in the website.

It has features:
1) eliminate 8080 port from urls
2) redunce load on tomcat as images and other resources are handled by IIS
3) support http keep alive for jsp and servlets
4) easy setup for SSL by IIS, no hassle for setting up SSL for tomcat

- Akash Kava