I'm having some trouble finding things due to some arcane code. Was
wondering if anyone could provide me with an example of dumping the
valuestack to the jsp so that I can take a look?
Jim C.
P.S. I've probably asked this before but I can't seem to find it via
searching. Reminder anyone?
-
ike "Loading...".
function updatePage() {
var d = document.getElementById("divResults");
d.innerHTML = 'Loading...';
var d1 = document.getElementById("divProcessing");
d1.style.display="block";
if (request.readyState == 4)
d.innerHTML = request.res
gt; Js will be run in browser so it has no access to stack or action variables.
>
> Best greetings,
> Paweł Wielgus.
>
>
>
> 2009/12/17 Jim Collings :
>> So I have two actions and one jsp. The idea is that one is for the
>> entire page and another is for putting
So I have two actions and one jsp. The idea is that one is for the
entire page and another is for putting into a via a JavaScript
method.
Question: How do I get items off of the value stack for use in JavaScript?
Jim C.
-
To
>From the Archives:
http://article.gmane.org/gmane.comp.jakarta.struts.user/165150
This is probably the same problem. How is this handled? A constant
was mentioned but it must be something in the Struts 2 code because it
doesn't seem to fit anywhere I put it:
...anyway, if this was implemente
I also forgot to mention that this is a convention-plugin project.
On Thu, Sep 10, 2009 at 3:10 PM, Jim Collings wrote:
> Will I have to define the action in the struts.xml? I'm currently
> using annotations to handle mapping.
>
> Jim C.
>
...
>
>
>
> The entire action class is:
>
> @SuppressWarnings("serial")
> public class DeadEnd extends ActionSupport
> {
>
> }
>
> and when any action returns "error" the deadEnd.jsp page is displayed.
>
> - Bill
>
> On Thu
Anybody know what the syntax for this is? I don't seem to be getting it right.
Jim C.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
anaged security, configured in web.xml.
>
> Mitch
>
>
>
> Jim Collings wrote:
>> I want to send a user to the welcome page if they don't have something
>> set in their session.
>>
>> I have an interceptor that works fine otherwise. It returns either
>&g
Yes.
On Thu, Sep 10, 2009 at 12:58 PM, Lukasz Lenart
wrote:
> 2009/9/10 Jim Collings :
>> I have an interceptor that works fine otherwise. It returns either
>> invocation.invoke() OR it returns Action.LOGIN. Problem is that I
>
> Did you create global result named &
I want to send a user to the welcome page if they don't have something
set in their session.
I have an interceptor that works fine otherwise. It returns either
invocation.invoke() OR it returns Action.LOGIN. Problem is that I
can't get the LOGIN result to map properly. How is this done? I've
tr
> Hi
> Is there a setting/property I can set to get the Convention plugin to
> tell me where & what it's looking for to resolve to the result
> classes. Having split a Struts 2 (2.1.7) application that was running
> solely on Tomcat to now serve static content from an Apache Webserver
> and pass St
Musachy Barroso wrote:
> yes, off the top of my head, which is *very* unreliable(specially on
> Fridays when I can only think of happy hour) :)
Indeed. ;-)
Jim C.
signature.asc
Description: OpenPGP digital signature
just an
> example, it could be ftl or vm, etc)
>
> musachy
>
> On Fri, Jul 24, 2009 at 7:48 AM, Jim Collings wrote:
>> User loads up a URL that calls an action named SomethingAction which
>> is an mostly empty action. It just sends em to the something.jsp page
>> by
Is there a graphical map of the decision tree for mapping? I would
like to see something like that.
For example, it says in the documentation that OneTwoThreeAction maps
to one-two-three.jsp but I can't find where it delineates what will
happen if there is a one-two-three-success.jsp page. I reme
User loads up a URL that calls an action named SomethingAction which
is an mostly empty action. It just sends em to the something.jsp page
by returning "success". What if there is a something-success page?
Will the behavior change?
On the something.jsp page, the user submits a form that calls ano
OK, so it is really a lot simpler than I thought. Just have to set the
name of the select to the name of the property and the system will
figure out that it is a list of what ever the listkey is set to. Same
as usual.
On Wed, Jul 1, 2009 at 12:11 PM, Jim Collings wrote:
>> One way to imp
> One way to implement:
> Create a class, CascDropDown, with getters and setters for value, label and
> subList.
> subList is a List of objects, DropDown, with getters and setters for value
This is not what I was having trouble with.
Anyway, I've got the solution but I need to complete what I am
So I tried setting key='selectedList'
This did not work. I got a null selectedList and:
ognl.ExpressionSyntaxException: Malformed OGNL expression:
[ognl.ParseException: Encountered "" at line 1, column 0.
Was expecting one of:
.
.
.
etc.
> How? If I set the tag to a list of objects specified in
So I went searching in the archives for how to use a select tag with
multiselect='true' set.
I found one entry from 2007 where a user asks this question. The
answer was "Use a list".
Great.
How? If I set the tag to a list of objects specified in my action,
how do I set the second list of objects
> Hi,
> While referring the below link I came to know that we can have
> prepare{MethodName}() that will run before the invocation of the particular
> method.
>
> http://struts.apache.org/2.1.6/docs/prepare-interceptor.html
>
> I was trying the same. In my action class, I have a save() method a
john feng wrote:
> Putthese code in servlet or action class. don't put in the jsp file.
...
>> is possible?
This idea seems promising.
So I have an action that results in the jsp in question and I'm using
the Convention plug-in. Presumably, I would have to apply one of the
*Aware interfaces to th
Dave Newton wrote:
> Jim Collings wrote:
>> <%response.setHeader("Content-Disposition", "attachment;
>> filename=\"filename_${fromDate}-${toDate}.doc\""); %>
>>
>> The above is what I currently have but I think there is a new wa
<%response.setHeader("Content-Disposition", "attachment;
filename=\"filename_${fromDate}-${toDate}.doc\""); %>
The above is what I currently have but I think there is a new way to
do it that doesn't involve using a scriptlet. Also, the "fromDate" and
"toDate" items don't work. I've tried quoting
I don't want users pasting in formatting from Word into my Struts II
text area. How can I prevent this?
Jim C.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache
This still isn't working. In theory, if I set the meta data as below:
This should explicitly tell the browser what to call the file but the
file name still comes out as action-name.
Does anyone have any ideas as to how I can prevent this? Perhaps if I
move the "downloadable-report.jsp" file
I have an action with a property that I want on my result jsp in plain
text, no controls.
Can't remember the syntax for this.
lil help?
Jim C.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional command
Lukasz Lenart wrote:
> As I remember, Dynamic Method Invocation is disabled by default, so
> you need to enable it:
> struts.enable.DynamicMethodInvocation = true
Turns out that the convention plugin was doing something. Renamed to
circumvent. Hope someday to understand convention plugin enough t
There's got to be a better way of doing this than the way that I am doing it.
Convention plugin.
According to my projects requirements error/validation/success
messages are supposed to show on the jsp that generated them. So if I
am on a page that adds a record and I leave all the fields blank,
s
I've got an action/jsp combo that is under /content. Success and error
messages are actually displayed on the jsp in question. So for
"input" and for "success" it's supposed to loop back to the jsp and
display either a success message or validation errors. I have an empty
"execute()" method annota
Can't put em in your database as BLOB's with all the other user info?
On Tue, Jun 9, 2009 at 4:26 PM, Dave Newton wrote:
> fireapple wrote:
>>
>> If I want to persist images to the hard drive of server. Shall I persist
>> the
>> data inside WAR or outside? Because user can change their portrait, d
It's a report and the requirement I'm trying to satisfy is that you
have to be able to save it as a MS Word *.doc file. What I've
discovered is that you can take a stand-alone html file (i.e. no
external files like images or CSS etc. ) change the file extension
from *.html to *.doc and double click
Anybody know of such a beast?
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
> The configuration constant I pointed to still isn't in there.
>
> In the default stack, the params interceptor does not run before the
> prepare interceptor. For instances where you need the params set
> first, then the prepare interceptor fires afterwards, we created the
> paramsPrepareParamsSta
> I'm assuming you are using the conventions plugin (since there is no
> action definition). How are you making sure your
> conventions-configured actions are in the "stuff" package? If this is
> your configuration, in whole, then you need to add -
>
>
>
> Just matching up namespace is not enough.
So I have a Preparable action and in the Preparable method, I need
access to a parameter. Others have gone over my struts.xml and seem to
think that it is correct:
I have a getter and a setter for the property but it is not being set.
It is being called from a link
ust
tried "redirect-action" mentioned in these docs and either I don't
know how to use it, or it doesn't work.
On Fri, May 29, 2009 at 2:45 PM, Wes Wannemacher wrote:
> http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-Resultannotation
>
> -Wes
So what are the different options for setting type in an @Result
annotation and what are they for? Can't find this in the docs.
Jim C.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail:
I just did this a while ago. All I had to do was set:
readonly="true"
on the struts textfield tag. Mine doesn't have an icon though.
On Fri, May 29, 2009 at 2:00 PM, Girish Naik wrote:
> Hi,
> I have used struts2-core-2.0.11.2 in My Application. And intend to use the
> Struts date time picker,
So if I use dynamic method invocation, like so:
/admin/change-wingding!change
How will the result urls for that call be constructed?
Jim C.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands,
On Wed, May 27, 2009 at 3:17 PM, Wes Wannemacher wrote:
> Wait, wait... Actions package? Are you using codebehind or
> conventions? If so, then the struts.xml file you posted won't be
> enough. You have to either change the default convention package or
> you have to use InterceptorRef annotations
So if I have property "userName" in my action with a getter and a
setter and then I want to use that information in my jsp but NOT in a
control what syntax would I use?
If it were a text box, for example, I would set the name attribute of
the text box to "userName" and it would work. I want to use
> Do you have any actions in that package? Your interceptor should be
> run, but only against actions in that package (xxx). Also, your
> interceptor is last in your stack, so things like validation failure
> can keep it from firing.
>
> -Wes
Yes. Tried putting it in the Actions package. No dice.
So, I've edited the struts.xml appropriately and I've created an
Interceptor that implements the interceptor interface. Init() is
called on startup but I can't get it to call intercept() to save my
life. My objective is to create an interceptor that checks to see if a
session variable is set and if
g out there that will
do this already.
Jim C.
> 2009/5/26 Jim Collings :
>> How can I force the user to go to a specific page, if a specific
>> property is set?
>
> With JavaScript? Or if you mean server side solution, in execute()
> method return different result namr b
How can I force the user to go to a specific page, if a specific
property is set?
Jim C.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
I take it back. I only thought I had it figured out. I'll use the
dummy action. I find it distasteful but it seems the best way.
Jim C.
On Fri, May 15, 2009 at 9:07 AM, Jim Kiley wrote:
> What I've done in this situation is put in the dummy action. Inevitably I
> find myself needing some kind
\page-two <--Page two action "page-two!dosomething"
Now I could put in a dummy action that just forwards to "page-two.jsp"
but why? It seems like there should be a better way.
Jim C.
On Fri, May 15, 2009 at 7:16 AM, Jim Collings wrote:
>
> So I have a jsp
So I have a jsp that needs to submit to another jsp. Both are in /content.
When I use file-name.jsp I get 404. When I use file-name, I get the action
that file-name.jsp submits to.
Any ideas on how I can work around this?
Jim C.
Musachy Barroso wrote:
> if you add a "/" to the action name, it won't append the namespace to
> it, but use it as the whole action name. If your namespace is
> "myactions", and you set the name as "/action", the action name is
> "/action", if you set it to "action" then the action name will be
> "
, type = "chain")})
On Thu, May 14, 2009 at 1:30 PM, Jim Collings wrote:
> I have an action with "execute" in the superclass (ActionSupport) being
> called by one activity and another method of the same Action called
> "doSomething" being called by ! notat
ields are not
> populated in the action, then the params interceptor is not getting
> applied, it is hard to say without more details.
>
> musachy
>
> On Thu, May 14, 2009 at 1:30 PM, Jim Collings wrote:
> > I have an action with "execute" in the superclass (Acti
I have an action with "execute" in the superclass (ActionSupport) being
called by one activity and another method of the same Action called
"doSomething" being called by ! notation in a form submit.
I've noticed that when I annotate the "doSomething" method with:
@Action(results = {...@result(nam
Dave Newton wrote:
> Jim Collings wrote:
>> A table of defaults for all of the conventions the convention plugin
...
> Hmm, I guess that's what I thought that table of results and results
> codes was. If you file a CLA you can update the wiki yourself.
Thanks. I may just
>> %{#parameters.someName}
>> %{#parameters['someName']}
>> %{parameters.someName}
>> %{parameters['someName'}
>> parameters.someName
>> parameters['someName']
>> #parameters.someName
>> #parameters['someName']
I believe it turned out to be this one above.
Many thanks to all who assisted. :-)
J
The question is simpler than it seems. It's the syntax that's the kicker.
The old script based way is like this:
<%= request.getParameter("someName") %>
What's the new way?
On Wed, May 13, 2009 at 3:28 PM, Jim Collings wrote:
> Has to be in the jsp.
> t
On May 13, 2009, at 3:16 PM, Jim Collings wrote:
>
>> It isn't in the value stack but I need to snag it. Can't find any
>> examples
>> of how to do this.
>>
>> Clue anyone?
>>
>>
>> Jim C.
>
>
---
It isn't in the value stack but I need to snag it. Can't find any examples
of how to do this.
Clue anyone?
Jim C.
Ya. That sounds like a magic trick. ;-)
On 5/13/09, Doug Pham wrote:
> Hi All,
> In the main page one of the bullet point is:
> Easy-to-test Actions - Test Struts2 Actions directly, without resorting to
> mock HTTP objects.
>
> I would love to see a few examples of these.
>
> Cheers,
> Doug
I think this is right but it might not be. It's just an example
of what I am looking for. Something like this would tremendously
simplify the docs... at least for me.
On 5/13/09, Dave Newton wrote:
> Jim Collings wrote:
>> I've read this many times but I'm not getting out
Z would be fantastic. I
suppose I will have to write it myself though but I thought I would check to
see if anyone had something like that, first.
Jim C.
On Wed, May 13, 2009 at 7:17 AM, Lukasz Lenart wrote:
> 2009/5/13 Jim Collings :
> > Is there a place where I can see what the conve
Is there a place where I can see what the conventions are that the
convention plug-in uses?
Preferably in a clean table format. I'm a fairly visual learner.
Jim C.
It's nowhere in my code. All of my results are hard coded things like
"SUCCESS". Any ideas where this is coming from and why?
Jim C.
t"
> 2- Define an interface ,say HeaderAware.
> 3- In your interceptor retrieve related values from Header and then inject
> it into your action if it implements "HeaderAware.
>
> That should do it.
>
> --- On Tue, 5/12/09, Jim Collings wrote:
>
> > From: Jim
I am also trying to retrieve an item in the header so that I can place it in
the value stack. Any ideas on how best to accomplish this?
Jim C.
On Tue, May 12, 2009 at 8:37 AM, Norris Shelton wrote:
> I looked in the interceptors and did not see one that pulled the heders.
>
>
> Norris Shelton
>
65 matches
Mail list logo