John,
When I was first learning Struts, I saw that kind of page when I had an
incorrect action method. I use execute() and there are two performs. One
with this ServletRequest and ServletResponse while the other has
HttpServletRequest and HttpServletResponse. Have you tried using execute()
in
hi
i have the following codes in my JSP :
input type=hidden name=userID value=bean:write name=user
property=userID scope=request//
which converts into input type=hidden name=userID value=1/.
If validation is used and there are errors, the input page is displayed.
Now the above value became :
hi sebastian,
If you have configured action to use redirect ( which is
normal case ), ur request attributes will be lost.
Try putting that bean seesion scope.
sachin
xoriant, mumbai
PS : also make sure, how does struts take us back to input page ?( using
forward or redirect i
On Sun, 19 Sep 2004 15:44:14 +0530, ravi naraharasetty
[EMAIL PROTECTED] wrote:
Hi All,
How do I access JSF Managed Bean which is in session scope into a
Struts Action Class.
Assume you have a managed bean named foo that you'd like to access,
of type FooBean.
FacesContext fc =
First I would ask, why aren't you using the Struts tags (such as
html:hidden)? I assume that you are using them to render your other
inputs (such as those of type text).
But, to answer your question, it's a matter of scope. When the page
containing the form is first rendered, the hidden
Could you be little bit clear at your JSP?
Thanks.
Jitender Kumar C.V.
I dont think this is right solution..
Jitender Kumar C.V.
On Sun, 19 Sep 2004 19:17:25 -0400 (EDT), Frank W. Zammetti (MLists)
[EMAIL PROTECTED] wrote:
Erik's answer is what I would call the correct one...
I agree as well, but just wanted to point out one additional detail
... if you override the equals() method, you will probably also want
to
Why didnt I use html:hidden?
Whenever I use that I have parsing error and exception thrown which I
think is because of the bean:write within html:hidden. Using input
didn't cause any problem.
If html:hidden will not cause the problem and I am doing it the wrong
way. Pls advise.
Ok..now I
I thought you can't control redirect/forwrd for validation? I can
control that for mapping forward only.
Sebastian
On Mon, 2004-09-20 at 15:14, Sachin Bhutada wrote:
hi sebastian,
If you have configured action to use redirect ( which is
normal case ), ur request attributes will
Hi Sebastian,
I would suggest you to manually call validate method and let your data
still remains in the request scope incase of validation being failed. I
feel this to be a better solution for your scenario.
Jitender Kumar C.V.
Hi,
In recent past I have been working with struts Map-backed Action Form.
It can accept any number of HTML form parameters without declaring
each field as accessors or in an external XML file.
This seems to be a good approach , as I don't need to create a new
ActionForm for my data entry
I just finished setting up a Valve for (Tomcat) IP restriction and it
worked fine.
Since I am in a rare good mood, I decided that it was time for me to
give some positive feedback where it is due, since I mostly just complain.
The Tomcat documentation, and the Struts documentation, though not
Perhaps you would like to use the html-el tags (which also come with the
Struts dist), like this:
html-el:hidden property=${myBean.myField}/
But there is nothing wrong with using the standard html hidden input as
far as I know (but you give up some Struts luxuries).
Using Session scope is one
Tried changing it to session scpope. Guess wat, I hit into another
problem. Because the values are in session scope, whenever there's
validation errors, the values entered by user previously was reset to
whats set in session!
Guess have to continue reading to find a workaround.. If only struts
What did you change to Session scope?
It looks to me like you are trying to put the current user ID into the
form as a hidden variable. I would have thought that your user bean
would already have been in Session scope . . . not the case? Are you
retrieving other values for your form from
Hi Guys,
I am using the Struts Frame Work and Servlets in my Application. And It's working
fine...
But the Problem is
It's working only the Static IP Address Systems ...but through Proxy my application
is not working .
In my application one of the main future is Download the File
Hi All,
The inability to set initial values for struts html:radio/ element is
causing me some real issues. I have a view action that I use to redirect
to a form with radio buttons, that itself will call a subsequent action
to actually handle the business logic of the operation. The page relies
Ok I resolved it and I think this is the best way at least for now.
In my ActionForm, set the attribute back in request if there's error :
if(errors != null) {
ActionForm form = new ActionForm();
form.set
form.set
request.setAttribute(user, form);
}
Sebastian
On Mon, 2004-09-20 at
Do you keep your form in the request or session scope?
Ricardo Gladwell [EMAIL PROTECTED] schrieb am
20.09.2004, 11:38:05:
Hi All,
The inability to set initial values for struts element is
causing me some real issues. I have a view action that I use to redirect
to a form with radio
Well, validate=false is now on my action and in the code is
DynaValidatorForm dynForm = (DynaValidatorForm) form;
ActionErrors dynFormErrors = dynForm.validate(mapping, request);
if (! dynFormErrors.isEmpty()) {
logger.debug(invalid form);
saveErrors(request, errors);
return
Hi,
Both forms are stored in the request scope, although I do not explicitly
set that anywhere. Should I be setting the scope for the form in the
session?
Martin Schaefer wrote:
Do you keep your form in the request or session scope?
Ricardo Gladwell [EMAIL PROTECTED] schrieb am
20.09.2004,
Hi:
I am displaying a hierarchy of objects in a textarea using the nested tags. Whenever a
user deletes whatever is in the textarea for a particular object, I want to remove
that object from the list.
Has anyone done this in the past?? If so, could you please share how you accomplished
it.
Hi,
I have been trying for about 4 hours to get something to work that would
take about 4 minutes using scriplets! (and I can find no reference to this
in my Core Jstl book).
Basically, I have an arraylist of sound objects in the session and when the
user clicks one - it should play. The
c:out value=/${path}${sound.fileName}/
Quoting andy wix [EMAIL PROTECTED]:
Hi,
I have been trying for about 4 hours to get something to work that would
take about 4 minutes using scriplets! (and I can find no reference to this
in my Core Jstl book).
Basically, I have an arraylist of
c:forEach var=sound items=${Sounds} varStatus=status
tr
tda href= XX c:out value=${sound.fileName}//a/td
/tr
/c:forEach
where XX is the problem bit. I want to concatenate / + path +
${sound.fileName} so that the href gets the full path and but only the
filename is
Hi All,
Are there any demo applications/tutorials that explain how to
integrate JSF+Tiles with Struts. Please redirect me relevant urls.
Thanks Regards,
Kumar.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
For reference, here's a snippet from the JSTL 1.0 Spec., Section 3.1 Expressions
and Attribute Values:
It is also possible for an attribute to contain more than one EL expression,
mixed with static text. For example, the following would display Price of
productName is productPrice for a list of
Hi Kumar,
the struts-faces-lib contains a sample on that.
it is important to have this in struts-config:
controller
set-property property=inputForward value=true/
set-property property=processorClass
value=org.apache.struts.faces.application.FacesTilesRequestProcessor/
/controller
Struts-FAces
Hi,
Test like this!
In JSP
input type=hidden property=userID /
write get and set method for userID in ActionForm
On 20 Sep 2004 17:44:15 +0800, Sebastian Ho
[EMAIL PROTECTED] wrote:
Ok I resolved it and I think this is the best way at least for now.
In my ActionForm, set the
Hari Haran wrote:
Hi,
In recent past I have been working with struts Map-backed Action Form.
It can accept any number of HTML form parameters without declaring
each field as accessors or in an external XML file.
This seems to be a good approach , as I don't need to create a new
ActionForm for my
Hi All,
What is the main objective/purpose of integrating JSF with Struts. If
I correctly understood I am thinking of achieving below objectives
with their integration:
a. use JSF for presentation layer viewing/validation/exception
handling/internationalization
b. use Struts for controller layer
I think the main reasons are
a. You can start using JSF with existing apps and not have to rewrite
apps that may have been written with struts.
b. That you can use tiles as your templating mechanism, while using
your JSF forms.
So far I've only been using JSF and struts separately, but I'm
Hi,
I'm just starting with Struts 1.1 and am trying to set up a datasource. When I
compile my class I get a worning that Action.Data_Source_Key is deprecated. Could you
point me to where I can look up a newer API? All my books use DATA_SOURCE_KEY. What
do I use insted?
Here is the line the
Hello Nadia,
use org.apache.struts.Globals.DATA_SOURCE_KEY
***
NK Hi,
NK I'm just starting with Struts 1.1 and am trying to set up a
NK datasource. When I compile my class I get a worning that
NK Action.Data_Source_Key is
You need to have a delete button associated with each individual item
you wish to delete.
In your nested:submit property=deleteMe /
your class should be defined as
public YourClass {
SomeParent myParent;
//: This method will be called when the delete button is pushed
public void
Hello,
I've just migrated our application from strtus 1.1 to 1.2.4.
I wanted to add a doubleRange check on one of the fields in my jsp. After
much hassle I found out that doubleRange validation is not defined in the
validation-rules file. Whereas, according to the documentation it is a
Thanks Dirk!
Nadia
-Original Message-
From: Dirk Markert [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 10:10 AM
To: Struts Users Mailing List
Subject: Re: Data_Source_Key depricated, newby question
Hello Nadia,
use org.apache.struts.Globals.DATA_SOURCE_KEY
Thanks for the reply and the expertise. To answer questions you raised:
I'm having a hard time understanding why anyone would want to spend
the extra server side processing cycles for doing this.
The reasons would be:
1) to make debugging HTML display problems easier to track down.
2) to
Craig McClanahan wrote:
On Sun, 19 Sep 2004 15:44:14 +0530, ravi naraharasetty
[EMAIL PROTECTED] wrote:
Hi All,
How do I access JSF Managed Bean which is in session scope into a
Struts Action Class.
Assume you have a managed bean named foo that you'd like to access,
of type FooBean.
The latest announcement on the struts site has a typo. The date of the
announcement reads 19 Sep 2003 (instead of 2004). No big deal but
thought I would mention it.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
You should be careful with this.
Because this:
body bgcolor=red
table
tr
tdimg src=http://struts.apache.org/images/asf_logo_wide.gif;img
src=http://struts.apache.org/images/asf_logo_wide.gif;/td
/tr
/table
/body
does not render the same as this:
body bgcolor=red
table
tr
td
img
Folks,
I've seen quite a few references to Struts and Spring integration
while browsing this mail archive. I was wondering why would I ever
want to use Spring with Struts application?
I hope people who have experience with both of these framework would
shed some light on this question.
Regards,
Spring is great for wiring your application together. It decouples
your application layers and reduces the amount of code you have to
write. If you and your team already know struts, you can use it
instead of Spring's MVC framework. I've written a couple applications
using this combination. It
Thanks for pointing this out - I've corrected this in cvs and the web site
will be updated soon.
Niall
- Original Message -
From: Sean Schofield [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, September 20, 2004 3:51 PM
Subject: [site] Typo in
Download Firestorm/DAO and study generated source code.
www.codefutures.com/products/firestorm/
Shed.
-Original Message-
From: Manuel Wissmann [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 18, 2004 4:39 AM
To: [EMAIL PROTECTED]
Subject: Tutorial for DAO with Struts
Hi
I'm having troubles with html:options tag, I was hoping for some insight.
I've got an ActionForm called myForm.
On that form, I've got a String field iD, and a Collection (Vector) of
Struts LabelValueBeans called myCollection. Appropriate getters and
setters, too. Code below.
On my JSP. I've
http://www.sourcebeat.com/docs/Spring%20Live/Rev_1/Spring%20Live_SampleChapter.pdf
On Mon, 20 Sep 2004 12:41:34 -0400, Hollaway, Shedrick CIV (TRFKB
C600) [EMAIL PROTECTED] wrote:
Download Firestorm/DAO and study generated source code.
www.codefutures.com/products/firestorm/
Shed.
Hi to everyone!
I have already used taglibs before but I am having some trouble making
jstl core 1.1.1 taglib to evaluate expression languages on Tomcat 5.0.27.
I have all of the required libraries on WEB-INF/lib/ (jstl, standard,
jdbc_2_0_stdext, xalan and xerces).
Tomcat does not give
I don't think you're using the set tag properly.
Try:
c:set var='a' value=1/c:out value='${a}'/
hope it helps,
Anna Kerekes
From: Pedro Salgado [mailto:[EMAIL PROTECTED]
Sent: Mon 20/09/2004 1:15 PM
To: Struts Users List
Subject: standard-1.1.1 expression
Try removing the bean:define
And setting your line:
html:options collection=nameList property=name labelProperty=name/
to:
html:options collection=PageBeans property=name labelProperty=name/
HTH,
Amin
-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Monday,
Now that I've upgraded to Struts 1.2, I've noticed a difference in how
my application is handled. It seems that I can no longer redirect to
an error page when there is a bug in the JSP.
I used to get the Tomcat 500 error page but its no longer coming up. I
also get an error logged to the
Hi all
I need to set a cookie in a method in my action class (my whole app is
HTML so no sessions, just the login screen and a cookie)
three questions
1. How do I set a cookie inside of an Action class that I can check
using javascript? Normally I would do something like
boolean saveUser(String
Muhammad Momin Rashid wrote:
Hello,
I've just migrated our application from strtus 1.1 to 1.2.4.
I wanted to add a doubleRange check on one of the fields in my jsp. After
much hassle I found out that doubleRange validation is not defined in the
validation-rules file. Whereas, according to the
Hello,
I am having some problems running the program below (it does not run the way it
should).
*The output I get is***
before a a is null after a
*The desired output is
before a init after a
I'm not sure why ${a} is
You should look up container Data Source via JNDI (and not use Struts
Data Source any more)
.V
Dirk Markert wrote:
Hello Nadia,
use org.apache.struts.Globals.DATA_SOURCE_KEY
***
NK Hi,
NK I'm just starting with Struts 1.1 and am
I tried your way:
%@ taglib uri=/tags/struts-html prefix=html %
%@ taglib uri=/tags/struts-bean prefix=bean %
%@ page import=org.dhsinfo.content.PageBean %
html:select size=1 property=anything
multiple=false
html:options collection=PageBeans
property=name labelProperty=name/
/html:select
%
java.lang.String a = init;
request.setAttribute(a,a);
%
c:out value=${a} /
or
c:set var=a value=init /
c:out value=${a} /
Mark
On 20 Sep 2004, at 20:16, Anna Kerekes wrote:
Hello,
I am having some problems running the program below (it does not run
the way it should).
*The
The first way works..thankyou
However, the second way does not :( I get the following error:
exception:
javax.servlet.ServletException: javax/servlet/jsp/el/VariableResolver
root cause:
java.lang.NoClassDefFoundError: javax/servlet/jsp/el/VariableResolver
Any ideas?
Hi,
This is an old issue, but have a small twist in the requirements that I need
to satisfy and that can't be done using the solution outlined in the
following article. I am just wondering if things have changed in tha past
one year. Also, I apologize for the cross-post, but I thought it was
Thorbjørn Ravn Andersen wrote:
On Sun, 19 Sep 2004 22:43:04 +0200, Johannes Wolfgang Woger
[EMAIL PROTECTED] wrote:
Hi.
I have to print a html page generated form a jsp-file.
It should be formated via FOP.
Image the jsp shown on the browser, with a print button to print
a fomatted version of
Caroline - I have 3 suggestions.
The first is to make sure that you are using the correct form name in
your html:form, and that the form definition is setup correctly in
struts-config. The error message you are getting seems (to me at least)
suspiciously like it can't find a form property named
Allistair Crossley wrote the following on 9/20/2004 6:12 AM:
DynaValidatorForm dynForm = (DynaValidatorForm) form;
ActionErrors dynFormErrors = dynForm.validate(mapping, request);
I just tested this and it works fine.
--
Rick
-
To
Is there a way to create a form-bean dynamically? I'd like to have a
form dynamically created and populated with the request parameters.
Right now, I won't be using validation.
- Dave
Hi, thanks for the reply.
First, 'anything' is the property for the html:select
tag; therefore, 'anything' has nothing to do
with my particular problem.
Second, There is no problem with the database
operation. Data are retrieved and can be displayed
using the c:forEach tag. Now, it
All
Another newbie question.
I have a list of 10 servers I need to loop through and connect to in
turn inside of my LoginAction object
what's the best way to keep the list of attributes so they arent hard
coded (I can't use a database)
How would I create an ApplicationResources.properties?
This is my point though - if what you posted is your entire
listpages.jsp page (you haven't selectively cut/pasted) then your
problem IS with the anything - you do not have an html:form tag
wrapping your html:select, which is a nono. Since it can't find the form
bean, it can't find the
Ahhh
Do I need to declare the resource bundle in the struts-config.xml file
the way the messageresources are declared.
message-resources parameter=MessageResources /
or is that only for the message resouces?
On Mon, 20 Sep 2004 16:02:43 -0400, Slattery, Tim - BLS
[EMAIL PROTECTED] wrote:
Do I need to declare the resource bundle in the
struts-config.xml file the way the messageresources are declared.
Only if you want the html:errors or html:messages tags to be able to
access it.
--
Tim Slattery
[EMAIL PROTECTED]
Interesting..
what about
c:set var=a value=${'init'} /
?
On 20 Sep 2004, at 21:01, Anna Kerekes wrote:
The first way works..thankyou
However, the second way does not :( I get the following error:
exception:
javax.servlet.ServletException: javax/servlet/jsp/el/VariableResolver
root cause:
You could use a lazy ActionForm:
http://www.niallp.pwp.blueyonder.co.uk/#lazydynabean
or even just a straight LazyDynaBean
form-bean name=myForm
type=org.apache.commons.beanutils.LazyDynaBean/
For both of these, you need Struts 1.2.4 and BeanUtils 1.7.0
Niall
- Original
No, I'm getting the same HTTP Status 500 error as before...
I've also tried all the different scopes in the set tag, but no luck
Does the var have to be in a specific format? Is there anything else I can try?
From: Mark Lowe [mailto:[EMAIL PROTECTED]
I see what you mean now. You are correct. I have to
wrap html:select tag with a html:form tag. This
is not the first time that I stumble on this problem.
I should surely learn a lesson now.
Thanks a lot for pointing out my mistake. This
mistake should be imprinted in my head from now on.
Both the client-side and the server-side validation are executing instead of
just the client-side. I know it has something to do with the way I've coded
the save button. The underlying problem is that I want to use images and
roll-over images for the save button but I also want the enter key to
If I'm understanding your scenario correctly your onclick needs to call a
function that will call the submit() on the form only if the validation
passes.
Barnett, Brian W. [EMAIL PROTECTED] wrote on 09/20/2004 04:51:55
PM:
Both the client-side and the server-side validation are executing
I could be wrong, and i don't have the time to verify this with code
right now, but it's possible that the reason the form still gets
submitted is because you're calling form.submit() directly. That
might be bypassing the onsubmit=return validateMyForm(this). You
*do* have that, right? I don't
I'm running eclipse 3.0, myeclipse 30b2, apache 5.0.27 and struts 1.1
if I change the ApplicationResources.properties file then redeploy it to
tomcat, my struts web app does not see
the change. I need to stop/start tomcat to see a change in the properties
file.
My question, is there a
Thanks for your input bmf5 and Hubert. For those interested, here are some
code snippets that worked for me:
html:form action=/gradeLevel onsubmit=return validateMe(this);
...
input type=image src=/images/btn_primary_action_save.gif align=right
From: [EMAIL PROTECTED]
if I change the ApplicationResources.properties file then redeploy it to
tomcat, my struts web app does not see
the change. I need to stop/start tomcat to see a change in the properties
file.
My question, is there a struts or tomcat configuration value that will
make
Ok, yeah, I thought I saw something like that. Thanks.
- Dave
-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 3:44 PM
To: Struts Users Mailing List
Subject: Re: Dyna Forms
You could use a lazy ActionForm:
I have raised an issue on struts-dev which I think impacts struts-user
as well. So, here is a cross posting, which under these cirucmstancs
makes sense, I think.
Looking over Struts 1.2, I see that my ImageButtonBean, an idea
discarded for improvements some time ago, made it into the Struts
Michael McGrady wrote the following on 9/20/2004 7:52 PM:
I have a real concern that Struts is going to continue to be bloated
with what are not Struts, not part of the framework, but what are
instead really very useful uses of Struts. DispatchAction and its
progeny are just one example of
Notes for upgrading to the new Struts 1.2.4 version can be found here:
http://wiki.apache.org/struts/StrutsUpgrade
Niall
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
for simplicty you can use something like this on your page
fmt:setLocale value=${lang_id} /
fmt:bundle basename=translation
fmt:message key=site.nme /
input type=text name=nme value=${param.nme} /
you have to have your own translation_language.properties file on your
appclasses dir
On Thu, 16
I need to secure my login page only, just to prevent the username/password
from being picked up.
What is the quickest and dirtiest way to do this?
I was thinking of something along the line of checking in my login.jsp for
request.isSecure() and then response.redirect()ing to https, but my
I'm working from the examples here:
http://www.developer.com/java/ejb/article.php/3321521
I have an array of values that are sent to a page for editing. The page
is coming up ok with the correct text box values as seen below
(item[0].xxx, etc). But when the form is submitted the changes don't
Rick Reumann wrote:
Michael McGrady wrote the following on 9/20/2004 7:52 PM:
I have a real concern that Struts is going to continue to be bloated
with what are not Struts, not part of the framework, but what are
instead really very useful uses of Struts. DispatchAction and its
progeny are just
Which part of your code generated this? Can I have a look over it?
Thanks,
Jitender Kumar C.V.
Hi
The output doesn't even print out the nextController in the method
which I inserted..
Thanks
--
JSP
--
html:submit value=Reset property=action/
html:submit property=action value=Next
bean:message
Hi,
I need the url that you are giving for html:form and also the mapping of
the same in struts-config.xml...The error might be like you are using some
conflicting properties because, forward, href, page or action are
exclusive properties. Any combination of these properties for a tag
Sebastian,
Jitender is right about a tag only allowing one of forward, href, page
or action as an attribute in the tag. However, the Jasper Exception is
telling you which tag: in an html:rewrite. I just verified this by making a
bad tag and seeing the exact same error in Tomcat 5.0.28 under
Tom,
I agree with Wendy. I play around on Tomcat 5.0.28, Struts (1.1 and 1.2.4),
Eclipse v3.0 (now 3.0.1 as of last night). I use the Sysdeo tomcat plug-In
and have to make the application reload (a simple menu option) to see any
resource changes like the properties file. I could make it
I was just wondering that I couldnt find any mapping in JSP for the method
nextController(). Iam sorry I was actually expecting the value of action
attribute of html:form but not URL.
Jitender Kumar C.V.
Hi All,
Do we have any english version of this application demonstrating
Struts+Tiles+JSF on this link
http://www.apache.org/~matzew/jsf2004.zip
Thanks Regards,
Kumar.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hi,
Take a look at http://sslext.sourceforge.net/
Regards,
Janarthan S
-Original Message-
From: Janice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 6:38 AM
To: [EMAIL PROTECTED]
Subject: need help securing my login page
I need to secure my login page only, just to
95 matches
Mail list logo