How about this:
action path=/maauto/quote
type=MyClass
forward name=success path=/maauto/done.do/
action path=/maauto/done
forward=/myapp/apage.jsp
/
Ellen Kraffmiller wrote:
Hi,
I have a question regarding local forwards.
It seems that a
what i want to do is:
html:form onkeyup=javascript:submit()
...
/html:form
does anyone know if this supported yet or is it on the todo list?
chico
--
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you
The tags for the actual HTML controls accept Javascript events.
I don't believe you can attach an event to the HTML form itself. (We can
only do what the browser's and HTML support ;-)
The one and only 1.1 TODO list is on the site.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom
Hello Ted,
Wednesday, June 27, 2001, 2:12:07 PM, you wrote:
TH How about this:
TH action path=/maauto/quote
TH type=MyClass
THforward name=success path=/maauto/done.do/
TH action path=/maauto/done
TH forward=/myapp/apage.jsp
/
One question
Just my $0.02 but for many applications built around the Struts framework
there will be specific controlled environments (and for many there won't be)
wherein the browser is a known variable. While events like onkeyup are
supported on forms for IE4 and above only, it would be nice to have them
Matt,
I'm almost(...) convinced that the issue is not about the fact that iPlanet
cannot find the struts library, because I think it can. Do you know if the
JSP compiler has it's own environmental settings like classpaths etc?
Because it also could be that during compilation of the JSP the
For the HTML tags, one solution would be to add a standard options
parameter that would pass through the value uninterpreted. This would
keep us from having to worry about vendor-specific implementations.
Assenza, Chris wrote:
Just my $0.02 but for many applications built around the Struts
BDY.RTF
Hi,
How can a request processing be delegated from an Action class to
another?
Thanks
Sandhya
Excellent solution (which could, in the long run, be applicable in more
places then just html:form)!! :)
Chris
-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 8:11 AM
To: [EMAIL PROTECTED]
Subject: Re: onkeyup support on html:form ...
For
Hello ssuku,
Wednesday, June 27, 2001, 4:24:58 PM, you wrote:
shhc Hi,
shhc How can a request processing be delegated from an Action class to
shhc another?
shhc Thanks
shhc Sandhya
Return forward to another action -
return new ActionForward( someaction.do );
--
Best regards,
I am creating a custom Struts tag which needs to
search for an object in a HashMap. I want the 'key" for the object in the
HashMap to be some agreed upon, pre-defined, final global value defined in a
file available to the whole application. How do I refer to this value in a
Tag attribute?
Thanks, I will do it this way.
It would be nice, rather than having to do this work-around with an extra
action mapping that is just used as a forward, to be able to refer to global
forwards directly in the action mapping. Are there any plans to add this
feature?
From: Ted Husted [EMAIL
I have a class which has a Vector property I wish to iterate over. It
appears the logic:iterate tag is not finding the property for the Vector,
even though it is clearly present and validated through other means. The
iterate tag works fine when I use the 'collection' attribute to explicitly
I am new to struts and trying to get down some of the
basics. I am trying to use the command:
bean:message key=header.title/
When I do, I get the following exception:
javax.servlet.jsp.JspException: Missing message for
key header.title
I have verified that my ApplicationResources file does
Bob,
Did you make sure, that your jsp-page has the following entry, so it can use the
bean:message-tag:
%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
Marcel
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27,
Hi. I'm new to struts (I've been working on my first struts webapp
for the past few days), but I have a design question to ask:
Why is there a separate validation call to an ActionForm? Isn't the
normal JavaBeans PropertyVetoException model cleaner and easier to
maintain?
I may well be
Title: RE: Struts Question
Hello all
I went to IBM Software site and found a FixPak 4 for WebSphere 3.5.3
(http://www-4.ibm.com/software/webservers/appserv/doc/v35/wasv35ptf4_defects.html).
But there isn't any mention on the PageContext.removeAttribute()'s bug.
Does anybody now if this
Matt,
Not sure I follow what you are trying to do. Do you want to post some more
info...?
Cheers,
Dave
Matt Raible [EMAIL PROTECTED] on 06/26/2001 11:06:02
PM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED],
[EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Hello all,
I'm trying to get my code to work with indexed properties. Thanks to Dave Hay and his
Struts tweak, I was able to generate input types like this:
input type=text name=users[0].username size=12 value=
input type=text name=users[0].role size=12 value=
using the following Struts tags:
The ActionForm is considered to be a container for
holding and preserving the information the user has
entered. So you don't want to reject any data at this
level because if the validation fails you want to
return exactly what the user has entered. So most
people use String getter/setters in
Jason,
I believe you need a
public User getUser(int index)
{
return (users[i]);
}
For the examples I sent you, I have the following form:
public final class ParametersForm extends ActionForm
{
// --- Instance
Is this all in one class? It shouldn't even compile
if you have getUsers() returning two different types.
Here is a snippet on using an array.
public User getUser(int index) {
return user[index];
}
public void setUser(int index, User user) {
this.user[index] = user;
}
Then you
that did the trick.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 9:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Indexed Properties
Jason,
I believe you need a
public User getUser(int index)
{
return (users[i]);
Yes, I did. It has it in there.
Bob
--- Marcel Andres [EMAIL PROTECTED] wrote:
Bob,
Did you make sure, that your jsp-page has the
following entry, so it can use the
bean:message-tag:
%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld
prefix=bean %
Marcel
Does anybody know how to use a hashtable with the options tag?
We are writing an application server where everything is generated from xml
files and list type structures are stored in Hashtables.
Here is an example of the type of structure I would be sending to the
request/session for the
make sure your web.xml file points to the ApplicationResources file that you're using.
the entry looks like this:
init-param
param-nameapplication/param-name
param-valuecom.cnet.app.intranet.app.psr.ApplicationResources/param-value
/init-param
~Jason
-Original
I am still having any trouble. I have literally
placed the ApplicationResources.properties file
everywhere and it is not being loaded, or if it is,
then the properties are not being interpreted
correctly - either way, it is not working yet. Is
there any way to display the explicit file name
I have verified that, and it is:
init-param
param-nameapplication/param-name
param-valueApplicationResources/param-value
/init-param
As I read it, that should go to the base directory
where all classes are stored, and not traverse down to
a specific package. In other words,
You could subclass the ActionServlet and over-ride the initApplication() method.
This is the method that loads the file.
You could then display the file, and its contents if you wanted. (maybe use a
debug setting to specify if you want this to happen?)
Or, you could write a simple class that
On Wed, Jun 27, 2001 at 09:27:13AM -0700, David Winterfeldt wrote:
The ActionForm is considered to be a container for
holding and preserving the information the user has
entered. So you don't want to reject any data at this
level because if the validation fails you want to
return exactly
I just wanted to let everyone know (even if not many are using JRUN) about
an error and a fix.
Most people may know that JRun does not properly conver String
types to their boolean counterparts in Custom Tags.
E.G. The first gives an error, but the converted second does not.
html:someTag
I imagine you'll have to parse that attribute
yourself and use reflection to get that value. I don't think Struts has
support for this. It might be difficult to keep it generic however, since
I don't think there is way you can access the imports that are declared in a JSP
page.
Of course,
My jsp page
with the following tag
html:text
property="username" size="20" maxlength="20" value="test"
inside/html:txt
generates the
following java code (from VAJ 3.5.3)
do
{
//
end
out.print(_jspx_html_data[4]);
// begin
[file="C:\\login.jsp";from=(16,0);to=(16,69)]
/*
Hi all,
I am new to struts and i created a simple jsp and
all along with proper modifications to struts-config.xml and when i try to run
my jsp i get the above exception.
Can anyone tell me what could be the
cause???
here is my code
.jsp
logic:equal name="indexPage"
I just deployed a new struts example application from TomCat to iPlanet
WebServer 6.0
I am able to launch the application (the first page). However, when I try to
click on
the submit button of the first page, I notice following errors in the log
file :
Typically the errors are as follows :
1)
Hello,
When I tried the struts-upload example, if I try to upload a file which size
is bigger than the defined maxFileSize, there will be a ServeletException
been thrown on the browser.
But I want to define a more customized error jsp page that can deal with the
exception and display a more
I don't know if it will be as simple as you would
like, but Struts takes a lot of work away for you.
There is a lot of work planned for Struts 1.1 which
will save even more time.
Here are a few packages that are posted. There are a
lot of other resources posted on Ted Husted's site.
I'm using www.webappcabaret.com. You can go there
and read all about there setup. From what I understand it is configured to call
my stuff www.mydomain.com. The servlet
engine is Tomcat 3.2 and is shared. The errors message I get is basically a
request not found because it is trying to get
Maybe this
is an enhancement request, maybe I've been overlooking a
feature.
I'd like
to write some bean properties output in a JSP page and suppress
exceptions.
bean:write name="customer" property="name"
exception_ignore="package.name.MyException" /
bean:write
name="customer"
What exception do you usually get? Seems like you should check if the
property is present instead of pounding through them, or use some other
applicable logic tag.
Anthony
-Original Message-
From: Ensing, Marco [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 12:55 PM
To:
I am getting the following error when I try to process
my user entry form. Any ideas? I would like a
general idea of what I should do when I get this type
of error.
Included servlet error: 500
Location: /test/userentry.jsp
Error Location: /test/logon.jsp
Internal Servlet Error:
I think you have to have the html:text tag inside an
html:html tag. For example:
html:html
html:text property = "username" size =
"20" maxlength = "20" value = "test"
/html:text
/html:html
I think that might be the source of your problem.
-- John Townsend
- Original Message -
Exception are not Errors and the nice things with Exceptions is that you are able to
handle them when you want to. The exception what is thrown is my own defined exception.
(Bean is used in different frameworks and I have to throw that exception)
I can think of plenty of workarounds, but I
Make sure you call super.init() in the init() method of your subclass.
Fr.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 27 June 2001 14:21
To: [EMAIL PROTECTED]
Subject: Problem with resources when extending ActionServlet
The struts documentation states
Is your text element contained within an html:form
tag?
--- Nick Chalko [EMAIL PROTECTED] wrote:
My jsp page with the following tag
html:text property=username size=20
maxlength=20 value=test inside
/html:txt
generates the following java code (from VAJ 3.5.3)
do {
hi,
i want to display records from database in a
tabular format in index.jsp itself without any form submission.
can anyone tell me how to do this.
thanx.
rama.
Sorry, yes it was in a html:htmlhtml:form
-Original Message-
From: Bob Byron [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 2:14 PM
To: [EMAIL PROTECTED]
Subject: Re: null pointer error
Is your text element contained within an html:form
tag?
--- Nick Chalko [EMAIL
You can either have a collection of collections or
have a collection of an object that represents a row
like this example.
logic:iterate id=searchResults
name=com.forbes.cms.botw.search
tr bgcolor=#ff
td nowrapbean:write name=searchResults
property=name//td
tdbean:write
Hello all,
Below is the code I am trying to execute and I get the
error "javax.servlet.ServletException: No getter
method available for property singleSelect for bean under name
org.apache.struts.taglib.html.BEAN". I have the get and set methos for
singleSelect in my resultAction class.
I got
messages like this when I started using Struts. This happened to me
because I made the mistake of overloading my getters and setters which breaks
introspection. Don't do it. Make getters and setters with different
names instead of overloading.
Anthony
-Original
True, Exceptions are not Errors. Exceptions are defined by Sun as a form
of Throwable that indicates conditions that a reasonable application might
want to catch. They are commonly associated with a failure of some kind
because when the normal flow is disrupted it's hard to recover safely.
I
thanks david,
in this case as i will not have any actionform, should i have the getter
method inside the actionclass or is there another way.
if possible can you give me some snippets like the one you've given.
thanx,
rama.
- Original Message -
From: David Winterfeldt [EMAIL
Thanks
a lot Anthony. I have another question that accompanies it. Instead of using
action="result.do" , could I call a JavaScript function, ex: action="func()"
?
-Michael.
-Original Message-From: Anthony Martin
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 27, 2001 2:35
PMTo:
I'm not sure what it is just from the error. If you
could you post your JSP, I would look at it.
David
--- Bob Byron [EMAIL PROTECTED] wrote:
I am getting the following error when I try to
process
my user entry form. Any ideas? I would like a
general idea of what I should do when I get
I also would take a look at the DBTags library in the Jakarta project. This works very
well for displaying data from a db, and is less complex than struts. If your not
processing forms, it may be the best way to go...
Ryan
[EMAIL PROTECTED] 06/27/01 03:33PM
You can either have a collection
I never tried it. But I don't think so. Even still, wouldn't an
onsubmit=return func() ; better serve you? Just make sure you return
false from func() or the submit *will* take place.
Anthony
-Original Message-
From: Michael Skariah [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June
Silly question, perhaps, but you do have /html:text and not /html:txt,
don't you?
--
Martin Cooper
- Original Message -
From: Nick Chalko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 11:53 AM
Subject: null pointer error
My jsp page with the following tag
Thanks again Anthony, that what I too thought.
-Michael.
-Original Message-
From: Anthony Martin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 2:50 PM
To: '[EMAIL PROTECTED]'
Subject: RE: ServletException
I never tried it. But I don't think so. Even still, wouldn't
Yes closing tags are there also.
I even tried
html:text property=username size=20 maxlength=20 value=test/
and
html:text property=username size=20 maxlength=20 value=test
test/html:txt
To see if having a body would matter, no difference.
I think it is a problem with IBM.
out =
My example was reusing my ActionForm just to hold my
search results for each row and then putting the
ActionForm in a Collection. Since you don't have a
corresponding ActionForm I would make a simple bean to
hold the search data with the appropriate
getters/setters and use that instead of the
i get the same error
Cannot find bean org.apache.struts.taglib.html.BEAN in scope null because of
this line
html:text property=Server /
- Original Message -
From: David Winterfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 2:49 PM
Subject: Re: Cannot find
Anthony,
Thanks for your long replies.
I don't know how you concluded that I wanted to use it as goto statements. It's
going to be a very long story why I have to throw an exception from an accessor.
I hope you are willing to take this as a fact.
I do not want to have the exception for
thanx david, i guess i should do so.
one more question, do you have any idea why No bean found under attribute
key
thanks,
- Original Message -
From: David Winterfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 3:08 PM
Subject: Re: working with reports
My
Ryan,
your idea seems to be good. fairly simple than struts. but i have so many
pages like that and driver and database connections inside jsp doesn't seem
to be a good idea.
thanks though,
rama.
- Original Message -
From: Ryan Cornia [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
I would guess that one of the tags is looking for
something a parent tag (html:form probably) should
have put in scope for it, but I haven't personally
seen this error. If I could see all of the jsp, I
might see something. Also, are you using Strut 1.0?
David
--- Rama Krishna [EMAIL
On Thu, 28 Jun 2001 07:22, Nick Chalko wrote:
Sorry, yes it was in a html:htmlhtml:form
you do mean html:html/html:form
^^^
dont you?
-Original Message-
From: Bob Byron [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 2:14 PM
To: [EMAIL PROTECTED]
I've run into another problem with indexed properties. I have an ActionForm subclass
called CreateForm. It contains setters and getters for my indexed properties of the
form getUsers(), setUsers. I would like to loop through the collection and display
textboxes, that even on reload (in the
Hi all,
I would like to put the value of 'str' in line 13. Can anyone tell mw what
has to be done.
-Mike.
---
html:select property=selectedValue value=
html:option value=/html:option
%
// 'ht' is a hash table
List myList =
I apologize to all for my question. Actually it was a spelling mistake and I
fixed it.
-Original Message-
From: Michael Skariah [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 4:19 PM
To: [EMAIL PROTECTED]
Subject: RE: working with reports
Hi all,
I would like to put the
hi,
In my application contents of the Form are database driven. Is there
anyway I could use Struts here?
What I mean is I can not pre-define a custom Form class since getter and
setters are not completely known initially.
Any ideas?
Regards
Kiran
I while ago I had the same question. It was a bit tricky at that time and
don't know if it's made any easier now.
The problem is that you can always create your own instance of the Action,
but this is not the ideal solution.
Ideally you would like to use the instance cached by the ActionServlet.
In your logic:equal tag, you are using 'name' and 'property'. In your
html:text tag, you are using only 'property'. The second case will work
only if this code is inside an html:form tag and the form bean has a
property with that name.
--
Martin Cooper
- Original Message -
From: Rama
thanx much martin,
html:form action=indexPage
html:text name=indexPage property=Server /
/html:form
is it possible to have this one line instead of logic:equal, because it is
my index page and i want to get some data from the actionclass without any
form submission.
and when i changed my jsp
I'm not sure I understand what you're asking. You can either use:
html:text name=indexPage property=server /
on its own, or:
html:text property=server /
if it's inside a form. If you don't need a form, you don't have to use one.
You are getting a no getter error because you specified the
I don't think this is related to indexed properties. Your ActionForm
subclass is called CreateForm, but have you also created an instance of this
class and stored it in the request or session under the attribute name
'CreateForm'? That is what the iterate tag is looking for (because of your
Hi -
I am new to Struts. I also have this kind of
application where I need to show a lot of data. I
understand your solution. But for this, do I need to
make any entry in the config file for the jsp which
renders the view of the bean. Otherwise, how will it
fit in the overall framework of Struts
This will work as well indeed, and is a lot simpler than what I suggested.
However it will go through the web server layers again before it gets to the
container and then the ActionServlet, which will do the usual things as with
any request. The solution I proposed was more an optimized solution
Hi all,
I have a problem, my code in a jsp page is as
follow :
%Vector v =
new Vector();
//putsomething into the vectorhere
pageContext.setAttribute("list", v,
PageContext.PAGE_SCOPE);
%
html
body
logic:iterate id="element"
name="list"
bean:write name="element"
On Thu, 28 Jun 2001 14:27, you wrote:
I would like to put the first part into an action class and the last part
into a jsp page but the problem is i can't get the variable pageContext
from the action class. Should i use session to solve this problem ? (e.g.
the action class will put the
Hi,
I'm looking for a way to figure out which check boxes, in a table that is submitted
as part of a form, have been checked.
I have produced the table with the iterate tag, which presents a nice output. Is
there some way to take care of this as input at submit,
or should I consider using
81 matches
Mail list logo