You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Søren Blidorf <so...@nolas.dk> on 2007/06/27 15:06:55 UTC

Problems with my struts_config.xml?

Can anybody see if something is wrong with this struts-config.xml. I have just upgraded struts to 1.2.9.

And a simple .do call does not work. Nothing happends. I get a blank screen and no errors is reported i  the logs

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

<!-- ================================================ Form Bean Definitions -->

  <form-beans type="org.apache.struts.action.ActionFormBean">
<!-- Most of the form-beans has been removed -->
  <form-bean name="SearchForm" type="um.forms.sob.SearchForm" />
  </form-beans>


<!-- ========================================= Global Exception Definitions -->

  <global-exceptions>
        <!-- sample exception handler
        <exception
            key="expired.password"
            type="app.ExpiredPasswordException"
            path="/changePassword.jsp"/>
        end sample -->
  </global-exceptions>


<!-- =========================================== Global Forward Definitions -->

  <global-forwards type="org.apache.struts.action.ActionForward">
  <forward name="success" path="index.jsp" redirect="true" />
  <forward name="error" redirect="true" path="/error/index.jsp" />
  </global-forwards>


<!-- =========================================== Action Mapping Definitions -->

  <action-mappings type="org.apache.struts.action.ActionMapping">
  <!-- Admin START -->
  <action path="/admin/addFormBean" type="org.apache.struts.actions.AddFormBeanAction" />
  <action path="/admin/addForward" type="org.apache.struts.actions.AddForwardAction" />
  <action path="/admin/addMapping" type="org.apache.struts.actions.AddMappingAction" />
  <action path="/admin/reload" type="org.apache.struts.actions.ReloadAction" />
  <action path="/admin/removeFormBean" type="org.apache.struts.actions.RemoveFormBeanAction" />
  <action path="/admin/removeForward" type="org.apache.struts.actions.RemoveForwardAction" />
  <action path="/admin/removeMapping" type="org.apache.struts.actions.RemoveMappingAction" />
  <!-- Admin SLUT -->

  <!-- Most of the mappings has been removed -->
  <action parameter="" name="SearchForm" path="/sob/search" input="/sob/um.jsp" validate="true" type="um.actions.sob.SearchAction" scope="request"><forward name="success" redirect="false" path="/sob/search.jsp" /><forward name="error" redirect="false" path="/sob/searchError.jsp" /></action>


  </action-mappings>

  <controller processorClass="org.apache.struts.action.RequestProcessor" contentType="text/html"/>

  <message-resources parameter="resources.application"/>


</struts-config>

*******************************************

BR.

Soren, DK

Re: Problems with my struts_config.xml?

Posted by Niall Pemberton <ni...@gmail.com>.
On 6/28/07, Søren Blidorf <so...@nolas.dk> wrote:
> I upgraded from STRUTS 1.0 and I also upgraded to tomcat 6.0 from a 4.xx

So possibly something might have gone wrong when you upgraded Tomcat.
Without any error messages its hard to help though. I would start by
trying to get more logging output from both Tomcat when it starts up
and your webapp.

Going from Struts 1.0 to 1.2 is going to mean you're going to have
issues to resolve (some things were deprecated in 1.1 and removed in
1.2.x). We don't have notes for upgrading from 1.0 - but there are
reasonable notes for 1.1 --> 1.2 here:

http://wiki.apache.org/struts/StrutsUpgrade

One thing I noticed is your message resources - for 1.2 these should
be configured in the struts-config.xml rather than the web.xml

Niall

> Soren
> ----- Original Message -----
> From: "Niall Pemberton" <ni...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Thursday, June 28, 2007 3:31 AM
> Subject: Re: Problems with my struts_config.xml?
>
>
> On 6/27/07, Søren Blidorf <so...@nolas.dk> wrote:
> > Can anybody see if something is wrong with this struts-config.xml. I have
> just upgraded struts to 1.2.9.
> >
> > And a simple .do call does not work. Nothing happends. I get a blank
> screen and no errors is reported i  the logs
>
> Just out of interest what version of Struts were you upgrading from?
> Also were you just upgrading Struts - or were you changing other
> things as well (like upgading your servlet container)?
>
> Niall
>
>
> > *******************************************
> > <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
> Configuration 1.2//EN"
> "http://struts.apache.org/dtds/struts-config_1_2.dtd">
> > <struts-config>
> >
> > <!-- ================================================ Form Bean
> Definitions -->
> >
> >   <form-beans type="org.apache.struts.action.ActionFormBean">
> > <!-- Most of the form-beans has been removed -->
> >   <form-bean name="SearchForm" type="um.forms.sob.SearchForm" />
> >   </form-beans>
> >
> >
> > <!-- ========================================= Global Exception
> Definitions -->
> >
> >   <global-exceptions>
> >         <!-- sample exception handler
> >         <exception
> >             key="expired.password"
> >             type="app.ExpiredPasswordException"
> >             path="/changePassword.jsp"/>
> >         end sample -->
> >   </global-exceptions>
> >
> >
> > <!-- =========================================== Global Forward
> Definitions -->
> >
> >   <global-forwards type="org.apache.struts.action.ActionForward">
> >   <forward name="success" path="index.jsp" redirect="true" />
> >   <forward name="error" redirect="true" path="/error/index.jsp" />
> >   </global-forwards>
> >
> >
> > <!-- =========================================== Action Mapping
> Definitions -->
> >
> >   <action-mappings type="org.apache.struts.action.ActionMapping">
> >   <!-- Admin START -->
> >   <action path="/admin/addFormBean"
> type="org.apache.struts.actions.AddFormBeanAction" />
> >   <action path="/admin/addForward"
> type="org.apache.struts.actions.AddForwardAction" />
> >   <action path="/admin/addMapping"
> type="org.apache.struts.actions.AddMappingAction" />
> >   <action path="/admin/reload"
> type="org.apache.struts.actions.ReloadAction" />
> >   <action path="/admin/removeFormBean"
> type="org.apache.struts.actions.RemoveFormBeanAction" />
> >   <action path="/admin/removeForward"
> type="org.apache.struts.actions.RemoveForwardAction" />
> >   <action path="/admin/removeMapping"
> type="org.apache.struts.actions.RemoveMappingAction" />
> >   <!-- Admin SLUT -->
> >
> >   <!-- Most of the mappings has been removed -->
> >   <action parameter="" name="SearchForm" path="/sob/search"
> input="/sob/um.jsp" validate="true" type="um.actions.sob.SearchAction"
> scope="request"><forward name="success" redirect="false"
> path="/sob/search.jsp" /><forward name="error" redirect="false"
> path="/sob/searchError.jsp" /></action>
> >
> >
> >   </action-mappings>
> >
> >   <controller processorClass="org.apache.struts.action.RequestProcessor"
> contentType="text/html"/>
> >
> >   <message-resources parameter="resources.application"/>
> >
> >
> > </struts-config>
> >
> > *******************************************
> >
> > BR.
> >
> > Soren, DK
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Problems with my struts_config.xml?

Posted by Søren Blidorf <so...@nolas.dk>.
I upgraded from STRUTS 1.0 and I also upgraded to tomcat 6.0 from a 4.xx

Soren
----- Original Message -----
From: "Niall Pemberton" <ni...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, June 28, 2007 3:31 AM
Subject: Re: Problems with my struts_config.xml?


On 6/27/07, Søren Blidorf <so...@nolas.dk> wrote:
> Can anybody see if something is wrong with this struts-config.xml. I have
just upgraded struts to 1.2.9.
>
> And a simple .do call does not work. Nothing happends. I get a blank
screen and no errors is reported i  the logs

Just out of interest what version of Struts were you upgrading from?
Also were you just upgrading Struts - or were you changing other
things as well (like upgading your servlet container)?

Niall


> *******************************************
> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
> <struts-config>
>
> <!-- ================================================ Form Bean
Definitions -->
>
>   <form-beans type="org.apache.struts.action.ActionFormBean">
> <!-- Most of the form-beans has been removed -->
>   <form-bean name="SearchForm" type="um.forms.sob.SearchForm" />
>   </form-beans>
>
>
> <!-- ========================================= Global Exception
Definitions -->
>
>   <global-exceptions>
>         <!-- sample exception handler
>         <exception
>             key="expired.password"
>             type="app.ExpiredPasswordException"
>             path="/changePassword.jsp"/>
>         end sample -->
>   </global-exceptions>
>
>
> <!-- =========================================== Global Forward
Definitions -->
>
>   <global-forwards type="org.apache.struts.action.ActionForward">
>   <forward name="success" path="index.jsp" redirect="true" />
>   <forward name="error" redirect="true" path="/error/index.jsp" />
>   </global-forwards>
>
>
> <!-- =========================================== Action Mapping
Definitions -->
>
>   <action-mappings type="org.apache.struts.action.ActionMapping">
>   <!-- Admin START -->
>   <action path="/admin/addFormBean"
type="org.apache.struts.actions.AddFormBeanAction" />
>   <action path="/admin/addForward"
type="org.apache.struts.actions.AddForwardAction" />
>   <action path="/admin/addMapping"
type="org.apache.struts.actions.AddMappingAction" />
>   <action path="/admin/reload"
type="org.apache.struts.actions.ReloadAction" />
>   <action path="/admin/removeFormBean"
type="org.apache.struts.actions.RemoveFormBeanAction" />
>   <action path="/admin/removeForward"
type="org.apache.struts.actions.RemoveForwardAction" />
>   <action path="/admin/removeMapping"
type="org.apache.struts.actions.RemoveMappingAction" />
>   <!-- Admin SLUT -->
>
>   <!-- Most of the mappings has been removed -->
>   <action parameter="" name="SearchForm" path="/sob/search"
input="/sob/um.jsp" validate="true" type="um.actions.sob.SearchAction"
scope="request"><forward name="success" redirect="false"
path="/sob/search.jsp" /><forward name="error" redirect="false"
path="/sob/searchError.jsp" /></action>
>
>
>   </action-mappings>
>
>   <controller processorClass="org.apache.struts.action.RequestProcessor"
contentType="text/html"/>
>
>   <message-resources parameter="resources.application"/>
>
>
> </struts-config>
>
> *******************************************
>
> BR.
>
> Soren, DK
>

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




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


Re: Problems with my struts_config.xml?

Posted by Niall Pemberton <ni...@gmail.com>.
On 6/27/07, Søren Blidorf <so...@nolas.dk> wrote:
> Can anybody see if something is wrong with this struts-config.xml. I have just upgraded struts to 1.2.9.
>
> And a simple .do call does not work. Nothing happends. I get a blank screen and no errors is reported i  the logs

Just out of interest what version of Struts were you upgrading from?
Also were you just upgrading Struts - or were you changing other
things as well (like upgading your servlet container)?

Niall


> *******************************************
> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
> <struts-config>
>
> <!-- ================================================ Form Bean Definitions -->
>
>   <form-beans type="org.apache.struts.action.ActionFormBean">
> <!-- Most of the form-beans has been removed -->
>   <form-bean name="SearchForm" type="um.forms.sob.SearchForm" />
>   </form-beans>
>
>
> <!-- ========================================= Global Exception Definitions -->
>
>   <global-exceptions>
>         <!-- sample exception handler
>         <exception
>             key="expired.password"
>             type="app.ExpiredPasswordException"
>             path="/changePassword.jsp"/>
>         end sample -->
>   </global-exceptions>
>
>
> <!-- =========================================== Global Forward Definitions -->
>
>   <global-forwards type="org.apache.struts.action.ActionForward">
>   <forward name="success" path="index.jsp" redirect="true" />
>   <forward name="error" redirect="true" path="/error/index.jsp" />
>   </global-forwards>
>
>
> <!-- =========================================== Action Mapping Definitions -->
>
>   <action-mappings type="org.apache.struts.action.ActionMapping">
>   <!-- Admin START -->
>   <action path="/admin/addFormBean" type="org.apache.struts.actions.AddFormBeanAction" />
>   <action path="/admin/addForward" type="org.apache.struts.actions.AddForwardAction" />
>   <action path="/admin/addMapping" type="org.apache.struts.actions.AddMappingAction" />
>   <action path="/admin/reload" type="org.apache.struts.actions.ReloadAction" />
>   <action path="/admin/removeFormBean" type="org.apache.struts.actions.RemoveFormBeanAction" />
>   <action path="/admin/removeForward" type="org.apache.struts.actions.RemoveForwardAction" />
>   <action path="/admin/removeMapping" type="org.apache.struts.actions.RemoveMappingAction" />
>   <!-- Admin SLUT -->
>
>   <!-- Most of the mappings has been removed -->
>   <action parameter="" name="SearchForm" path="/sob/search" input="/sob/um.jsp" validate="true" type="um.actions.sob.SearchAction" scope="request"><forward name="success" redirect="false" path="/sob/search.jsp" /><forward name="error" redirect="false" path="/sob/searchError.jsp" /></action>
>
>
>   </action-mappings>
>
>   <controller processorClass="org.apache.struts.action.RequestProcessor" contentType="text/html"/>
>
>   <message-resources parameter="resources.application"/>
>
>
> </struts-config>
>
> *******************************************
>
> BR.
>
> Soren, DK
>

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


Re: Problems with my struts_config.xml?

Posted by Søren Blidorf <so...@nolas.dk>.
Thanks.

This is my web.xml. Which looks alot like your surgestions.

Any idears

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>ApplicationResources</param-value>
    </init-param>
    <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>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>driver</param-name>

<param-value>com.microsoft.sqlserver.jdbc.SQLServerDriver</param-value>
    </init-param>
    <init-param>
      <param-name>serverName</param-name>
      <param-value>127.0.0.1</param-value>
    </init-param>
    <init-param>
      <param-name>url</param-name>
      <param-value>jdbc:sqlserver://127.0.0.1</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
  <servlet-mapping>

----- Original Message -----
From: "Martin Gainty" <mg...@hotmail.com>
To: <so...@nolas.dk>
Sent: Wednesday, June 27, 2007 3:52 PM
Subject: Re: Problems with my struts_config.xml?


> Goddag Soren-
>
> //web.xml you'll need
>   <!-- Action Servlet Mapping -->
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>*.do</url-pattern>
>   </servlet-mapping>
>
> //web.xml your servlet-name 'action' will need a servlet-class defined to
> it..
>   <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>2</load-on-startup>
>   </servlet>
>
> Tak/
> Martin-
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message -----
> From: "Søren Blidorf" <so...@nolas.dk>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Wednesday, June 27, 2007 9:06 AM
> Subject: Problems with my struts_config.xml?
>
>
> Can anybody see if something is wrong with this struts-config.xml. I have
> just upgraded struts to 1.2.9.
>
> And a simple .do call does not work. Nothing happends. I get a blank
screen
> and no errors is reported i  the logs
>
> *******************************************
> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
> Configuration 1.2//EN"
> "http://struts.apache.org/dtds/struts-config_1_2.dtd">
> <struts-config>
>
> <!-- ================================================ Form Bean
> Definitions -->
>
>   <form-beans type="org.apache.struts.action.ActionFormBean">
> <!-- Most of the form-beans has been removed -->
>   <form-bean name="SearchForm" type="um.forms.sob.SearchForm" />
>   </form-beans>
>
>
> <!-- ========================================= Global Exception
> Definitions -->
>
>   <global-exceptions>
>         <!-- sample exception handler
>         <exception
>             key="expired.password"
>             type="app.ExpiredPasswordException"
>             path="/changePassword.jsp"/>
>         end sample -->
>   </global-exceptions>
>
>
> <!-- =========================================== Global Forward
> Definitions -->
>
>   <global-forwards type="org.apache.struts.action.ActionForward">
>   <forward name="success" path="index.jsp" redirect="true" />
>   <forward name="error" redirect="true" path="/error/index.jsp" />
>   </global-forwards>
>
>
> <!-- =========================================== Action Mapping
> Definitions -->
>
>   <action-mappings type="org.apache.struts.action.ActionMapping">
>   <!-- Admin START -->
>   <action path="/admin/addFormBean"
> type="org.apache.struts.actions.AddFormBeanAction" />
>   <action path="/admin/addForward"
> type="org.apache.struts.actions.AddForwardAction" />
>   <action path="/admin/addMapping"
> type="org.apache.struts.actions.AddMappingAction" />
>   <action path="/admin/reload"
type="org.apache.struts.actions.ReloadAction"
> />
>   <action path="/admin/removeFormBean"
> type="org.apache.struts.actions.RemoveFormBeanAction" />
>   <action path="/admin/removeForward"
> type="org.apache.struts.actions.RemoveForwardAction" />
>   <action path="/admin/removeMapping"
> type="org.apache.struts.actions.RemoveMappingAction" />
>   <!-- Admin SLUT -->
>
>   <!-- Most of the mappings has been removed -->
>   <action parameter="" name="SearchForm" path="/sob/search"
> input="/sob/um.jsp" validate="true" type="um.actions.sob.SearchAction"
> scope="request"><forward name="success" redirect="false"
> path="/sob/search.jsp" /><forward name="error" redirect="false"
> path="/sob/searchError.jsp" /></action>
>
>
>   </action-mappings>
>
>   <controller processorClass="org.apache.struts.action.RequestProcessor"
> contentType="text/html"/>
>
>   <message-resources parameter="resources.application"/>
>
>
> </struts-config>
>
> *******************************************
>
> BR.
>
> Soren, DK
>
>


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