tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Siggelkow" <bills...@bellsouth.net>
Subject RE: page redirect problem in jstl or jsp?
Date Thu, 19 Aug 2004 01:39:09 GMT
Your problem is the mapping -- if you want any path ending in ".do" to be a
Struts Action you need to define the servlet mapping as:
<servlet-mapping> 
	<servlet-name>action</servlet-name> 
 	<url-pattern>*.do</url-pattern>
</servlet-mapping>

Trust me, there's nothing wrong with Struts when it comes to your problem.

Bill Siggelkow
billsigg@bellsouth.net
 
 

> -----Original Message-----
> From: Gao Di [mailto:jaoyina@yahoo.com.cn] 
> Sent: Wednesday, August 18, 2004 9:25 PM
> To: Tag Libraries Users List
> Subject: Re: page redirect problem in jstl or jsp?
> 
> maybe there is something wrong in my config files?
> 
> struts-config.xml
> <action-mappings>
> 	<action path="/SearchAction" 
> 			type="com.adt.action.log.SearchAction"
> 			name="SearchForm"  
> 			input="/index.jsp" 
> 			scope="request" >
> 	<forward name="success" path="/vnp_list.jsp" />
> 	</action>
> </action-mappings>
> 
> web.xml
> <servlet-mapping> 
> 	<servlet-name>action</servlet-name> 
> 	<url-pattern>/do/*</url-pattern>
> </servlet-mapping>
> 
> but in another jsp,i use form's action,it's ok.
> <html:form styleId="form1" action="SearchAction.do">
> 
>  --- Bill Siggelkow <billsigg@bellsouth.net> 的正文:
> > Works for me, Gao. I have the following JSP which redirects to an 
> > Action  without a hitch.
> > 
> > <%@ page contentType="text/html;charset=UTF-8"
> > language="java" %>
> > <%@ taglib uri="http://java.sun.com/jstl/core"
> > prefix="c" %>
> > 
> > <html>
> > <head>
> >   <title>Test</title>
> > </head>
> > <body bgcolor="white">
> >     <c:redirect url="/ViewStep1.do"/>
> > </body>
> > </html>
> > 
> > 
> > Gao Di wrote:
> > 
> > > it's ok ah,if i typed page directly,u can write
> > some
> > > sample and try it .
> > > 
> > >  --- Bill Siggelkow <billsigg@bellsouth.net>
> > 的正文:
> > > 
> > >>What happens if you go to directly to the page
> > from
> > >>your browser? Do u
> > >>also get a 404? If so, then the problem is with
> > the
> > >>action mapping and
> > >>not the redirect. Perhaps a typo in your struts-config.xml.
> > >>
> > >>
> > >>Gao Di wrote:
> > >>
> > >>>i use struts framework in my project,and use the
> > >>
> > >>jstl
> > >>
> > >>>in the jsp page.now i want to write a page which
> > >>
> > >>will
> > >>
> > >>>auto forward to a struts action class,but
> > whatever
> > >>
> > >>i
> > >>
> > >>>use jstl or jsp ,it can't find the url either.
> > >>>in jstl i use:<c:redirect url="SearchAction.do"/> and in 
> jsp i use:
> > >>><jsp:forward page="SearchAction.do"/> if i change the url to 
> > >>>"xxx.jsp" or a simple
> > hello
> > >>>world servlet,it's ok.but if i use struts action,evertime i got 
> > >>>page 404,url not found.
> > >>>cause i think the struts action is also a servlet
> > >>
> > >>in
> > >>
> > >>>essential,maybe there is a way to solve this
> > >>
> > >>problem.
> > >>
> > >>>
> > >
> >
> _________________________________________________________
> > > 
> > >>>Do You Yahoo!?
> > >>>150万曲MP3疯狂搜,带您闯入音乐殿堂
> > >>>http://music.yisou.com/
> > >>>美女明星应有尽有,搜遍美图、艳图和酷图
> > >>>http://image.yisou.com
> > >>>1G就是1000兆,雅虎电邮自助扩容!
> > >>>
> > >>
> > >
> >
> http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.co
> m/event/mail_1g/
> > > 
> > >>
> > >>
> > >
> >
> ---------------------------------------------------------------------
> > > 
> > >>To unsubscribe, e-mail:
> > >>taglibs-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail:
> > >>taglibs-user-help@jakarta.apache.org
> > >>
> > >> 
> > > 
> > > 
> > >
> >
> _________________________________________________________
> > > Do You Yahoo!?
> > > 150万曲MP3疯狂搜,带您闯入音乐殿堂
> > > http://music.yisou.com/
> > > 美女明星应有尽有,搜遍美图、艳图和酷图
> > > http://image.yisou.com
> > > 1G就是1000兆,雅虎电邮自助扩容!
> > >
> >
> http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.co
> m/event/mail_1g/
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > taglibs-user-help@jakarta.apache.org
> > 
> >  
> 
> _________________________________________________________
> Do You Yahoo!?
> 150万曲MP3疯狂搜,带您闯入音乐殿堂
> http://music.yisou.com/
> 美女明星应有尽有,搜遍美图、艳图和酷图
> http://image.yisou.com
> 1G就是1000兆,雅虎电邮自助扩容!
> http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.co
> m/event/mail_1g/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message