could append my sample code
snippets.
I appreciate your swift replies
Thanks,
~Samy
-Original Message-
From: Ben Anderson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 2:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Struts check box validation question
not too sure what you mean
Here's code I got from Kris Schneider. It validates that at least one of
the check boxes was checked, but you should be able to change it fairly
easily to do whatever you want. If you're wondering how this code fits in,
check out:
http://jakarta.apache.org/struts/userGuide/dev_validator.html
class from the jsp
Regards,
Samy.
-Original Message-
From: Ben Anderson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 2:28 PM
To: [EMAIL PROTECTED]
Subject: RE: Struts check box validation question
Here's code I got from Kris Schneider. It validates that at least one
project this application is for mandates only request scope be used
Can I ask why? It would make things much easier to set the ArrayList in
session scope.
However, I guess you can do this using struts ActionForms. You'll just need
to make sure that every page you are navigating to includes
granted your struts-config is setup properly to use your bean and it extends
actionForm, then why don't you just use the reference that is passed in to
the execute method?
if( form instanceof myForm ){
myForm mf = (myForm)form;
mf.setXXX( Steelers rule );
}
You don't need to worry about
jsp:useBean id=subscription scope=session
class=com.borneo.beans.SubscriptionForm /
This creates a new SubscriptionForm object because no object exists in
session scope(or any scope) referenced by the name subcription. Struts
uses a different id. I think it depends on the version of Struts
are you using jstl?
fmt:formatNumber pattern=#,###.00 value=${netTotal}/
From: Lucas Gonzalez [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Formating a float
Date: Thu, 5 Feb 2004 11:55:18 -0300
Hi,
I´ve been
if img src=/some/dir/myAction.dodoens't work for you,
then adding an base tag isn't going to help you.
You just need to add your application context in there. Check out:
http://jakarta.apache.org/struts/userGuide/struts-html.html#img
Also here's another archive site:
http://marc.theaimsgroup.com
Could that play a part in this?
nope
From: Greg Blomquist [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: img tag with action as src
Date: Tue, 3 Feb 2004 13:38:38 -0500
Thanks for the speedy reply. However, that doesn't seem to solve
EnterInfoAction
--
saveToken(request);
enterInfo.jsp
-
nothing required - the html:form tag places an input type=hidden tag for
you
ProcessInfoAction
-
if ( !isTokenValid(request, true) ) {
//incorrect token
}
I'm pretty
I'm assuming you're trying to use a Linux Live distro. Perhaps you could
test by removing write capabilities to your Tomcat/Resin directories -
chmod -R -w /some/dir. If Resin still operates ok, I don't see why it
wouldn't work from a live CD.
-Ben
From: Rouven Gehm [EMAIL PROTECTED]
if you use the struts-el tag libraries you can try this:
html-el:text name=someForm property=someProperty
value=${otherForm.map.yourProp/
I've heard that it's best to avoid putting scriptlet/java code in my jsp
pages.
It is, but you're specific problem isn't pertaining to scriptlet vs.
I think you need to take a step back and understand how http works. Per
each request, only one html form can be submitted(whether it's a get or a
post). This is not specific to Struts, Java or any web server solutions.
Your design is flawed, but it doesn't pertain to Struts. You can have
struts validation uses the input attribute of the action tag to send you
back to where you came from if validation fails. Here's the excerpt from
the dtd:
input Module-relative path of the action or other resource to
which control should be returned if a
dosen't work any more. Why?
Thx
Robert Lehner
Ben Anderson wrote:
struts validation uses the input attribute of the action tag to send you
back to where you came from if validation fails. Here's the excerpt from
the dtd:
input Module-relative path of the action or other resource
Actually those 2 methods should provide the same output. This is from the
TagUtils.jsp, which is used in the bean:write tag:
MessageResources resources =
retrieveMessageResources(pageContext, bundle, false);
...
message = resources.getMessage(userLocale,
http://jakarta.apache.org/struts/userGuide/struts-html.html#img
From: vasudevrao gupta [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Images as links in struts
Date: Wed, 14 Jan 2004 17:34:35 +0530
Hi All,
Can anyone help me about how
you can't have a tag as an attribute for another tag. How bout this?
bean-el:message key=parametric.key arg0=${myBean.myParam} /
From: Henrique VIECILI [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Bean Tag
[EMAIL PROTECTED]
Subject: Re: Bean Tag question
Date: Wed, 14 Jan 2004 17:32:55 -0300
Ok, i will try it!
but, where can i download the struts-el.tld files??
i have not found them in the struts web site!
Thanx
Henrique
- Original Message -
From: Ben Anderson [EMAIL PROTECTED]
To: [EMAIL
Could you show the implementation(s) of your ObjX.getErrors() methods. I'm
guessing there's probably a better way to do what you're trying to do.
It probably has something to do with the implementation of:
not sure if this matters, but my oracle jar is in common/lib instead of
shared/lib. I'm not familiar with the differences/uses of common and
shared, but that's how mine works.
-Ben
From: Ed Dowgiallo [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users
http://www.paychex.com/demos/s125/index.html
you can't directly access it, because it's a subsription service, but
there's a flash tour of the site.
From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: URGENT - Help defending Struts
Date:
you can't specifiy a tag as the value of an attribute in another tag. There
are a few different ways you could solve this problem. Here's one using
jstl and struts-el:
c:set var=messy
bean:message key='csc.button.submit'/
/c:set
html-el:submit property=physicianSubmit value=${messy}/
From:
you're getting the NullPointerException because getServlet() is returning
null. This is because setServlet hasn't been called by Struts yet. From
the javadoc for Action:
When an Action instance is first created, the controller servlet will call
setServlet() with a non-null argument to
You need to decide if you want to use Struts validation or define your own
class. You're example below is inconsistent:
If you want to use Struts validation(which you probably do):
struts-config.xml
---
form-bean name=calcForm
type=org.apache.struts.validator.DynaValidatorForm
alright, didn't think I'd need to chime in, but someone's gotta defend the
black gold:
representing the great city of Pittsburgh:
Iron City Beer
From: Chappell, Simon P [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
This is because you can't mix the value of an attribute of a custom tag with
both string literal and run time expressions.
Instead of this:
html:submit onclick=this.form.hiddenId.value='%=(String) theCode %';
value=Edit /
something like this should work:
c_rt:set var=theCode value=%=(String)
http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.html
From: Kalra, Ashwani [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts (E-mail) [EMAIL PROTECTED]
Subject: token pattern
Date: Wed, 10 Dec 2003 22:12:52 +0800
hi,
Can any one point me to the
c_rt:set var=key value=%= myKey %/
c:set var=mapper value=${myMap[myKey]}/
c:out value=${mapper.myProperty}/
From: Joe Hertz [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Property Declaration Annoyances
Date: Tue, 9 Dec 2003 10:43:22
I don't know which tag library you're referring to, but I believe you should
be able to call
pageContext.getRequest() from any method in a class that extends TagSupport.
-Ben
From: Honza Spurný [EMAIL PROTECTED]
Reply-To: Honza Spurný [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: display tag
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/TagSupport.html
From: Honza Spurný [EMAIL PROTECTED]
Reply-To: Honza Spurný [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: display tag library
Date: Tue, 2 Dec 2003 16:39:22 +0100
Ben Anderson
not sure I fully understand your problem. This may be the answer you aren't
looking for, but maybe it can help (it just gives the current path):
%@ page import=org.apache.struts.Globals %
c_rt:set var=mapping_key value=%= Globals.MAPPING_KEY %/
c:set var=mapping
from http://marc.theaimsgroup.com/?l=struts-userm=106730742008404w=2
modified slightly:
// Now write the actual content type and data
response.setContentType(text/plain);
JspWriter stream = response.getWriter();
... write out the csv ...
// Return null to tell Struts the response is
You can't specify a tag for the value of an attribute. The only place you
can nest tags is inside the tagbody. Are you using JSTL and struts-el?
You could do
html-el:radio property=id value='${filters.filterID}/
but what you're describing sounds more like:
c:forEach var=row items=${filters}
if that's how you want to do it you need to change your quotes from:
option value=bean:write name=module
property=module_id/abc/option
to:
option value='bean:write name=module
property=module_id/'abc/option
From: Ricky Lee [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
I'm starting a new project that the customer says must be done in PHP. I've
been looking at frameworks and there seems to be a bunch. There is one
called php.MVC - http://phpmvc.net - that is based on struts. I'd love to
use it since I'm already familiar with struts. Does anyone have any
Shishir,
you cannot nest tags within tags.
You probably want to use
html-el:image
http://jakarta.apache.org/struts/faqs/struts-el.html
-Ben
From: Shishir K. Singh [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject:
you probably only want one form set to request scope.
If you use different forms, then that form is only valid for the one
specific action it is associated with. For instance, if the submitting page
contains a form that has a textbox where you can input your name. And you
want to display the
or if you want to keep them outside of WEB-INF
add a line like this to your web.xml
security-constraint
web-resource-collection
web-resource-nameprivate/web-resource-name
url-pattern/myPages/*/url-pattern
/web-resource-collection
auth-constraint/
ActionErrors ae = form.validate( mapping, request );
if( ae.size() != 0 ){
saveErrors( request, ae );
return new ActionForward( mapping.getInput() );
}
From: Khandelwal, Rahul [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To:
http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest,%20java.lang.String)
http://marc.theaimsgroup.com/?l=struts-userm=106641120427697w=2
From: Otto, Frank [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL
jstl solution:
in your jsp:
-
fmt:setBundle basename=com.myapp.one var=oneProps/
fmt:setBundle basename=com.myapp.two var=twoProps/
fmt:message key=errors.header
in your struts-config.xml:
!-- this is now your default resource bundle --
message-resources parameter=com.myapp.one/
message-resources parameter=com.myapp.two key=MESSAGE_TWO/
in your jsps:
bean:message key=errors.header/
bean:message key=approval.001 bundle=MESSAGE_TWO/
From:
It depends on the container as to how you put the datasource into the
context.
If you're using Tomcat 4.1:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
Then to access the datasource:
String dsName = java:comp/env/jdbc/myDS;
ctx = new
this should work:
c:set var=person value=${requestScope.personForm}/
c:set var=_name value=name/
c:set var=_firstName value=firstName/
c:out value=${person[_name][_firstName]}/
From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL
javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context
Philipp
-Ursprüngliche Nachricht-
Von: Ben Anderson [mailto:[EMAIL PROTECTED]
Gesendet: Fr 17.10.2003 16:22
An: [EMAIL PROTECTED]
Cc:
Betreff: Re: Looking up the Struts
have you looked at multibox?
c:forEach items=${reports} var=row
tr
td align=left valign=top
html:multibox property=reportList
c:out value=${row.key}/
That is true, but when columns are added to the table - you need not edit
any file other than the jsp(doing it Kris' way).
From: David Graham [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Iterating the resultset contents in the view
know this will work:
c:set var=link
bean:message key=path/bean:message key=file
/c:set
but does anyone know if there's a way to continue to the next line without
inserting a space?
Thanks,
Ben Anderson
would you mind elaborating?
From: Eric Jain [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: html spaces
Date: Thu, 10 Jul 2003 17:19:17 +0200
but does anyone know if there's a way to continue to the next line
As per earlier requests, I attempted to switch my bean:message tags to
fmt:message tags, however I have been unsuccessful thus far.
This is what worked:
keys are defined in MessagesMyBundle.properties
code file=struts-config.xml
message-resources key=MESSAGE_MY_BUNDLE
I'm not too sure exactly what you're trying to do, but I think this is
generally how you'd be using html:text
code file=struts-config.xml?
form-beans
form-bean
name=myForm
type=org.apache.struts.validator.DynaValidatorActionForm
form-property
writing the .js and then finding it because our
actions are mapped /do/xxx/yyy/zzz? It doesn't seem to be looking in the
right place.
I've been searching all over the web and through the mail-archive for
answers, but haven't found anything definitive.
Thanks in advance,
Ben Anderson
This is what I have in struts-config.xml:
form-beans
form-bean
name=reportForm
type=org.apache.struts.validator.DynaValidatorActionForm
form-property name=reportList type=java.lang.String[]/
/form-bean
/form-beans
-Ben Anderson
From: [EMAIL
Try html:rewrite
http://jakarta.apache.org/struts/userGuide/dev_html.html
From: Nicolas De Loof [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: [struts-menu] how to use URL rewriting ?
Date: Thu, 19 Jun 2003 15:53:56
window.open( link );
Thanks,
Ben Anderson
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
.
-Ben Anderson
From: Natalie D Rassmann [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: DynaValidator Form is Null
Date: Tue, 17 Jun 2003 07:24:10 -0400
Sorry, that line isn't throwing the null pointer exception
-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: DynaValidator Form is Null
Date: Tue, 17 Jun 2003 07:37:03 -0400
How do you add the form somewhere in the action?
Ben Anderson wrote:
I had trouble with this as well. Hopefully, the answer
58 matches
Mail list logo