Hi!
I am writing an application with JSPs and I am using the struts framework. I
am also using Struts JSP Tags in my JSP. I am having a problem with the
html:form tag. I have a do/while loop embedded in my JSP as a scriplet.
Ths scriplet is inside my html:form tags and it is giving me
: Martes, 24 de Febrero de 2004 02:51 a.m.
To: 'Struts Users Mailing List'
Subject: RE: Must have action=. in html:form tag?
I understand DispatchAction fairly well. But because there are certain
extra things I need to do that DispatchAction won't help. Anyway,
Shyam's
suggestion of using
Hi:
My html:form tag doesn't allow me to skip an 'action' attribue. If you
look at my code below, I move the assignment of the 'form action' to the
javascript function so which action to take is dynamically depends on the
form element 'whichAction'. But the compiler insist I have to have
Specify the Action associated with fromCreateShopWorkOrder or
fromUpdateShopWorkOrder in the html:form attribute.
--- Au-Yeung, Stella H [EMAIL PROTECTED] wrote:
Hi:
My html:form tag doesn't allow me to skip an 'action' attribue. If you
look at my code below, I move the assignment
Hubert:
Can you elaborate that In othe words, how do I do everything that the
function submitForm() does to dynamically pick an action all within the
html:form tag?
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 4:36 PM
To: Struts
with fromCreateShopWorkOrder and
fromUpdateShopWorkOrder, right?
- Hubert
--- Au-Yeung, Stella H [EMAIL PROTECTED] wrote:
Hubert:
Can you elaborate that In othe words, how do I do everything that the
function submitForm() does to dynamically pick an action all within the
html:form tag
words, I have action mapping in my struts-config.xml file for both
path /app/fdd/shopWorkOrder/fromCreateShopWorkOrder and
/app/fdd/shopWorkOrder/fromUpdateShopWorkOrder. But I want whichever one
to be chosen to be dynamically. So how I do that all within the
html:form tag?
-Original Message
whichever one
to be chosen to be dynamically. So how I do that all within the
html:form tag?
--- Hubert Rabago [EMAIL PROTECTED] wrote:
I never said anything close to what you're asking me.
All I said is choose one of your two possible outcomes (doesn't matter
which
one), take the path that you
:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 4:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Must have action=. in html:form tag?
But I don't always want /app/fdd/shopWorkOrder/fromCreateShopWorkOrder to
be my action all the time. I want the action for the form to be dynamic
dynamically. In
other words, I have action mapping in my
struts-config.xml file for both
path
/app/fdd/shopWorkOrder/fromCreateShopWorkOrder and
/app/fdd/shopWorkOrder/fromUpdateShopWorkOrder.
But I want whichever one
to be chosen to be dynamically. So how I do that
all within the
html:form tag
(document.theForm)
-Original Message-
From: Paul, R. Chip [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 5:23 PM
To: 'Struts Users Mailing List'
Subject: RE: Must have action=. in html:form tag?
You can't.
Correct me if I'm wrong, but the html:form action= property is what
let's
via javascript?
Chip
-Original Message-
From: Au-Yeung, Stella H [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 4:52 PM
To: 'Struts Users Mailing List'
Subject: RE: Must have action=. in html:form tag?
Paul and Hubert:
If I do the following, just choose one of the paths
/shopWorkOrder/fromUpdateShopWorkOrder method=post
onSubmit=return submitForm(document.theForm)
-Original Message-
From: Paul, R. Chip [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 5:23 PM
To: 'Struts Users Mailing List'
Subject: RE: Must have action=. in html:form tag
=. in html:form tag?
Just a suggestion. Not sure if I'm right...
Instead of using onSubmit() event of your html:form,
why don't you call the Javascript when the user
clicks/submits the associcated HTML component -
Create/Update button, and set the action
accordingly.
HTH,
Shyam
--- Au-Yeung, Stella H [EMAIL
Stella:
Any time you incorporate Javascript into your app, you have to wonder if things
will work now/ever/always in this/that/other browser. So avoiding everything
except the most basic javascript may be a good idea.
What you want to do can be done more cleanly (just in my opinion though) in
=. in html:form
tag?
Just a suggestion. Not sure if I'm right...
Instead of using onSubmit() event of your
html:form,
why don't you call the Javascript when the user
clicks/submits the associcated HTML component -
Create/Update button, and set the action
accordingly.
HTH,
Shyam
=. in html:form tag?
Shyam:
I am not sure what you mean, can you elaborate that?
The current form only has one 'submit' button. After the user fills in data
on the current form, I want the data to be submitted to the DB and then
automatically be taken back to the 'previous' screen. This previous screen
can
Ramadoss:
That's what I did already in one of my original version. My reason of
posting to this group is because html:form doesn't allow me to use a
dynamically assigned action (such as one I set in my Javascript function
to replace the one I have within the html:form tag.
-Original
Mailing List'
Subject: RE: Must have action=. in html:form tag?
Ramadoss:
That's what I did already in one of my original version. My reason of
posting to this group is because html:form doesn't allow me to use a
dynamically assigned action (such as one I set in my Javascript function
List
Subject: RE: Must have action=. in html:form tag?
Well, as the others said DispatchAction is the way to
go.
Since, you already have two separate Actions defined,
I thought it may be worthwhile to give my idea a try.
What I meant was, instead of a submit button
html:submit, use a normal
I am converting a html form to .jsp page. Html file contains following
form code.
form name=frmName tag.
This form name is getting used by few javascript functions.
At present I have this line in .jsp page for form tag.
html:form action=action1.do
Which attribute in the html:form tag
Yes, u r rite.
Thanks kadir for prompt reply.
-Original Message-
From: Kathiresan Murugesan [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 2:06 PM
To: Viral_Thakkar
Subject: RE: html:form tag
Hi
You can use the name attribute value you given in your form bean mapping
Hi Jim
Remove your second servlet mapping in your web.xml. I had the same problem.
I've defined two mappings:
servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping
servlet-mapping
servlet-nameaction/servlet-name
Hi,
I am using struts 1.1 on tomcat 5.0.14 and have problem with the FormTag from
struts-html tag lib.
My jsp contains the line:
html:form action=/cp/admin/someAction method=POST
[snip]
/html:form
And I have the following action-mapping defined:
action
This is my first shot at using 100% struts tags for my forms. I'm missing something.
snippet from jsp:
html:form action=pmregister method=post focus=firstName name=pmRegisterForm
type=com.je.struts.action.PMRegisterForm
!--form action=pm/pmregister method=post --
PFirst namenbsp;*nbsp;:
[mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 1:42 PM
To: Struts Users Mailing List
Subject: Having trouble with html:form tag
This is my first shot at using 100% struts tags for my forms. I'm missing
something.
snippet from jsp:
html:form action=pmregister method=post focus=firstName
with html:form tag
First off.. What version of Struts are you using?
This appears to be an older version as type/name are deprecated.
You should be have setting those in the struts-config.
Also make sure your action matches the action path in your struts-config.
-Tim
-Original Message
trouble with html:form tag - Using 1.1
1.1
Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-
- Original Message -
From: Chen, Gin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, October 24, 2003
I took out those attributes from the html:form tag , but the results were
exactly the same. This is weird. My setup looks correct.
Here's my struts XML:
form-bean
name=pmRegisterForm
type=com.je.struts.action.PMRegisterForm
/form-bean
.
action path=/pmregister
type
.
Note the exactly equal to
-Tim
-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 3:05 PM
To: Struts Users Mailing List
Subject: Re: Having trouble with html:form tag - Using 1.1
I took out those attributes from the html:form tag , but the results
Phone: 813-503-1484
-
- Original Message -
From: Chen, Gin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, October 24, 2003 3:32 PM
Subject: RE: Having trouble with html:form tag - Using 1.1
Don't
clues.
-Tim
-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 3:46 PM
To: Struts Users Mailing List
Subject: Re: Having trouble with html:form tag - Using 1.1
That did not work. I had actually tried that before, but I have done some
many
with html:form tag - Using 1.1
Is it possible since you are using validation; validate=true that your
validation is failing and that is why ur action doesn't run???debug for
validate method in actionform bean?
Chen, Gin [EMAIL PROTECTED]
10/24/2003 02:32 PM
Please respond to Struts Users Mailing
validate=false
change ur mapping
Jim Kennedy [EMAIL PROTECTED]
10/24/2003 03:12 PM
Please respond to Struts Users Mailing List
To: Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:Re: Having trouble with html:form tag - Using 1.1
-
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 24, 2003 4:21 PM
Subject: Re: Having trouble with html:form tag - Using 1.1 - NO luck
try changing your mapping in web.xml to *.do and the for your form
html:form name=myForm method=post action
respond to Struts Users Mailing List
To: Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:Re: Having trouble with html:form tag - Using 1.1 - THAT WORKED
But why. I don't understand. I should be able to define:
/pm/*
/hello/*
/anything
, 2003 4:46 PM
Subject: Re: Having trouble with html:form tag - Using 1.1 - THAT WORKED
I think your way should work too.You should be able to define any kind of
mapping as per rules!!Your mapping should match the call.
But when U define mapping as /pm/* then you also have to call servlet
like
Hi All,
Have an issue with populating a form from a POJO (Bean like with getters /
setters) returned from OJB
Have setup Struts with ObjectRelationalBridge
Using DynaValidatorForm for validation
Passing objects into DB without issue.
Was hoping to pass the object back to the same form that I
Hi,
Let me restate a question that I asked earlier. I am really stumped on this
one and i can't move forward. I have an html:form tag with my action
defined. html:form action=/myAction. When the form is generated as html,
it has form name=myForm method=post action=. I have browsed the
source code
Show how you defined your ActionMapping for /myAction in
struts-config.xml
Also can you see any errors in your logs?
-Original Message-
From: Canning, Chuck [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 4:49 PM
To: 'Struts Users Mailing List'
Subject: html:form tag
: Monday, July 28, 2003 3:50 PM
To: 'Struts Users Mailing List'
Subject: RE: html:form tag generation
Show how you defined your ActionMapping for /myAction in
struts-config.xml
Also can you see any errors in your logs?
-Original Message-
From: Canning, Chuck [mailto:[EMAIL PROTECTED]
Sent
you should be using the full class path for the type attribute.
-Original Message-
From: Canning, Chuck [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 4:57 PM
To: 'Struts Users Mailing List'
Subject: RE: html:form tag generation
Here it is. Thanks.
action path=/myAction
Shneyderman [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 4:04 PM
To: 'Struts Users Mailing List'
Subject: RE: html:form tag generation
Hmm, something is weird here you do not specify name of the form you use
for this action yet html generates the name of myForm.
Something is fishy here. You
-Original Message-
From: Canning, Chuck [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 4:13 PM
To: 'Struts Users Mailing List'
Subject: RE: html:form tag generation
Oops, my bad. Sent he wrong one.
action path=/myAction
type=MyAction
name
And here is the generated html -- sorry for second post, sent first by
mistake.
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
html
head
TITLEDeploy New Price/TITLE
link rel=stylesheet type=text/css href=styles/zdpm.css
/head
body class=mainContent
div
It looks allright to me.
I do not know.
-Original Message-
From: Canning, Chuck [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 5:27 PM
To: 'Struts Users Mailing List'
Subject: RE: html:form tag generation
And here is the generated html -- sorry for second post, sent first
Mailing List'
Subject: RE: html:form tag generation
Hey,
Here is the actual stuff -- the struts-config.xml has been striped because
it is quite large.
form-bean name=CustomDeployForm
type=com.zilliant.management.ui.struts.deploy.CustomDeployForm/
action path=/deploy/confirmDeployCustom
Hi,
Does anyone know why the name and type attributes
of the form tag are deprecated?
It seems to me that a tight coupling between a jsp and
it's associated ActionForm makes more sense than
coupling the ActionForm with the Action, which is the
consequence of the putting the name attribute in the
What if you want to write an Action that can service a
family of several different ActionForms??
You can do it. Just need to do it yourself (well sort of).
Alex.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
-
From: Alex Shneyderman [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 12:31 PM
To: 'Struts Users Mailing List'
Subject: RE: html:form tag and coupling between ActionForm and Action
What if you want to write an Action that can service a
family of several different ActionForms
small the architecture that puts effort into
making them generic and reusable may be misguided.
Brendan
-Original Message-
From: Suzette Daniel [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 9:41 AM
To: 'Struts Users Mailing List'
Subject: RE: html:form tag and coupling between
'
Subject: RE: html:form tag and coupling between ActionForm and Action
I just wanted to add a little bit more to Alex's comment.
1.Create a form interface that represents your family of forms
abstract class PersonForm extends ActionForm{
getFirstName
... It
then modifies the path and forwards to a view which in my case will be the
Struts application. So the user submits to /legacy/struts.do but Struts
receives /root/legacy/struts.do and the page is /root/legacy/struts.jsp.
The html:form tag with an action of /struts.do currently sets the action
that is responsible for user initialization, security, etc... It
then modifies the path and forwards to a view which in my case will be the
Struts application. So the user submits to /legacy/struts.do but Struts
receives /root/legacy/struts.do and the page is /root/legacy/struts.jsp.
The html:form tag
.
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Friday, March 28, 2003 11:42 AM
To: Struts Users Mailing List
Subject: Re: html:form tag - specify rendered action
On Fri, 2003-03-28 at 12:16, Kuntz, Tim wrote:
Is it possible to manually control the rendered form
Subject: Re: html:form tag - specify rendered action
On Fri, 2003-03-28 at 12:16, Kuntz, Tim wrote:
Is it possible to manually control the rendered form action attribute?
I am migrating and existing MVC framework to Struts and have the
requirement
that the two frameworks run in tandem
receives /root/legacy/struts.do and the page is
/root/legacy/struts.jsp.
The html:form tag with an action of /struts.do currently sets the
action
to /root/legacy/struts.do and I need it to be /legacy/struts.do.
Has anyone else dealt with this issue?
The framework is only prepending
exactly what it should be doing in a normal application.
In my case, I just need to modify that behavior so I can get it to work in
my environment.
I see. So you want to take advatage of the form handling capabilities
of the html:form tag without it prepending the context?
Interesting. Would
of the form handling capabilities
of the html:form tag without it prepending the context?
Interesting. Would a JavaScript solution work for you?
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
On Fri, 2003-03-28 at 13:43, Kuntz, Tim wrote:
Sorry, the framework refers
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:
Users Mailing List'
Subject: html:form tag and document submit()
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
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
'
Subject:html:form tag and document submit()
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
One is a javascript method that allows you to submit a form, the other
a jsp tag that renders to an html form when its asociated with a form
bean..
Or have i miss understood the question?
Giovedì, 13 mar 2003, alle 10:31 Europe/Rome, Mohan Radhakrishnan ha
scritto:
Hi,
I have a dumb
Hi,
I want to give a name to html:form tag, so i can use
it in javascript, but i found that this method is
depricated, so how can i do it?
my old defintion of form is
FORM name=mapsForm action=/servlet/input
so in my new defination will be
html:form action=input
how do i define name
here's a thought. maybe you can look at the taglib. struts-html.tld.
-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 12:16 PM
To: [EMAIL PROTECTED]
Subject: html:form tag question in struts1.1b2
Hi,
I want to give a name
The tag generates the name attribute for you based on the name of your form
bean.
David
From: Ashish Kulkarni [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: html:form tag question in struts1.1b2
Date: Tue, 21 Jan 2003 09:16:06 -0800
PROTECTED]
To: [EMAIL PROTECTED]
Subject: html:form tag question in struts1.1b2
Date: Tue, 21 Jan 2003 09:16:06 -0800 (PST)
Hi,
I want to give a name to html:form tag, so i can
use
it in javascript, but i found that this method is
depricated, so how can i do it?
my old defintion of form
I'm getting routed to the wrong server when I use html: form
action=/myAction
in a weblogic clustered environment. Does the html:form
tag POST to the Struts servlet using response.encodeURL
as the URL posted to?
How should I code my html:form tags in JSPs in
clustered environment to ensure
To: [EMAIL PROTECTED]
Subject: Re: Action field in html:form tag does not get evaluated
properly. Why?
try changing the JSP to
html:form action=/system/login
/html:form
From: Tobias Hill [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List
Hi,
In one of our JSP-views the html:form-tag does not
get its action attributed evaluated properly and we
have no idea why.
We are currently building an application on the Orion
server. The application context root is http://host/app/.
We have defined a login action this way:
action
I have a form which has three modes; Create, Edit, and View. When the form
is Create or
Edit, I want to place the focus on the first field (longName). But when I
use a logic:equal
tag to determine the correct html:form tag, I get a corrupted html file. Is
there another solution
besides
the correct html:form tag, I get a corrupted html file. Is
Jim there another solution
Jim besides the logic:equals tag?
Jim [ [ JSP Page ] ]
Jim body
Jim logic:notEqual name=accountDetailsForm property=action
Jim scope=request value=View
Jim html:form action
that the doco doesn't stay explicitly you need
to subclass DispatchAction.
At 05:30 pm 26-10-2001 +0200, you wrote:
Hi all
I'd like to put severel (submit) buttons into one html:form tag. Each of
this button should execute a different action. The problem is that only the
action given in the html:form tag
all
I'd like to put severel (submit) buttons into one
html:form tag. Each of
this button should execute a different action. The
problem is that only the
action given in the html:form tag is called.
Is there a way to tell struts to analyze the
request for a property action
and if the action
Hi all
I'd like to put severel (submit) buttons into one html:form tag. Each of
this button should execute a different action. The problem is that only the
action given in the html:form tag is called.
Is there a way to tell struts to analyze the request for a property action
and if the action
You would want this to read
html:form action=/do/createProject
and then make the action=submit part a hidden field in your form.
The Action Mapping should start out like this:
action
path=/createProject
type= ...
-- Ted Husted, Husted dot Com, Fairport NY USA.
--
Hi,
I am using Struts 1.0; the template tags and Tomcat 3.2.1 as server.
In my web.xml I have the following action-mapping:
servlet-mapping
servlet-nameaction/servlet-name
url-pattern/do/*/url-pattern
/servlet-mapping
In the main-template-jsp I have the following lines:
html:html
Message-
From: Jesse Alexander (KABS 11)
Sent: Monday, September 17, 2001 4:13 PM
To: [EMAIL PROTECTED]
Subject: Problem with mappings and html:form tag
Hi,
I am using Struts 1.0; the template tags and Tomcat 3.2.1 as server.
In my web.xml I have the following action-mapping:
servlet
Hello,
I have struts 1.0 based application that has 2 mappings:
!-- Excel Servlet Mapping --
servlet-mapping
servlet-nameexcelServlet/servlet-name
url-pattern/servlet/excelServlet/*/url-pattern
/servlet-mapping
!-- Action Servlet Mapping --
servlet-mapping
n="/saveRegistration.do"
or i've missed something?
Although the latter still works, the html:form tag has been made smart
enough to figure out how an action path is mapped to the controller
servlet. The former will work even if you change from path mapping to
extension mapping (or vice versa), for example.
John.
Craig
at startup time, and remembers which mapping you have
selected. If you do the usual extension mapping ("*.do"), it will
generate a hyperlink to "/saveRegistration.do"). Likewise, if you use
path mapping instead (say, "/execute/*"), the same html:form tag would
gen
action="/saveRegistration.do"
or i've missed something?
Although the latter still works, the html:form tag has been made smart
enough to figure out how an action path is mapped to the controller
servlet. The former will work even if you change from path mapping to
extension mapping
83 matches
Mail list logo