Solved

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

Posted on 2003-11-30
34
885 Views
Last Modified: 2010-04-01
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.
0
Comment
Question by:i_am_diablo2000
  • 18
  • 15
34 Comments
 
LVL 92

Expert Comment

by:objects
ID: 9848087
Doesn't look like the dll is loaded.
we use a different dll here, isapi_redirector2.dll.
0
 
LVL 92

Expert Comment

by:objects
ID: 9848126
the link I posted in your previous question included step by step instructions for installing isapi_redirector2.dll.
0
 

Author Comment

by:i_am_diablo2000
ID: 9848458
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?
0
 
LVL 92

Expert Comment

by:objects
ID: 9848483
> 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.
0
 

Author Comment

by:i_am_diablo2000
ID: 9848514
Ok. Please give me a few minutes. I will let you know.
0
 

Author Comment

by:i_am_diablo2000
ID: 9848602
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.
0
 
LVL 92

Expert Comment

by:objects
ID: 9848609
> 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 :)
0
 

Author Comment

by:i_am_diablo2000
ID: 9848742
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.
0
 
LVL 92

Expert Comment

by:objects
ID: 9848780
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).
0
 
LVL 92

Expert Comment

by:objects
ID: 9848807
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.
0
 

Author Comment

by:i_am_diablo2000
ID: 9848832
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.
0
 
LVL 92

Expert Comment

by:objects
ID: 9848845
registry entries are sill incorrect.

it should have the following attributes:

extensionUri
logFile
logLevel
serverRoot
workersFile
0
 
LVL 92

Expert Comment

by:objects
ID: 9848853
Not too sure about your worker2.properties file either. Where did u get it from?
Perhaps try the one I posted in previous q.
0
 
LVL 92

Expert Comment

by:objects
ID: 9848930
Which instructions are following?
You don't appear to be following the link I posted earlier.
0
 

Author Comment

by:i_am_diablo2000
ID: 9848970
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.
0
 

Author Comment

by:i_am_diablo2000
ID: 9849015
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.
0
 
LVL 92

Expert Comment

by:objects
ID: 9849140
try the workers2.properties i posted in other q.
i'm knocking off form the day now, will check on how u went tomorrow.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 92

Expert Comment

by:objects
ID: 9852532
any success?
0
 

Author Comment

by:i_am_diablo2000
ID: 9854648
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
0
 
LVL 92

Expert Comment

by:objects
ID: 9854672
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?
0
 

Author Comment

by:i_am_diablo2000
ID: 9854821
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
0
 
LVL 92

Accepted Solution

by:
objects earned 140 total points
ID: 9854964
ok i think we're close now.
The reason that fails is because that workers2 file only redirects .jsp requests to tomcat, and what you are accessing is not a jsp.
So with any luck if you try to access a jsp file it should hopefully work.
0
 

Author Comment

by:i_am_diablo2000
ID: 9855018
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.
0
 
LVL 92

Expert Comment

by:objects
ID: 9855062
you can set tomcat to run as a Windows service so its always running.
0
 

Author Comment

by:i_am_diablo2000
ID: 9855119
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?
0
 
LVL 92

Expert Comment

by:objects
ID: 9855129
you just need to change your tomcat config so it no longer listens on port 8080.
0
 

Author Comment

by:i_am_diablo2000
ID: 9855331
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.
0
 
LVL 92

Expert Comment

by:objects
ID: 9855350
> 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.
0
 

Author Comment

by:i_am_diablo2000
ID: 9855509
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?
0
 
LVL 92

Expert Comment

by:objects
ID: 9855562
>  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.
0
 

Author Comment

by:i_am_diablo2000
ID: 9855637
>> 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
0
 
LVL 92

Expert Comment

by:objects
ID: 9855671
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.
0
 

Author Comment

by:i_am_diablo2000
ID: 9855740
I hope I kind of understand that. Thanks and good day.
0
 
LVL 1

Expert Comment

by:ackava
ID: 10028265
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
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now