conventions would pickup, but the input result doesn't appear to
> follow the convention (it should be named signup-input.jsp). I'd poke
> around a bit and see if conventions is picking up that class as an
> action.
>
> -Wes
>
> On Tue, May 5, 2009 at 11:10 AM, mr
mraible wrote:
>
> This weekend, I attempted to upgrade AppFuse to use Struts 2.1 (formerly
> using 2.0.11.1). I used the following instructions:
>
> http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
>
> After completing all the
newton.dave wrote:
>
>> //lets take a look at documentation on using visitor field validator from
>> http://struts.apache.org/2.0.14/docs/using-visitor-field-validator.html
>> public class VisitorValidatorsExampleAction extends
>> AbstractValidationActionSupport
>>
>> //Latest WW 2.2.7 distro
This weekend, I attempted to upgrade AppFuse to use Struts 2.1 (formerly
using 2.0.11.1). I used the following instructions:
http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
After completing all the steps, I was able to get everything to compile and
star
Jeromy Evans - Blue Sky Minds wrote:
>
> Jeromy Evans wrote:
>> mraible wrote:
>>
>>>
>>> I tried FreeMarker this morning and discovered that the problem
>>> exists there
>>> too. Grrr. I've experienced Struts 2 being eliminated as a
Jeromy Evans - Blue Sky Minds wrote:
>
> mraible wrote:
>> I'm using 2.1.1-SNAPSHOT of the sitemesh and rest plugins.
>> FreeMarker/SiteMesh is working fine. However, I'm unable to use i18n tags
>> in
>> my decorator. In src/main/resources/com/c
open a S2 JIRA ticket that cross-references
> XW-557 (since I'm not sure if its something we could do here or not)
> -- and feel even more free to submit a patch!
>
> As usual, we are short of active volunteers, and we can always use a
> hand with the code!
>
&
some resource bundles in the S2.1.1 branch but haven't had a
> chance to investigate. There's several related issues in JIRA and I
> recall something specifically about package-level properties. I may
> have an opportunity to investigate later today. Does it find resources
>
I'm using 2.1.1-SNAPSHOT of the sitemesh and rest plugins.
FreeMarker/SiteMesh is working fine. However, I'm unable to use i18n tags in
my decorator. In src/main/resources/com/company/app/package.properties, I
have:
webapp.name=Foo
webapp.tagline=Bar
In my decorators/default.ftl, I have:
[EMAIL
Here's a sample app that's ready to run if you have MySQL installed.
https://appfuse-light.dev.java.net/files/documents/6839/68407/appfuse-light-struts2-hibernate-1.8.zip
Matt
Vinicius Medeiros Peretti wrote:
>
> I had problems with this combination using jdk 1.6, solved when I
> changed the
I agree that MenuContextListener is the best way to use Struts Menu in a
non-Struts 1.x environment.
Matt
Lead (and only) developer on Struts Menu ;-)
Al Sutton-4 wrote:
>
> 1) I use the MenuContextListener
>
> 2) I use static menus, but I believe there is something in the struts-menu
> FAQ t
ception
> caught setting 'doesntexist' on 'class mailreader2.Login: Error
> setting expression 'doesntexist' with value
> '[Ljava.lang.String;@15f1f9c'
>
> HTH, Ted.
> http://husted.com/ted/blog/
>
>
> On 8/28/07, mraible <[EMAIL PROTE
It looks like the FilterDispatcher supports a "config" init-parameter as
well. However, I tried setting it to /WEB-INF/struts.xml and it didn't work
for me.
http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html
Matt
Zarar Siddiqi wrote:
>
> The
return value;
} else {
value = findInContext(expr);
if (value == null) {
logLookupFailure(expr, ??);
}
}
However, I don't know what to put in the ?? location. Thoughts on this?
Thanks,
Matt
mraible w
Is it possible to use altSyntax to solve this problem? In other words,
require %{} around all expressions? Looking through the docs, it doesn't
seem like altSyntax is supported in Struts 2.
https://issues.apache.org/struts/browse/WW-1819
Thanks,
Matt
mraible wrote:
>
>
>
mraible wrote:
>
> I have the following class:
>
> public class TestAction {
>
> public static String concat(String str1, String str2) {
> return str1 + " and " + str2;
> }
> }
>
> In a JSP, I can write the following and it works fin
t, but kind of expected it, as "struts" is used
> to map to the resources inside the jar file, so is probably getting
> confused and building wrong paths. (should be fixable anyway :) )
>
> musachy
>
> On 8/21/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>&
Namespaces don't seem to work when my filter-mapping has a path like the
following:
struts
/struts/*
However, they seem to work fine when my url-pattern is /* or *.action. Is
this a known issue?
Thanks,
Matt
--
View this message in context:
http://www.nabble.com/Nam
t; try :
>
> @[EMAIL PROTECTED]
>
> musachy
>
> On 8/21/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>> I have the following interface that I'm trying to read variables from:
>>
>> public interface ServletMappingConstants
>> {
>> Strin
I have the following interface that I'm trying to read variables from:
public interface ServletMappingConstants
{
String SECURE_PREFIX = "secure/";
String STATIC = "static";
...
}
If my Action implements this interface, I can refer to these strings with
the OGNL expression "@[EMAIL PROTECTE
Is it possible to use Zero Configuration in a JUnit test? It works great when
running my Actions in a container, but I'd like to have a similar feature
when running tests - just "new" an Action and it'll be autowired with
dependencies.
Thanks,
Matt
--
View this message in context:
http://www.n
I'm trying to change from using the old-style URLs to Restful2ActionMapper.
Here's what I've added to struts.xml:
I have a UserAction that does CRUD (below).
And the following action definitions:
userList.jsp
userList.jsp
I've done it in the past using a combination of SiteMesh and .
http://raibledesigns.com/rd/entry/dependency_injection_with_sitemesh
Matt
Joe Lam wrote:
>
> May I know what is your practice to do Sidebar thing? here the sidebar
> means a block lets say on the left side showing login form for g
What are the errors you're getting? "Not much luck" isn't very descriptive.
;-)
Matt
Ravi Vedala wrote:
>
> Has anyone tried integrating the woodstock JSF components in Struts 2 ? I
> tried but not much luck.
>
> Thanks,
> r-a-v-i
>
>
> -
> Pinpoint cu
me" message = "App Name
> must be gt 5 chars", minLength = "5", maxLength = "12")
>
> I don't know how to make Struts 2 "see" this custom validator.
>
> Thanks,
> Joseph
>
>
>
> mraible wrote:
>>
>> I
On the following page, it describes how you can create hierarchical i18n
files and Struts will scan the hierarchy for appropriate messages.
http://struts.apache.org/2.x/docs/internationalization.html
This works well for Actions, but since most of my messages are in JSPs, I'd
prefer to put the *.
cher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at o
Thanks,
Matt
mraible wrote:
>
> I have the following validation XML that suites my needs perfectly:
>
>
I have the following validation XML that suites my needs perfectly:
Start year is required.
1900
Please enter a date after 1900.
startYear gte currentYear
Start year must be less than or equal to the current year
(${currentYear}).
er, then looks up a new error
> key, say 'xwork.default.invalid.fieldvalue.number'?
>
> Don
>
> On 8/9/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>> The default value for a type mismatch error (when doing conversion) is:
>>
>> xwork.default.in
The default value for a type mismatch error (when doing conversion) is:
xwork.default.invalid.fieldvalue=Invalid field value for field "{0}".
I'd like to change it to render something like "Please enter a valid date."
or "Please enter a valid number.". Is it possible to decipher the type of
the
Here's what I've done:
IMO, should detect when there's only one error and emit no
tags. I've entered an issue in JIRA for this:
https://issues.apache.org/struts/browse/WW-2090
On a related note, looking at the docs, it looks like you're required to use
to specify the field name. Is this
gt; now this is kind of a dumb question, but are you sure there is an
> error for that field?
>
>
>
> musachy
>
> On 8/6/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>> I tried your suggestion, no dice. I think the problem is that I have an
>> expression w/in a
ng parameters here are the request parameters)
>
>
>
> (#parameter.name is an array, it gets me all the time :) )
>
> musachy
>
> On 8/6/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>> That worked - thanks!
>>
>> Now I can't get the follow
ields (w/o
customizing a theme).
Matt
Musachy Barroso wrote:
>
> try :
>
>
>
> musachy
>
> On 8/6/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>> I'm trying to use the tag to create a re-usable set of
>> fields
>> in a form. In my JSP:
&g
Don Brown wrote:
>
> On 8/4/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>> With Struts 2, how would I go about doing the following:
>>
>> 1. Replace the i18n resolution logic to load key/value pairs from a
>> database
>> instead of properties f
Ray Clough wrote:
>
> We did something similar to what you are suggesting. We still use
> properties files, but we replaced much of the lookup with our own classes.
> We created a wrapper around ResourceBundle which has overloaded
> 'getText()' methods. We make this accessible to all parts o
I'm trying to use the tag to create a re-usable set of fields
in a form. In my JSP:
In template/simple/addposition.jsp, I have:
<%@ taglib uri="/struts-tags" prefix="s" %>
Name:
For some reason, this doesn't work.
Is there something I'm doing wrong? Can templates be JSPs or do
d with this person,
or choose "Other..."
reason == 'colleague' and colleaguePositionID == 'OTHER'
Hope this helps,
Matt
mraible wrote:
>
> I need to do something similar - is it possible to have conditional
> visitor validat
27;')
Please provide your friend's email
I get to have:
reason == 'friend' and friendEmail == ''
Please provide your friend's email
This seems much more logical to me.
Matt
mraible wrote:
>
> The foll
With Struts 2, how would I go about doing the following:
1. Replace the i18n resolution logic to load key/value pairs from a database
instead of properties files?
2. Add an extra processing step to translate wiki syntax in values to HTML?
Thanks,
Matt
--
View this message in context:
http://w
I need to do something similar - is it possible to have conditional visitor
validation in Struts 2? AFAICT, it isn't.
Basically, I'd like to have a couple of validation rules for a drop-down.
One rule is that the user must select at least one choice when the drop-down
has its radio button selecte
me a simple example?
>
> Thank you very much!
>
> Lupus
>
>
>
> mraible wrote:
>>
>> Have you added the JSF implementation's JARs to your classpath?
>>
>> Matt
>>
>>
>> lupus wrote:
>>>
>>> Hi all,
>>>
Have you added the JSF implementation's JARs to your classpath?
Matt
lupus wrote:
>
> Hi all,
>
> I cannot get Struts 2 JSF plugin working, the plugin documentation
> (http://struts.apache.org/2.x/docs/jsf-plugin.html) is not clear for me to
> follow and the jsf show-case mixed all the things
Is it possible to pre-compile JSPs with Struts 2, as well as compile/evaluate
OGNL expressions?
I found the following on compiling OGNL expressions, but it's a little more
low-level than what I'm looking for.
http://cwiki.apache.org/WW/ognl-expression-compilation.html
I'm looking for a mechani
mraible wrote:
>
> Thanks for your help. I was able to get it working with Sun's RI +
> Facelets. I'm confident I could get it working with MyFaces 1.2 as well -
> but since they require a JSP 2.1 container (Sun's RI doesn't), I'll stick
> with the R
he following at the top of my pages:
This doesn't happen when using JSP for the view. It also doesn't happen when
I use JSF standalone.
Matt
Laurie Harper wrote:
>
> mraible wrote:
>> I'm trying to integrate JSF into a Struts 2 prototype. AFAICT, I need to
>>
I'm trying to integrate JSF into a Struts 2 prototype. AFAICT, I need to add
the struts-jsf-plugin to my pom.xml and add FacesServlet to my web.xml. Are
there any other steps needed?
I'm using Sun's RI since it run's on Tomcat 5.x with JSP 2.0. How do I tell
JSF to use Facelets w/o a faces-config
is what worked for me.
>>
>>
>>
>>
>> reason == 'friend' and
>> friendEmail != null and friendEmail.trim().size() > 0
>> Please provide your friend's email
>>
>>
>>
>
nd's email
>
>
>
>
>
> Eric.
>
>
> On Jul 19, 2007, at 10:40 AM, mraible wrote:
>
>> If you're right, I'd expect the following expression make friendEmail
>> required when the "friend" reason is checked (it'
MConsulting.com
> FREE! Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details.
>
> -Original Message-
> From: mraible [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 19, 2007 11:32 AM
> To: user@struts.apache.org
> Subject: Re:
be the problem?
>
> I only point it out because the backwards logic involved with
> validators has bitten me in the past. I always have to remind myself
> that my validators test for things that I want, not for things that
> will cause failure.
>
> Eric Rank
>
>
>
I agree it would be nice if you could make totally clean URLs with Struts 2 -
as if you had each action registered as servlets in your web.xml.
Unfortunately, I don't believe it's possible. The only solution I can think
of is to use the UrlRewriteFilter.
http://tuckey.org/urlrewrite
While this s
That didn't work - how about this: http://rafb.net/p/cmnEKB18.html
mraible wrote:
>
> Looks like Nabble was escaping my HTML - let's try again with HTML Format
> checked:
>
>
>
> true
&
ssing something,
> but:
>
>
>friendEmail
>reason.equals('friend') and friendEmail == null
>Please provide your friend's email
>
>
>
> why is "friendEmail" in the expression?(should be "
> reason.equals('
I'm trying to use a FieldExpressionValidator (or ExpressionValidator) to
compare fields. Unfortunately, it doesn't seem to be working. I have a radio
button (named "reason") and a text field named "friendEmail". If the
selected radio has a reason of "friend", I want to require the text field.
Howe
I have the following class:
public class TestAction {
public static String concat(String str1, String str2) {
return str1 + " and " + str2;
}
}
In a JSP, I can write the following and it works fine:
However, if I change it to an invalid class name, it fails silently:
I've
If you download the example WAR - there's lot of examples in there. You could
also look at AppFuse (http://appfuse.org), which has Struts Menu
pre-integrated.
Matt
Antonio Petrelli-3 wrote:
>
> 2007/6/5, Archer <[EMAIL PROTECTED]>:
>> Hi All,
>>
>> I am new to struts menu. Can anybody please
mraible wrote:
>
> Does Struts 2 have support for a flash scope - where messages can be
> easily stuffed into this scope so they live through a redirect?
>
> Thanks,
>
> Matt
>
I'll assume the answer is "no".
--
View this message in context:
http:/
I have a Company object that's attached to my User object with the following
JPA configuration:
@ManyToOne(cascade = CascadeType.ALL, optional=true)
@JoinColumn(name="company_id")
public Company getCompany() {
return company;
}
In my userForm.jsp, I'm trying to render all
I recently added a DateConverter to my project (Struts 2.0.6, Maven 2) and
now I'm getting NPEs when running tests.
xwork-conversion.properties:
java.util.Date=org.appfuse.webapp.action.DateConverter
DateConverter.java:
public class DateConverter extends StrutsTypeConverter {
public Objec
I'm trying to get to work in AppFuse. I'm using Struts 2.0.6.
When I add the code below to a JSP, I get a 404 (via Firebug) for the
following files:
http://localhost:8080/struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js
http://localhost:8080/struts/dojo/src/i18n/calendar/nls/en/gregorianExtr
Does Struts 2 have support for a flash scope - where messages can be easily
stuffed into this scope so they live through a redirect?
Thanks,
Matt
--
View this message in context:
http://www.nabble.com/Flash-scope-in-Struts-2--tf3685114.html#a10300567
Sent from the Struts - User mailing list ar
plate,
but it still seems to happen. This is quite strange since class="desc"
shows up on my label. This is a customization I had in my xhtml template -
does Struts have the same customization?
Thanks,
Matt
mraible wrote:
>
> Any idea why does not work for me wit
Any idea why does not work for me with Struts 2.0.6?
The following works fine:
As does:
Is the "key" attribute of supposed to write the body? It seems to
write the label tag just fine, but it has no body.
Thanks,
Matt
--
View this message in context:
http://www.nabble.com/Using-%3C
Guillaume Carré wrote:
>
> 2007/3/14, mraible <[EMAIL PROTECTED]>:
>> What if you use foo - does that
>> work
>> for you as well?
>
> yes it does work as well, as advertized.
>
> And if I remove the ActionContextCleanUp filter, it doesn't
Guillaume Carré wrote:
>
> 2007/3/14, mraible <[EMAIL PROTECTED]>:
>> That's the problem, I *do* have the ActionContextCleanUp filter in my
>> web.xml:
>
> It's working here for me, I've included a test.jsp in my sitemesh
> decorator with a
Guillaume Carré wrote:
>
> 2007/3/14, mraible <[EMAIL PROTECTED]>:
>>
>> I have a messages.jsp[1] that's included (using <%@ include
>> file="/common/messages.jsp" %>) in my default decorator. This file has a
>> couple of calls to the va
I have a messages.jsp[1] that's included (using <%@ include
file="/common/messages.jsp" %>) in my default decorator. This file has a
couple of calls to the valueStack - namely hasActionErrors() and
hasFieldErrors(). This worked fine in WebWork 2.1.x and Struts 2.0.1 - even
when pages where render
if (pathIncluded && !pathExcluded) {
RequestDispatcher rd =
getServletContext().getRequestDispatcher(path);
rd.forward(request, response);
}
chain.doFilter(request, response);
}
}
Stuart Piltch wrote:
>
> mraible raibledesigns.co
lter). When specifying additional static content, you
> should be careful not to expose sensitive configuration information (i.e.
> database password)."
> //I haven't used it myself :)
> musachy
>
> On 2/27/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>>
&g
I'm using *.html as my default extension, which causes a whole host of issues
with Dojo. Regardless, I want to fight through it and see if I can come up
with a solution.
I noticed that FilterDispatcher allows you to serve up static files from the
classpath. Is it possible to configure this same
This issue turned out to be a bug in Spring's RequestContextLoader and will
be fixed in Spring 2.0.3:
http://forum.springframework.org/showthread.php?t=33874
Matt
mraible wrote:
>
> I get the following error when I try to deploy a Struts 2.0.6 application
> o
I get the following error when I try to deploy a Struts 2.0.6 application on
Resin 3.0.21:
java.lang.NullPointerException
at
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:50)
at _jsp._error__jsp._jspService(common/messages.jsp:2)
>From this,
I'm working to simplify the stack that I used to use in a WebWork
application. Here's what I currently have:
I can't seem to find any documentation on configuring wildcard actions in
Struts 2.x. Does this feature still exist?
Thanks,
Matt
--
View this message in context:
http://www.nabble.com/How-do-I-configure-wildcard-action-definitions-in-Struts-2.x--tf3077950.html#a8551509
Sent from the Struts -
75 matches
Mail list logo