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

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>
不知跟此有无 关系
...全文
145 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
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”吧

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧