Hi
I am trying to get the referrer URL using JSTL or JSP. Is there a way ?
I have a link in an email that hits an action. So in order to identify
the action was hit from the email link I appended a parameter to the URL.
Now I want to do something if the action was hit from the email
HI
My URL pattern in web.xml is
web-resource-collection
web-resource-nameemis-web/web-resource-name
descriptionRequire users to authenticate/description
url-pattern/emis/*/url-pattern
Hi
My validator only works for 'required' fields. Eventhough I have the
following in the same XML it is not working. Is this right ? My
configuration is right because the same validator works for 'required'
fields.
field
property=cocNumber
depends=integer
Hi
There are the steps I am following for a numeric check with struts
validator. I don't see the proper message and the check is passing. What
could be the problem ?
validation.xml
field
property=windSpeed
depends=integer
for a specific property.
html:errors property=windSpeed/
http://jakarta.apache.org/struts/userGuide/struts-html.html#errors
- Original Message -
From: MOHAN RADHAKRISHNAN [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 9:08 AM
Subject: Numeric
Hi
We are planning to deploy our struts application as a cluster.
public ActionForward add( ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse
Hi
The following should work. The hidden variable is needed if you want to
send it back to the proper indexed property when you submit.
logic:iterate name=myForm property=results id=result
indexId=ctr
bean:write name=result property=bookingNo/
html:hidden name=result property=bookingNo
Ramachandran,
The following is what we use. Read html:multibox doc.
logic:iterate id=item property=deletereqs name=form
tr bgcolor=#EEF1F7 class=text_bold height=20
td
Hi
I am using modules . Can I have the following in my respective struts
config files ? It seems that something is overwritten and I don't see errors
properly.
plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property property=pathnames
Hi
I am using nested beans. What is the equivalent using nested beans
for the following ?
html:select name=element property=ruleObjectiveId
html:options collection=OBJECTIVE labelProperty=name
property=id /
/html:select
OBJECTIVE is in the session scope.
I tried
Hi
I have a problem with the validator framework. The procedure I am
following is
1. I have code like this in the form
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request){
System.out.println( The requested operation is +
Unintentional Wrong subject again.
Mohan
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 24, 2004 12:23 PM
To: 'Struts Users Mailing List'
Subject: RE: generating tables in Struts
Hi
Is there any way to find out what action
vs what
errors you are returning. What happens when you change the jsp to have the
html:errors / tag instead?
-Joe
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 24, 2004 2:08 AM
To: 'Struts Users Mailing List'
Subject: Validator
Hi
Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 24, 2004 4:30 AM
To: \'Struts Users Mailing List\'
Subject: RE: Validator
Yes. That is what I am assuming.
I tried html:errors / too
The other methods are blocked. I can see that. The messages
-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 24, 2004 4:30 AM
To: \'Struts Users Mailing List\'
Subject: RE: Validator
Yes. That is what I am assuming.
I tried html:errors / too
The other methods are blocked. I can see that. The messages
are not appearing
Hi
If I have to use a custom request processor then I specify the following
controller
processorClass=com.jea.emis.presentation.EnvironmentRequestProcessor/
Is there anything else I have to do ? I am using modules.
I got a parsing error.
SEVERE: Parse Error at line 51 column 14:
HI
A follow-up question.
How does this impact my Tile request processor ?
SEVERE: TilesPlugin : Specified RequestProcessor not compatible with
TilesReques
tProcessor
Mohan
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Friday, January 23, 2004 4:45 PM
Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Friday, January 23, 2004 4:45 PM
To: 'Struts Users Mailing List'
Subject: custom request processor
Hi
If I have to use a custom request processor then I specify the following
controller
processorClass
Hi
I read the following spec. This means that in a clustered environment the
application scope
is useless. I can't really believe this. Why do we have this scope then ?
Mohan
The Server Specification states the following:
javax.servlet
Interface ServletContext
Hi
Is there any way to find out what action is current by overriding methods
like 'processForwardConfig' etc. and call a method in that action. I am
using Tiles. So my custom processor extends the Tile processor.
The business case for this is not worth explaining because I am doing this
Hi
Can I use code like this to selectively enable my validator framework ?
I am using DispatchAction.
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request){
if( getOperation().equals( showRuleByStatus) ||
getOperation().equals( addRule)
Apology for the wrong subject
Mohan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Zsolt,
I have some idea about this though I haven't tried it. I think this is
the basic idea.
Use JSTL fmt tag
context-param
param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
param-valuecom.jea.emis.rulemaking.presentation.RuleMakingResources/param
-value
/context-param
Mohan
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 7:48 PM
To: 'Struts Users Mailing List'
Subject: RE: How to replace bean:message... with JSTL?
Zsolt,
I have some idea about this though I haven't tried it. I
Raman,
What's wrong with this ? html:checkbox property=deleteItem/
Shouldn't this pick up the property from the ActionForm and generate
value=x for example.
Is yours dynamic ?
Mohan
-Original Message-
From: Raman [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 17, 2004 12:43
=bCancel=true;/
Regards
Steve
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: 16 January 2004 06:34
To: 'Struts Users Mailing List'
Subject: Disable validator framework
Hi
We are using dispatch action and validator framework. There is a popup
action
Hi
We are using dispatch action and validator framework. There is a popup
action associated
with one button on the form. When the user clicks on this a particular
method in the action is called but I don't want to validate the ActionForm
because the main form is not submitted. There are other
I just use ActionErrors for everything but I am guessing that it is
html:errors for errors
and html:messages for messages.
Mohan
-Original Message-
From: Otávio Augusto [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 11:17 AM
To: [EMAIL PROTECTED]
Subject: messages
I'm able
I remember that this is done to use custom properties in your action mapping
in the struts-config.xml file.
action ...
set-property property=foo value=x/
set-property property=bar value=y/
/action
You can access them in your action.
Mohan
-Original Message-
From:
You can use a vendor-specify API ( JDBC/Realm ) to map to user/role tables.
You can also use the XML file ( tomcat-users.xml ) instead with hard-coded
values.
You don't have to extend RequestProcessor if you are using CMA.
If you want to do application based-security then you need to extend
We use base forms too but we use sub-forms in both action mappings. It works
for us if we use sub-forms with action chaining like this.
Our action chains are very minimal though because it is not recommended
design practice.
Mohan
-Original Message-
From: [EMAIL PROTECTED]
Hi
Are you only filtering data based on role ?
If you are talking about role-based access of views then we are doing
something like that
1. You can use Container Manager Authentication and restrict access to
URL patterns to only valid users.
2. You can use the vendor-specify XML file
Hi
Seems that you have a List of player objects. If so then indexed bean
properties might help. Your form will contain something like the following.
public void setPlayerList(ArrayList playerList){
this.playerList = playerList;
}
public ArrayList getPlayerList(){
Just extend it and call super.init()
servlet-nameaction/servlet-name
servlet-classcom.cellx.lucid.servlet.IntranetServlet/servlet-class
Nothing special that I know of.
Mohan
-Original Message-
From: Sudhakar G [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003
This seem to be a authentication issue managed with Container Managed
Authentication
web-resource-collection
web-resource-nameweb/web-resource-name
descriptionRequire users to authenticate/description
This might be the wrapper you are looking for
protected MessageResources getMessageResources(){
return MessageResources.getMessageResources(ApplicationResources);
}
//getMessageResources().getMessage( key );
The API has lot of other methods.
Mohan
Your problem could be solve by this simple method
init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml,
/WEB-INF/struts-config-timesheet.xml,
/WEB-INF/struts-config-recruitment.xml,
Seems this is not supported by many containers yet(J2EE 1.4). You could use
a filter to check for session expiry but what if it expires after it passes
the filter. Then each JSP should have a check in the beginning.
Mohan
-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of
You should have a property in your form bean where the user selection will
go. In this case the property is name
html:select size=1 property=Property in the form bean to hold the
selection
multiple=false
html:options collection=EDITORS property=name
labelProperty=name/
/html:select
Mohan
Hi
Can I use logic:iterate and indexed properties with display tag sorting ?
Thanks,
Mohan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
We need to show a set of buttons at the bottom of a form activated or
deactivated according to the role of the login user. Now the html:form
closes after the set of buttons in the page. How are parts of the same page
composed like this ?
Help appreciated.
Mohan
Hi
The following
UserContainer user = ( UserContainer )session.
getAttribute(
Constant.USER_KEY );
user.setPassCode( Test );
session.setAttribute( user );
is
bean:parameter id=cellColor name=cellColor
value=content_tbl_blue /
This code defines a scripting variable but I think that since you don't have
any html controls this value is not automatically sent with the request.
In our JSP's where we don't have html controls we use the following code.
Knutson
http://www.baselogic.com
+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---
- Original Message -
From: Mohan Radhakrishnan [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, September 12, 2003 7:33 AM
Subject: RE: assigning a value back to a bean
Hi
I am just trying to learn about the Plug-in API.
When exactly is this useful ? How would it be helpful if I want to
plug-in a custom-user authentication facility instead of using the
vendorspecific XML file ( JDBC realm in tomcat for example ).
Mohan
Yes. This is a normal approach.
ActionForms are used only if you want to pre-populate data. i.e If you have
to show default values in a text field you can pre-populate the Action Form
and forward to a JSP.
You can also store a Collection directly in one of the scopes and show
that but Custom
Hi
We've been using multiple row update using indexed properties for one
level of master-detail hierarchy. Now we have several levels. i.e.
Master 1
Detail 1
Detail 1.1
Detail 1.2
Detail 2
Detail 2.1
;)
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 10:37 AM
To: 'Struts Users Mailing List'
Subject: Struts as a framework
Hi
This is a general question to understand Struts better. Is Struts a
black-box or a gray-box framework ?
Mohan
Hi
This is a general question to understand Struts better. Is Struts a
black-box or a gray-box framework ?
Mohan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi
html:html xhtml=true
I found the following explanation.
A special attribute named xml:lang may be inserted in documents to
specify the language used in the contents and attribute values of any
element in an XML document
I know that this is related to locales.
Can somebody
Hi
http://jakarta.apache.org/struts/faqs/indexedprops.html
Struts doc. seems to be sufficient for this query.
Mohan
-Original Message-
From: Florent LOTHON [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 5:41 PM
To: Struts Users Mailing List
Subject: multiple input form
We needed a sub-class of ActionServlet to set up our JMS subscribers. We
couldn't find a way to set it up at container start up ( OC4J ). So we had
to extend it to set up everything when the ActionServlet is called in its
init() method. That is our use case.
Mohan
-Original Message-
Hi
We have been using a menu system that is based on roles. The new
requirement here is an admin. screen that shows the menu items and
permissions to access them. When the menu items are chosen a menu tree
should be generated dynamically.
We are using the logic:present tag to check the roles
Hi
The only difference I can see is the 'type' attribute. We don't use it.
The doc. says that no type conversion will be performed if this bean is not
present. I am not sure what it means but we get by without it.
Mohan
-Original Message-
From: Sridhar Kotagiri [mailto:[EMAIL
But you can redirect using logic redirect tag ?
Mohan
-Original Message-
From: Suzette Daniel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 8:03 PM
To: 'Struts Users Mailing List'
Subject: RE: Struts Action in Welcome File List
Nope this is not supported, the web.xml must
I have to agree with that. Here in our part of the world ( India and
Singapore(hearsay) ) there is a groundswell of Struts popularity. I myself
introduced it in two companies. Though initially there was a slight murmur
from the management about the learning curve, it gradually picked up. I am
This is what I think about the listener approach. In our project even
though we use HttpSessionAttributeListener, we are loading only the login
user profile as a java bean. We don't mix servlet listeners and Struts
forms. We could load data into POJO's and then copy it into ActionForms
whenever
Struts doesn't have anything to do with Servlet filters (Servlets 2.3). You
can use filters.
You don't have to rewrite anything.
web.xml only has entries for servlets. A Struts action is not a servlet. Do
you mean role based permissions for actions ?
Mohan
-Original Message-
From:
Hi
This is a question about the best practice followed when refreshing
screens to reflect new data in the database.
1. View 1 has a 'search' button.
2. The searched records are displayed with a hyperlink for editing
them.
3. The edit page opens a new JSP. After
If it is only countries then you can load it when the application
starts up. You have to implement ServletContextListener. You will have a
data base call in your class that implements this interface.
A 'prepopulate' action is like any other normal action that does
something
Hi
I would like to use role based authentication. That is CMA. Now I
also want to call my Action class. The idea is to use
logic:present role=name/
My Action class sets up user profiles based on the login ID etc. Is this
possible ?
Mohan
Hi
Our presentation tier using struts ends right at the business delegate. I
am aware of the load-on-startup tag. Now if I want to start a subsystem like
my messaging (JMS) server which is very loosely coupled to my presentation
tier I think of the startup class provided by almost all
Hi
I usually see the logout action implemented like this
HttpSession session = request.getSession();
User user =
(User)session.getAttribute(Constants.USER_KEY);
session.removeAttribute(Constants.USER_KEY);
Hi
This article http://www.well.com/user/jaron/general.html ends with
these words Lanier has no academic degrees. If this doesn't inspire
software programmers all over the world then nothing will.
I've been collecting such details over the past few years. Take the
case of Jeff de
Hi
I throw a RuntimeException like the following.
error-page
exception-typejava.lang.IllegalStateException/exception-type
location/error/error.jsp/location
/error-page
Should it fire the error.jsp page immediately?
Mohan
Hi
I have several listeners in my web application. Some of them access
the database. For example, my ServletContextListener loads data at start-up.
How are these exceptions trapped generally ? The UI can't be notified
directly by bubbling the exceptions up.
Should I use something
Hi
Our pre-selection is working though. Actually our values are in the
database . So we use a populate action that other actions extend.
We apply a pre-selection filter like this to make the first value of a
multi-select drop-down always selected.
The values are in a ArrayList
Hi
Is there a way to store what is returned by
bean:message key=%=x%/
in a variable in the scope directly using bean:define or something else
instead of writing the following scriptlet in my JSP ?
MessageResources messages =
Hi
We do it in the servlet filter.
The line that does it is
if( !req.getRequestURI().equals( /login.action )
session.isNew() ){
}
I couldn't find any other way to prevent my login page itself expiring.
Mohan
-Original Message-
From: Rick Ashley [mailto:[EMAIL
Hi,
If your problem is that you need to check if that file is there or not ,
then this might help
if( getServlet().
getServletContext().getResourceAsStream(
resource ) == null ){
logger_.debug(Not found );
Or make the base action extend PopulateAction after the scaffold example.
-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 4:01 PM
To: Struts Users Mailing List
Subject: Re: [newbie] Prepopulating a form
Johan Wasserman írta:
Hi,
I need to
Hi
What is the best practice to trap exceptions thrown in listeners ? My
ServletContextListener might throw custom exceptions which the UI should
respond to properly by showing a message.
How do you make custom exceptions bubble up from methods like
public void
Hi
I want to clear a doubt.
This is my web.xml
!-- Action Servlet Mapping --
servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.action/url-pattern
/servlet-mapping
Now I cannot prevent these *.action URL's being typed directly in the
browser
Hi,
I have a dumb question to ask.
What does the tag html:form do that document.form.submit() doesn't do
?
If there is a considerable difference between these two methods, then it
might explain some of the things we have been facing here.
Mohan
-Original Message-
From:
To: Struts Users Mailing List
Subject: RE: html:form tag and document submit()
html:form is a JSP Tag library that renders a form tag based on the
struts-config.
document.form.submit() is a JavaScript expression that is going to submit
the specific form.
-Original Message-
From: Mohan
Hi,
servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.action/url-pattern
/servlet-mapping
I am trying to find a way to filter all actions for detecting session
timeout except login.action.
It is not CMS. Could it be regex pattern matching ?
Hi,
I've read all the back button mails. Mine is this.
We have several drop-down lists that are populated with JSTL.
c:if test=${ID == 1 or ID == 2}
Show a certain drop-down list
/c:if
ID is in the session. After viewing the results of the submit a few times
when the user
Hi
I am trying to use simple if-else logic here.
Date formatter -
jsp:useBean id=now class=java.util.Date /
fmt:formatDate var=currentdate value=${now}
pattern=dd/MM//
If my indexed property in the form returns null, I use the current date.
c:choose
c:when
bean:define id=enddate
value=%=currentdate.toString()%/
/c:otherwise
/c:choose
Mohan
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 2:07 PM
To: 'Struts Users Mailing List
Hi,
Ours is not exactly the same problem because it is diagnosed as a cache
problem. Sometimes when the session times out and a particular action URL
menu.addMenuItem(Menu,location='test.action');
was the last one to be executed and we log out and log in, this URL
somehow gets stuck in
Hi,
I want to check for emptiness with JSTL.
I declare a variable like this
c:set var=tablecontent scope=session value=/
Then it is set like this
c:set var=tablecontent scope=session value=${buffer}/
The check would be
c:if test=${empty tablecontent}
Hi,
My actions are all extended from a base action.
How do I invalidate the previous session and start afresh ?
I know about the API method to invalidate a session. But where do I call
it. Is it in the constructor of the the super class at the highest level?
I used to invalidate the
Hi,
It is not CMS. Will take a look at the security filter.
Mohan
-Original Message-
From: Max Cooper [mailto:[EMAIL PROTECTED]
Sent: Friday, March 07, 2003 1:30 PM
To: Struts Users Mailing List
Subject: Re: Association between Session object and Cookies/URL
rewriting
Requirement
Hi,
I am trying to use the following
bean:define id=startdate name=form property='%= date[ + 0 + ]
%'/
to set the property in a html:text box. The property is of type String[]. So
I am using the above indexed property access method.
html:text property=date
Hi,
Exactly what happens with my pet project here. The login page times
out before the user logs in after the specified timeout period. I have been
pulling my hair all day.
Need more explanation. I am using setLocale in the base action which my
login action is extending. I do
Hi,
I looked at all the conditions in Craig's mail that you included.
* Actions will create a session for you automatically if you use
transaction tokens, or the getLocale()/setLocale() methods.
My BaseAction that my LoginAction extends has code like this.
protected
Hi,
It seems that there is no way to associate the session timeout
information in the web.xml for the session created after the user logs in.
Or is there ? Let me know if I am very wrong here but my login page also
expires before the user is authenticated. The user perception is that the
So I will have to use
inValidateSession( request );
What will happen to code like this in by base action if I do this? That
would be lost.
protected void setLocale(
HttpServletRequest request,
Locale locale) {
HttpSession session =
to forget about the
user (force a logout). What is it that you wish to achieve?
-Max
On Thu, 2003-03-06 at 05:50, Mohan Radhakrishnan wrote:
So I will have to use
inValidateSession( request );
What will happen to code like this in by base action if I do this?
That
would
Hi,
Has anybody ensured dates in the text box are not reset ? I want the
value entered by the user to be retained in the html:text box. My dates in
the form are of type String[]. And I didn't find a way to make html:text
accept indexed properties.
Thanks,
Mohan
9:30 AM
To: [EMAIL PROTECTED]
Subject: Re: html:text accepts indexed properties
A String[] form field implies that there are multiple form inputs with the
same name.
David
From: Mohan Radhakrishnan [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users
Hi,
Jakarta JMeter.
Mohan
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2003 12:50 AM
To: [EMAIL PROTECTED]
Subject: [OT] Simulating Concurrent Users
Hi,
Is there some open source tool or technique that I can use to
simulate
with the form
data.
David
From: Mohan Radhakrishnan [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: html:text accepts indexed properties
Date: Thu, 6 Mar 2003 09:37:03 +0530
Well . Even in this case
Actually I am in this for the ... The way my manager is glaring
at me today. I better be part of it and find something.
Mohan
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2003 10:36 AM
To: 'Struts Users Mailing List'
Subject: RE:
Hi,
I want to show the ActionErrors.GLOBAL_ERROR only if other errors
like the following are not present.
errors.add(key, new ActionError(information));
saveErrors( request, errors );
Now I am using code like this that occasionally fails
Hi,
Our prepopulation works like this.
protected void prepopulate( HttpServletRequest request, String name
){
ReportForm form = null;
form = ( ReportForm )request.getSession().getAttribute(
reportForm );
if( form == null) {
-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 12:02 PM
To: 'Struts Users Mailing List'
Subject: indexed property
Hi,
Can html:text directly accept an indexed property with struts 1.x ?
Mohan
Hi,
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topicf=18t=
001085
Would anybody know something about this. What is actually written in
session.ser across tomcat shutdown and restart ?
I have been searching on the internet about this. How to prevent this ? Why
is this
Hi,
I am trying to set a particular property on a form. But I don't want it to show
on the browser.
The following is an initial
attempt.
html:hidden name="reportForm" property="x" value="4"/
Is this the right approach ?
Mohan
styleClass=dropdown maxlength=10
size=12 value=%=enddate.toString()%
This seems to work.
Mohan
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 12:02 PM
To: 'Struts Users Mailing List'
Subject: indexed property
Hi,
Can
1 - 100 of 213 matches
Mail list logo