ข้าพเจ้าเชื่อว่าพระคุณของพระเจ้านั้นเพียงพอต่อชีวิตและครอบครัวของข้าพเจ้า

เกลือจืด
Location :


[ดู Profile ทั้งหมด]

ฝากข้อความหลังไมค์
Rss Feed
Smember
ผู้ติดตามบล็อก : 7 คน [?]




Group Blog
 
<<
เมษายน 2551
 12345
6789101112
13141516171819
20212223242526
27282930 
 
27 เมษายน 2551
 
All Blogs
 
Friends' blogs
[Add เกลือจืด's blog to your web]
Links
 

 

run JSP(TOMCAT) บน IIS Service

ในหลายกรณี ที่ต้องการใช้งาน TOMCAT ซึ่งได้เขียนโปรแกรมไว้ด้วย JSP
แล้วต้องการให้ไป RUN บน IIS Service อีกที

จะด้วยความจำเป็นใดๆก็ตามแต่นะ...
อันนี้คือวิธีการที่ผมได้ทดลองทำตาม web นี้
ซึ่งได้ผลดีมาก
//neosmart.net/blog/2006/configuring-jsp-for-iis/
ถ้าอ่านภาษาอังกฤษคล่องก็ไปดูที่ต้นฉบับนะ
ในนี้ผมจะสรุปวิธีที่ผมทำตาม

ทั้งหมดนี้ผมทดสอบบนเครื่อง window 2003/tomcat 5
1. ติดตั้ง IIS ตามปกติ
2. ติดตั้ง JDK
3. ติดตั้ง TOMCAT ให้เลือกแบบที่ install เป็น service มาใช้
(ผมติดตั้ง TOMCAT บน C:\TOMCAT)
4. downnload isapi_redirect*.dll (* หมายถึง version) จาก
//www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/
แล้วเอาไป copy ลงใน C:\TOMCAT\bin\isapi_redirect.dll
(อย่าลืม rename มัน)
5. download(เขียนเองก็ได้) isapi_redirect.properties มาแก้เป็น
====================================


# Configuration file for the Jakarta ISAPI Redirector

# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges
extension_uri=/jakarta/isapi_redirect.dll

# Full path to the log file for the ISAPI Redirector
log_file=C:\TOMCAT\bin\isapi_redirect.log

# Log level (debug, info, warn, error or trace)
log_level=info

# Full path to the workers.properties file
worker_file=C:\TOMCAT\conf\workers.properties

# Full path to the uriworkermap.properties file
worker_mount_file=C:\TOMCAT\conf\uriworkermap.properties

=========================================
ให้ copy file นี้ไปที่ C:\TOMCAT\bin

6.download หรือ เขียน workers.properties
======================================

workers.tomcat_home=C:\TOMCAT\

# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=C:\Program Files\Java\jdk1.5.0_09\

# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=\

# The workers that your plugins should create and work with
#
worker.list=neosmart

#------ DEFAULT ajp13 WORKER DEFINITION ------------------
#--------------------------------------------------------------------
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.neosmart.port=8009
worker.neosmart.host=localhost
worker.neosmart.type=ajp13

======================================
แล้ว copy file นี้ไปที่ c:\tomcat\conf

7. dowload หรือ เขียน file uriworkermap.properties
====================================

/jsp-examples/*=neosmart

====================================
แล้ว copy file นี้ไปที่ c:\tomcat\conf

8. ที่ IIS MMC ให้กด right-click ที่ default website -> Properties -> ISAPI Filters ให้เพิ่ม filter isapi_redirect โดยให้ Browse ไปที่ C:\TOMCAT\bin\isapi_redirect.dll.

9. ที่ IIS MMC อีกที add virtual directory ไปให้ชื่อ jakarta
แล้วกำหนด home ไปที่ c:\tomcat\bin

10. ที่ IIS MMC อีกที ที่เมนู Web Service Extensions -> [Add a new Web service extension..] ให้เพิ่ม [extension name]= JSP
แล้วให้ executable file=C:\TOMCAT\bin\isapi_redirect.dll
แล้ว check [set this extension to allowed] แล้วกด OK.

11. ที่ C:\TOMCAT\bin\isapi_redirect.dll กด right-click properties
ที่ tab security ให้เพิ่ม user = iusr_COMPUTERNAME ให้สิทธิ read และ execute

12. restart iis service

เพียงแค่นี้ ก็จำสำเร็จได้
ทดสอบโดยเรียก //servername/jsp-examples

ในกรณีที่ยังไม่ได้ ให้ลองไปอ่านรายละเอียดที่ต้นฉบับ
โดยเฉพาะให้ส่วนของ comment ต่างๆที่ถามตอบกัน




 

Create Date : 27 เมษายน 2551
3 comments
Last Update : 27 เมษายน 2551 20:05:46 น.
Counter : 2351 Pageviews.

 

 

โดย: SassymOn 30 พฤศจิกายน 2554 0:53:41 น.  

 

เดี๋ยวไปลองครับ

สอบถามครับ คือผมทำระบบที่ต้อง login ที่นี้ใช้ session ช่วย ก็ทำงานได้ เมื่อ logout เมื่อเข้าลิงค์ตรงๆ ก็ไม่สามารถเข้าหน้านั้นได้ แต่ติดปัญหาตรงที่ เมื่อมีการ กด ปุ่ม back บน browser มันจะมีหน้าที่เข้าไปตอน login ค้างเก่าอยู่ปรากฏว่าาทำงานได้เหมือนไม่ได้ logout ออกมา

มีวิธีแนะนำ หรือ ตัวอย่างโค้ดมั้ยครับ

ใช้ JSP กับ Servlet ครับ

 

โดย: www.tripzaa.com (Photo by ObEy ) 26 ธันวาคม 2555 9:36:33 น.  

 

เดี๋ยวไปลองครับ

สอบถามครับ คือผมทำระบบที่ต้อง login ที่นี้ใช้ session ช่วย ก็ทำงานได้ เมื่อ logout เมื่อเข้าลิงค์ตรงๆ ก็ไม่สามารถเข้าหน้านั้นได้ แต่ติดปัญหาตรงที่ เมื่อมีการ กด ปุ่ม back บน browser มันจะมีหน้าที่เข้าไปตอน login ค้างเก่าอยู่ปรากฏว่าาทำงานได้เหมือนไม่ได้ logout ออกมา

มีวิธีแนะนำ หรือ ตัวอย่างโค้ดมั้ยครับ

ใช้ JSP กับ Servlet ครับ

 

โดย: www.tripzaa.com (Photo by ObEy ) 26 ธันวาคม 2555 9:37:16 น.  

ชื่อ : * blog นี้ comment ได้เฉพาะสมาชิก
Comment :
  *ส่วน comment ไม่สามารถใช้ javascript และ style sheet
 

 Pantip.com | PantipMarket.com | Pantown.com | © 2004 BlogGang.com allrights reserved.