Hi,
I have also implemented login mechanism but I have used Servlet
filter to check the user login status.
I have applied filer on the restricted URI of my application by just a small
configuration in web.xml.
Regards,
Nitesh Jain
-Original Message-
From: Robin Mannering [mailt
2009/7/17 mathias-ewald :
> I want to round a value during an interation:
Maybe it will be better to prepare a list on server side with rounded
values and iterate over them?
Regards
--
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/
Pablo Picasso - "Computers are useless. They
Hi Robin,
Select tag expects an list object in the list attribute but in your
case you are providing an Map that's why it is not behaving correctly.
I suggest create an object called UserType with two fields id and name. And
put these objects into a list (lets say usertypes). Now use follo
On Thursday 16 July 2009 07:12:25 pm Musachy Barroso wrote:
> I am trying to "sell" the idea of using Struts 2 to my employer, and I
> know these questions will come up:
>
> 1. Who is using it?
> 2. How does it perform, compared to plain servlets and jsps?
> 3. How well does it scale?
> 4. Has anyo
Wes Wannemacher wantii.com> writes:
> Seems to me that my idea to create an ObjectFactory based plugin ... needs to
pick up some steam.
> I only have one question for the EJB users out there... Do you guys need
Spring integration as well?
To answer your question, _I_ personally don't need Spring
Hi,
I want to round a value during an interation:
--
(Min: , Max: )
<%
int val = 0;
%>
--
I agree that date conversion is a real problem for S2, especially in multi
lingual applications.
We¹ve had to implement our own converter which either looks for a format
value with the date string or picks up a list of default prioritised date
formats and tries each one successively until success
On Thursday 16 July 2009 07:14:30 pm Dave Newton wrote:
>
> IMO that's outside the purview of unit testing, though--by definition
> this describes integration testing: the testing of an action along with
> the framework.
>
> There's nothing *wrong* with doing that testing, I just don't think it's
>
On Thursday 16 July 2009 04:20:05 pm Nathan Schulte wrote:
> Nils-Helge Garli Hegvik gmail.com> writes:
> > The short answer - You have to do the lookup yourself.
> >
> :/
> :
> > The long answer - There's a similar discussion going on that pretty
> > much covers the topic:
> > http://www.nabble.c
Hi,
I think this link can help.
http://jira.opensymphony.com/browse/XW-670
Aloha,
Rafael Sobral
Milan Milanovic wrote:
>
> I'm sorry, but I finally got what is the problem. I'm sending in this
> thread and I want people on the list know what I have find. It very bad
> that nobody from Strut
Ritvars Rundza-ns wrote:
Yes, 2nd one contains ParametersInterceptor call, but both of them contains
StaticParametersInterceptor call. You mentioned, that "static param
interceptor, so you have that set up
somewhere". There are no explicitly defined interceptors @ my-super-app.
The default stac
tsongwei wrote:
This is a general design practice question.
Say if I am designing User Account Management component that does the
following:
1) User Profile info update -- updates firs name, last name, etc,...
2) Change password. -- do password verification, and change password
3) User Payment in
Haroon Rafique wrote:
We like to test against the complete struts context include the relevant
interceptor stack. This gives us the ability to test for all kinds of
combinations of compelte and partially incomplete input.
IMO that's outside the purview of unit testing, though--by definition
t
I am trying to "sell" the idea of using Struts 2 to my employer, and I
know these questions will come up:
1. Who is using it?
2. How does it perform, compared to plain servlets and jsps?
3. How well does it scale?
4. Has anyone benchmark it under load? numbers?
2-4 are somewhat related. I am sure
Well, actually I am wrong about that and yes, if there is no "/", it
will use the namespace name:
if (!locationArg.startsWith("/")) {
ActionContext ctx = invocation.getInvocationContext();
HttpServletRequest req = (HttpServletRequest)
ctx.get(ServletActionContext.HTTP_REQ
there is no magic there, remove the first "/" and give it a try.
musachy
On Thu, Jul 16, 2009 at 12:29 PM, stanlick wrote:
>
> I am working on a plug-in and having trouble getting the runtime to find my
> freemarker pages. I have a folder named pages in my plugin.jar where my
> freemarker pages
Yes, 2nd one contains ParametersInterceptor call, but both of them contains
StaticParametersInterceptor call. You mentioned, that "static param
interceptor, so you have that set up
somewhere". There are no explicitly defined interceptors @ my-super-app.
Ok, whatewer, this is irrelevant. Just deplo
2009/7/16 jayadevan :
> xwork-2.0.4.jar,
> ognl-2.6.11.jar,
> jsp-api-2.0.jar,freemarker-2.3.8.jar,
> commons-logging-1.0.4.jar
> these are other jars
And struts2-core.jar, which version? Do you have some other exception
when you're starting Tomcat?
Regards
--
Lukasz
http://www.lenart.org.pl/
h
Hi!
I would like to implement JASPER and my struts1 appliction
I have list of orders and items and I would like to use it .
I am new to JASPER. Does anyone know of an example for it?
Thanks
-
To unsubscribe, e-mail: user-unsub
uh? This is from the 2nd stack:
ParametersInterceptor.doIntercept(ActionInvocation) line: 187
ParametersInterceptor(MethodFilterInterceptor).intercept(ActionInvocation)
musachy
On Thu, Jul 16, 2009 at 1:33 PM, Ritvars Rundzāns wrote:
> Look carefully! As you can see, BOTH setters origin from sta
Look carefully! As you can see, BOTH setters origin from static params
interceptor (1st: line 129, 2nd - line 148).
And i do not have set it up somewhere - look @ war. Config is as simple as
possible.
Nils-Helge Garli Hegvik gmail.com> writes:
> The short answer - You have to do the lookup yourself.
:/
> The long answer - There's a similar discussion going on that pretty
> much covers the topic:
> http://www.nabble.com/Struts2-Action-Class-and-EJB-Injection-td24497801.html
Yes, I'm familiar wi
The short answer - You have to do the lookup yourself.
The long answer - There's a similar discussion going on that pretty
much covers the topic:
http://www.nabble.com/Struts2-Action-Class-and-EJB-Injection-td24497801.html
Nils-H
On Thu, Jul 16, 2009 at 10:03 PM, Nathan Schulte wrote:
> This may
This may be more related to XWork2, but I'll start by asking here.
I'm creating a custom Interceptor to handle user permissions for an application.
Rather than redirecting to an action to actually process a login attempt
(requiring a custom result type), the Interceptor itself will process the lo
Hi,
This is a general design practice question.
Say if I am designing User Account Management component that does the
following:
1) User Profile info update -- updates firs name, last name, etc,...
2) Change password. -- do password verification, and change password
3) User Payment info update. -
Hi,
I recently implemented a login mechanism but did it slightly differently
after recommendations from this mailing list to use an interceptor.
Each action/page that requires a validated login is directed via a
Interceptor.
The sole purpose of the interceptor is to verify the existence of
If it's integration testing you want to do, I've had success embedding
Jetty and doing "full" in-container integration testing. Embedding
Jetty is really easy, and it's pretty fast too. Although not Struts 2
specific, take a look at this article:
http://today.java.net/pub/a/today/2007/04/12/embedde
I am working on a plug-in and having trouble getting the runtime to find my
freemarker pages. I have a folder named pages in my plugin.jar where my
freemarker pages reside. My struts-plugin.xml is referring to the pages as
follows:
/pages/config.ftl
However, I am receiving a runtime
java.io.F
On Today at 1:19pm, GL=>Greg Lindholm wrote:
GL> Well everyone has an opinion so here mine:
GL>
GL> I want to unit test my Struts actions in the full Struts context which
GL> includes the interceptor stack and validation. This way I know my
GL> actions and results are configured correctly sinc
#1 is from the static param interceptor, so you have that set up
somewhere, and the second one is from the normal request parameter
(params interceptor)
On Thu, Jul 16, 2009 at 10:35 AM, Ritvars Rundzāns wrote:
> I put BP @ setCmd.
>
> 1st hit:
> ---
Take a look at Spring Security (formerly ACEGI).
http://static.springsource.org/spring-security/site/
> -Original Message-
> From: mathias-ewald [mailto:nitehoax...@gmx.net]
> Sent: Thursday, July 16, 2009 2:37 PM
> To: user@struts.apache.org
> Subject: Login with Struts2
>
>
> Hi,
>
Hi,
I am trying to implement a login mechanism. I will now explain what I did
and what error I get but in case there is a more sophisticated way to do
that - please tell me!
I created a BaseAction which is the parent of all my Actions. The BaseAction
is supposed to be responsible for displaying
Thanks everyone for their opinions. I was indeed hoping to hear both
sides of this matter, with both bringing valid arguments and make good
points.
I was wondering with popular frameworks like struts, spring and
hibernate integrated together and the increasing adoption of test
driven, and agile de
Hi all,
I am trying to validate the date field through the xml by using the date
validator defined.
The problem with this is we can't have leap year validation with this, nor
formate validation and need to specify the date range.
Is there any way where I can validate the date(which impl
Hi all,
I am trying to validate the date field through the xml by using the date
validator defined.
The problem with this is we can't have leap year validation with this, nor
formate validation and need to specify the date range.
Is there any way where I can validate the date(which implici
Works - thx. I should have seen that in the doc though ^^
Nils-Helge Garli wrote:
>
> Try using the url tag without specifying value or action.
>
> Nils-H
>
> Den 16. juli. 2009 kl. 13.14 skrev mathias-ewald :
>
>>
>> Hi,
>>
>> is there a way to create a URL (like ) to the Action that
>> c
I put BP @ setCmd.
1st hit:
>
Daemon Thread [http-8080-2] (Suspended (breakpoint at line 28 in Person))
Person.setCmd(String) line: 28
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) lin
Well everyone has an opinion so here mine:
I want to unit test my Struts actions in the full Struts context which
includes the interceptor stack and validation. This way I know my actions
and results are configured correctly since I test them. I also know my
declarative validations are working co
Hi!
i have these components:
i would like that when the user chooses a specific value in data.payingType
- it would disable/enable the other html:select and html:text.
i wrote this function:
It appears that every request through struts is getting a copy of the
Session object, even for those that don't need it, like static resources
(.js, .css, etc). Can I disable this behavior somehow, only getting the
session when I need it? Below is a sample stack trace.
at
org.apache.cata
+1 for what Wes said. Plus, I would say, the junits become so complex
(when you do integration test from them), that from my experience,
when they break, people don't want to fix them (because we have to
admit, we are lazy).
musachy
On Thu, Jul 16, 2009 at 8:28 AM, Wes Wannemacher wrote:
> I have
can you put a breakpoint in the setter and see where is it called
from? (both times)
musachy
On Thu, Jul 16, 2009 at 8:08 AM, Ritvars Rundzāns wrote:
> Hi!
>
> I am wondering, why setters for cmd and id fields @ my Person action (see
> below) is called twice. For example, when browser requests
>
I have a few thoughts on this, but I am somewhat opinionated when it
comes to unit testing. Personally, I don't think it's necessary to
test your actions with the interceptors. If you want to make sure that
your actions fit into the struts flow of things, then unit testing is
probably not the right
Hi!
I am wondering, why setters for cmd and id fields @ my Person action (see
below) is called twice. For example, when browser requests
/person-aaa-bbb?dum=ccc , this gets stdout-ed :
example.per...@113981b 18061339
setCmd ]aaa[
setId ]bbb[
setCmd ]aaa[
setDum ]ccc[
setId ]bbb[
execute
I know s
Hello,
Platform : Struts 2, EJB 3.0, Glassfish 2.1
I'm having trouble using the Freemarker equivalent of the JSP Struts 2
Select Tag.
I need to convert:
into the Freemarker equivalent.
userTypes is an application defined attribute. I have checked the
existence of the attribute within th
Hello,
I was hoping to hear the community's views about unit testing a
Struts2 application which is integrated with Spring and Hibernate. My
plan is to unit test the actions with the framework's interceptors
running, rather than each action class in a stand-alone isolated
fashion.
What approach d
Hi,
I have made a struts form:
Name nl
price:
and the mapped actionclassmethod addProduct with:
public String addProduct(){
Product p = new Product(productNameNl, productPrice);
ProductDA.getInstance().addProduct(p);
return SUCCESS;
}
public void setProductNameNl(String productNameNl) {
thi
struts needs to map url requests to FilterDispatcher
your WEB-INF/web.xml should have filter configured and mapped as:
struts
org.apache.struts2.dispatcher.FilterDispatcher
actionPackages
your.action.package
templ
Let's say you have /*.action as your filter URL and you have Websphere
application server and IBM Http server as your webserver. Once you try to
generate your plugin file for http server, *.action is not picked up by WAS as
filter are ignored [since they are not supposed be accessed directly fo
hi
xwork-2.0.4.jar,
ognl-2.6.11.jar,
jsp-api-2.0.jar,freemarker-2.3.8.jar,
commons-logging-1.0.4.jar
these are other jars
Lukasz Lenart wrote:
>
> 2009/7/16 jayadevan :
>> u said struts-tags.xml is already in struts2-*.jar
>> so add struts2-core.jar into class path and try to exccute
>>
>> the
Try using the url tag without specifying value or action.
Nils-H
Den 16. juli. 2009 kl. 13.14 skrev mathias-ewald :
Hi,
is there a way to create a URL (like ) to the Action that
called a
JSP file? I would like to reuse some code like forms and other stuff
cu
mathias
--
View this message
ive used OpenEJB with TC
then again you could deploy your EAR to a true EJB3 container with a
J2EE-AppServer such as GF, WL or AMSServer..even resin would handle EJBs
?
Martin Gainty
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confide
2009/7/16 jayadevan :
> u said struts-tags.xml is already in struts2-*.jar
> so add struts2-core.jar into class path and try to exccute
>
> then i got the following exception
>
> org.apache.jasper.JasperException: File "/struts-tags.tld" not found
struts-tags.tld is for sure in struts2-core.jar,
hi
u said struts-tags.xml is already in struts2-*.jar
so add struts2-core.jar into class path and try to exccute
then i got the following exception
org.apache.jasper.JasperException: File "/struts-tags.tld" not found
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultEr
Hi,
is there a way to create a URL (like ) to the Action that called a
JSP file? I would like to reuse some code like forms and other stuff
cu
mathias
--
View this message in context:
http://www.nabble.com/URL-to-underlying-action-tp24514500p24514500.html
Sent from the Struts - User mailing li
2009/7/16 jayadevan :
> i tried both way
> directly
> and step by step
You should avoid directly accessing jsp files, always go through
actions. Especially when you are using Struts tags inside.
Regards
--
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/
Ogden Nash - "The troub
2009/7/16 jayadevan :
> my index.jsp like this
Is it the same file as in web.xml for welcome-file?
> where i place "struts-tags.xml " ?
It's already in struts2-*.jar
Regards
--
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/
Joan Crawford - "I, Joan Crawford, I believe in th
Thanks Robert for your inputs.
Well I'm sure that Struts does initialize all null objects along the object
chain if they are null, because for 90% of the time, this works. I do not
explicitly initialize objects along the object chain in my code. For most of
the time, Struts detects that it is null
Say Jon schrieb:
public void prepare() throws Exception {
super.prepare();
BaseEntity model = null;
if (getId() != null) {
model = (BaseEntity) session.get(getEmbeddedModelKey() + getId());
if (model == null) model = service.retrieve(modelClass, getId());
}
if (model == null && !(this inst
my index.jsp like this
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
http://www.w3.org/TR/html4/loose.dtd";>
<%...@taglib uri="/struts-tags" prefix="s" %>
Hello World
i tried both way
directly
and step by step
Lukasz Lenart wrote:
>
> It's ok, when you got that exception? What url were you entering in
> web browser? It looks like you went directly to jsp.
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
> http://dailylog.lenart.org.pl/
>
> Timothy
Hi Robert,
Thanks for the reply. I'm heartened that Struts 2 have a live community that
can help with issues. Firstly, yes you are right that I'm using a
ModelDriven.
I have a super class ModelDrivenAction which my other action classes extend
from.
public void prepare() throws Exception {
super.
62 matches
Mail list logo