You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Miren Urkixo <mi...@tinieblas.com> on 2007/09/08 21:11:25 UTC
the tomcat welcome file one struts action
Hello
I am trying to make one web aplication using struts into one tomcat 5.0.XX
In my web.xml file i writte whic is my welcome file, one struts action
(Index.do) but the tomcat doesn't not show the action, shows me the all
files from the index directory, listing my / directory.
Can you help me for making the index file , welcome file, been one struts
action (Index.do)?
Thanks
My web.xml file is this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>VeniveNicaragua</display-name>
<context-param>
<param-name>
javax.servlet.jsp.jstl.fmt.localizationContext
</param-name>
<param-value>
/WEB-INF/classes/com/ApplicationResources
</param-value>
</context-param>
<filter>
<display-name>Filtro</display-name>
<filter-name>Filtro</filter-name>
<filter-class>
com.gestor.Filtro
</filter-class>
</filter>
<filter-mapping>
<filter-name>Filtro</filter-name>
<url-pattern>/</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Filtro</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Filtro</filter-name>
<url-pattern>/Index.do</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>InitServlet</servlet-name>
<servlet-class>
com.gestor.servlets.InitServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>Index.do</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>
/WEB-INF/struts-nested.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/c-rt.tld</taglib-uri>
<taglib-location>/WEB-INF/c-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/c.tld</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: the tomcat welcome file one struts action
Posted by "Lilianne E. Blaze" <li...@tlen.pl>.
Try creating an empty file named "Index.do" in "/".
Greetings, Lilianne E. Blaze
Miren Urkixo wrote:
> Hello
> I am trying to make one web aplication using struts into one tomcat
> 5.0.XX
> In my web.xml file i writte whic is my welcome file, one struts action
> (Index.do) but the tomcat doesn't not show the action, shows me the
> all files from the index directory, listing my / directory.
> Can you help me for making the index file , welcome file, been one
> struts action (Index.do)?
>
> Thanks
> My web.xml file is this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> <display-name>VeniveNicaragua</display-name>
> <context-param>
> <param-name>
> javax.servlet.jsp.jstl.fmt.localizationContext
> </param-name>
> <param-value>
> /WEB-INF/classes/com/ApplicationResources
> </param-value>
> </context-param>
>
> <filter>
> <display-name>Filtro</display-name>
> <filter-name>Filtro</filter-name>
> <filter-class>
> com.gestor.Filtro
> </filter-class>
> </filter>
> <filter-mapping>
> <filter-name>Filtro</filter-name>
> <url-pattern>/</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>Filtro</filter-name>
> <url-pattern>*.jsp</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>Filtro</filter-name>
> <url-pattern>/Index.do</url-pattern>
> </filter-mapping>
>
> <servlet>
> <servlet-name>InitServlet</servlet-name>
> <servlet-class>
> com.gestor.servlets.InitServlet
> </servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet>
> <servlet-name>action</servlet-name>
> <servlet-class>
> org.apache.struts.action.ActionServlet
> </servlet-class>
> <init-param>
> <param-name>config</param-name>
> <param-value>/WEB-INF/struts-config.xml</param-value>
> </init-param>
> <init-param>
> <param-name>debug</param-name>
> <param-value>3</param-value>
> </init-param>
> <init-param>
> <param-name>detail</param-name>
> <param-value>3</param-value>
> </init-param>
> <load-on-startup>0</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>*.do</url-pattern>
> </servlet-mapping>
> <welcome-file-list>
> <welcome-file>Index.do</welcome-file>
> </welcome-file-list>
> <jsp-config>
> <taglib>
> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
> <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
> <taglib-location>
> /WEB-INF/struts-nested.tld
> </taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
> <taglib-location>/WEB-INF/fmt.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/c-rt.tld</taglib-uri>
> <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/c.tld</taglib-uri>
> <taglib-location>/WEB-INF/c.tld</taglib-location>
> </taglib>
> </jsp-config>
> </web-app>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: the tomcat welcome file one struts action
Posted by Yannick Haudry <yh...@gmail.com>.
Create a simple index.jsp and declare it as your welcome file in web.xml:
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
In this jsp, make use of a logic redirect to actually redirect to your
action through a global ActionForward:
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<logic:redirect forward="welcome" />
Then update your struts-config.xml accordingly :
<global-forwards>
<forward name="welcome" path="/Index.do"/>
</global-forwards>
<action-mappings >
<action path="/Index"
scope="session"
type="com.domain.struts.index.action.IndexAction">
<forward name="success" path="/WEB-INF/JSP/index/index.jsp" />
<forward name="error" path="/WEB-INF/JSP/error/errorGeneral.jsp" />
</action>
</action-mappings>
Hope it helps
Yannick
On 9/9/07, Hassan Schroeder <ha...@gmail.com> wrote:
> On 9/9/07, Miren Urkixo <mi...@tinieblas.com> wrote:
>
> > And into the web.xml i have:
> >
> > <welcome-file-list>
> > <welcome-file>/Index.do</welcome-file>
> > </welcome-file-list>
>
> I believe that should be "index.do" rather than "/index.do".
>
> (And presumably not starting with an upper-case "I"...)
>
> FWIW,
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: the tomcat welcome file one struts action
Posted by Hassan Schroeder <ha...@gmail.com>.
On 9/9/07, Miren Urkixo <mi...@tinieblas.com> wrote:
> And into the web.xml i have:
>
> <welcome-file-list>
> <welcome-file>/Index.do</welcome-file>
> </welcome-file-list>
I believe that should be "index.do" rather than "/index.do".
(And presumably not starting with an upper-case "I"...)
FWIW,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: the tomcat welcome file one struts action
Posted by Miren Urkixo <mi...@tinieblas.com>.
hello
thanks for your answer.
When i call: http://localhost:8080/Index.do the aplic show me the page well,
the tomcat shows me the index page but if i call http://localhost:8080/ it
not shows me the page.
In my struts.config i have:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources />
<form-beans />
<global-exceptions />
<global-forwards />
<action-mappings >
<action path="/Index"
scope="session"
type="com.domain.struts.index.action.IndexAction">
<forward name="success" path="/WEB-INF/JSP/index/index.jsp" />
<forward name="error" path="/WEB-INF/JSP/error/errorGeneral.jsp" />
</action>
</action-mappings>
<message-resources parameter="com.domain.resources.ApplicationResources"
/>
</struts-config>
And into the web.xml i have:
<welcome-file-list>
<welcome-file>/Index.do</welcome-file>
</welcome-file-list>
but if i call the / (http://localhost:8080/ i doesnt show me the index page,
it list the / directory.
Can you help me?
thanks
----- Original Message -----
From: "Gabriel Wong" <ga...@webappcabaret.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Sunday, September 09, 2007 1:14 AM
Subject: Re: the tomcat welcome file one struts action
> You may want to check on the Struts list. It could be a CASE SENSITIVITY
> issue.
> Does your app come up when you include Index.do in the URL?
>
> Miren Urkixo wrote:
>> Hello
>> I am trying to make one web aplication using struts into one tomcat
>> 5.0.XX
>> In my web.xml file i writte whic is my welcome file, one struts action
>> (Index.do) but the tomcat doesn't not show the action, shows me the all
>> files from the index directory, listing my / directory.
>> Can you help me for making the index file , welcome file, been one struts
>> action (Index.do)?
>>
>> Thanks
>> My web.xml file is this:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>> <display-name>VeniveNicaragua</display-name>
>> <context-param>
>> <param-name>
>> javax.servlet.jsp.jstl.fmt.localizationContext
>> </param-name>
>> <param-value>
>> /WEB-INF/classes/com/ApplicationResources
>> </param-value>
>> </context-param>
>>
>> <filter>
>> <display-name>Filtro</display-name>
>> <filter-name>Filtro</filter-name>
>> <filter-class>
>> com.gestor.Filtro
>> </filter-class>
>> </filter>
>> <filter-mapping>
>> <filter-name>Filtro</filter-name>
>> <url-pattern>/</url-pattern>
>> </filter-mapping>
>> <filter-mapping>
>> <filter-name>Filtro</filter-name>
>> <url-pattern>*.jsp</url-pattern>
>> </filter-mapping>
>> <filter-mapping>
>> <filter-name>Filtro</filter-name>
>> <url-pattern>/Index.do</url-pattern>
>> </filter-mapping>
>>
>> <servlet>
>> <servlet-name>InitServlet</servlet-name>
>> <servlet-class>
>> com.gestor.servlets.InitServlet
>> </servlet-class>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
>> <servlet>
>> <servlet-name>action</servlet-name>
>> <servlet-class>
>> org.apache.struts.action.ActionServlet
>> </servlet-class>
>> <init-param>
>> <param-name>config</param-name>
>> <param-value>/WEB-INF/struts-config.xml</param-value>
>> </init-param>
>> <init-param>
>> <param-name>debug</param-name>
>> <param-value>3</param-value>
>> </init-param>
>> <init-param>
>> <param-name>detail</param-name>
>> <param-value>3</param-value>
>> </init-param>
>> <load-on-startup>0</load-on-startup>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>action</servlet-name>
>> <url-pattern>*.do</url-pattern>
>> </servlet-mapping>
>> <welcome-file-list>
>> <welcome-file>Index.do</welcome-file>
>> </welcome-file-list>
>> <jsp-config>
>> <taglib>
>> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
>> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>> </taglib>
>> <taglib>
>> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
>> <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
>> </taglib>
>> <taglib>
>> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
>> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
>> </taglib>
>> <taglib>
>> <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
>> <taglib-location>
>> /WEB-INF/struts-nested.tld
>> </taglib-location>
>> </taglib>
>> <taglib>
>> <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
>> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
>> </taglib>
>> <taglib>
>> <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
>> <taglib-location>/WEB-INF/fmt.tld</taglib-location>
>> </taglib>
>> <taglib>
>> <taglib-uri>/WEB-INF/c-rt.tld</taglib-uri>
>> <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
>> </taglib>
>> <taglib>
>> <taglib-uri>/WEB-INF/c.tld</taglib-uri>
>> <taglib-location>/WEB-INF/c.tld</taglib-location>
>> </taglib>
>> </jsp-config>
>> </web-app>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
>
> --
> Regards
>
>
>
> Gabriel Wong
>
> Beyond Private JVM JAVA Hosting
>
> http://www.webappcabaret.com
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: the tomcat welcome file one struts action
Posted by Gabriel Wong <ga...@webappcabaret.com>.
You may want to check on the Struts list. It could be a CASE SENSITIVITY
issue.
Does your app come up when you include Index.do in the URL?
Miren Urkixo wrote:
> Hello
> I am trying to make one web aplication using struts into one tomcat
> 5.0.XX
> In my web.xml file i writte whic is my welcome file, one struts action
> (Index.do) but the tomcat doesn't not show the action, shows me the
> all files from the index directory, listing my / directory.
> Can you help me for making the index file , welcome file, been one
> struts action (Index.do)?
>
> Thanks
> My web.xml file is this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> <display-name>VeniveNicaragua</display-name>
> <context-param>
> <param-name>
> javax.servlet.jsp.jstl.fmt.localizationContext
> </param-name>
> <param-value>
> /WEB-INF/classes/com/ApplicationResources
> </param-value>
> </context-param>
>
> <filter>
> <display-name>Filtro</display-name>
> <filter-name>Filtro</filter-name>
> <filter-class>
> com.gestor.Filtro
> </filter-class>
> </filter>
> <filter-mapping>
> <filter-name>Filtro</filter-name>
> <url-pattern>/</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>Filtro</filter-name>
> <url-pattern>*.jsp</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>Filtro</filter-name>
> <url-pattern>/Index.do</url-pattern>
> </filter-mapping>
>
> <servlet>
> <servlet-name>InitServlet</servlet-name>
> <servlet-class>
> com.gestor.servlets.InitServlet
> </servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet>
> <servlet-name>action</servlet-name>
> <servlet-class>
> org.apache.struts.action.ActionServlet
> </servlet-class>
> <init-param>
> <param-name>config</param-name>
> <param-value>/WEB-INF/struts-config.xml</param-value>
> </init-param>
> <init-param>
> <param-name>debug</param-name>
> <param-value>3</param-value>
> </init-param>
> <init-param>
> <param-name>detail</param-name>
> <param-value>3</param-value>
> </init-param>
> <load-on-startup>0</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>*.do</url-pattern>
> </servlet-mapping>
> <welcome-file-list>
> <welcome-file>Index.do</welcome-file>
> </welcome-file-list>
> <jsp-config>
> <taglib>
> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
> <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
> <taglib-location>
> /WEB-INF/struts-nested.tld
> </taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
> <taglib-location>/WEB-INF/fmt.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/c-rt.tld</taglib-uri>
> <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
> </taglib>
> <taglib>
> <taglib-uri>/WEB-INF/c.tld</taglib-uri>
> <taglib-location>/WEB-INF/c.tld</taglib-location>
> </taglib>
> </jsp-config>
> </web-app>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
Regards
Gabriel Wong
Beyond Private JVM JAVA Hosting
http://www.webappcabaret.com
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org