Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 30 Jan 2008 14:28:23 -0000 Issue 7833

user-digest-help

2008-01-30


Author LoginPost Reply

user Digest 30 Jan 2008 14:28:23 -0000 Issue 7833

Topics (messages 181970 through 181997):

Struts 2.1.1 and Tiles
 181970 by: Sanjeev Vijapurapu
 181976 by: Sanjeev Vijapurapu
 181977 by: Dave Newton

Re: #request scope
 181971 by: Dave Newton
 181981 by: WongTseng
 181983 by: Dave Newton
 181996 by: stanlick.gmail.com

html:text
 181972 by: Arora, Parvinder
 181973 by: Dave Newton

Re: [S2] Iterator and Index
 181974 by: bradharris
 181975 by: Dave Newton
 181978 by: Laurie Harper

Re: [S2] Starter application in IE & Firefox
 181979 by: hezjing

s:if test with empty String
 181980 by: quinquin2209
 181991 by: ravi_eze

Re: struts1 and struts2 together
 181982 by: nagendrabvvs
 181984 by: Otto, Frank
 181992 by: nagendrabvvs
 181997 by: Otto, Frank

Re: Error messages is repeated Using Struts 2 Annotation validation
 181985 by: Johnson nickel

Struts - Dojo Problem: Internet Explorer cannot open the internet site ... Operation Aborted
 181986 by: Johan Snyman

Re: dojo 1.0 DateTextBox and ISO-8601
 181987 by: Roberto Nunnari

[S2.1] dojo widget dialog
 181988 by: Desbois Arnaud

[S2] Where should I save the I18N properties file?
 181989 by: hezjing

Re: CompositeActionMapper
 181990 by: neha bhatt

Struts 2 onchange event to get values from databases
 181993 by: Johnson nickel
 181994 by: Johan Snyman
 181995 by: Johan Snyman

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_181970.ezm (zipped)
Hi,

Has anybody tried using tiles2 with struts 2.1.1? I had a working app
with tiles2 and struts 2.0.9; but when I upgraded to 2.1.1 it just
stopped working.

Stack Trace is:

javax.servlet.jsp.JspException: Error executing tag: JSPException while
including path '/layouts/layout-template.jsp'. ServletException while
including page.

    at
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurity
TagSupport.java:80)

    at
org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSup
port.java:80)

    at
org.apache.jsp.security.login_jsp._jspx_meth_tiles_insertDefinition_0(or
g.apache.jsp.security.login_jsp:87)

    at
org.apache.jsp.security.login_jsp._jspService(org.apache.jsp.security.lo
gin_jsp:57)

    at
org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:93)

    at javax.servlet.http.HttpServlet.service (HttpServlet.java:820)

    at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper

.java:373)

    at
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:4

70)

    at
org.apache.jasper.servlet.JspServlet.service (JspServlet.java:364)

    at javax.servlet.http.HttpServlet.service (HttpServlet.java:820)

    at
org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java:487

)

    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet

Handler.java:1093)



Any pointers on how to resolve this?



Thanks


Attachment: user_181976.ezm (zipped)
It's actually because of the standard taglib. I am using core taglib for
some use case and if I remove that code it works fine. But what I am not
able to understand is that why does struts2.0.9 works fine with it where
as struts 2.1.1 doesnt

-----Original Message-----
From: Sanjeev Vijapurapu [mailto:SVijapurapu@(protected)]
Sent: Tuesday, January 29, 2008 2:48 PM
To: user@(protected)
Subject: Struts 2.1.1 and Tiles

Hi,

Has anybody tried using tiles2 with struts 2.1.1? I had a working app
with tiles2 and struts 2.0.9; but when I upgraded to 2.1.1 it just
stopped working.

Stack Trace is:

javax.servlet.jsp.JspException: Error executing tag: JSPException while
including path '/layouts/layout-template.jsp'. ServletException while
including page.

    at
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurity
TagSupport.java:80)

    at
org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSup
port.java:80)

    at
org.apache.jsp.security.login_jsp._jspx_meth_tiles_insertDefinition_0(or
g.apache.jsp.security.login_jsp:87)

    at
org.apache.jsp.security.login_jsp._jspService(org.apache.jsp.security.lo
gin_jsp:57)

    at
org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:93)

    at javax.servlet.http.HttpServlet.service (HttpServlet.java:820)

    at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper

.java:373)

    at
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:4

70)

    at
org.apache.jasper.servlet.JspServlet.service (JspServlet.java:364)

    at javax.servlet.http.HttpServlet.service (HttpServlet.java:820)

    at
org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java:487

)

    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet

Handler.java:1093)



Any pointers on how to resolve this?



Thanks


Attachment: user_181977.ezm (zipped)
--- Sanjeev Vijapurapu <SVijapurapu@(protected):
> It's actually because of the standard taglib. I am using core taglib for
> some use case and if I remove that code it works fine. But what I am not
> able to understand is that why does struts2.0.9 works fine with it where
> as struts 2.1.1 doesnt

Without the JSP that you believe is causing the problem it will be much, much
harder to help you.

Dave


Attachment: user_181971.ezm (zipped)
--- stanlick <stanlick@(protected):
> I have a weird situation where I am losing a request
> parameter inside a loop!
> [...]
> <s:property value="#request.model.parentId" />

Doesn't "#request" retrieve request *attributes*?

Dave


Attachment: user_181981.ezm (zipped)
in S2, inside iteration, the item object is push onto the VS, so just
remove the pound key.


--
Best Regards
Wong Tseng

Attachment: user_181983.ezm (zipped)
--- WongTseng <wangzengverycool@(protected):
> in S2, inside iteration, the item object is push onto the VS, so just
> remove the pound key.

Accessing a request attribute, however, still requires the "#" because it's a
named value on the stack, not simply a pushed action or the current object of
an iterator.

Dave


Attachment: user_181996.ezm (zipped)
Parameters and it contains the value immediately before entering the
iterator, as I am printing it out. Seems goofy to have to set a var just to
use it in the loop two lines later.

On Jan 29, 2008 5:10 PM, Dave Newton <newton.dave@(protected):

> --- stanlick <stanlick@(protected):
> > I have a weird situation where I am losing a request
> > parameter inside a loop!
> > [...]
> > <s:property value="#request.model.parentId" />
>
> Doesn't "#request" retrieve request *attributes*?
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Scott
stanlick@(protected)

Attachment: user_181972.ezm (zipped)
A primitive question:

Can I hide the border which comes around html:text ?

~Parvinder


Attachment: user_181973.ezm (zipped)
--- "Arora, Parvinder" <PA0626@(protected):
> Can I hide the border which comes around html:text ?

CSS; see the "styleClass" attribute [1]. (It may differ slightly depending on
which version of S1 you're using; I honestly don't recall.)

Dave

[1] http://struts.apache.org/1.x/struts-taglib/tlddoc/html/text.html



Attachment: user_181974.ezm (zipped)

Any Response to this question? I'm really hoping this wasn't left out of
Struts2, but I can't seem to find anything indicating there is support for
iterative form fields. This is a pretty big piece to be missing, so
feedback on the correct approach here would be appreciated.

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_181975.ezm (zipped)
--- bradharris <bmharris@(protected):
> Any Response to this question? I'm really hoping this wasn't left out of
> Struts2, but I can't seem to find anything indicating there is support for
> iterative form fields. This is a pretty big piece to be missing, so
> feedback on the correct approach here would be appreciated.

There is [currently] no automagic support for indexed form fields.
Constructing the names, however, is pretty straight-forward. It's not really
that "big of a piece" IMO, but it is a minor irritation. File a JIRA if
you're concerned (I don't know if there is one already).

Dave


Attachment: user_181978.ezm (zipped)
Dave Newton wrote:
> --- bradharris <bmharris@(protected):
>> Any Response to this question? I'm really hoping this wasn't left out of
>> Struts2, but I can't seem to find anything indicating there is support for
>> iterative form fields. This is a pretty big piece to be missing, so
>> feedback on the correct approach here would be appreciated.
>
> There is [currently] no automagic support for indexed form fields.
> Constructing the names, however, is pretty straight-forward. It's not really
> that "big of a piece" IMO, but it is a minor irritation. File a JIRA if
> you're concerned (I don't know if there is one already).

To be clear, the part that is missing is automatically generating the
names of the input fields appropriately. You can certainly still use
collection-backed form fields, you just need a little extra coding in
your JSP. Something like this:

  <s:textfield id="name[%{#stat.index}]" name="firstname" label="...">

or

  <s:textfield name="names[%{#stat.index}].firstname" label="...">

(I'm not sure off the top of my head which is right, but it'll be
something along those lines...)

L.


Attachment: user_181979.ezm (zipped)
Hi

OK, the same problem occured even before the dependencies are modified.
The following are the steps I performed,

1) Create the starter application
  > mvn archetype:create
  -DgroupId=com.fdar.apress.s2
  -DartifactId=app
  -DarchetypeGroupId=org.apache.struts
  -DarchetypeArtifactId=struts2-archetype-starter
  -DarchetypeVersion=2.0.9-SNAPSHOT
  -DremoteRepositories=http://people.apache.org/maven-snapshot-repository

2) Run the starter application
  > mvn jetty:run

3) Open Firefox and goto http://localhost:8080/app

4) Open IE 6.0 and goto http://localhost:8080/app


The menu is displayed on top of the page in Firefox, but NOT in the IE 6.0.
Can you reproduce the same problem?


On 1/29/08, Laurie Harper <laurie@(protected):
> hezjing wrote:
> > Hi
> >
> > I created Struts2 starter application as shown below,
> >
> >   mvn archetype:create
> >   -DgroupId=com.fdar.apress.s2
> >   -DartifactId=app
> >   -DarchetypeGroupId=org.apache.struts
> >   -DarchetypeArtifactId=struts2-archetype-starter
> >   -DarchetypeVersion=2.0.9-SNAPSHOT
> >   -DremoteRepositories=http://people.apache.org/maven-snapshot-repository
> >
> > then, I modified pom.xml and changed the dependencies to JUnit 4.4 and
> > Struts 2.0.11.
> >
> > When loaded the application in Firefox, I can see the menu bar ("Menu
> > 1", "Menu 2" and etc) displayed on the top.
> >
> > When loaded the application in IE 6.0, the same menu bar is missing!
> >
> > Do you what could be the problem?
>
> Did everything work before you updated the dependencies? If so, did you
> check the release notes for 2.0.11 [1] to see if any changes may be
> needed in the starter app code?
>
> L.
>
> [1] http://struts.apache.org/2.0.11/docs/release-notes-2011.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--

Hez

Attachment: user_181980.ezm (zipped)

Hi All,

I have an array of String "members"... where member[0] is the member id and
member[1] is the member's name.

In the jsp, I want to display member[1] if it is not empty, or member[0] if
member[1] is empty.

<s:if test="%{members[#status.index][1]} == '' ">
 <s:property value="%{distinctIssuePartyId[#status.index][0]}"/>                    
</s:if>
<s:else>
 <s:property value="%{distinctIssuePartyId[#status.index][1]}"/>
</s:else>

However, the else logic is executed no matter member[1] is empty or not.

How can I test with empty string?

Thanks in advance

Queenie
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_181991.ezm (zipped)

hi,
probably u can go this way:

< s:if test="{members[#status.index][1] eq null} >
 <s:property value="%{distinctIssuePartyId[#status.index][0]}"/>                    
</ s:if>

or

< s:if test="{''.equals(members[#status.index][1])} >
 ...
</ s:if>

this is ognl and should help u out. let me know if it works.

cheers,
ravi



quinquin2209 wrote:
>
> Hi All,
>
> I have an array of String "members"... where member[0] is the member id
> and member[1] is the member's name.
>
> In the jsp, I want to display member[1] if it is not empty, or member[0]
> if member[1] is empty.
>
> <s:if test="%{members[#status.index][1]} == '' ">
>  <s:property value="%{distinctIssuePartyId[#status.index][0]}"/>                    
> </s:if>
> <s:else>
>  <s:property value="%{distinctIssuePartyId[#status.index][1]}"/>
> </s:else>
>
> However, the else logic is executed no matter member[1] is empty or not.
>
> How can I test with empty string?
>
> Thanks in advance
>
> Queenie
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_181982.ezm (zipped)

Hi Frank,
Could i ask you a favour....?

As i am also trying to migrate our project to struts2 from struts1.1.....
I am in need of help regarding this.
can i use both struts1 and struts2 together?

So hope you have got knowledge in this, and as iam new to struts2, If
possible could you please give me some important points to do migration for
my existing project.

Any help regarding this is most appreciable,
Thanks a lot in advance,
Nagendra
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment: user_181984.ezm (zipped)
hi nagendra,

yes, you can use struts1 and struts2 together. take a look at:

http://www.infoq.com/articles/converting-struts-2-part1

it's a good tutorial to migrate a app to struts2.

kind regards,

frank

> -----Ursprüngliche Nachricht-----
> Von: nagendrabvvs [mailto:nagendrabvvs@(protected)]
> Gesendet: Mittwoch, 30. Januar 2008 06:46
> An: user@(protected)
> Betreff: Re: struts1 and struts2 together
>
>
>
> Hi Frank,
> Could i ask you a favour....?
>
> As i am also trying to migrate our project to struts2 from
> struts1.1.....
> I am in need of help regarding this.
> can i use both struts1 and struts2 together?
>
> So hope you have got knowledge in this, and as iam new to struts2, If
> possible could you please give me some important points to do
> migration for
> my existing project.
>
> Any help regarding this is most appreciable,
> Thanks a lot in advance,
> Nagendra
> --
> View this message in context:
> http://www.nabble.com/struts1-and-struts2-together-tp15035931p
15175909.html
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment: user_181992.ezm (zipped)

Thanks a lot for quick reply, frank.

Can i ask you one question?
That, Were you able to moigrate your proj successfully with out any
problems?


--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_181997.ezm (zipped)
no problem.

I haven't migrate our project, because I have realized a new topic with struts2 in our project. It's a configurator with ajax (YUI). the rest is still struts1.


kind regards,

frank

-----Ursprüngliche Nachricht-----
Von: nagendrabvvs [mailto:nagendrabvvs@(protected)]
Gesendet: Mittwoch, 30. Januar 2008 14:10
An: user@(protected)
Betreff: Re: AW: struts1 and struts2 together



Thanks a lot for quick reply, frank.

Can i ask you one question?
That, Were you able to moigrate your proj successfully with out any
problems?


--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment: user_181985.ezm (zipped)

Thanks for your quick response,

In my Login.jsp,
<s:textfield name="username" label="UserName" />
<s:password name="spassword" label="Password" />
<input type="image" src="../images/Login.gif" value="Login">

Instead of using <s:submit value="Login"/>, I used html image tag .
If i used <s:submit> it works fine.
   




newton.dave wrote:
>
> --- Johnson nickel <saravanan@(protected):
>>
> @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName
>> is required")
>
> For a string field you'll probably want to use the
> @RequiredStringValidator:
> a text field will return an empty string, whereas @RequiredFieldValidator
> only checks for null-ness (different from blank-ness).
>
>> Same as For password also ,
>
> *Exactly* the same? (You put the right "fieldName" for the password field,
> right?)
>
>> When i have submit the Login button, the Error messages is displaying
> Repeated.
>
> You'll need to provide some JSP and possibly configuration in order to
> help
> diagnose the problem.
>
> Where are the duplicated messages appearing?
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_181986.ezm (zipped)
Hi



I’ve been struggling of late to get the dojo-tags working (but that is
another story all together), but have gotten it to the point where finally I
can see a “tabbedpanel” displayed in Firefox. Unfortunately the same code
does not display in IE, giving me rather a pop-up with the text in the
subject line of this mail.



From HYPERLINK
"http://support.microsoft.com/default.aspx/kb/927917"http://support.microsof
t.com/default.aspx/kb/927917 I quote the MS explanation for the error:

“This problem occurs because a child container HTML element contains script
code that tries to modify the parent container element of the child
container. The script code tries to modify the parent container element by
using either the innerHTML method or the appendChild method.”



Also on HYPERLINK
"http://clientside.cnet.com/code-snippets/manipulating-the-dom/ie-and-operat
ion-aborted/"http://clientside.cnet.com/code-snippets/manipulating-the-dom/i
e-and-operation-aborted/ the explanation is:

“IE does this when you attempt to modify a DOM element before it is closed.”



My application uses Tiles to compose the page.

-       If I add the <sx:header/> tag in the template file, I get the
above mentioned error and after clicking “Okay” IE says the page could not
be found (with no apparent errors in my JBoss terminal.



-       If I move the header tag to the jsp that describes the tile I
want to display the tabbedpanel with, IE does not give me the error, but the
div inside (<sx:div …/>) the tag is displayed in the wrong position, that
is, not inside the tabbedpanel. When I click on any other tab the div is
displayed correctly (even the original). Also I have a filter set up to
handle Hibernate transactions and the filter throws the following error:



09:58:02,281 ERROR [HibernateTransactionFilter] Exception caught when
filtering

ClientAbortException: java.net.SocketException: Connection reset by peer:
socket write error



Just for the record, I am using the struts-core-2.1.0.jar file, I use tiles
2.0.3 jars and the struts2-tiles-plugin-2.0.8.jar file.



My question is if anybody else have run into a similar problem and found a
solution. Also if anybody have got any comments on where the <sx:head /> tag
should be and if it makes sense to have it in the tile jsp (except that it
seems to be only solution to get IE to display the page…)



Thanks for reading all the way through this mail! J



Jo


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29
10:20 PM


Attachment: user_181987.ezm (zipped)
Hi Jeromy.


Jeromy Evans wrote:
> Hi Roberto,
>
> This is precisely what a custom type-converter is for:
> http://struts.apache.org/2.x/docs/type-conversion.html
>
> It accepts a string and converts to an object, and vice versa. It's
> invoked by the conversion interceptor.

I'm going to implement a converter right away!


>
> However, I thought the default Date converter is already setup to
> convert ISO-8601 strings to java.util.Date and vice versa. You might
> get a nice surprise if you add a Date property to your model with the
> startDate name. (The docs mention a locale-dependent date rather than
> ISO-8601 so I may be mistaken though).

Unfortunately not. I have a Date object in my model named startDate
and it complained about not being able to parse the string. That's
true at least for jave 5.. don't know about java 6.. but it's strange
that ISO-8601 is not supported.


>
> Roberto Nunnari wrote:
>> Hi.
>>
>> I have a form that posts to a ModelDriven Action.
>> In that form I'm trying to use raw dojo 1.0 DateTextBox, but I have
>> trouble with the formatting of the date.. According to the
>> dojo docs, when communicating to/from the server, it uses
>> ISO-8601.
>>
>> As java.util.Date doesn't know how to parse ISO-8601
>> dates, I suppose I'll use a method on the action to parse,
>> but I'm interested to know how others have solved this
>> issue. Maybe with an interceptor?
>>
>> as for formatting the date to initialize the dojo input, here
>> is the code I put in my jsp:
>>
>> <input type="text" name="startDate" dojoType="dijit.form.DateTextBox"
>> required="true" value="<s:date name="startDate" format="yyyy-MM-dd"
>> />" size="40"/></td>
>>
>> Best regards.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>


--
Robi


Attachment: user_181988.ezm (zipped)
I'm using Struts 2.1.0, and I want to use the dojo widget dialog.



I try this simple code:

<%@(protected)" %>

<html>

<head>

<sx:head debug="true"/>

<script type="text/javascript">

dojo.require("dojo.widget.Dialog");

var dlg;

function init() {

dlg = dojo.widget.byId("dialogContent");

dojo.debug("dlg="+dlg);

alert(dlg+" "+document.getElementById("dialogContent"));

}

dojo.addOnLoad(init);

</script>

</head>



<body>

<a href="javascript:dlg.show()">Show</a>

<div dojoType="Dialog" id="dialogContent" bgColor="grey" bgOpacity="0.5"
toggle="fade" toggleDuration="250" closeOnBackgroundClick="true">

Hello World!

</div>

</body>

</html>



But the variable dlg is always undefined (but with the
document.getElementById("dialogContent"), the div is correctly present)



How I can correctly use the widget dialog into Struts 2.1.0 ?



Best regards

Arnaud




Attachment: user_181989.ezm (zipped)
Hi

I have an action in src/main/java/com/dummy/action/MyAction.java
and the locale messages defined in MyAction.properties and package.properties.

I saved these properties files in src/main/java/com/dummy/action directory.

When run (e.g. mvn jetty:run), the locale messages are not displayed.
Maybe the properties files are not loaded?

Where should I save the properties files in Maven project directory?


--

Hez

Attachment: user_181990.ezm (zipped)

I wish to use CompositeActionMapper to chain multiple Custom ActionMappers.


<constant name="struts.mapper.class"    
value="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"/>
<constant name="struts.mapper.composite"
value="com.action.MyCustomActionMapper,com.action.MyCustomActionMapperSecure"/>

in this case I get 'Http status 404'..

Any idea regarding?

Thanks,
Neha Bhatt


Deryl Seale wrote:
>
> As an update, I can obviously use url-pattern's in my web.xml to more
> finely control which requests get sent to Struts, but there is still
> the matter of the embedded static resources bundled with the struts
> library.  Is there any setting to get the RestfulActionMapper to get
> it to ignore requests for static resources?
>
> thanks.
> --Deryl
>
> -----
>
> Well I got a little further with this -- thanks!
>
> Now I can get CompositeActionManager to work properly for actions
> that are mapped both with traditional URL's (ie: /foo/bar.action) and
> REST style URL's (/foo/bar/1). Unfortunately, this seems to have
> screwed up loading static content url's (/foo/bar.css) such that I
> cannot get to JSP pages directly, and none of my stylesheets load.  
> Is there another mapper I need to add to this declaration:
>
> <constant name="struts.mapper.class"
>          
> value="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"/>
> <constant name="struts.mapper.composite" value="struts,restful"/>
>
> thanks.
> --Deryl
>
> On Mar 29, 2007, at 3:09 PM, Darren Salomons wrote:
>
>>
>> Deryl,
>>
>> I'm not sure if you solved your problem but this is how I got it to
>> work.
>> In the struts.mapper.composite value it is a list of the bean
>> references
>> from the struts-default.xml it is not a list of class names. The
>> bean name
>> for the DefaultActionMapper is struts. So you could configure the
>> DefaultActionMapper and the RestfulMapper with the following
>> configuration
>> in your struts.xml file.
>>
>>   <constant name="struts.mapper.class"
>> value="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"/>
>>   <constant name="struts.mapper.composite" value="struts,restful"/>
>>
>> Hope this helps,
>>
>> Darren Salomons
>>
>>
>>
>> Deryl Seale wrote:
>>>
>>> Yes, I tried that, and all I got was an exception when I started up
>>> the application saying that an ActionMapper with the name "struts"
>>> had already been loaded, presumedly from struts-default.xml. If
>>> there is a way to make Struts use CompositeActionMapper with some
>>> configuration entry in struts.xml, it is not obvious to me how to do
>>> it (in spite of the documentation).
>>>
>>> --Deryl
>>>
>>> On Mar 20, 2007, at 10:26 AM, Dave Newton wrote:
>>>
>>>> --- Deryl Seale <deryl.seale@(protected):
>>>>> I am having some trouble getting the
>>>>> CompositeActionMapper to work
>>>>> properly. I have the following specified in my
>>>>> struts.properties:
>>>>> [...]
>>>>
>>>> Have you tried it like this in struts.xml?
>>>>
>>>> <bean
>>>> type="org.apache.struts2.dispatcher.mapper.ActionMapper"
>>>>
>>>>     name="struts"
>>>>
>>>> class="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"
>>>> />
>>>> <constant name="struts.mapper.composite"
>>>>
>>>> value="org.apache.struts2.dispatcher.mapper.DefaultActionMapper,foo.
>>>> ba
>>>> r.MyActionMapper,foo.bar.MyAnotherActionMapper"
>>>> />
>>>>
>>>> (I haven't; this is what's in the API docs, though,
>>>> and I tend to avoid the properties file.)
>>>>
>>>> d.
>>>>
>>>>
>>>>
>>>>
>>>> ____________________________________________________________________
>>>> __
>>>> ______________
>>>> No need to miss a message. Get email on-the-go
>>>> with Yahoo! Mail for Mobile. Get started.
>>>> http://mobile.yahoo.com/mail
>>>>
>>>> --------------------------------------------------------------------
>>>> -
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>
>>> --
>>> Deryl Seale -- Director of Engineering
>>> c: 734.883.9636
>>> deryl.seale@(protected)
>>> www.intel-assess.com
>>>
>>>
>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/
>> CompositeActionMapper-tf3433990.html#a9740579
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>
> --
> Deryl Seale -- Director of Engineering
> c: 734.883.9636
> deryl.seale@(protected)
> www.intel-assess.com
>
>
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_181993.ezm (zipped)

Hi All,

     I am using Struts 2 application, i have userdetails.jsp its
contains five text fields.
two buttons save and update. In my action i have written save() method and
update() method.  

In my jsp one drop down box its contains users. At the time of onchange
event to populate the text fileds values from databases.
  can u give me any solutions how to do this?

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_181994.ezm (zipped)
Hi Johnson,

I'm no Struts expert but from my experience you have two ways of
implementing what you want to achieve.

1. You can populate your dropdown box and have the fields empty. On your
element you can set the onchange to call a javascript function that calls
the same action, but passing it the content of your combobox, to do your
database lookup on the server side and then pass the info to your
userdetails.jsp where you can set your fields.

2. You can use AJAX to do the call asynchrononously, that is the value is
passed to an action on the server and without the values passed back and
filled into your fields. Nowadays you'll find plenty of tutorials and
examples out there. Check out the following:

http://struts.apache.org/2.x/docs/ajax.html
(the official Struts AJAX guide)

http://www.roseindia.net/struts/struts2/struts2ajax/index.shtml
(easy login example)

http://www.javaworld.com/javaworld/jw-08-2007/jw-08-ajaxtables.html?fsrc=rss
-index
(although is a rather tough example to follow if you're new to AJAX)

http://www.planetstruts.org/struts2-showcase/showcase.action
(showcase examples)

Hope this helps

Jo



-----Original Message-----
From: Johnson nickel [mailto:saravanan@(protected)]
Sent: 30 January 2008 03:26 PM
To: user@(protected)
Subject: Struts 2 onchange event to get values from databases


Hi All,

     I am using Struts 2 application, i have userdetails.jsp its
contains five text fields.
two buttons save and update. In my action i have written save() method and
update() method.  

In my jsp one drop down box its contains users. At the time of onchange
event to populate the text fileds values from databases.
  can u give me any solutions how to do this?

--
http://www.nabble.com/Struts-2-onchange-event-to-get-values-from-databases-t
p15182158p15182158.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29
10:20 PM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29
10:20 PM



Attachment: user_181995.ezm (zipped)
Hi Johnson (and others),
I'm not really as retarded as I sound in the previous mail, just distracted
while I was composing the mail. Please contact me if you find it as
difficult to follow as I did after reading the first reply...

Jo




-----Original Message-----
From: Johan Snyman [mailto:jsnyman@(protected)]
Sent: 30 January 2008 03:43 PM
To: 'Struts Users Mailing List'
Subject: RE: Struts 2 onchange event to get values from databases

Hi Johnson,

I'm no Struts expert but from my experience you have two ways of
implementing what you want to achieve.

1. You can populate your dropdown box and have the fields empty. On your
element you can set the onchange to call a javascript function that calls
the same action, but passing it the content of your combobox, to do your
database lookup on the server side and then pass the info to your
userdetails.jsp where you can set your fields.

2. You can use AJAX to do the call asynchrononously, that is the value is
passed to an action on the server and without the values passed back and
filled into your fields. Nowadays you'll find plenty of tutorials and
examples out there. Check out the following:

http://struts.apache.org/2.x/docs/ajax.html
(the official Struts AJAX guide)

http://www.roseindia.net/struts/struts2/struts2ajax/index.shtml
(easy login example)

http://www.javaworld.com/javaworld/jw-08-2007/jw-08-ajaxtables.html?fsrc=rss
-index
(although is a rather tough example to follow if you're new to AJAX)

http://www.planetstruts.org/struts2-showcase/showcase.action
(showcase examples)

Hope this helps

Jo



-----Original Message-----
From: Johnson nickel [mailto:saravanan@(protected)]
Sent: 30 January 2008 03:26 PM
To: user@(protected)
Subject: Struts 2 onchange event to get values from databases


Hi All,

     I am using Struts 2 application, i have userdetails.jsp its
contains five text fields.
two buttons save and update. In my action i have written save() method and
update() method.  

In my jsp one drop down box its contains users. At the time of onchange
event to populate the text fileds values from databases.
  can u give me any solutions how to do this?

--
http://www.nabble.com/Struts-2-onchange-event-to-get-values-from-databases-t
p15182158p15182158.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29
10:20 PM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29
10:20 PM



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29
10:20 PM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29
10:20 PM


©2008 gg3721.com - Jax Systems, LLC, U.S.A.