Finally, some progress.
web.xml
context-param
param-nametemplatePath/param-name
param-valuetemplate/param-value
/context-param
It said in the source code that it can't be a relative path but for me
template is under my webroot.
Sean Ford wrote:
Hello,
We
Has anyone noticed that local Freemarker templates they kept in /template are
no longer being picked up in favor of the .jar templates?
Any ideas if there is a constant or change to where we put templates to fix
this?
--
View this message in context:
Take a look at using Enunciate with Struts2.
http://enunciate.codehaus.org/
http://docs.codehaus.org/display/ENUNCIATE/A+Rich+Web+service+API+for+Struts+2
-D
jayakumar ala wrote:
I don't understand why i should look into IBM site.? I am asking with
respect to struts what i should do if
When you are talking about action messages it is not a hash map with a key.
It is a simple CollectionString. ActionSupport has a method
getActionMessages() that returns this string collection.
Field errors are a different matter. These come through as a MapString,
ListString. You get that
It would appear that has to do with some form of unit test or test harness
code that is embedded in struts2-core. I haven't look at the pom.xml but if
its there outside of the test context then that is probably a problem.
However, the .jar itself shouldn't cause you any problems if your
I like how code is declared #fail because there probably is not a toString
method. lawl. Please do not be distractedBrian's code was a perfectly
good example.
Brian Thompson-5 wrote:
In context of the other two examples, you're right; I should have used
something like
var foo =
That is strange. I use the older 6.x jetty maven plugin and the restarts
work well. The stacktrace is not very helpful in this case. You may have
more luck on a maven/jetty mailing list.
wild_oscar wrote:
Hi,
I'm developing using a Maven modular project (one module for the
to be taken care of by OGNL or Xwork? because if I
don't do it in a List, but as an direct Action property instead, there
wont
be any warning message.
Thanks
On Mon, Sep 14, 2009 at 1:15 PM, dusty dustin_pea...@yahoo.com wrote:
I saw similar errors when a Type Converter did not return
I saw similar errors when a Type Converter did not return a null when an
empty value was given. This could be an issue with the built-in conversion
for Big Decimal.
Can you try and override the Big Decimal converter with your own type
converter and include code to return a null if the input
Hot Div Injection Vector - Service Pack 1 : a little know DHTML library used
exclusively by porn link aggregator sites. I am surprised you didn't know
that.
and Martin, I am so busy that I only make it back here periodically, but it
seems like everytime I do Musachy is giving you a beat down
The error/warning you are talking about happens when the conversion fails.
Essentially, after it tries the conversion and can't do it then it tries to
apply the setXXX(String xxx), but that really is not what you want at all.
When you are using your own converters you want to be able to
Nice Musachy! I have several projects I can test it out on. I will let you
know if I find anything.
-D
Musachy Barroso wrote:
FYI the JSON Plugin(http://code.google.com/p/jsonplugin/) is now part
of Struts and will be released in 2.1.8. The code at Google Code will
not be maintained any
That sounds like a troubling one, based on what you describe it should work.
Especially if the struts iterator works on the same JSP page. What version
of Struts and DisplayTag are you using.
There was a time when you had to use the s:set / tag and a time when you
did not. Have you tried
s:submit type=image alt=Unlocked src=/residentrn/images/accept.png
onclick=%{\$('\ + #foo + \').request(); return false;\} /
Security Management wrote:
Can someone suggest a way to do this:
s:submit type=image alt=Unlocked src=%{unlocked_image}
onclick='$(s:property
?
-Original Message-
From: dusty [mailto:dustin_pea...@yahoo.com]
Sent: Wednesday, July 08, 2009 7:24 AM
To: user@struts.apache.org
Subject: RE: using ajaxanywhere and struts
Is there a compelling reason why you are using AjaxAnywhere? One may be,
It's one I know really well
I am all
@struts.apache.org
Subject: Re: Commercial framework based on struts2.
Date: Wed, 8 Jul 2009 21:37:24 -0400
On Wednesday 08 July 2009 00:00:49 dusty wrote:
I know a guy who knows a guy that ported Icefaces to Struts2 + stuff
you
probably need and don't know it. He even has a ponytail. He wants
Let the record the response was non-responsive. Struts is trying to call
index() on your action. Since you likely don't have index() in your action
it seems likely that the REST plugin is in your path and is trying to
auto-map a URL to the index() method of a registered Controller.
So lets
For stuff like data dictionary lists, or other random stuff I don't need to
reload I will initialize on startup and store in the servletContext. I will
use EhCache for handling cache of model objects when I have a lot of reads
and want to improve performance when there are lots of things.
I
I know a guy who knows a guy that ported Icefaces to Struts2 + stuff you
probably need and don't know it. He even has a ponytail. He wants eleventy
thousand dollars.
sharath wrote:
Dear All,
I'm looking for chimerical framework which is built on top of struts2,
with having AJAX
So I think straight JQuery is pretty easy, although I have not tried the new
JQuery plugin(s). Just download JQuery and JQuery UI and include them on
your page.
script type=text/javascript src=c:url
value=/scripts/jquery/jquery-1.2.6.js//script
script type=text/javascript src=c:url
I think you were using this JSP template as a view for a Struts2 action,
hence the mailing list choice. If that is the case, just remember that the
URL is relative to the action and not the path of the dispatched JSP
template.
Larry Reed-2 wrote:
Thank you Christian. This has solved the
Is there a compelling reason why you are using AjaxAnywhere? One may be,
It's one I know really well
I am all for alternative lifestyles, but perhaps you should look into JQuery
or Prototype. Lots and lots of examples and help out there on the world
wide web for those AJAX tools.
deligeli
I think you need to describe what you do with the POST from the user form and
what happens after. So show your action method that is saving the user
data. Also show your struts configuration for the results of this action.
Are you redirecting? Or is the POST transaction happening inside this
I think his point is that his view template is going to iterate these objects
anyways, he just did not include the additional layout html for the
resultsList. I don't think he was suggesting that getting a count by
looping is better done in JSP tags rather than the action class. I am sure
Struts can't find the compiled action class for the action you defined in
your struts.xml.
newton.dave wrote:
Nagesh Reddy K wrote:
Action class [java.struts2.examples.chapter1.HelloWorld] not found -
action -
http://struts.apache.org/2.x/docs/localization.html
On this page it says your Action must implement ValidationAware or extend
ActionSupport in order for the error messages to be localized. I am
assuming that is still true when using Convention? How is your Action class
setup?
Wampole,
We have used Spring Security in the last 10 struts2 apps. We have some that
use a local user store in the database, others that use LDAP to AD and some
that use Atlassian's Crowd.
Spring Security is very easy to add to your app and gives just about
everything you need I have not ventured
to choose Spring Security but as
we are not going to use Spring in our application so we were just a bit
confused (:) ) if we can use this frame work even without using Spring??
hope to get some light over this.
On Sun, Jun 21, 2009 at 12:37 PM, dusty dustin_pea...@yahoo.com wrote:
We have
That works? What processes that redirect-action:PHAInformation parameter?
Struts sees that and just redirects? If I knew how that worked then I could
figure out how to add parameters.
omnipresent wrote:
I have a button value like this
s:submit value=Cancel
Perhaps the language is bad, but what I believe that documentation means is
that when you are iterating the each object in the iteration is at the top
of the stack so that when you do something like this:
s:iterator value=#session.users
s:property value=firstName/
/s:iterator
Struts knows
Usually that means you have the td outside the table tag somehow. Is that
table terminated in the middle of your setup and not restarted?
Marc Eckart-2 wrote:
Hi,
we have a struts2 application and we implemented the ajax functions
with jquery.
We now load some html tables with ajax in
I have used the JSON plugin quite a bit and I have not seen the root
switching you are describing. The only difference I can see is that I am
using xml config for those actions. It seems like your result is not
getting the root parameter. Could it be an issue with the @Result
annotation
I think this is more difficult than most people think. There are a lot of
use cases and edge cases that make most home grown solutions pretty fragile.
I think GETs are pretty easy but it gets a little more exciting when you are
dealing with POSTs to a secure resource. People tend to get pissed
There is no reason why Struts can't figure out the URL and give it back. I
have not seen the JSON result used the way you have it configured.
Typically, you see the JSON result with a root parameter. The root is the
action property you want to be the root of your JSON object graph.
So what I
What was the name of that middleware generator for HibernateMiddleGen?
The screenshots in the docs remind me of that. Is there a link for the
source code? The svn repo seems empty. It would be good to get through the
source and see how the actions/etc are implemented and see if we can
is not
required in this case.
I am just wondering there should be a way where we can retreview the
values from the request like forward.
Regards
Siddiq.
dusty wrote:
The technical answer to your question is the chain result will copy
the previous request.
I think there could
Are you registering the listener in the action or interceptor. Does it
matter or both fail?
The REST plugin needs a steward(stuart). Don (original author) has been too
busy to work on it and I think most of the current committers are happy with
the current REST function or are working on
Jeroen,
This setup is so that you can initiate and control the properties of the
transaction from the controller, if that is a pattern you require?
Do you do this for all your calls to the service layer from controllers, and
how is it better/different from a calling a service method annotated
I think for modelDriven you need to set the appendPrefix parameter of the
Visitor validator to false. Essentially, struts is adding an error to
fieldErrors like (model.field,error message) rather than
(field,errormessage) and so the freemarker templates can't match up your
fieldname to any
Sure no problem. Here are the steps:
a) Hire someone who knows what they are doing
b) While they are working read Struts2 in Action and JQuery in Action.
c) Read blogs and books about CSS and web interface design
d) Ask your consultant to show you how they did what they did and take notes
e)
In case you have not guessed, asking someone to just give me code is not
the best policy on any forum/mailing list. You can either a) use Google to
find someone who has posted code b) Learn to do it yourself. Either way
its not really a Struts related question.
All that said, try this
Perhaps you are looking for some basic tidbits you may commonly use:
a) Calendar pop-up
b) Ajax calls with JSON response from Struts
c) Simple element hide/show
Can you build a list like this of things you need to build your UI or are
you looking more for skill building sources?
fireapple
I can't think of anything with a quick breeze through of your message, but
you should use the id parameter of the s:textfield tag so you know what the
HTML id will be in your $(#...) call.
Kiru-2 wrote:
I am using JQuery for validating the fields in my jsp page, created using
Struts 2.1.6.
The technical answer to your question is the chain result will copy the
previous request.
I think there could be some pattern issues here though. You have a central
action where you post a variety of forms and you want to reuse that action
and then figure out which form to go back to?
I
How is your JUnit test setup? If your service is injected in your JUnit test
and not in Struts then it could be that contextConfiguration in web.xml is
messed up.
I usually annotate the action with @Component and just put an @Autowired
over the setter. I am not sure what @PostConstruct does.
That is just a brutal description dude. I can't even venture a guess at what
you are describing but I would stick with the solution proposed before.
PEGASUS84 wrote:
ok but i try to use an hidden tag but it set all values of name because it
is into an iterator tag
--
View this
?
abed wrote:
Dusty,
Thank you very much for your reply. Attached you will find our
httpd.conf, workers.properties and server.xml files. we currently
have both PHP (Apache based) and JSP/Servlet (handled by the Apache/Tomcat
through the AJP) sites on this server. I removed some
Nice! I thnk I will definitely give it a try. Seems like are always
building something, we build a lot of smallish apps for the health system.
Is it in the sandbox? I haven't looked for it.
krosenvold wrote:
dusty wrote:
Back in December Blake was asking about reloading the config
If it works with tomcat alone it is likely not a struts issue, but post your
apache cnfig from httpd.conf and workers.properties and server.xml from
Tomcat. We have had good experience with mod_proxy_ajp if you have control
of the apache server.
abed wrote:
Hello,
I have Apache-2.2 acting
Hey there. You are still having issues with that form. Maybe I can help. I
have seen a couple different versions in your various posts, but on your
latest version you look to have it set up right.
In previous posts your action had a a ruleName and ruleDays property itself.
In there your
Back in December Blake was asking about reloading the config using JavaRebel.
Does anyone have any experience with this working? They are advertising
Works great with Struts2 on their website. I was going to give it a try
but wanted to know if anyone already did some debug lifting.
--
View
Seems like it should work the way you have it described. Perhaps show the
JSP syntax although is suspect its correct. Maybe also show the Bean and
action code for good measure.
Is days a reserved word in OGNL? I don't think so. Did you try to change
it to dayz and see if that works?
Is that an ad for services? Maybe proof read if so, but better yet
ask/answer questions.
Frans Thamura-2 wrote:
hi all
just wanna to give u all our work
my foundation, meruvian, now collect and helping vocational school,
and mostly 50% cannot work, and they are smart
take a look,
The common pattern suggested for this requirement is to create interceptors
to decode the values coming in and a jsp library/tag to encode the values in
the link.
PEGASUS84 wrote:
Thank you.
i wish encode data in the query string how can I do?
--
View this message in context:
to watch the video when I
fire up my laptop later.
-Wes
On 4/6/09, dusty dustin_pea...@yahoo.com wrote:
Is that an ad for services? Maybe proof read if so, but better yet
ask/answer questions.
Frans Thamura-2 wrote:
hi all
just wanna to give u all our work
my foundation
country. I plan to watch the video when I
fire up my laptop later.
-Wes
On 4/6/09, dusty dustin_pea...@yahoo.com wrote:
Is that an ad for services? Maybe proof read if so, but better yet
ask/answer questions.
Frans Thamura-2 wrote:
hi all
just wanna to give u all our work
my
I am not sure that I understand your problem if there is one.
---
I have that shirt
Patrick Aikens wrote:
I'm trying to go with an all-annotation based configuration for a
project I'm working on, and now have the desire to use a scope
interceptor in my app. The following is an
GUICE usage is strictly forbidden.
Adam Ruggles wrote:
If you're using spring, why don't you use spring to inject your property?
Kumar Mettu wrote:
Musachy,
This works great as long as default Struts Object Factory is used but
get the exception the following exception If I
Seems like you have it down. Why is it kind of? It is only a really type
conversion issue if you need to reconstruct the graph of MapBeanList from
a string posted from a web page.
mahanare wrote:
kind of got a fix.
here is my jsp content.
tr
s:iterator
displayTag is not terrible when working with Struts propertiesthese days.
Remember that you can get to stuff on the value stack via JSTL expressions
as well. Which works well with displayTag.
Mileidys Gonzalez Prieto wrote:
I recomend jMesa... is very good and is possible to do
There should be a rule:
If you can't write it by hand, then you shouldn't use a tag to automate
it.
This goes triple for Javascript. Once things start emitting Javascript, if
you don't know what they are doing and why, you are headed for trouble.
Look at the Dojo questions in the mailing
Ultimately, we should declare what are resources and get the free mapping
from the REST plugin for those Controllers. Seems like that is what the
NamspaceBasedActionMapper is, but I was thinking either a
@Resource annotation at the top of the Controller
or
constant name=struts.rest.resources
You don't need to rebuild Struts to customize the freemarker templates. Put
a folder called /template in your webroot and then subfolder of the theme,
like simple. /template/simple/doubleselect.ftl or
/template/xhtml/doubleselect.ftl.
newton.dave wrote:
sajidbigler wrote:
i am
I demand a new Rabile post that declares Struts2 no longer sucks.
Musachy Barroso wrote:
yeah I was thinking about that when I was writing that email, you out
there Matt? :)
musachy
On Fri, Mar 20, 2009 at 10:23 AM, Dave Newton newton.d...@yahoo.com
wrote:
Musachy Barroso wrote:
Yes, I remember talking to Don about it at last year's Java Symposium. The
only exception is that RoR routes allow nested resources and provides not
only controller/action mapping but also outbound link generation.
To tell you the truth, I am big believer in the RESTful design concept for
@Chris - Those are definitely good points. I think that our first priorities
for the applications we build for the Health System are maintainability
readability. We don't have the performance needs of a major public internet
site. Our sites are pretty zippy. ;-) Usually we have more large
This is a gift from Mr. Don Brown back when he was working on the REST
plugin. I remember people asking for it. Speaking of mrdon, where's he
been? Maybe Atlassian is working him hard these days. ;-p
Musachy Barroso wrote:
It is not a bug, it is a feature! /friday
musachy
On Fri,
your syntax for the field name should be
...name = settings[] rather than name = settings()
Also, I think your action expects to build a List of Settings rather than
Map of settings. If that is the case then you don't want to use key values
in settings[ASDF1-123AS-123SA-123] you want to use
Are you just looking for a Struts2 convention or the whole stack, presumably
Spring/Guice Hibernate/JDBC?
sheltonn wrote:
I was looking for something akin to the java code convention standard
(http://java.sun.com/docs/codeconv/). My guess is that there is nothing
out there for that. My
Not really. I am not sure if there is a Struts2 question in there or more of
a general web application design question. It sounds kind of messy. Kind
of a poor man's mash-up. Why do all the applications have the same session
id? Is it all one app now on one server or are they still on other
I am not sure it helps you with Dojo, but may want to look at either a) the
JSON result plugin which will return the actionErrors as part of the object
graph. You could also create your own objects and have the plugin encode
those in JSON and process them on the client side. b) I vaguely
Sorry it took me a while. Damn flu season...
Anyways, its not really complicated but I have found it to be useful. It
was inspired from some RoR projects I worked on and is a poor mans routing
table.
You create a JSP that you will include at the top of all your JSP views. In
this JSP you add
The [] syntax is used to define collections or maps of values. I don't
think your setters are going to work that way. OGNL does not know how to
handle arbitrary new setter parameters.
I think what you are trying to do is create a form with an arbitrary number
of fields, probably driven from
Adding the action, namespace and params url constructing pieces to s:a would
be cool, as long as we don't nerf the s:url function. I rather like the
pattern of using a central routes page as an include where urls are
created and their ids referenced in links via JSTL in the main pages.
-D
Sorry Martin, did Dave answer your question? Were you just wondering about
the namespace parameter on the url tag or about the routes pattern in
general?
mgainty wrote:
can you explain this routes a bit more..what is this another attribute or
a template?
i can see see action, params but
Hi All (err Musachy),
I have the classes below that I use for unit testing. They are a
spin-off/update of the Depressed Programmers unit test class. I like them
because they can test the Struts config along with the actions themselves +
interceptor execution. Things go well when you have an
You can't do what you are doing exactly. When you are using the free
conversion, Struts2 needs to be able to construct your object with a default
constructor and that is not going to happen with an interface. So if you
want to dynamically determine the implementation of that Object at runtime
mvn -Dtest=MyTestClassName
But don't let that think you can get Maven answers here! ;-)
Nils-Helge Garli wrote:
As both Martin and Dave pointed out, this is a maven related question.
Please check here: http://maven.apache.org/users/getting-help.html
Nils-H
On Fri, Mar 6, 2009 at
to a date object and use the struts
tag to format my date:
s:iterator value=scheduleList status=scheduleStatus
s:date value=scheduleList[#scheduleStatus.index]
format=dd/MM//
/s:iterator
dusty wrote:
Here is a Calendar converter class. Modify as necessary for your
+1 Spring Security. Everything else is for wimps.
Wes Wannemacher wrote:
On Wednesday 04 February 2009 05:56:24 alee amin wrote:
I browsed through struts official site to check for any plugin available
or
security mechanism to authenticate the user. but i could not find one.
can
Here is a Calendar converter class. Modify as necessary for your calendar
object:
import ognl.DefaultTypeConverter;
import org.apache.commons.lang.time.DateUtils;
import org.apache.commons.lang.time.FastDateFormat;
import org.apache.commons.logging.Log;
import
and Struts and watch the request to see what changes made in Spring
Security are affecting the Struts interceptors.
dubrovsky wrote:
dusty wrote:
What is your filter order in web.xml. Can you show your web.xml config?
Yes, of course. I think my web.xml is all right. Here
That is too bad. Injecting a Resource in Spring is a snap and you can do
cool things like load from the classpath when testing but then load from the
file system during runtime. You can store your parameters in a properties
file and then load that file into a Properties object.
Bummer your
You are likely using a full interceptor stack that includes the FileUpload
interceptor. You should be able to exclude that interceptor from your stack
to remove that dependency.
ManiKanta G-2 wrote:
http://struts.apache.org/2.x/docs/file-upload.html
Well I m not using any file upload...
List = ResultSet from Oracle. If you can project your resultset into Objects
then you can address properties in the jasper report by fieldName. To be
perfectly honest it has been a while since I have worked with raw JDBC
objects, so I cannot remember what object you create to execute SQL to
You should look at Spring annotations. So awesome. And Spring Security!?!
forget about it. If you don't drink the Injection/TDD koolaid then wiring
up services with Spring may seem lame.
I don't think the issue is how well Spring handles JDBC. We could talk
about Hibernate, but I am
Well, I have been using the underlying DefaultTypeConverter for a while
across various versions without any problems. The StrutsTypeConverter is
really just a convienence class to abstract you from the XWork converter,
but there is no reason why you can't just use the XWork converter.
Here are
Are those nested s:url tags? impressive.
$(document).ready(function(){
$(#reallyLongLink).click(function(){
//and to integrate with Struts2
alert('s:property value=#tempMilestoneRemoveURL/');
});
});
newton.dave wrote:
Seshagiri V wrote:
Sorry,
What is your filter order in web.xml. Can you show your web.xml config?
dubrovsky wrote:
I posted reply for this problem in Spring community forum. Who is
interested in, please follow the link -
http://forum.springsource.org/showthread.php?t=66381
Dude. I read somewhere that IE sucks at handling URL encoding that uses +.
You may need to google that or experiment with %20 instead. %20 is space
right?
Seshagiri V wrote:
FIY
..
In Firefox, selecting text(as # only If click on Delete link
as button then
Lukasz Lenart wrote:
2009/1/26 dusty dustin_pea...@yahoo.com:
When using the struts2-spring-plugin, without bean declaration for your
actions, what is the default scope for the created Action beans?
Prototype,
I hope, but I can't really find where that is set or happens. I know
intended
recipient. Sender does not necessarily endorse content contained within
this transmission.
Date: Mon, 26 Jan 2009 21:41:21 +0100
Subject: Re: Spring Scope Default
From: lukasz.len...@googlemail.com
To: user@struts.apache.org
2009/1/26 dusty dustin_pea...@yahoo.com:
Interesting
Next week on When Dave Snaps, he threatens to ban anyone from the list if
he finds the answer in the first five links returned from googling 3 or more
words in their post.
...do the needful -- priceless.
newton.dave wrote:
Wes Wannemacher wrote:
On Monday 26 January 2009 22:34:57 Dave
mvn dependency:tree | grep spring
spring-framework-xxx:2.0.5
spring-framework-xxx:2.5.6 -- oh #@!
dependency
groupIdorg.apache.struts/groupId
artifactIdstruts2-spring-plugin/artifactId
version2.0.11.2/version
excludes
exclude
+1 for @Namespace(/webfarm)
chaining is usually a sign of a bad pattern. See
http://cwiki.apache.org/confluence/display/WW/Action+Chaining.
Those are class annotations I assume. Any errors on application startup?
Including the convention plugin does help it work.
newton.dave wrote:
When using the struts2-spring-plugin, without bean declaration for your
actions, what is the default scope for the created Action beans? Prototype,
I hope, but I can't really find where that is set or happens. I know the
default for Spring beans when not otherwise specified is Singleton, so I
Good luck with SEAM.
RajibJana wrote:
I strongly feel that this should be a feature of S2, it will ease the
developers work. With due respect to S2, I can say that SEAM provides few
more relevant features that are required for todays enterprise
applications.
Thanks
Rajib
I have used the static method you describe in the past.
Ignacio de Córdoba wrote:
Hi there,
I am writing a custom authentication and authorization interceptor and
need access to cookies. I've checked in Struts2 and other docs both ways
of getting access to cookies. I can't use
independent of http session feature without any baggage and
which they claim as revolutionary approach to state management. I will
check this feature.
Regards
Rajib
dusty wrote:
Conversations are just state persisted over a session. They could be
used for long
Do not use s:form action=/j_security_check use a normal form
action=/j_security_check
I think you could also do a
s:url value=/j_security_check id=loginPost/
s:form action=%{#loginPost}
Raghuveer Rawat-2 wrote:
Hi, I am trying to setup my struts2 login form for spring security..
I
1 - 100 of 149 matches
Mail list logo