You are correct, #3 isn't possible right now with the rest plugin,
however, it is certainly on the near-term roadmap. What is needed is
the ability to define wildcards in the namespace, also known as url
templates. For example, you could do something like
@Namespace(/states/{state}) on your
Currently, the TextProvider impl is not pluggable. Note that Action
classes themselves can implement TextProvider (and usually do via
ActionSupport), so they can customize it all they need.
What is your usecase for having your own TextProvider? That class is
only used in a few places, so
The main goal:
I want to get i18n strings from properties files in UTF-8 encoding.
The secondary goal:
Load current locale setting from JSTL config variables like
Config.FMT_LOCALIZATION_CONTEXT and its locale variable value
Thus I will use jstl-fmt tags and strust i18n support TOGETHER
I think you must put the ID's in hidden fields and then they will fill up
with id's from your collection on jsp page
In save method wou will analyse the recieved data.
kaouki wrote:
Hi,
I get this bean in my action in order to modify it in my jsp:
Catalogue {
Long id;
String title;
Hi All,
I am developing a form using jsp. If validation fails then I want those fields
to be highlighted . I am able to print error message on top but not able to
highlight the text( for example UserName(if it contains less characters)).
Please somebody suggest some solution for this.
Thanks
Hi Ashish,
If you're using Struts 2, and the xhtml/css_xhtml theme, the template
for each field in the form includes controlheader-core.ft that
provides the logic to include the html to report field errors.
Here is an extract:
#assign hasFieldErrors = parameters.name?exists
Hi ...
I am not able to use the datefimepicker, when I use the following
code:
s:datetimepicker name=birthday label=Date:
/s:datetimepicker
Only Label is displaying no... date and time in JSP..
Regards,
Rajagopal
-Original Message-
From: Jeromy Evans
Don Brown wrote:
You are correct, #3 isn't possible right now with the rest plugin,
however, it is certainly on the near-term roadmap. What is needed is
the ability to define wildcards in the namespace, also known as url
templates. For example, you could do something like
Try to use lt;result name=success type=chain doThing/result
This will invoke ChainInterceptor that wiil copy SIMILAR(by name and type)
objects in both actions. And error mesages also.
Please, look at ChainInterceptor source.
cuong.van.truong wrote:
I have this actions in the same
I use
action name=login_* class=login method={1}
result name=inputlogin.jsp/result
result name=errorlogin.jsp/result
result name=success/pages/main.jsp/result
result name=success2/pages/dashboard.jsp/result
/action
zul;jami wrote:
I have two methods in action
This action occures when call jsp directly and use lt;s:... / tags on it.
You must call to Action class before and forward to jsp view page with
lt;s:... / tags
Riccardo Mollame wrote:
Here's it to you:
java.lang.NullPointerException
at
Thanks Dave.
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 25, 2007 8:29 PM
To: Struts Users Mailing List
Subject: Re: Multiple Textboxes with same name.
S2 will handle indexed form names properly, so you
could have an action property defined as,
The list property targets to model with data for rendering lt;select tag.
In lt;option tag you recieve Item.toString as value attribute.
After post Struts cannot set this value to user.item property.
I think you must use in itemId as value for lt;option value attibute
and use s:select
After changing my struts.xml as you said
also my action fires execute and also update.
I do not want to fire update.Pls help
Igor Vlasov wrote:
I use
action name=login_* class=login method={1}
result name=inputlogin.jsp/result
result name=errorlogin.jsp/result
i'm new in integrating JasperReports and Struts 2..my problem is its always
saying that my datasouce is
null so it displays a pdf file with all the labels in it without anything on
the detail part..my datasource
is an ArrayList of Personnel object, i name it reportData.
here is part of my code..
Hi every one,
I have installed Struts 1.3.8 used the struts-blank-1.3.8.war to create a
first project, it run on an Apache Tomcat 5.0 with a JDK1.4.2_08.
When I first try the app with the /Welcom.do url from the struts-blank app,
no problem (this Welcom.do is just an url that forward directly to
2007/10/26, Hans Hedung [EMAIL PROTECTED]:
!-- == Tiles Definitions === --
plug-in className=org.apache.struts.tiles.TilesPlugin
set-property property=definitions-config
value=/WEB-INF/conf/tiles-defs.xml, /WEB-INF/conf/tiles-defs-store.xml,
This is the tiles-part.
!-- == Tiles Definitions === --
plug-in className=org.apache.struts.tiles.TilesPlugin
set-property property=definitions-config
value=/WEB-INF/conf/tiles-defs.xml, /WEB-INF/conf/tiles-defs-store.xml,
/WEB-INF/conf/tiles-defs-admin.xml,
Are you sure than you delete:
action name=login_* class=login method=update
result name=success/pages/dashboard.jsp/result
/action
When call login_input.jspa then input method called
When call login.jspa then execute method called.
zul;jami wrote:
After changing my
In our application we need to lazy load fields in the view.
We have configured springs OpenSessionInViewFilter.
If we use lazy loading from a normal JSP View, everything works fine.
But on our View we also have AJAX tabbedpane with remote div's.
Now the problem is:
within the content of this
I have not deleted.instead I gave
action name=login_* class=login method={1}
result name=inputlogin.jsp/result
result name=errorlogin.jsp/result
result/pages/main.jsp/result
/action
action name=update class=login method=update
result
Hello
Lately I was playing with MultipartRequest parsers.
In the file struts-default.xml, the beans of type MultipartRequest
have a scope specified: scope=default
In this file, only these beans have a scope specified.
Apparently, default is not the default scope at all...
About that, I think
Did you try this ?
result name=input type=redirect-action
param name=actionNameModNews/param
param name=id${id}/param
/result
Julien
-Message d'origine-
De : Andvar Woo [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 26 octobre 2007 12:17
À : Struts Users Mailing List
Hi.all.
Recently,I'v encounter a problem.
The problem comes as follows:
*First invoke a MdfNews Action with a news id param to init some
variables,then goes*
*to a newsModify.jsp page ,something like
http://www.comanyName.com/news/MdfNews.action?id=123*
action name=MdfNews
Hi,
I have Struts 1.2.7 application and I need to write custom validator for my
form. I've wrote struts tutorial at
http://struts.apache.org/1.2.7/userGuide/dev_validator.html
and have tried to do the same. But my validator is not working. Here is my
class method :
public class GroupIdValidator
yes that is what i did I use only
action name=login_* class=login method={1}
result name=inputlogin.jsp/result
result name=errorlogin.jsp/result
result name=success/pages/main.jsp/result
result name=success2/pages/dashboard.jsp/result
/action
BUt still update is
use @SkipValidation annotation for methods, which you do not need to
validate.
This affects on StrutsValidationFramework
For validate() method you must manually analyse the situation and skip its
executing.
Lindell, Andrew wrote:
The problem I'm having is getting validation to run when
I use validate() method from ActionSupport for complex bussines
validation.(it works in WorkFlowInterceptor).
Sometime, for trivial fields, i can use Struts ValidationFramework.(it
works after ParameterInterceptor)
Sean Kleinjung-2 wrote:
Hey,
I have a question concerning where
Try to use servletFilter from servlet specification with apropriate
mapping
enthucoder wrote:
I have a requirement, where on each page load, I hit some Servlet or
Action (Can be modified accordingly). Should i use a IncludeAction here or
there is a better or elegant way to achieve this?
If you use only
action name=login_* class=login method={1}
result name=inputlogin.jsp/result
result name=errorlogin.jsp/result
result name=success/pages/main.jsp/result
result name=success2/pages/dashboard.jsp/result
/action
the update action called when
You have to delete second binding...
zul;jami wrote:
I have not deleted.instead I gave
action name=login_* class=login method={1}
result name=inputlogin.jsp/result
result name=errorlogin.jsp/result
result/pages/main.jsp/result
/action
action name=update
After deleting the second binding also I got the same error.
Igor Vlasov wrote:
You have to delete second binding...
zul;jami wrote:
I have not deleted.instead I gave
action name=login_* class=login method={1}
result name=inputlogin.jsp/result
result
Well, I'm using Hibernate for persistance, so I guess the implementation
would be somehow different. Nevertheless, I'm looking at this solution.
For my understanding, with this approach you monitor the CRUD transactions
(via JPA/Toplink features) and audit each CRUD event individually, correct?
Just found the problem cause:
what was not mentioned:
in the requests initiated by the remote divs the model is retrieved from
session.
For the model no hibernate session is attached, so non of the not already
loaded
lazy loading fields are available.
Seems we have to:
a) attach session
Do you know what has happened to 2.0.11? It seems to
have stalled.
--- Ted Husted [EMAIL PROTECTED] wrote:
On 10/25/07, someone wrote:
Hi,
Having been a long time developer with Struts, I
love working with Struts 2x. So far it has
been a pleasure and you guys have done a great job.
It
From this point of view I can not properly investigate the problem.
May be run in debug mode and analyse when and where method update is
called.
or make manually a NUllPointerError and see the stack trace.
zul;jami wrote:
yes that is what i did I use only
action name=login_*
On 10/25/07, someone wrote:
Hi,
Having been a long time developer with Struts, I love working with Struts 2x.
So far it has
been a pleasure and you guys have done a great job. It seems like all
the things I did not
like about Struts have been address in Struts2.
Do you know when 2.1 will be
I would like to find a better way to do that ... if it is possible ...
Because I would have the same probleme with all my beans (Hibernate
entities).
If I want to render an entity bean E in my view (with 4 or 5 properties,
nested beans or not), and the user updates 2 properties and submits the
Is there a command to show the value stack as a graphical tree? I would pay
a couple large for that picture this morning.
--
Scott
[EMAIL PROTECTED]
in 2.1, add debug=browser to your url (and make sure that you have the
dojo plugin installed). By default it will display #context and you
will be able to drill down on fields. If you want to change the
display root object then add object=%21ognlexpr to your url.
See WW-2070 for details.
regards
Ok, but I don't understand... ^^
Here is my Action:
public class CatalogueAction extends ActionSupport {
private Catalogue catalogue;
(...)
@RequiredStringValidator(message = Titre obligatoire, fieldName =
catalogue.titre)
public String save() {
if (logger.isInfoEnabled()) {
You don't have to put the values not on the form in
hidden fields: if you have the ID then you re-attach
the Hibernate object, set the new values that were on
the form, and update.
Unless you keep the actual object in session (whether
you do it via ScopedModelDriven or not isn't
relevant), or
The release has been submitted for mirroring (Tue)
although I didn't see it anywhere except apache
servers as of last night, but I didn't look around on
all the mirrors, either.
--- David Harland [EMAIL PROTECTED] wrote:
Do you know what has happened to 2.0.11? It seems to
have stalled.
---
hello serge,
I am sending you a sample pseudo code just check if everything is
correct.
public class FirstApplication extends Action
{
public ActionForward execute( ActionMapping mapping,
ActionForm form,
I guess you need to have reportData as a field in the Action and do
setReportData(reportData) in execute() after populating it.
On 10/26/07, carmi_cd [EMAIL PROTECTED] wrote:
i'm new in integrating JasperReports and Struts 2..my problem is its
always
saying that my datasouce is
null so it
I would pay a couple large
btw where is my cash? :)
musachy
On 10/26/07, Musachy Barroso [EMAIL PROTECTED] wrote:
in 2.1, add debug=browser to your url (and make sure that you have the
dojo plugin installed). By default it will display #context and you
will be able to drill down on fields.
--- Musachy Barroso [EMAIL PROTECTED] wrote:
I would pay a couple large
btw where is my cash? :)
You're rich!
It'd also be pretty short work to take the stack and
create a Graphviz file, too.
d.
-
To unsubscribe, e-mail:
A few more minutes of experimenting and i answered my own question ...
anyone else who wonders, instead of using
s:submit cssClass=templateButton value=%{getText('healthe.admin.save')}
method=save /
i used
s:submit cssClass=templateButton value=%{getText('healthe.admin.save')}
So I have a form with action = template and on this form i have several
submit buttons, with methods = save, restore, and preview.
I also have some a links with href action urls - example:
s:url action=template method=view id=view
s:param name=sponsor value=%{sponsor} /
s:param name=type
Musachy is is our javascript expert! I would demand a Web 2.0 compliant
viewer with animation, fade-in/out and other whizbang features. :)
Tom
newton.dave wrote:
--- Musachy Barroso [EMAIL PROTECTED] wrote:
I would pay a couple large
btw where is my cash? :)
You're rich!
It'd
OK, I looked at the constructor of
org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer
class which has only two param
Updated it to:
bean id=userIncrementer
class=org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer
Digging down into the code, I'm trying to figure out exactly what class(es)
open a .jsp file, and populate it with values from the OgnlValueStack.
Any ideas?
--
View this message in context:
http://www.nabble.com/What-actually-processes-a-JSP-file--tf4698875.html#a13432429
Sent from the Struts
Hi,
I have added Form Based Tomcat Authentication for my struts-2
application. It works foine if I have just the login form in my login.jspas,
form method=POST action=j_security_check
input type=text name=j_username
input type=password name=j_password
/form
However I
Hello,
Can someone tell me how to setup for postgresql
org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer
in applicationContext-ibatis.xml file please?
Here I tried, but failed!
bean id=userIncrementer
Rename narrative_fr_FR.properties to narrative_fr.properties.
2007/10/19, ChristopherAngel [EMAIL PROTECTED]:
I've developed a web app using Struts2 - I need to make it display
different
languages based on the locale of the browser but I'm having a little
difficulty getting it to work.
Your app server (tomcat, WAS, etc.) compiles/serves the JSP files. The
request is dispatched to the app server eventually.
-W
On 10/26/07, jamestastic [EMAIL PROTECTED] wrote:
Digging down into the code, I'm trying to figure out exactly what class(es)
open a .jsp file, and populate it with
But Tomcat doesn't directly know about ValueStacks. It seems there must be
some Struts2 component which handles this part. Not to mention all the
Struts2 helper classes for processing Struts2 markup in JSP files.
After my Action has completed, I've traced the ServletDispatcherResult to
call
It looks like there's a ServletHolder which tells a servlet to process the
JSP file. I just can't figure out what that servlet is.
Hmm...
jamestastic wrote:
Digging down into the code, I'm trying to figure out exactly what
class(es) open a .jsp file, and populate it with values from the
It's been on the main Maven repository since Tuesday:
http://repo1.maven.org/maven2/org/apache/struts/struts2-core/2.0.11/
So, Maven 2 users should be able to update to it without problem. And
if you're not using Maven, you should be! (Just kidding! I don't mean
to start a build tool war).
But I wanted it in 3D!
Musachy Barroso wrote:
I would pay a couple large
btw where is my cash? :)
musachy
On 10/26/07, Musachy Barroso [EMAIL PROTECTED] wrote:
in 2.1, add debug=browser to your url (and make sure that you have the
dojo plugin installed). By default it will
The JSP is processed by your servlet container, but it delegates to
the tag libraries whenever it encounters a custom tag. The OGNL Value
Stack access happens (mostly) in the Struts 2 s:... tag library.
(*Chris*)
On 10/26/07, jamestastic [EMAIL PROTECTED] wrote:
It looks like there's a
org.apache.jasper.servlet.JSPServlet looks interesting.
Could the RequestDispatcher be invoking a JSPServlet to compile a JSP on the
fly, then populate it according to my ValueStack?
jamestastic wrote:
But Tomcat doesn't directly know about ValueStacks. It seems there must
be some
On 10/26/07, jamestastic [EMAIL PROTECTED] wrote:
org.apache.jasper.servlet.JSPServlet looks interesting.
Could the RequestDispatcher be invoking a JSPServlet to compile a JSP on the
fly, then populate it according to my ValueStack?
Yes, Jasper is a very common JSP Servlet (but it's not the
On 10/26/07, jamestastic [EMAIL PROTECTED] wrote:
But Tomcat doesn't directly know about ValueStacks. It seems there must be
some Struts2 component which handles this part. Not to mention all the
Struts2 helper classes for processing Struts2 markup in JSP files.
You're right, tomcat doesn't
The problem is I'm trying to integrate Struts2 into an application which has
a different servlet container already embedded in it.
This servlet container, when it receives the forward() from the
ServletDispatcherResult, looks for a servlet to handle the new request. I
now see this new servlet
I have a fairly strong Struts 1.x background but suffered a lot in one of the
recent projects
because of the lack of some controls ( I didn't find using Dojo etc. that
easy).
I am currently working on a new project using Oracle ADF Faces and I am really
very impressed
by the out-of-the-box
Hi,
I am testing a Servlet Filter usage. And somehow, my application doesn't
even start in Tomcat 5.5. Please help me in debugging, where I am going
wrong.
Here is what did:
SampleFilter.java
package app;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class
Zhang, Larry (L.) wrote:
This might be an old topic, but should we completely rule out using
struts tag and move to jstl tag?
JSTL is preferred over Struts1's tags where there is overlap (mostly for
the logic: taglib). For Struts 1 and 2, though, there is lots of
functinoality in the taglibs
Stephen de Vries wrote:
Are there any examples of how to write Actions for the multiselect tags
such as s:select and s:checkboxlist? The Tag reference documentation
only explains how to use the tags themselves, but not what the action or
model should look like and whether any conversion is
sagarlotiya wrote:
Hi Problem in Struts2.
I have problem when using OGNL to set the Object directly on Model.
For e.g.
s:select name=courseImplementation.department
list=listPropertySelectionModel.departmentListOfSchool listValue=name /
e.g. Final html which is rendered by struts2
select
Giovanni Azua wrote:
hi all,
I have at application scope level a list of data received as event
from a system outside the Struts 2 web app. I then have my struts
application with a JSP page that shows to the user the list using
displaytag when the user chooses to have an overview of such
Igor Vlasov wrote:
Hello
I want to add a user defined HTML attribute to lt;s:textfield.
Example of rendered HTML control: lt;input type=text
userDefinedAttribute=true/.
How can I do this?
if i write lt;s:textfield name=customer.cus_surname size=20
userDefinedAttribute=true /
I recieve
sagarlotiya wrote:
Hi Problem in Struts2.
I have problem when using OGNL to set the Object directly on Model.
For e.g.
s:select name=courseImplementation.department
list=listPropertySelectionModel.departmentListOfSchool listValue=name /
e.g. Final html which is rendered by struts2
select
Tomás Pollak wrote:
Hello all,
I am currently working on a development project for a web system using
Struts 1.2.9. It is a fairly large system that has been under development
for more than three years now.
During the code-test-and-debug cycle we are forced to restart the server
several times,
You've configured your application to send all requests through Struts:
filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping
It *might* be enough to move this mapping after all your existing
servlet mappings. Alternatively, you'll
robin bajaj wrote:
I have a fairly strong Struts 1.x background but suffered a lot in one of the
recent projects
because of the lack of some controls ( I didn't find using Dojo etc. that easy).
I am currently working on a new project using Oracle ADF Faces and I am really
very impressed
by
--- enthucoder [EMAIL PROTECTED] wrote:
I am testing a Servlet Filter usage. And somehow, my
application doesn't even start in Tomcat 5.5.
You should consider asking this on a general-purpose
JEE programming list/news group, as this isn't
Struts-related.
When you do, it would make sense to
John Doe wrote:
Hi,
I have Struts 1.2.7 application and I need to write custom validator for my
form. I've wrote struts tutorial at
http://struts.apache.org/1.2.7/userGuide/dev_validator.html
and have tried to do the same. But my validator is not working. Here is my
class method :
public class
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()
--- jamestastic [EMAIL PROTECTED] wrote:
The problem is I'm trying to integrate Struts2 into
an application which has a different servlet
container
already embedded in it.
What do you mean, a different servlet container?
What Java app server are you using that doesn't
process JSP files?
d.
Okay, I thought, i missed out on that..
Here is the trace if anybody still wants to look at it :
Oct 26, 2007 2:46:48 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Oct 26, 2007 2:46:49 PM
That looks OK; perhaps you didn't deploy the filter class correctly? You
need to go through your Tomcat logs and find out what prevented it from
starting up.
L.
enthucoder wrote:
Hi,
I am testing a Servlet Filter usage. And somehow, my application doesn't
even start in Tomcat 5.5. Please
On 10/26/07, Laurie Harper [EMAIL PROTECTED] wrote:
Tomás Pollak wrote:
These files are pretty stable now, so having to pay the price to parse the
XML every time seems unnecessary. I was wondering if there is an approach to
configure a Struts application using code instead of XML files. Has
I believe there are lots of ways that JSP engines work. Here's how the
one in tomcat works:
In my app I have a file named login.jsp.
Inside $CATLINA_HOME (at work/Catalina/localhost/myapp/org/apache/jsp)
it automatically creates login_jsp.java
Which it then compiles to login_jsp.class
Which
The code has been checked into XWork, but since the upcoming Struts
2.1.0 release will depend on XWork 2.1.0 and not XWork 2.1.1 (which
trunk will be when it is released next), the feature won't be
available until Struts 2.1.1.
Basically how it works is you define your namespace to be:
85 matches
Mail list logo