明明有页面,为什么找不到?

askr 2004-10-06 11:12:19
我用struts,无论运行哪个页面,都 说找不到,怪了,在tomcat的server.xml时加入了:
<Context path="/tour" docBase="tour" debug="0"
reloadble="true">
<Realm className="org.apache.catalina.realm.JDBCRealm"
debug="99" driverName="org.git.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost:3306/tourism_db?user=root"
userTable="attraction" userNameCol="user_id"
userCredCol="password" userRoleTable="user_role"
roleNameCol="role_name"/>
</Context>
不知跟此有无 关系
...全文
110 点赞 收藏 14
写回复
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
askr 2004-10-10
up
回复
wafeng 2004-10-09
帮你顶
回复
askr 2004-10-08
这些工程都使用了struts
回复
askr 2004-10-08
up
回复
zhengbin2004 2004-10-07
看看你的页面是否让我破了~!
如果没有。你做做系统、侧试
郑兵
53848347
回复
tie_jiang 2004-10-07
不知道你的tomcat是什么版本的。我用5.0.28。不用添加这些。要在
..Tomcat5\conf\Catalina\localhost\ 下改变
<!--

Context configuration file for the Tomcat Balancer Web App
This is only needed to keep the distribution small and avoid duplicating
commons libraries

$Id: balancer.xml,v 1.1 2003/11/20 21:43:32 remm Exp $

-->


<Context path="/balancer" docBase="balancer" debug="0" privileged="true">

</Context>


“balancer.xml“内容中修改虚拟目录。但启动的时候会显示异常。不影响运行工作。我测试jsp时正常。
回复
狐帝 2004-10-07
docBase属性值最好写明全路径
回复
AbeiXu 2004-10-07
你的struts-config.xml的配置文件看一下,有没有写错。
或者把他贴出来,这样也许能更好的解决问题。
回复
askr 2004-10-07
楼上的在说什么呢
回复
askr 2004-10-07
up
回复
rollrock 2004-10-07
up
回复
askr 2004-10-07
更正,我说的是jbuilder9自带的4.0.16,奇怪,原来运行的好好,今天运行哪个都找不到,也调试不了,痛苦啊
回复
askr 2004-10-07
tomcat5.0.19`
回复
askr 2004-10-07
struts-config.xml:
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>

<form-beans>
<form-bean name="attractionForm"
type="com.wrox.tourism.entity.Attraction"/>
<form-bean name="eventForm" type="com.wrox.tourism.entity.Event"/>
</form-beans>

<action-mappings>

<action path="/home"
type="com.wrox.tourism.actions.HomeAction"
unknown="true">
<forward name="success" path="/home.jsp"/>
</action>

<action path="/viewAttraction"
type="com.wrox.tourism.actions.ViewAttractionAction"
input="/home.do">
<forward name="success" path="/viewAttraction.jsp"/>
</action>

<action path="/registerAttraction"
type="com.wrox.tourism.actions.RegisterAttractionAction"
input="/registerAttraction.jsp"
name="attractionForm"
scope="request">
<forward name="success" path="/confirmRegistration.jsp"/>
</action>

<action path="/editAttraction"
type="com.wrox.tourism.actions.EditAttractionAction"
input="/home.do">
<forward name="success" path="/editAttraction.jsp"/>
</action>

<action path="/updateAttraction"
type="com.wrox.tourism.actions.UpdateAttractionAction"
input="/editAttraction.jsp"
name="attractionForm"
scope="request">
<forward name="success" path="/confirmUpdate.jsp"/>
</action>

<action path="/listEvents"
type="com.wrox.tourism.actions.ListEventsAction"
input="/editAttraction.do">
<forward name="success" path="/listEvents.jsp"/>
</action>

<action path="/editEvent"
type="com.wrox.tourism.actions.EditEventAction"
input="/listEvents.do">
<forward name="success" path="/editEvent.jsp"/>
</action>

<action path="/updateEvent"
type="com.wrox.tourism.actions.UpdateEventAction"
input="/editEvent.jsp"
name="eventForm"
scope="request">
<forward name="success" path="/listEvents.do"/>
</action>

<action path="/deleteEvent"
type="com.wrox.tourism.actions.DeleteEventAction"
input="/listEvents.do">
<forward name="success" path="/listEvents.do"/>
</action>

<action path="/deregisterAttraction"
type="com.wrox.tourism.actions.DeregisterAttractionAction"
input="/editAttraction.do">
<forward name="success" path="/home.do" redirect="true"/>
</action>

<action path="/logoff"
type="com.wrox.tourism.actions.LogoffAction"
input="/editAttraction.do">
<forward name="success" path="/home.do" redirect="true"/>
</action>

</action-mappings>

</struts-config>
to kingfox:
你是说物理路径吗?windows的\还用写两个吗
to tie_jiang:
你的意思是在那个目录下建个“工程名.xml”吧
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告