There's no real difference between using one property name of your own
choosing, and using the Struts GLOBAL_ERROR property name. It's mostly just
a matter of choice. The only point I can think of is that you might want to
differentiate between things that are really global and things that are
You need to make sure the html:form action=/logon tag in you jsp page,
is declared in your struts config file ..here is an example of my struts
confignotice the action path=/logon tag.You need one of these
for every different html:form action= tag in you jsp page.
?xml
Hello John
From: [EMAIL PROTECTED] (John Miaso)
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: document.testbean.submit is not a function
Date: Wed, 09 May 2001 08:27:24 -0600
I've modified the html-select.jsp example to include the script:
SCRIPT
function cbChanged() {
I would like to use the transaction token logic in the Action class.
However I am not able to figure out how to place the Transactional Token in
the JSP so it can be validated against when isTokenValid() is called within
my Action class. I looked at the Struts source code to find:
Title: ConnectionPooling in struts
me too
thanks!
-Original Message-From: zhongqing
[mailto:[EMAIL PROTECTED]]Sent: den 10 maj 2001
03:09To: [EMAIL PROTECTED]Subject: Re:
UnSubscribe please!!
me too
- Original Message -
From:
Natra, Uday
Hi,
I've got an app that will be deployed to a number of different contexts
/test
/dev
/staging
/
(root)
The app contains a large amount of static content e.g. images which will always
be referenced from /current_context/image
some of the jsps are accessed directly and via the
A quick check to the latest src (20010508) seem to indicate that now
html:form store data in the request context.
Cedric
Tim Moore wrote:
I'm working on a very complex webapp with hundreds of form pages. Frequently
there are chunks of a form that are shared across several pages. I was
Hi Cal,
I don't know the reason why actual template implementation always turn
'true' the direct attribute when the body is used (David ?). Also, the
getDirect() method of PutTag doesn't take into account the real value of
'direct', just its presence ! Maybe this behavior need to be
Hi,
I think you want to start looking at the 'tokens' functionality that comes
with struts. We did something similar in my last non-struts project and it
worked very well.
Andy S
[EMAIL PROTECTED] on 09/05/2001 22:44:26
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Turgay,
Thanks for your help, I've tried something similar to your example, but I'm
still having some trouble. I've probably missed something obvious as I'm
new to struts JSP.
In my jsp I've got the following:
%@ page import=com.qspgroup.utc.TestGridForm errorPage=fcerror.jsp %
%@ taglib
Many thanks Niall, that clears things up for me. Do you know if there is a
reason why this is the behaviour for checkboxes? Is this just with
checkboxes or other tags as well?
I don't really like the idea of modifying the struts code - the whole point
of deciding to use it is for code reuse
RTFM ;-) - see below :-)
At 22:18 09.05.01 -0400, you wrote:
I was wondering if anyone has configured STRUTS 1.0 on TOMCAT 4.0 B3, I
seem to be having some errors on startup of the server. The example,
blank, test, and upload applications are not deploying correctly. Below
is a sample of
Hi,
One of my getter methods (called by struts) needs to get hold of an object
in the Session so that it can populate the values of a drop down box based
upon a call to the customer object which is stored in the session.
Unfortunatley struts does not pass my method the request or the session
Hi,
I made the following changes in my Action class and got my save to work.
HttpSession session = request.getSession();
TestGridForm testGridForm = (TestGridForm)session.getAttribute(
testGridForm );
However, while trying to debug my problem I found I get 3 ActionForm Beans
created when I
I assume that you're bean extends ActionForm.can't you get the required
information you need from the session during the call to the validate()
method? This method receives a request object as a parameter.
From: Andrew Steady[EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL
How about not clearing the values in your reset() method (or only clear
values upon some special condition).
- Original Message -
From: John Raley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 09, 2001 9:52 PM
Subject: ActionForm.reset() not called when form tag creates
I ran into this same issue. I accomplished this by
creating a custom tag (in my case called, PageLoader).
The PageLoader tag will expose a scripting variable
called contextRoot, which is basically
pageContext.getRequest()).getContextPath()
scott.
--- Nathan Coast [EMAIL PROTECTED] wrote:
Hi,
I am using JBUilder 4, but the debugger does not let me set a breakpoint
on a tag on a JSP page. I can though set a breakpoint inside the Tag code,
but that is not that interesting. Have u succeeded to set a breakpoint on
a tag in a JSP page?
--- Mark Simms [EMAIL PROTECTED] wrote:
Upgrade to
In that case i would advise you to maintain a Hashmap/Hashtable of form
objects wrapped inside an Global Action form (session scope). Every time a
user opens a new browser window, i am sure that a unique id can be generated
for the new window ( i have seen a posting on this list a month back
Hello,
I have a Vector Object stored in my session with
the key "tabTest" this Vector contains "Client" Objetcs, Client classe have
a "name" property.
I use this code in my JSP :
logic:iterate id="client" name="tabTest"
scope="session" type="Client" bean:write
name="client"
The problem with multiple servlets.
1) Security is a pain when you should check in each and every servlet. In a
single servlet you have one point of entry/ on point of exit. So security
can be implemented quite efficiently.
2) Ease of maintenance. For example when you are porting across
have u
put that object into the session, before u get to the form
session.setAttribute("tabTest",
VectorObject);
-Original Message-From: Sylvain FAGNENT
[mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 2:57
PMTo: [EMAIL PROTECTED]Subject: Logic
iterate problems
Richard,
I put my bean in session scope when I create it in an action class:
OracleConnBean dbconn=null;
dbconn = (OracleConnBean)session.getAttribute(dbconnection);
if(dbconn == null) {
dbconn = new OracleConnBean();
session.setAttribute(dbconnection, dbconn);
}
Then, I can access the
Use this... ActionForm.getServlet().getSession() .
cheers,
Amar..
-Original Message-
From: Tony Karas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 6:44 AM
To: [EMAIL PROTECTED]
Subject: Re: Getting hold of the session
I assume that you're bean extends
oops my mistake.. Sorry about my last mail ... I really need some caffeine
before i answer any more questions here
cheers,
Amar..
-Original Message-
From: Tony Karas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 6:44 AM
To: [EMAIL PROTECTED]
Subject: Re: Getting hold of
cheers
this is what I figured, seems like an unpleasant overhead object - instantiation
and 3 method calls for every relative url in the site every time every page is
accessed.
Must be some hack to get the context and place it into a static final variable
somewhere prior to jsp compilation.
Yes , we did ! :-(
- Original Message -
From:
Dudley Butt@i-Commerce
To: '[EMAIL PROTECTED]'
Sent: Thursday, May 10, 2001 3:04
PM
Subject: RE: Logic iterate problems
have
u put that object into the session, before u get to the
form
Maybe
use need to use the jsp:useBean name="tabTest"
class="VectorObject" scope = "session" /
in
your jsp page. Give it a shot and let me know...
cheers,
Amar..
-Original Message-From: Sylvain FAGNENT
[mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:13
AMTo: [EMAIL
Bart,
I did find the source of this problem. If the submit button is named the
default property value of submit, Javascript assumes that the button is being
referred to, not the function when the form.submit() request is processed. By
using the property tag and a value other than submit,
Hi Andrew,
why don?t you populate your beans before you call your jsp (where i asume
your getter methods are being called). i.e. let your ActionClass gather all
customer information, prepare your bean, drop it in the session and access
it in your jsp.
If you want to directly populate your
I came across a similar problem not so long ago. What I'd done wrong was try
and access properties outside the html:form tags.
Moving my tag calls inside the form tags fixed my problem at the time, but I
don't know if this applies in your case. It's worth double checking
none-the-less.
Regards
I think some people are missing the point you're
trying to make, so I I'm going to take a stab at it.
Yes, the Servlet and Action APIs are very similar, but
a Servlet and an Action really have are two different
entities. A Servlet's set of interfaces covers what
is required of an Action and
Hi All,
can somebody help please??
I am getting this exception:
since it is demanding something in the struts.jar...Could somebody tell me
where have i gone wrong..I am trying to run web application on weblogic
server.
Other jsp are being compiled but a couple of jsp have this problem:
May
I tried, here is the code in my action
:
tabTest= new
Vector();test = new
Client();test.setName("Tata
DUBAR");tabTest.add(test);test
= new
Client();test.setName("SFA");tabTest.add(test);
session.setAttribute("tabTest",tabTest);
And the JSP code :
jsp:useBean id="tabTest"
I tried to encapsulate all my tags with
html:form action=realAction
..
/html:form
But it still doesn't work !
- Original Message -
From: Firmin David [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 3:22 PM
Subject: RE: Logic iterate problems
I came across a
In
your jsp page did you do an import on client ?
%@ page import = "beans.Client" %
-Original Message-From: Sylvain FAGNENT
[mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:33
AMTo: [EMAIL PROTECTED]Subject: Re: Logic
iterate problems
I tried, here is the
Nanduri, Amarnath wrote:
i have seen a posting on this list a month back where
somebody has explained that using javascript we can generate a unique id for
every new web browser that was opened by the user
search the archives for: The Joy of File
Pete
begin:vcard
n:;
In fact I use the full class name in the iterate
Tag !
- Original Message -
From:
Nanduri, Amarnath
To: '[EMAIL PROTECTED]'
Sent: Thursday, May 10, 2001 3:39
PM
Subject: RE: Logic iterate problems
In
your jsp page did you do an import on client ?
I
don't think you need the jsp:useBean. You also don't need type="Client". If you
want to use type, make sure the class is fully qualified with the package it's
in.
-Original Message-From: Sylvain FAGNENT
[mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:33
AMTo:
Turgay,
I've just tried that but get the following exception:
javax.servlet.jsp.JspException: Cannot find bean contributorEditForm in
scope session
I've removed all useBean tags from my jsp and have added the following in my
action class:
ContributorEditForm contributorEditForm =
try this
logic:iterate id=tabTest name=tabTest scope=session type=Client
bean:write name=tabTest property=name/
/logic:iterate
-Original Message-
From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 3:37 PM
To: [EMAIL PROTECTED]
Subject: Re: Logic iterate
Humour me...I'm not entirely convinced this'll work, and I know it's not
ideal anyway, but here goes...
Could you try:
logic:iterate collection=%=tabTest% type=your.class.name.Client
id=aClient
bean:write name=aClient property=name/
/logic:iterate
Like I say, I'm not convinced this'll work, but
Doesn't work since we retrieve the following exception:
javax.servlet.jsp.JspException: No getter method for property choix of bean
tabTest
tabTest is a Vector!!
- Original Message -
From: Dudley Butt@i-Commerce [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 3:45
i'll send u some code that u can adapt for Vectors that we used quite
effectively with Arraylists, try it out...
we used like a wrapper class to put our collection object in as follows:
-
package com.didata.itax.payment.web.data;
import
Cheers Dudley,
I have a solution but I am not happy with it (and I now also have the
additional problem that checkboxes only get sent back if they are set so I
can't tell which checkbox has been checked! - Another one to sort out).
Do you know if this is a design error. Basically, the problem
Have you tried this? It should work as long as whatever is in the Vector has
a method defined like: public String getName();
logic:iterate id=client name=tabTest
bean:write name=client property=name/
/logic:iterate
Put something like this at the top of your JSP just to make sure tabTest is
yes please inform us, i also want to know, i've also had to do it this way,
is there a better way anyone, please help!!! desperation is setting in
here! An example would help..anyone!??
-Original Message-
From: Tony Karas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 4:52
The problem is that my reset() method populates the form with default values
(the ones I want the user to see when she first gets to the form).
The workaround is to send requests like these through a no-op Action with the
same form type and name. This will cause the form to be created. The
At 10:57 AM 5/10/2001 +0200, Jean-Noel Ribette wrote:
Allen,
You can set the transactional token in your edit Action class with
saveToken(request). Then you can test the token in
the submit action.
I suggest you have a look at the classes EditRegistration and
SaveRegistration in the example
Can anyone help with this?
I have an array of checkboxes in my ActionForm represented by
boolean[] delete;
and I have a setter function
public void setDelete( boolean[] values )
{
delete = values;
}
The problem is that I have only checkboxes that are checked get sent back -
so if one
I found the error, the logic tld was not
imported...
the logic tag was not parsed
stupid error isn't it ?? :-
- Original Message -
From:
Sylvain FAGNENT
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 3:41
PM
Subject: Re: Logic iterate problems
It is saved in a hidden field in the form so it ends up in the request when
you submit.
-Original Message-
From: Allen Walker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 11:40 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Transactional Tokens in the JSP?
At
Im not sure how the ActionForm changes things, but without an actionform your
could do this
Each checkbox can have the same name, but a different value.
When the form is submitted, the checkboxes that have been checked are in the
request.
You can use the
Hi,
I'm using a Tomcat 3.3 and try to access a session-EJB from an
Action-Class.
When I try to get an InitialContext in my Action-Class:
Hashtable env = new Hashtable();
Context ic = new InitialContext(env);
EJBMMHome home = (EJBMMHome) ic.lookup(EJBMM);
I get the error:
I posted this same response to your Posting Collections question yesterday.
Here it is again. If you use the html:multibox, you can get back an array of
key values instead of an array of booleans. They key values can be Longs,
Strings, whatever, as long as it uniquely identifies the row that you
No - I don't believe it's possible to breakpoint a CUSTOM tag...it's
probably a limitation of the built-in browser which maintains a table of
only the JSP tags.
This would be a terrific enhancement.I will pose it to the JBuilder
newsgroup.
- Original Message -
From: Rajan Gupta
Yeah - I'm looking at that. My problem now is how to get the value for each
checkbox. My bean has an id property - so I have tried this kind of
thing:
logic:iterate id=retailer name=retailerForm property=retailers
tr
tdhtml:checkbox name=retailer property=delete
1) Is SunMicro going to be supporting STRUTS from a financial and/or
marketing standpoint ?
I only saw one tiny, tiny mention of STRUTS in the JAVAONE outline of
presentations I just got in the mail.
That bothers me.
2) If the answer to #1 is unknown, will JSP/Java serverside professional
the way we solved this was to create a hidden field for each checkbox that
holds the value that would be sent if the checkbox were to be checked. I
then compare the full value array sent by the hidden values with the partial
array sent by the checkboxes to see which ones were checked and which
Well the first thing that strikes me is that there would be no (ejb) initial
context to obtain since Tomcat is not an EJB container. ;)
I recommend downloading JBoss from http://www.jboss.org/ for doing that sort
of thing. Their values for INITIAL_CONTEXT_FACTORY and PROVIDER_URL are on
their
Here's a quick one - anyone use or modify iterate to support iterations
through a DefaultTableModel. Since it's just a vector of vectors we tried
nesting iterate tags, but to no avail. Anyone already done this or do I need
to code it myself if I want it (hehe)? :)
Chris
Title: RE: Philosophical question(s) related to STRUTS
I believe that developers are starting to committ to Struts. This info. should be in the archive, but here it is again.
Its noteworthy that the new 2nd edition Professional JSP book published by WROX
Just as a small aside, Wrox has devoted a chapter to Struts in their latest
Professional JSP book
(http://www.wrox.com/Books/Book_Details.asp?section=11_3isbn=1861004958sub
ject=subject_id=) so I'd say it's definitely getting some recognition! :)
Chris
-Original Message-
From: Mark
tataryn:craig
What work has been done so far on this effort? Is there any
documentation or source available for folks to review/use/contribute to
what's being done. I have some interest in a struts based workflow
mechanism, and have done a little work on my own in this area (just a
Don't use the html:checkbox, use html:multibox and use bean:write in the
body of the tag. An html:multibox resolves to an HTML checkbox.
Hal
-Original Message-
From: Tony Karas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 12:44 PM
To: [EMAIL PROTECTED]
Subject: Re:
Ugh... for the first time ever I had to write a pop-up using javascript :(
I'd like to do:
script type=text/javascript
function addProductToCart() {
opener.location.href = html:rewrite forward=addProductToCart
paramId=productId paramName=productId/
window.close()
This article touches on some of the concerns you've raised.
http://www.sys-con.com/java/archives/0603/mcclanahan/index_i.html
-Original Message-
From: Mark Simms [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 9:44 AM
To: [EMAIL PROTECTED]
Subject: Philosophical question(s)
Try pulling the bean value out into a script variable.
Taglibs cannot be nested within another taglib as an attribute.
Tony Karas wrote:
Yeah - I'm looking at that. My problem now is how to get the value for each
checkbox. My bean has an id property - so I have tried this kind of
thing:
Struts has a bright future, as long as JSPs have a future. I don't think
Struts has any serious competition among JSP-centric MVC frameworks, but
Struts' fate is somewhat tied to that of JSPs. If you decide that you don't
like JSPs then there are lots of competitors to JSPs, mainly templating
I have been doing research for my company pertaining to adopting a
framework/methodology for developing all future applications. I am convinced
that Struts is a very solid solution and will be pushing *heavily* for the
adoption of it within our architecture.
I have been monitoring this list for
Hi,
how do you forward from one action servlet to another? I have a form that
gets submitted to a servlet that I may depending on a value pass it off to
another servlet to process.
Any help is appreciated.
Alex
ext. 104
Fax: 1-905-777-0132
Good point Hal, WebForms are just a tiny part of what makes up .NET and I
forsee the battle between MS and Sun becoming *extremely* aggressive in the
near future. .NET and J2EE are two attempts at the (basically) the same end
result and both do an excellent job (I'm going to say I think .NET
You could either define a forward for this action in struts-config.xml, or
construct a new ActionForward on the fly.
Alex Colic wrote:
Hi,
how do you forward from one action servlet to another? I have a form that
gets submitted to a servlet that I may depending on a value pass it off to
If you are using just Struts, then you have only one servlet, the
ActionServlet.
If you are using struts in conjunction with some other servlets, then in
your action class do this...
public class XYZAction extends Action
{
public ActionForward perform(mapping, form, request, response)
{
This issue applies to all form field tags, not just checkboxes.
Modifying struts tags is currently a pain, but I just subimitted a bugzilla
enhancement to re-factor the tags so that they are more granualar and make
it easier to override descrete bits such as generating the name attribute.
In
Alex,
if I understand you correctly, you can set up the forwarding in your
struts-config.xml to point to the next action path:
eg !-- Process Log filter --
action
path=/ProcessLogFilter
type=beans.ProcessLogFilterAction
name=LogFilterForm
there's instructions in the website.
http://jakarta.apache.org/struts/installation-wls.html
-Original Message-
From: Kiet Nguyen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 12:07 PM
To: '[EMAIL PROTECTED]'
Subject: My first
I'm trying to setup struts to work with
http://jakarta.apache.org/struts
http://jakarta.apache.org/struts/userGuide/index.html
http://jakarta.apache.org/struts/installation.html
http://jakarta.apache.org/struts/installation-wls.html
Look in the struts distribution that you built:
src/example/*
dist/webapps/struts-example.war -
Will this not keep the thread of ActionServlet which invoked perform()
method hanging?
--- Nanduri, Amarnath [EMAIL PROTECTED] wrote:
If you are using just Struts, then you have only one servlet, the
ActionServlet.
If you are using struts in conjunction with some other servlets, then in
your
I don't know if this is the right thread. But I just got multibox working
in my app (including preservation of checkbox entries between forwards).
Let me share with you what I have to see if this helps:
in Jsp: (cleanSolutionAreaTypes in an Application-scoped Vector)
tr
td
Struts is the topic of a seminar at BorCon 2001 http://www.borcon.com/.
There are no online links for this particular seminar, but it's outlined on
their snailer mailer:
Seminar 3148 - Configuring AppServer to Work with Struts
I guess AppServer is (or contains) Borland's web server, but I've
In response to number 2
Java serverside professional developers can choose to wait until Sun
provides some kind of blessing, or they can think for themselves. This
might save some people from reinventing the struts wheel all over again.
Struts-like functionality must be provided one way or
Absolutley nothing has been done! We are in design mode, basically I need to draft up
a functional spec so we can start
deligating chunks of it out to people intrested in contributing (sort of make a more
granular TODO list).
I'll put you on the struts-workflow mail list I have going, and I
Nope the thread after invoking perform() will then decide what to do
next. Since you are already making its decision, it won't complain and will
die gracefully.
An other way to do it is already pointed out by other people. In your
struts-config.xml file map the forward to a different
I want to create my own Radio button tag that's a slightly modified version
of the struts RadioTag.
So, I made a new class that extends BaseHandlerTag (just like RadioTag) and
copied the RadioTag code to my new class (NewRadioTag). I successfully
compiled my new Tag and added it to my existing
I think weblogic is masking the real error. Put a temporary try catch block
inside your html:form tag on the JSP to trap the real error. If the
exception is a ServletException, get the root exception
Hal
-Original Message-
From: Ariff Sidi [mailto:[EMAIL PROTECTED]]
Sent:
I had this problem, and worked out a solution that seemed workable.
The main thing to remember with the html:xxx/ tags is the
the name part should always be the name of the form bean, and
the property be relative to that, otherwise the BeanUtils won't
be able to repopulate the form.
I tend to
When myAction.do is called, I have a chance within
reset() to initialize my request-scoped objects. However, if myAction.jsp
is called instead then I can't seem to find a way to get initialized. Are
there any methods called in my Action class when the .jsp file is invoked
instead of the .do
No.
What I do (antd I think it this is from the example app as well, maybe
subscription.jsp) is to put at the beginning of the .jsp file (this is
from memory, don't have the code handy)
logic:notPresent name=yourFormBean
logic:forward forward=editFormCode/
/logic:notPresent
Where
As a profession developer I have taken to learning how to use Struts
for several reasons (besides being Java, and thus way cool).
It's free. It doesn't cost me anything to develop or deploy.
Open Source. If the development team die in a freak accident
from caffeine overdose at something like
Thanks, that was just what I needed. Now, on to the next step - connecting
to a database.
kln
-Original Message-
From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 2:41 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Newbie Question: Servlet Exception - This
Richard,
Make sure that your bean is put in the session scope *before* the jsp page
is called. (In some earlier Action class)
And, please do not take me wrong: you can of course use useBean tags, but
what I understand is, you should avoid this when possible (when you can do
it with Struts
92 matches
Mail list logo