Hello,
I tried following the Struts 2 bootstrap tutorial, but even the first piece
looks like Martian to me. Could someone please give me a step by step approach
to setup struts 2 (like 1. move this file to here, 2. do this, ...), because
the tutorial itself requires a tutorial to understand
Hi,
Junit is unable to run getText() and retrieve text resources from a package.xml
file, because it appears to be a functionality that is provided by the
ActionSupport super class. Is there a way to setup my Junit test case to be
able to run that code? I've setup my test case to use a mock
Hi All,
Would someone let me know whether it's possible to tweak something so that
JUnit test code can run on an action method that calls the ActionSupport method
getText() to fetch string resources from a package.properties file. As it
stands, I keep getting a null exception when getText()
That's exactly the one Wendy! I wasn't using an IDE to code the java pages for
the HelloWorld tutorial, but my IDE of choice, if one is needed for the test,
is Eclipse 3.2.
Thanks a bunch
Session
On 6/9/07, Session Mwamufiya [EMAIL PROTECTED] wrote:
I've been able to set up struts 2
Hi Dan,
Sorry that I don't have an answer for you, but rather a question: are you
using Eclipse for your development? is that where you use the breakpoints?
I've been trying to setup struts 2 to work with Eclipse, but have not been able
to get it to work; so instead, I code the files with a
--- Session A Mwamufiya wrote:
now I need to find a tweak of some sort for Tomcat
6,
so that I don't need to restart the server every
time I
make a change to the war file. Is there a way to
have
Tomcat reload the war file as soon as it changes?
Maybe checking the Tomcat documentation would
Hello,
Has anyone experienced using HTML frames with a struts 2 app? I'm trying to do
just that, but my result page after a successful login doesn't find the pages
for the frames. Here's the result page code:
%@ taglib prefix=s uri=/struts-tags %
html
head
titleZen Server Main
This is a great link, thanks so much Mark.
Session
On 6/27/07 10:24 AM, Toni Lyytikäinen [EMAIL PROTECTED] wrote:
Or better yet, create a Login interceptor or Login filter that checks
the session and redirects to login page if the required key is not
there. Make package(s) of the actions
Hi,
I've been doing some readin on interceptors, and am wondering whether there's a
way to declare a login type of interceptor only once and have it apply across
my entire app. I'm looking for something other than having every package
extend the one in which the interceptor is defined.
Hi,
I'm using frames in my app; my login page is not within a frame, but it goes to
a page with frames once a user is authenticated. I have 2 frames: a control
frame on the left and a display frame on the right. Going from my login to the
main page (with frames) is not an issue, but I'm also
Thanks, that answers my question.
Session
--- Session A Mwamufiya wrote:
I've been doing some readin on interceptors, and am wondering whether
there's a way to declare a login type of interceptor only once and have
it apply across my entire app. I'm looking for something other than
having
Hi,
I'm using an interceptor to implement the login to my app, my welcome page uses
2 frames, and I would like to have my login jsp page load as a single window
once my session object expires when a user clicks on a link in one frame that
triggers a window to be loaded in the other frame.
Hi All,
Does anyone have a link to a simple example for unit testing an interceptor and
creating a mock ActionInvocation? The example in the Struts 2 documentation
(http://struts.apache.org/2.0.8/docs/how-can-we-test-actions.html) is hard to
understand and reuse in my code.
Thanks for any
Hi,
This is the 3rd attempt I make to get an answer on how to force a jsp result
page to be returned as a single window if html frames are used. Please give me
any hint as to how I can get this done.
Thanks,
Session
-
To
Hi,
Has anyone created unit tests (with JUnit) for interceptors? I'd like to have
an easy example to follow in order to unit test mine.
Thanks,
Session
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
result from inner action, actionResult,
result); }
-Original Message- From: Session A Mwamufiya
[mailto:[EMAIL PROTECTED] Sent: Thursday, 5 July 2007 6:23 PM To:
Struts Users Mailing List Subject: unit testing interceptors
Hi,
Has anyone created unit tests (with JUnit
Hi, I know about the target attribute, but I don't know how to set it for a
result page in struts 2. I'm using an interceptor, and I don't want the login
page to appear in the target frame if the interceptor intercepted an action
that is supposed to appear in the target frame. Is there a way
Thanks Dale, I actually fixed it by setting a target attribute in the form on
my login page, so that it always puts the resulting page at the top level.
Thanks,
Session
Session A Mwamufiya wrote:
I'm using an interceptor, and I don't want the login page to appear in
the target frame
In my case, it's ok that the login at least displays once in the frame setting,
but then if the user fails to enter the right credentials, then the subsequent
login form will appear at the top level.
Thanks for the help in understanding this,
Session
Session A Mwamufiya wrote:
Thanks Dale
Hi All,
I've installed SSL on my JBoss container (it works) and have created an
interceptor that checks that the requests to my web app are secure (using
https). I would like to redirect all non-secure requests to use ssl and have
https in the address. How can this be done? I'm not sure how
/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
Hi All,
I've installed SSL on my JBoss container (it works) and have created an
interceptor that checks that the requests to my web app are secure
(using https). I would like to redirect all non-secure requests to use
ssl and have https
Hi All,
Has anyone come across an struts 2 example that uses a tree viewer to represent
categories and questions, like what eclipse has for its online help webpage.
I'd like to copy a similar example for a project I'm working on. Any help
would be much appreciated.
Thanks,
Session
Hi,
Has anyone used a treeviewer in a struts 2 project? I'm looking to generate a
tree view from a database of categories and questions, and have the tree update
when the database is changed from a web page.
Thanks,
Session
Hi,
I have a jsp page with a form and a number of input buttons. I would like my
form action to differentiate which button has been pressed in order to show
different pages. I have private boolean variables that correspond to each
button in my jsp page being pressed, but when my action runs
; }
public String other() throws Exception { your logic here . return
SUCCESS; }
This pattern has proven wonderfully useful in our development.
Brian Trzupek
On Jul 26, 2007, at 2:31 PM, Session A Mwamufiya wrote:
Hi,
I have a jsp page with a form and a number of input
Hi,
I use the following code to display a list of buttons that are supposed to call
their associated actions when pressed:
s:form target=SMIG_Editor
s:submit value=Add Category action=CategoryEditor
cssClass=actionButton/
s:submit value=Add Question action=QuestionEditor
moving u cud try to add the method attribute in the
submit tags. u can try to fill in execute in that or just create a new
method which does what execute does. this is more like bruteforce i think
and i havent tried it either.
Himanshu
-Original Message- From: Session A Mwamufiya
using the browser.
If not, the action name is incorrect. Have you confirmed that its actually
posting a request? Also the logging and debugging interceptor for more
insight.
Session A Mwamufiya wrote:
Hi,
I use the following code to display a list of buttons that are supposed
to call
Session A Mwamufiya wrote:
Hi All,
Has anyone come across an struts 2 example that uses a tree viewer to
represent categories and questions, like what eclipse has for its
online help webpage. I'd like to copy a similar example for a project
I'm working on. Any help would be much appreciated
Hello All,
Has anyone created a tree view in a web app? I'm looking to use a collapsible
tree to represent elements from a MySQL database, which will be modified by
some actions. I am looking for a good tutorial/example that I could follow;
one that is complete from start to finish.
Thanks
Hi,
I have one frame that is handled by an action that displays a treeview, and
another frame that is handled by another set of actions that edit the different
types of elements in the tree. I would like to have the treeview action
refresh once an editor action is performed. How would I go
Hi All,
Please help me build a tree viewer. I know that someone must have developed a
web app that uses a tree viewer that loads data from a database. Please walk
me through it or send me a tutorial link.
Thanks,
Session
-
/treeview.html
This tree is based on scriptaculous (to manage AJAX, editable, droppable
node,...)
Regards Angelo
2007/7/30, Session A Mwamufiya [EMAIL PROTECTED]:
Hi All,
Please help me build a tree viewer. I know that someone must have
developed a web app that uses a tree viewer
is based on scriptaculous (to manage AJAX, editable, droppable
node,...)
Regards Angelo
2007/7/30, Session A Mwamufiya [EMAIL PROTECTED]:
Hi All,
Please help me build a tree viewer. I know that someone must have
developed a web app that uses a tree viewer that loads data from
Hi All,
I'm sorry to keep harassing everyone with my need for a treeview tutorial. I
have a module I would like to deliver in 2 days in which I need to make use of
a tree viewer to represent data. I have received links from others to demo
pages of treeviews (thank you for that), but none of
the data from
your database, instead of returning static data as in the example.
//I haven't seen any step by step tutorial on how to use the tree
musachy
On 7/30/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
Hi All,
I'm sorry to keep harassing everyone with my need for a treeview
Hi,
I've been trying for 2 days straight (no sleep) to get a tutorial for creating
a tree viewer, but to no avail (all examples and links given were incomplete,
but thanks for sending them though). I would like to contact Ted Husted, who's
name appears at the top of the tutorials
2007/7/30, Session A Mwamufiya [EMAIL PROTECTED]:
Hi All,
Please help me build a tree viewer. I know that someone must have
developed a web app that uses a tree viewer that loads data from a
database. Please walk me through it or send me a tutorial link.
Thanks, Session
You have a very valid point, and I will get to it in 2 weeks' time, once I'm
done with my program assignments. It surely was an experience to go through.
Best,
Session
How about writing a tutorial that others could find and follow?
-Original Message- From: Session A Mwamufiya
Hi,
They are both possible. Take a look at
http://jscontrolstags.sourceforge.net/controls/treeview/treeview.html
Don't ask me for a tutorial or complete example on trees, because I've
struggled to get that information for the past 2 days. I may end up writing a
tutorial once I'm done with
Hi,
I have a page with various strut objects in a form (buttons, textfields, and
listboxes), and would like to be able to control the layout. I tried using a
css file to set the size and font of buttons:
- my jsp page contains:
td valign=top
s:form target=SMIG_Editor
s:submit value=Add
Hi,
I have a number of result pages for my action, and I would like them to appear
in different frames. Is there a way to define the target frame for each result
page?
Thanks,
Session
-
To unsubscribe, e-mail: [EMAIL
Hi,
Is there a way to configure an s:form tag so that the 2 submit buttons appear
side by side instead of one under the other? I use a css file with
input.actionButtons {float: left;} to move both of them to the left, but
they're not appearing next to each other.
Thanks,
Session
Hi,
I have two frames and would like to have the submit button from one frame be
handled by that frame's action and do the following:
1. capture values from the frame and put them in the session object
2. load a different page in the current frame
3. force the other frame to reload
Getting 1
I got it cleared up, it was an issue with not using the absolute path in my
link.
Thanks,
Session
Hi, Do you have your form's theme set to css_xhtml ?
Leena
On 7/31/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
Hi,
I have a page with various strut objects in a form (buttons
Hi,
Is it possible to have an action process a page and launch an alert dialog box
if it encounters an issue that the user should be made aware of? Additionally,
how would I launch a confirmation dialog box and get the user's choice?
Thanks,
Session
Hi again,
How should I go about obtaining a user's selection in an s:select element from
my action's code?
Thanks,
Session
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
Forgive the flurry of posts. I'd like to be able to do two things with tree
nodes:
- determine which one was clicked from my action code (getting the
corresponding id is enough)
- display the nodes in different colors depending on the type of the object. I
can determine the type of the
Hi,
Could someone tell me how in my action code I could get the item that was
selected by a user in a s:select list?
Thanks,
Session
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hi,
I've posted a number of times regarding this subject, but have not gotten a
reply. I would think that others have used s:select before and know how to
obtain a user's selection in data. Please help, because I have been stuck for
a number of hours now.
Thanks,
Session
by the framework and all we need
to do is access the property that we've associated with the selection list.
Thanks a million, and again sorry for the spam.
Best,
Session
Session A Mwamufiya wrote:
Could someone tell me how in my action code I could get the item that
was selected by a user
Hi,
I know that I've sent many questions today, so please bear with me once more.
I'd like to have my action popup a message to the user if a submit button is
pressed and the entered data is incorrect. Is that possible? Or if not from
struts 2, is there a way for struts 2 to execute html
Hi,
I was able to get the selected item from a s:select element, which can be
accessed from the property variable that is associated with it. Now I'm trying
to do the same with the s:tree element. But it seems as though there is no
property object association with s:tree. How would I go
Hi again,
Anyone has a clue about obtaining a user's selection in an s:tree element? I
used the example from the showcase, and I don't fully understand the following
script:
script
function treeNodeSelected(nodeId) {
dojo.io.bind({
url: s:url
Hi,
I have a page with input fields, and would like my action to populate those
fields before they get displayed. This page is handled by a certain action,
but it is the result page from a different action (I click on a button in the
previous action form, and this one gets called up). I put
is displayed. Is there something else that
needs to be setup in the jsp?
Thanks,
Session
Hi,
Implement the prepare method in your action class and add the code in that
method.
Thanks,
Nuwan
Session A Mwamufiya wrote:
Hi,
I have a page with input fields, and would like my action
/myFirstAction.jsp /result result
name=second type=redirectAction goSecond /result /action action
name=goSecond class=com.myorg.MySecondAction result name=success
/jsp/mySecondAction.jsp /result /action
Session A Mwamufiya wrote:
Hi,
I have a page with input fields, and would like my
struts 2.0.6, is redirectAction not defined for it?
--- Session A Mwamufiya wrote:
I tried to follow this approach, but my server fails in struts.xml,
stating that there's an error in building results for my first action.
Does it say anything in particular about the error?
d
you are right, it now works. Thanks a lot for your help and patience
Best,
Session
I believe the correct spelling is redirect-action
http://cwiki.apache.org/WW/action-configuration.html
On 8/6/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
I get the following: Caused
Hi,
I want to set up my own validate method to validate fields in my own way, but
I'm not sure how to set up the method. I don't know how to set or clear the
validation error message. Is it ok just to use the action's error stack, like
this:
public void validate() {
if
error.
If you are using the XHTML theme, the error will appear above the field.
This should set and clear the validation message for you. If you are
using the simple theme you have to add the s:fielderror tag.
On 8/6/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
Hi,
I want to set
the
javascript parts manually (it isn't very hard anyway).
On 8/6/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
Hi again,
Anyone has a clue about obtaining a user's selection in an s:tree
element? I used the example from the showcase, and I don't fully
understand the following
Hello,
I've been trying to get the tree view code from the showcase to work for many
days now, and I'm literally stuck. I use logging to determine whether action
methods are called or not, and the following script never gets to the
dynamicTreeSelectAction action:
script
function
}); } );
musachy
On 8/6/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
Hello,
I've been trying to get the tree view code from the showcase to work
for many days now, and I'm literally stuck. I use logging to
determine whether action methods are called or not, and the following
in the
object that is passed to the function.
musachy
On 8/6/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
Hi,
Thanks so much for the breakthrough. I implemented the change, and now
the action gets called. The only thing now is that I don't seem to be
getting an actual nodeId in the display
Hi,
Is there a way to implement access control in struts 2? I presume that we can
use an interceptor, but I'm not sure how to map actions to specific roles. Any
ideas?
Thanks,
Session
-
To unsubscribe, e-mail: [EMAIL
Thanks for the replies guys, but is there an example that I can follow? It
seems to me that a user's roles are defined in a request object, but I'm not
sure how. I'm continuing to search online for examples.
Thanks,
Session
Session A Mwamufiya wrote:
Is there a way to implement access
Hi,
Is there a way that when a s:tree is reloaded, it expends to a particular level
of expansion? I presume that I will save that expansion level in my session
object, but I'm not sure how to get it or set the tree to it, or if it's even
possible.
Thanks,
Session
I'm relaunching this thread in case an s:tree expert may have missed it the
first time around :).
Thanks for any help,
Session
Hi,
Is there a way that when a s:tree is reloaded, it expends to a particular
level of expansion? I presume that I will save that expansion level in
my session
Hi,
I have an s:tree with category, question, and answer elements, and I'd like to
differentiate them a bit by having a different icon for each type of element.
Is there a way to specify which icon to use for an element of the tree? I know
which function gets called to obtain the root
Hi,
I've been trying to not have my validation fire when I navigate to a form and
populate it with data to be edited. Unfortunately, it still fires. To
clarify, I'm using both xml validation and my action is validateable with a
validate() method. I used the approach from the HelloWorld
A bit more info on this. My struts.xml (actually, a different config file
that's called from struts.xml) contains the following:
action name=SMIGSelection
class=edu.cmu.sei.smart.zen.server.smigmaintenance.SMIGSelection
result name=success/pages/smigmaintenance/SMIGSelection.jsp/result
Any ideas about how to stop a form from validating the data when it first gets
launch?
Thanks
A bit more info on this. My struts.xml (actually, a different config
file that's called from struts.xml) contains the following:
action name=SMIGSelection
Hi,
I've been trying for some time to get the following logic to work:
s:if test=freshSmigFlag == false
s:checkbox key=overwriteCheckbox name=overwriteCheck/s:checkbox
/s:if
where freshSmigFlag is a variable in my action, and there is a getter and
setter defined for it.
I also tried to
Hi,
I tried to set some UI elements (button, select, ...) to be disabled, but they
are still clickable. I would like to disable certain UI objects from an action
code, where some logical verification will occur as the form is prepared. Any
ideas about how this can be done?
Thanks,
Session
Hi,
I have the following checkbox in my jsp:
s:checkbox key=overwriteCheckbox name=overwriteFlag labelposition=left
onclick=if (this.checked) {javascript:return
confirm('%{getText('elementOverwriteConfirmation')}')} /
In my action, I have defined overwriteFlag as a String variable, and have a
both, and neither
worked.
Thanks,
Session
Session A Mwamufiya wrote:
s:checkbox key=overwriteCheckbox name=overwriteFlag
Isn't key a shorthand for name, value, and label? If so, I'm not sure
which of name and key will win. Look in the generated html--is the name
attribute
I appreciate the explanation on how it's all supposed to work, but given my
limited experience with struts 2 and this type of framework as a whole, I am
not yet proficient enough to figure out where things are being generated. I
use log4j to log a number of events in my code, but I don't even
Hi,
Struts displays the jsp objects the way it likes, for example, aligning buttons
on the right even if I put them inside a div align=left/div tag. Is
there a way to take control of how the layout is displayed without using the
simple theme (that doesn't have a nice UI by the way)?
Thanks,
Hi, I have an action that is validateable and uses the validate method to
ensure that an element isn't added to the database if it already exists in
there. Unfortunately, the validation occurs as soon as my form is launched. I
tried to follow the approach from the helloworld example to not
param
name=excludeMethods execute,input,back,cancel,browse, detail, delete,
goAdd, goModif, view/ param /interceptor-ref
So add the name of your first method in the excludeMethods, and the
validation will not occures.
Session A Mwamufiya [EMAIL PROTECTED] 13/08/2007 08:58 Veuillez
Hi,
I've been stuck trying to capture, in my action, the set of elements placed in
one of the lists of an s:optiontransferselect tag. I can refer to the
selected element in the list by using the name of the list, but how do I access
all of the elements in the list? (they were obtained by
Hi,
I would like to set a textbox to readonly when a flag is set in my action. I
have the following jsp call:
s:textfield name=name label=Name readonly=if(%{editingFlag==true}){return
'true'}/
but the textfield is not readonly, and the page source reflects it. BTW,
editingFlag is set in the
Anyone familiar with the way the s:optiontransferselect tag works? I'm
looking to retrieve the content of the entire right-hand list (not just a
selected item in it). I would assume that there's a way to do that, but I'm
not sure how. Any ideas?
Thanks,
Hi,
I've been stuck trying to
Expert struts programmers, please take a look at this thread. I believe it
should be a straight forward answer, but I haven't received any replies since I
launched the thread. I don't mean to pester you, but I'm really trying to get
over this hurdle.
Thanks,
Anyone familiar with the way
,
Session
Give it an id (or name? I forget) and supply set/get methods in the
action?
Isn't it just two select boxes (for all intents and purposes, at least
regarding what you're doing)?
--- Session A Mwamufiya [EMAIL PROTECTED] wrote:
Expert struts programmers, please take a look
Hi,
Is there a way, with the current version of struts 2, to use a conditional
statement to color code elements that are displayed in a s:select tag. By
this, I mean that if I have items in my list that are 4, then they're red, and
if they are = 4, then they are blue. Obviously, this is not
?
On 8/13/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
Hi, I have an action that is validateable and uses the validate method
to ensure that an element isn't added to the database if it already
exists in there. Unfortunately, the validation occurs as soon as my
form is launched. I
Thanks Manu. I'm new with the tree, and am attempting to implement one for a
project I'm working on.
I'm having a number of difficulties:
- I can't manage to reload at the node level I want, it always reloads with
root showing
- it takes a long time to load
and I have a couple of feature
Hi,
I started a thread on this topic a while back, but the example I was guided to
was hard to understand and implement.
The question is straight forward: How do you get the value of a checkbox from
within an action?
- I have named my s:checkbox in the jsp, and have a private String element
I had actually modified the name of the checkbox and its property name in the
action (for conformity reasons), but I had forgotten to change the names of the
get/set methods; silly me.
Now it works. Sorry for the confusion, and thanks for the eager assistance.
Best,
Session
Session
Ok, thanks. I'll look into creating custom templates and see how far I get.
Thanks,
Session
Session A Mwamufiya wrote:
Hi,
Is there a way, with the current version of struts 2, to use a
conditional statement to color code elements that are displayed in a
s:select tag. By this, I mean
That happened to me once, and it ended up that the s:select tag was improperly
written. Make sure that you are returning an appropriate mapstring, string
from the function that is associated to the list attribute in s:select. It
expects a map that maps IDs to strings that get displayed.
Hope
Hi,
I'm attempting to follow a Dojo tree widget tutorial,
http://willcode4beer.com/ware.jsp?set=dojoTreeWidget, where Dojo is used to
define a tree. Unfortunately nothing comes up on the page, even though the
page source shows the tree definition.
The tree page is set as the result page for
send me the link to a working version of the
file?
Thanks,
Session A. Mwamufiya Carnegie Mellon University MBA | Tepper School of
Business MSE (software eng.) | School of Computer Science T: (412) 508-5455
| [EMAIL PROTECTED]
-Original Message- From: Session A Mwamufiya
[mailto
Web
Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you
don't have to reinvent it!
Session A Mwamufiya wrote:
Who has experience using Dojo? Please help me get it setup. I added
the dojo.js file from the 0.9.0 release (I think it's the latest) to my
webcontent folder
Hi,
Has anyone been able to find a way to lazy-load the s:tree tag. I'm having
some performance issues with a really big tree. Please send me an example.
Thanks,
Session
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Hi,
I haven't kept up with progress made in struts 2.0.9, so I was wondering
whether there have been changes made to the s:tree tag that would now allow
nodes to have icons. If so, please refer me to an example.
Thanks,
Session
TreeViewer people, and Dojo fans, please chime in your comments. I wanted to
switch from struts with s:tree to Dojo, but I can't find any online examples
where Dojo obtains the tree data from a java class. Do you have any examples I
could look at?
Thanks,
Session
Hi,
Has anyone been
Anyone knows whether this feature has been added in yet?
Session A Mwamufiya wrote:
I'm relaunching this thread in case an s:tree expert may have missed it
the first time around :).
Is there a way that when a s:tree is reloaded, it expends to a
particular level of expansion? I presume
1 - 100 of 137 matches
Mail list logo