配置自已的JSP文件夹步骤精.docx
- 文档编号:12059519
- 上传时间:2023-04-16
- 格式:DOCX
- 页数:16
- 大小:20.48KB
配置自已的JSP文件夹步骤精.docx
《配置自已的JSP文件夹步骤精.docx》由会员分享,可在线阅读,更多相关《配置自已的JSP文件夹步骤精.docx(16页珍藏版)》请在冰豆网上搜索。
配置自已的JSP文件夹步骤精
配置自已的JSP文件夹步骤:
(1)在某磁盘如C:
上建立一个文件夹;
(2)修改Tomcat\conf下的主配置文件server.xml,用查找功能找到
(3)在和之间插入以下文字:
/abc"debug="0"reloadable="true"> 插后为: ... /abc"debug="0"reloadable="true"> /sun"debug="0"reloadable="true"> ... (4)存盘后必须重新启动Tomcat引擎。 这样,就可以将JSP页面存放到C: \abc内,用户可以通过虚拟目录abc访问JSP页面, 或者将JSP页面存放到D: /sun内,用户可以通过虚拟目录xyz321访问JSP页面, 比如,在浏览器地址栏中键入http: //localhost: 8888/abc/aaa.jsp 或者浏览器地址栏中键入http: //localhost: 8888/xyz321/bbb.jsp 当客户经过上面的Web服务目录的JSP页面后,服务器的 Tomcat\jakart4.1\work\Standalone\localhost\会出现abc子目录或xyz321子目录, 子目录中存放了JSP页面对应的java文件和java文件的字节码文件。 Server.xml --ExampleServerConfigurationFile--> --Notethatcomponentelementsarenestedcorrespondingtotheir parent-childrelationshipswitheachother--> --A"Server"isasingletonelementthatrepresentstheentireJVM, whichmaycontainoneormore"Service"instances.TheServer listensforashutdowncommandontheindicatedport. Note: A"Server"isnotitselfa"Container",soyoumaynot definesubcomponentssuchas"Valves"or"Loggers"atthislevel. --> --UncommenttheseentriestoenableJMXMBeanssupport--> debug="0"/> debug="0"/> --GlobalJNDIresources--> --Testentryfordemonstrationpurposes--> --Editableuserdatabasethatcanalsobeusedby UserDatabaseRealmtoauthenticateusers--> type="org.apache.catalina.UserDatabase" description="Userdatabasethatcanbeupdatedandsaved"> --A"Service"isacollectionofoneormore"Connectors"thatshare asingle"Container"(andthereforethewebapplicationsvisible withinthatContainer).Normally,thatContainerisan"Engine", butthisisnotrequired. Note: A"Service"isnotitselfa"Container",soyoumaynot definesubcomponentssuchas"Valves"or"Loggers"atthislevel. --> --DefinetheTomcatStand-AloneService--> --A"Connector"representsanendpointbywhichrequestsarereceived andresponsesarereturned.EachConnectorpassesrequestsontothe associated"Container"(normallyanEngine)forprocessing. Bydefault,anon-SSLHTTP/1.1Connectorisestablishedonport8080. YoucanalsoenableanSSLHTTP/1.1Connectoronport8443by followingtheinstructionsbelowanduncommentingthesecondConnector entry.SSLsupportrequiresthefollowingsteps(seetheSSLConfig HOWTOintheTomcat4.0documentationbundleformoredetailed instructions): *DownloadandinstallJSSE1.0.2orlater,andputtheJARfiles into"$JAVA_HOME/jre/lib/ext". *Execute: %JAVA_HOME%\bin\keytool-genkey-aliastomcat-keyalgRSA(Windows) $JAVA_HOME/bin/keytool-genkey-aliastomcat-keyalgRSA(Unix) withapasswordvalueof"changeit"forboththecertificateand thekeystoreitself. Bydefault,DNSlookupsareenabledwhenawebapplicationcalls request.getRemoteHost().Thiscanhaveanadverseimpacton performance,soyoucandisableitbysettingthe "enableLookups"attributeto"false".WhenDNSlookupsaredisabled, request.getRemoteHost()willreturntheStringversionofthe IPaddressoftheremoteclient. --> --Defineanon-SSLCoyoteHTTP/1.1Connectoronport8081--> port="8080"minProcessors="5"maxProcessors="75" enableLookups="true"redirectPort="8443" acceptCount="100"debug="0"connectionTimeout="20000" useURIValidationHack="false"disableUploadTimeout="true"/> --Note: Todisableconnectiontimeouts,setconnectionTimeoutvalue to0--> --DefineaSSLCoyoteHTTP/1.1Connectoronport8443--> -- port="8443"minProcessors="5"maxProcessors="75" enableLookups="true" acceptCount="100"debug="0"scheme="https"secure="true" useURIValidationHack="false"disableUploadTimeout="true"> clientAuth="false"protocol="TLS"/> --> --DefineaCoyote/JK2AJP1.3Connectoronport8009--> port="8009"minProcessors="5"maxProcessors="75" enableLookups="true"redirectPort="8443" acceptCount="10"debug="0"connectionTimeout="20000" useURIValidationHack="false" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/> --DefineanAJP1.3Connectoronport8009--> -- port="8009"minProcessors="5"maxProcessors="75" acceptCount="10"debug="0"/> --> --DefineaProxiedHTTP/1.1Connectoronport8082--> --Seeproxydocumentationformoreinformationaboutusingthis.--> -- port="8082"minProcessors="5"maxProcessors="75" enableLookups="true"disableUploadTimeout="true" acceptCount="100"debug="0"connectionTimeout="20000" proxyPort="80"useURIValidationHack="false"/> --> --Defineanon-SSLlegacyHTTP/1.1TestConnectoronport8083--> -- port="8083"minProcessors="5"maxProcessors="75" enableLookups="true"redirectPort="8443" acceptCount="10"debug="0"/> --> --Defineanon-SSLHTTP/1.0TestConnectoronport8084--> -- port="8084"minProcessors="5"maxProcessors="75" enableLookups="true"redirectPort="8443" acceptCount="10"debug="0"/> --> --AnEnginerepresentstheentrypoint(withinCatalina)thatprocesses everyrequest.TheEngineimplementationforTomcatstandalone analyzestheHTTPheadersincludedwiththerequest,andpassesthem ontotheappropriateHost(virtualhost).--> --Definethetoplevelcontainerinourcontainerhierarchy--> --Therequestdumpervalvedumpsusefuldebugginginformationabout therequestheadersandcookiesthatwerereceived,andtheresponse headersandcookiesthatweresent,forallrequestsreceivedby thisinstanceofTomcat.Ifyoucareonlyaboutrequeststoa particularvirtualhost,oraparticularapplication,nestthis elementinsidethecorresponding ForasimilarmechanismthatisportabletoallServlet2.3 containers,checkoutthe"RequestDumperFilter"Filterinthe exampleapplication(thesourceforthisfiltermaybefoundin "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters"). Requestdumpingisdisabledbydefault.Uncommentthefollowing elementtoenableit.--> -- --> --Globalloggerunlessoverriddenatlowerlevels--> prefix="catalina_log."suffix=".txt" timestamp="true"/> --BecausethisRealmishere,aninstancewillbesharedglobally--> --ThisRealmusestheUserDatabaseconfiguredintheglobalJNDI resourcesunderthekey"UserDatabase".Anyedits thatareperformedagainstthisUserDatabaseareimmediately availableforusebytheRealm.--> debug="0"resourceName="UserDatabase"/> --Commentouttheoldrealmbutleaveherefornowincasewe needtogobackquickly--> -- --> --ReplacetheaboveRealmwithoneofthefollowingtogetaRealm storedinadatabaseandaccessedviaJDBC--> -- driverName="org.gjt.mm.mysql.Driver" connectionURL="jdbc: mysql: //localhost/authority" connectionName="test"connectionPassword="test" userTable="users"userNameCol="user_name"userCredCol="user_pass" userRoleTable="user_roles"roleNameCol="role_name"/> --> -- driverName="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc: oracle: thin: @ntserver: 1521: ORCL" connectionName="scott"connectionPassword="tiger" userTable="users"userNameCol="user_name"userCredCol="user_pass" userRoleTable="user_roles"roleNameCol="role_name"/> --> -- driverName="sun.jdbc.odbc.JdbcOdbcDriver" connectionURL="jdbc: odbc: CATALINA" userTable="users"userNameCol="user_name"userCredCol="user_pass" userRoleTable="user_roles"roleNameCol="role_name"/> --> --Definethedefaultvirtualhost--> unpackWARs="true"autoDeploy="true"> --Normally,usersmustauthenticatethemselvestoeachwebapp individually.Uncommentthefollowingentryifyouwouldlike ausertobeauthenticatedthefirsttimetheyencountera resourceprotectedbyasecurityconstraint,
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 配置 自已 JSP 文件夹 步骤
![提示](https://static.bdocx.com/images/bang_tan.gif)