免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2089 | 回复: 9
打印 上一主题 下一主题

啊,要疯掉了,为什么总也配不好tomcat呢~~ [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-10-17 17:32 |只看该作者 |倒序浏览
郁闷中~~~

论坛徽章:
0
2 [报告]
发表于 2005-10-17 18:07 |只看该作者

啊,要疯掉了,为什么总也配不好tomcat呢~~

要配置吗?解压就行了

论坛徽章:
0
3 [报告]
发表于 2005-10-17 21:17 |只看该作者

啊,要疯掉了,为什么总也配不好tomcat呢~~

配哪部份,Realm、SSL、SSI、vHost、CGI还是什么?多看文档和规范。
爱拼才会赢 该用户已被删除
4 [报告]
发表于 2005-10-18 09:44 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
5 [报告]
发表于 2005-10-18 10:16 |只看该作者

啊,要疯掉了,为什么总也配不好tomcat呢~~

恩,是配置server.xml和web.xml,我不会配置用servlet的web应用,配的不能用,tomcat启动后显示错误~~

我看文档不晓得从哪里下手啊~~,文档写的也某找到例子,看的不拉解,看不动了
爱拼才会赢 该用户已被删除
6 [报告]
发表于 2005-10-18 10:28 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
7 [报告]
发表于 2005-10-18 11:16 |只看该作者

啊,要疯掉了,为什么总也配不好tomcat呢~~

<?xml version="1.0" encoding="ISO-8859-1"?>;
<!--
  Copyright 2004 The Apache Software Foundation

  Licensed under the Apache License, Version 2.0 (the "License";
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->;

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">;

  <display-name>;Welcome to Tomcat</display-name>;
  <description>;
     Welcome to Tomcat
  </description>;
    <servlet>;
        <servlet-name>;org.apache.jsp.index_jsp</servlet-name>;
        <servlet-class>;org.apache.jsp.index_jsp</servlet-class>;
    </servlet>;

    <servlet-mapping>;
        <servlet-name>;org.apache.jsp.index_jsp</servlet-name>;
        <url-pattern>;/index.jsp</url-pattern>;
    </servlet-mapping>;
        <servlet>;
            <servlet-name>;findservlet</servlet-name>;
                <servlet-class>;zite.FindServlet</servlet-class>;
            <init-param>;
                <param-name>;debug</param-name>;
                <param-value>;0</param-value>;
            </init-param>;
            <init-param>;
                <param-name>;JNDI</param-name>;
                <param-value>;java:comp/env/jdbc/zite</param-value>;
            </init-param>;
                <load-on-startup>;1</load-on-startup>;
        </servlet>;
       
        <serlvet>;
                <servlet-name>;DeleteServlet</servlet-name>;
                <servlet-class>;zite.DeleteServlet</servlet-class>;
        </servlet>;
       
    <resource-ref>;
            <description>;DB Connection</description>;
            <res-ref-name>;jdbc/zite</res-ref-name>;
            <res-type>;javax.sql.DataSource</res-type>;
           <res-auth>;Container</res-auth>;
    </resource-ref>;

</web-app>;

这个是web.xml文件,下面这个是server.xml文件



<Server port="8005" shutdown="SHUTDOWN" debug="0">;
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
            debug="0"/>;
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
            debug="0"/>;

<GlobalNamingResources>;

<Environment name="simpleValue" type="java.lang.Integer" value="30"/>;
<Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved">;
</Resource>;
<ResourceParams name="UserDatabase">;
      <parameter>;
        <name>;factory</name>;
        <value>;org.apache.catalina.users.MemoryUserDatabaseFactory</value>;
      </parameter>;
      <parameter>;
        <name>;pathname</name>;
        <value>;conf/tomcat-users.xml</value>;
      </parameter>;
    </ResourceParams>;
</GlobalNamingResources>;

  <Service name="Tomcat-Standalone">;

    <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
port="80"               minProcessors="25" maxProcessors="100"
               enableLookups="true" redirectPort="8443"
               acceptCount="100" debug="0" connectionTimeout="20000"
               useURIValidationHack="false"/>;
   
    <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
               port="8080" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="20000"
               useURIValidationHack="false"
               protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>;

    <Engine name="Standalone" defaultHost="localhost" debug="0">;

      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>;

     
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 debug="0" resourceName="UserDatabase"/>;

<Host name="localhost" debug="0" appBase="g:\"
       unpackWARs="true" autoDeploy="true" reloadable="true">;
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
                timestamp="true"/>;
          <Context path="company" docBase="company\" debug="0"/>;
       </Host>;
    </Engine>;

  </Service>;

</Server>;

论坛徽章:
0
8 [报告]
发表于 2005-10-18 11:17 |只看该作者

啊,要疯掉了,为什么总也配不好tomcat呢~~

长了点,但是有谁能指教下下吧~~

论坛徽章:
0
9 [报告]
发表于 2005-10-19 03:09 |只看该作者

啊,要疯掉了,为什么总也配不好tomcat呢~~

servlet基本上是不用配置的啊,只是对目录结构有些要求,你看看tomcat自己带的webapps目录下app就可以了。你可以直接创建一个新目录,下面要有WEB-INF/class 等等目录,然后把你的class文件放到这个目录下..., 从http访问的时候不要输入这些东西,而是直接根据你的class的package的结构输入即可。

论坛徽章:
0
10 [报告]
发表于 2005-10-19 08:13 |只看该作者

啊,要疯掉了,为什么总也配不好tomcat呢~~

谢谢啊~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP