Hi All,

I have tried all the ways but not able to solve the problem..
i am attaching all the codes for my test application..

*StrutsExample.xml*
*

package* aum;
*

import* java.sql.Date;
*

import* com.opensymphony.xwork2.ActionSupport;

**

*public* *class* StrutsExample *extends* ActionSupport {

**

*private* *static* *final* *long* *serialVersionUID* = 1L;

*private* String name="null";

Date date;

*public* Date getDate() {

*return* date;

}

*public* *void* setDate(Date date) {

*this*.date = date;

}

*public* String getName() {

*return* name;

}

*public* *void* setName(String name) {

*this*.name=name;

}

*public* String execute() *throws* Exception{

*return* *SUCCESS*;

}

}
*Struts.xml*

<struts>

<package name="nsolution" extends="struts-default" >

<action name="TestExample" class="aum.StrutsExample">

<result name="input">/jsp/index.jsp</result>

<result name="SUCCESS">/jsp/welcome.jsp</result>

</action>

</package>

</struts>

*Index.jsp*

<s:form action="TestExample">

<s:textfield label="Your Name" name="userName"/>

<s:textfield label="Enter Date" name="date"/>

<s:submit/>

</s:form>

one more interesting thing is that when i click the submitt button it is
displaying the URL as http://aum:8080/StrutsStarter/TestExample where as i
thik it should display it as
http://aum:8080/StrutsStarter/TestExample.action
Any suggestion in this regard will be much appriciated.

On 3/7/08, Dave Newton <[EMAIL PROTECTED]> wrote:
>
> --- "Karr, David" <[EMAIL PROTECTED]> wrote:
> > I'm technically a newbie on this, so don't take my word on it, but I
> > would suggest:
> >
> > * Don't use "actionPackages" or the annotations.
>
> Both actionPackages and the annotations work fine; the issue you had was
> that
> you were combining the two configuration methods. There are some
> limitations
> with S2.0's zero-config, most notably no interceptor-ref annotations. That
> may be solvable via @ParentPackage by configuring the interceptors via
> XML,
> however--not sure.
>
> > * Remove the "namespace" attribute on the action element.
>
> I didn't see that in his code; it may have gotten edited out. Normally the
> "namespace" attribute goes with the "package" element, though, and there's
> no
> reason not to have one.
>
> It's one of the major ways to separate parts of the application.
>
> > * Change the "package" attribute on the action element to have a value
> > != your Java package.
>
> Hopefully I (or someone...) will remember to look in to that and nail down
> why that's a possible issue and either document it or fix it.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to