Hi,
You should use interceptors provided by struts 2 for authenticating the
user. The interceptor provide you with easy coding according to AOP.
You can take a look at the sample application accompanying with struts2
distribution, that is mailreader.
Tuyen Dinh
On 10/16/07, Lizzy Borden <[EMAIL
Use struts formatting tags
<%@ taglib uri="http://java.sun.com/jstl/fmt"; prefix="fmt" %>
- Original Message -
From: "Sekhar, Raja" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Tuesday, October 16, 2007 9:11 AM
Subject: S:property converts string to rounded int
Hi Group
Despite the redundancy, having separate validators is nice since it
allows you to customize the error message. For example, you might
want to say, "Please enter your age," "Age must be a valid number,"
and, "You must be at least 13 years old to ride this ride."
On Oct 16, 2007, at 3:44 PM,
I am discovering that duplicate field validators in S2 are a royal pain in
the tucas! Remember the good old days when we could say age field
depends="required,int" Now we need to specify two entirely separate field
validators! I realize a field input may not *necessarily* be required, but
once
Thanks for the reply Jim I was trying to do whatever you said.. taking ur
idea when session expires what I did was I redirected to login page passing
request.getServletPath(); parameter as redirect param. But problem I had was
every thing in application has to go through the login action class whic
I already have enctype="multipart/form-data"
I can see below errors in log.. Looks like request is getting terminated
befor
Content-Type not allowed: myPhoto
"upload_7ddb4d8f_115a947dc12__8000_.tmp" image/pjpeg
java.lang.NullPointerException: Source must not be null
Looks like request is
Thanks for the input - your suggestion revealed an elegant solution. The
framework seems to automatically call validation methods with names of the
form validateActionName. Here's an example from my application. The entry in
struts.xml looks like this:
login and session
Hello,
I am starting to learn struts2 and I need some help.
I have done a login form, if the loginAction returns SUCCESS I forward to a
index.jsp, if it returns ERROR I forward to login.jsp page again.
When the authentication is good I create a Session var called logged-in and
I set it to true:
I struggled with the same thing, and finally had to defer to the
"Webwork in Action" and it's chapter on the Validation Framework.
"In the case of multiple action aliases, it's a better idea to pull your
common validations into a method and then call that method from each of
your execute() equ
hi all,
Unlike the other post I am using Struts 2.0.9 that seems to have a
slightly different setup for File Upload.
My struts.properties contains the relevant default settings:
### Parser to handle HTTP POST requests, encoded using the MIME-type
multipart/form-data
struts.multipart.parser=j
--- Rajagopal_Yendluri <[EMAIL PROTECTED]>
wrote:
> How can I get the actual file name which I browsed?
http://struts.apache.org/2.x/docs/file-upload-interceptor.html
By providing a method String fileName property in your
action. Note that different browsers may send the
actual filename different
What is the property defined as in your action or
bean?
--- "Sekhar, Raja" <[EMAIL PROTECTED]> wrote:
>
> Hi Group
> I am having a small issue with value="response.mtm"
> /> .
> say
> if mtm = "215667.20" then
> from the JSP I get a value of 215667.2,
>
I put it in "validate" method because this parameters must be readed when the
form is submited. And when the form is submited the validate method is
called.
Igor Vlasov wrote:
>
> Hello
>
> In my form i have common parameters like name="searchData.nights" maxlength="2" size="2" />
>
> and
Dipti, if you're using Struts 2.0.x, follow the example at :
http://struts.apache.org/2.0.9/docs/datetimepicker.html
It's likely you're just missing the essential
<%@ taglib prefix="s" uri="/struts-tags" %>
and/or
tags mentioned at the top of that page.
Note there are several issues with this
14 matches
Mail list logo