In Struts action path problem

Category: Java EE
 
pib2001
2009-03-31 07:26:49

Sponsored Links
In the struts action path is typically /
but if I mapping a JSP page to another directory, such as / admin / index.jsp, then the page image link all messed up, people know how else do? If you solve ah?

are we going to change the path of the action / admin / gotoindex.do?

if coupled redirect = "true" then my request with parameters can not be passed correctly!

help you pass your brother!!!

Sponsored Links

itcastshenxiaoyu1116
2009-03-31 07:37:10
jsp wording concerning action to:
<html:form action="/admin/adduser" method="POST">

<action
attribute = "addUserForm"
input = "/ admin / addUser.jsp "
name =" addUserForm "
path =" / userManage / listUserInf " ;
scope = "request"
type = "com.stormswan.ordliv.struts . action.userManage.ListUserInfAction "/>
<forward name="succeed" path="/admin/succeed.jsp" />
<forward name="fail" path="/admin/fail.jsp" />
</action>
wishlucky
2009-03-31 07:54:08
Semi you DO that index directly to your configuration folder on the line, or write directly to the absolute path
kangxsir
2009-03-31 08:09:34
in the jsp page "head" Lane with <html: base /> This tag on the line
unbeaten ah.
pviisvip
2009-03-31 08:17:11
struct-config.xml file to change up your new path (forward) just fine ...., should not affect the other because they were mapping .... ever ... .
piao_000
2009-03-31 08:30:10
If you are action words, direct. / actionName.do, which is a. /

If you link a jsp page
you afraid to engage wrong you can write like this.
<% = request.getContextPath ()%> / folderName / jspName.jsp
zhang1598245
2009-03-31 08:34:19
/ action.do preceded by "/ Project Name"
fiberhomebefore
2009-03-31 08:37:49
with stuts img tag.

Page path will indeed go to the root directory, or use struts tag automatically mapped to the root path of the picture, or change the picture folder path.
best not to use absolute paths.
lhb0429
2009-03-31 08:55:57
in your img src tag inside the path prepend <html:rewrite page=""/> ok, no worries!
qq549623117
2009-03-31 09:14:39
useless, from / forward to another directory, a subdirectory, such as / admin / images / link is not all.
luojie57851796
2009-03-31 09:49:45
absolute path would have a good
yu12345675
2009-03-31 10:29:03
absolute path? What does this mean?
below how I change this?
<action path="/gotoUser" type="com.fuqi.struts.action.GotoUserAction">
; <forward
name = "main"
path = "/ useradm / usermain.jsp"
redirect = "true" />
<forward name="addlog" path="/useradm/addlog.jsp"/>
</action>
spliulin
2009-03-31 10:52:52
point of correction:
jsp wording concerning action to:
<html: form action = "/ admin / adduser" ; method = "POST">
struts-config.xml the wording
<action
attribute = "addUserForm" ;
input = "/ admin / addUser.jsp"
name = "addUserForm"
path = "/ admin / adduser"
scope = "request"
type = "com.abc.admin.Adduser" />
<forward name = "succeed" path = "/ admin / succeed.jsp" />
<forward name = "fail" path = "/ admin / fail . jsp "/>
</action>
where input and output pages to match the actual location
lanbeibei1126
2009-03-31 11:24:42
you are not cross-module jump page ah? ?
If I just use SwitchAction
<action-mappings>
<action
path = "/ toModule"
type = "org.apache.struts.actions.SwitchAction" />

Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.