How to integrate javascript in struts without
writing any java code in jsp-pages?
hi ,
going through my code over and over again, I finally realized that the path of my
action class had changed...
@-}
thanx a lot, anyway
Marion
Hello world,
I'm trying to fill a struts template with an interate tag. The collection, an
ArrayList, is set in the jsp page.
My Code looks like this:
JSP-Page
=
...
%
ArrayList testList = new ArrayList();
I have a logic:iterate tag in which I list items to a table. In a column
at the right side I want to add a details link which should link to
detailed information of this item.
How can I use the html:link tag delivering a code of an item in my
iteration loop to my action?
logic:iterate
This works fine for me
1 Start up the adminserver.
2 Start up Admin Console.
3 Select Servlet 2.2/JSP 1.1 Full Compliance Mode for the Default Servlet
Engine. Restart the Default Server.
4 Use the Convert War file task to convert the struts-example.war from the
struts distrib as-is.
Convert
Hello Bernhard,
I am not sure if I got your problem right. Do you want to format the link name or the
link itself?
If you want to format the link, I would try to do someting like:
a href=/main.do?NameForParameter=bean:write name=chooseForm property=vecOptions
type=com.xxx.Option id=option/
Hi,
I have the following code:
html:radio property=radioBtn value=mail /
html:radio property=radioBtn value=credit /
html:errors property=radioBtn /
Just two normal radiobuttons, have do I use the 'selected'-option which html
provide?
If the user select one the radio-buttons and come back to
We got the following explanations from SilverStream:
If the server running the struts application does not have access to the
apache site for to get the dtd, the dtd must effectively be placed on the
local file system.
SilverStream searches relative to the
Hello,
I am using weblogic server 5.1 (sp8) and struts 1.0 with jdk1.3.0_02
In a startup.jsp I'm putting a bean into the session and then I forward to the login page where I want to use the bean.
If I do this the very first time after server startup, the constructor for the bean I am using is
Hi,
the old Struts User's Guide talk about a html tag call property, see the
description below :
property displays the named bean property within a form -- use it instead of
text for properties that should be read only.
My problem is that this tag doesn't exist in the new release of strust,
Title: AW: SilverStream behind firewall
Hi
all,
I have a problem in including a html file
in the JSP file.
I have
a 2 jsp's. The first jsp has a submit button.
When i
click on this submit button, I pass the filename as hidden
type.
I get
this hidden variable in my next jsp.
I will am
Title: AW: SilverStream behind firewall
Hi
Anwar,
If you
want to include dynamically, you should use this action
jsp:include
page='%=sUrl %'
flush="true"/
Regards,
Thai
-Original Message-From: Anwar Sadat
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, August 22, 2001
5:21
Title: AW: SilverStream behind firewall
Anwar,
I don't think you can use expressions in an include
directive.
Try
jsp:include page="%= sUrl %" flush="true"
/
Malc
-Original Message-From: Anwar Sadat
[mailto:[EMAIL PROTECTED]]Sent: 22 August 2001
11:21To: '[EMAIL
what would it take to make parts of the struts-config readable from a
database ?
Rakesh Ayilliath
(Software Engineer)
Synergy IT Innovations Pvt Ltd,
#196, 1st Floor, 9th Cross,
HMT Layout, RT Nagar
Bangalore 560032
[EMAIL PROTECTED]
- Original Message -
From: Craig R. McClanahan
Title: AW: SilverStream behind firewall
Hi
Thanx for the response.
Still i am having a problem in running the
jsp.
I am
running this on WebSphere 3.5. I am using the servlet engine of WebSphere to run
my jsp's.
The
rest of the lines are being compiled except for this.
The
error that it
Is it true that Struts cannot handle a java.sql.Date or java.util.Date
datatype? I seem to get errors everytime I try to have one in my form.
Thanks,
Matt
__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
Yes - I've looked at the code and it doesn't. Best bet is to have a String
injector/selector, then validate this in the validate() method of the form.
The way I have done it is to have 'String only' injectors/selectors,
validate the fields in validate() method of the form, then write a procedure
-Original Message-
From: Ben Jessel
Sent: 22 August 2001 12:44
To: '[EMAIL PROTECTED]'
Subject: RE: Dates and Struts
Yes - I've looked at the code and it doesn't. Best bet is to have a String
injector/selector, then validate this in the validate() method of the form.
The way I have
Matt Raible [EMAIL PROTECTED] wrote:
Is it true that Struts cannot handle a java.sql.Date or java.util.Date
datatype? I seem to get errors everytime I try to have one in my form.
Thanks,
Matt
No it cannot. Date is not so easy to parse since it is locale dependent.
Also the displaying a
Hi everyone
I have the following in a form in a jsp:
html:form action=/searchDocument.do
html:select property=keys style=width: 200px; multiple=true
size=5
html:options collection=keysWord property=id
labelProperty=val/
/html:select
/html:form
In ActionFrom I have
I'm using bean:write to populate a table. When a string is empty, I
(sometimes) need to put out nbsp; so that the tables borders look right.
I've found that I can do this directly (setting the bean property), so what
should I do?
David Corbin
Hi all,
I'm trying to use Struts with JBuilder5. I've followed the steps described
by Anthony Martin (http://www1.tramsasp.com/?section=dev), but I get an
invocation error on index.jsp when I right-click WebRun :
C:\jbuilder5\jdk1.3\bin\java -classpath [...] org.apache.jasper.JspC
-d
suggestion:-you may need to reset the value in the form bean
WARNING: In order to correctly recognize cases where none of the associated
radios are selected, the ActionForm bean associated with this form must
include a statement setting the corresponding array to zero length in the
reset()
We have developed a utility class for Date manipulation.
Attached the java file.
Hope this helps.
Thanks
Ravi
-Original Message-
From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 8:01 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Dates and
Hi All,
I have a form wich get default values from a bean. with the name and
property tags of the html:text tag. When the form has errors using the
validate(ActionMapping mapping,HttpServletRequest request) method the field
don't get repopulated with the text I it changed to. But it gets the
David,
I am doing something similiar in an application I am working on.
While I am not stripping the slash, I am modifying the path returned by
an action mapping by adding parameters to it without modifying any
Struts code.
I recommend this solution (or something similar): Write an
Ralph vd Houdt [EMAIL PROTECTED] wrote:
Hi All,
I have a form wich get default values from a bean. with the name and
property tags of the html:text tag. When the form has errors using the
validate(ActionMapping mapping,HttpServletRequest request) method the field
don't get repopulated
Hi,
When a construct a form with tag form:form ... /
form:form action=arbitrage.do form:submit
value=Arbitrage //form:form
I've got this :
form name=arbitrageForm method=POST
action=/assurance/arbitrage.do;jsessionid=iyn9hmlc31
input type=submit name=submit
value=Arbitrage/form
What is
If you use the html:options tag, it should be pretty simple. Since you
already have a collection of songs with each song having properties
for the label and value, you should be able to use this.
% Collection songs = SongCache.getInstance().fetchAll(); %
html:select property=id
html:options
where does ApplicationResources.properties have to be to get things to
Just Work(tm) ? i've put it in
WEB-INF/classes/my/package/tree/ApplicationResources.properties,
WEB-INF/classes, WEB-INF, the app root, etc. but struts ( bean:message )
still cant manage to find something thats in the
Although I have not yet tried it, you might consider
subclassing your WizardAction. WizardAction would
have all of the methods necessary to perform the
entire task, then have one subclass for each of the
steps all the while using the same WizardForm.
WizardAction extends Action
this is the session-id you are working with.
marcel
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 5:12 PM
To: [EMAIL PROTECTED]
Subject: [URI];jsessionid=iyn9hmlc31
Hi,
When a construct a form with tag form:form ... /
Did you also put the new uri in the web.xml file as a parameter value for
the ActionServlet?
-Original Message-
From: Howie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 11:15 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: location of
Slightly off-subject, but does anyone know how you can define values in xml
and then look them up in your actionForm? Or if it can't be done in web.xml,
how about application.properties?
Basically, I want to format a date according to a time format string eg,
dd, MMM, hh:mm. However, I want
Mike -
We sometimes use the page context to store tag results under a key name.
If tag executes multiple times per page then it checks the page context
for something under that key before going forward with processing. One
thing though, if the results of the tag depend on the attributes
Hi,
Are indexed tags implemented for text areas as part of Dave Hays indexed tag
patch?
is there a reason why they weren't included in the patch?
Cheers
Nathan
**
This email and any files transmitted with it are confidential
Wow, that's nice!
One minor fix I needed was to put the collection onto the request prior to
html:options..
% Collection songs = SongCache.getInstance().fetchAll(); %
html:select property=id
% pageContext.setAttribute(songs, songs); %
html:options collection=songs property=stringId
hi.
This is my situation:
-I create a blank application.
-I modify the struts-config.xml with:
form-beans
form-bean name=logonForm
type=mypackage.LogonForm/
/form-beans
and with
actionpath=/logon
type=mypackage.LogonAction
I was trying to run the sample app from the article
Making Struts work in the VisualAge for Java 3.5.3 WebSphere Test
Environment in the Va Java 3.5.3 Test Environment.
I installed the binary distribution file (Struts 1.0b)so I do not
have the source to fix or change. This is the error I get
You need a special struts.jar with a slight modification to the form tag,
which you can download from: http://www.enfused.com/struts.jar
Chris
Christopher Assenza
Phone: 412.201.6026
Fax: 412.201.6060
Email: [EMAIL PROTECTED]
ACCESSDATA
Moving Your Business from Point A to Point e.SM
Is it be possible to add a prefix to the forward parameter in an action
mapping. I'm not too hot with xml, so could you explain how to do this? I
presume you could define _something_ in the struts-config.xml/web.xml and
include it in the forward value...
Thanks for any advice!
In reply to message: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12014.html
I am trying to proxy to my action class via /do/*
rather than *.do
Therefore, I need to make some modifications to my
DefaultAction.java - but I'm having a little difficulty.
String forwardPath =
Here it is:
http://www7.software.ibm.com/vad.nsf/data/document2558?OpenDocumentp=1BCT
:)
Chris
Christopher Assenza
Phone: 412.201.6026
Fax: 412.201.6060
Email: [EMAIL PROTECTED]
ACCESSDATA
Moving Your Business from Point A to Point e.SM
http://www.accessdc.com/
-Original
Which radio button is selected when the JSP is displayed depends on the
value of the property in your form bean. For example, if your form bean's
'radioBtn' property is set to credit, then the second radio button in your
example will appear selected. You should set this up in your Action before
I'm not sure I understand your warning. For a set of radio buttons, there
should not be an array in the form bean, just a simple string property,
since only one radio button from a set can be selected at any time.
--
Martin Cooper
- Original Message -
From: SUPRIYA MISRA [EMAIL
Hello everyone and especially Dave Hays,
Has anyone tried updating the html:radio Struts tag to produce indexed
names? I am currently making a multiple choice survey application and
having an indexed radio button would be great!
Thanks,
Princeton
From
Hello,
We are currently in the early design stages of an extremely high profile application
and I am considering using Struts. I have used it in the past for several very small
applications with no more than a couple concurrent users. But since we only get one
shot at making this
Eric,
I can't really give you a success story yet, our first Struts application
isn't complete and I'd say we did some things wrong and did some things
right along the way - but overall things are going very well and Struts has
been very useful.
Just hang around here for a bit and you'll get
Eek, I gave you a bad link for Ted Husted's site, the correct one is:
http://www.husted.com/about/struts/
Chris
Christopher Assenza
Phone: 412.201.6026
Fax: 412.201.6060
Email: [EMAIL PROTECTED]
ACCESSDATA
Moving Your Business from Point A to Point e.SM
http://www.accessdc.com/
Hi,
this is the second time I am posting this message. When I try to run struts
on Tomcat, I get the following error :
Exception in: R( /examples + /jsp/logon/logon.jsp + null) -
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection
I tried all settings I
Hi,
this is the second time I am posting this message. When I try to run
struts on Tomcat, I get the following error :
Exception in: R( /examples + /jsp/logon/logon.jsp + null) -
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection
I tried all settings I
Is anyone using multiple action servlets for one application.
For example, if we have a main Action Servlet which delegates to
other Action Servlets, each of which accomplish substantial amount of
functionality.
Any suggestions on the Pros and Cons of this architecture?
Thanks
Anand Narayan
Hi all,
I am new to the mailing list and need directions to get to the list
archives(s)...
Thanks
Venkat.
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
--- Venkat Jonnalagadda [EMAIL PROTECTED] wrote:
Hi all,
I am new to the mailing list and need directions to get to the list
archives(s)...
Thanks
Venkat.
__
Do You
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
--- Venkat Jonnalagadda [EMAIL PROTECTED] wrote:
Hi all,
I am new to the mailing list and need directions to get to the list
archives(s)...
Thanks
Venkat.
__
Do You
I came across that error this morning(Cannot find ActionMappings or
ActionFormBeans collection).
My mistake was that my stuts-config.xml file had a syntax error for ex:
actionpath=/order
type=org.whatever.action.OrderAction
name=orderForm
My struts-config looks like :
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE struts-config PUBLIC
-//Apache Software Foundation//DTD Struts Configuration
1.0//EN
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
struts-config
form-beans
ActionError normally takes a key to a property in ApplicationResources
file. But I would like to report errors without putting all the errors in
the properties file.
I would like to continue to use the html:errors/ tag.
Is there a way of reporting errors from an Action which can be reported by
Hi. Have just replied to Nathan's post on the dev list.
I will make the changes to textAreas and radio buttons, and get them added to
nightly build.
Cheers,
Dave
Princeton Lau [EMAIL PROTECTED] on 08/22/2001 04:01:37 PM
Please respond to [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]'
I am not sure about your package structure, but we include the package
in the type attribute
form-bean name=logonForm
type=xxx.yyy.LogonForm/
action path=/logon
type=xxx.zzz.LogonAction
name=logonForm
forward
Bulk of the work gets done in the perform method of an action class.
ActionServlet is nothing but the controller.
If your question is reg. use of multiple action classes one delegating a
task to the other, the answer is yes.
we just need to forward from one action to the other.
hope this
perhaps your type might be a problem
type should refer to complete java class type including any packages
eg: mypackage.LogonFormmypackage.LogonAction
also check, if your struts-config.xml is in your web-inf folder.
i guess u don't need / before ur path name forward name=failure
may be not. as far as i know. but you can have a work around having one
general key and some default value and pass in a replacement value in
ActionError constructor
so all u r classes can use the same key but replace the default value. this
way u can use html:errors/
hope this helps,
rama.
Hello,
Is it possible to return collections of messages from
the ApplicationResources.properties file?
Eg the ApplicationResources.properties could be:
page1.optionbox.1=Apples
page1.optionbox.2=Oranges
page1.optionbox.3=Pears
...
...
I would like to get page1.optionbox.* as a collection
to
simply
write your javascript between script/script tags, as you would
do in the case of a normal html page.
thanks
-va
-Original Message-From: Metehan Selvi
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, August 22, 2001 2:03
AMTo: [EMAIL PROTECTED]Subject: how to
integrate
from with in the perform method of an action class,
call mapping.forward('success');
define the forward tag for 'success' in struts_config.xml
-va
-Original Message-
From: Jan Fredrik Overaasen
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 7:29 AM
To: '[EMAIL PROTECTED]'
Any chance anyone has done this for WAS 4.0 on 2000?
Hi David,
I am assuming that you are using bean:write to retrieve data values from
your model beans. Your problem is purely related to the presentation
(view/jsp).
So, a clean solution would be to create a custom JSP tag, which would do the
same as the the Struts bean:write tag
And I thought about that, I was just shocked that there isn't already
something for this.
- Original Message -
From: Patrick Vanden Driessche [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 7:35 PM
Subject: RE: nbsp; with bean:write
Hi David,
I am assuming
One thing I've done in the past is to always place a nbsp; before my closing
/td - that way you're guaranteed a space after the data and it doesn't
affect your layout. This is only necessary if you have borders on your tables.
The other solution is to remove table borders, and then this is not
Dear all
I'musing Struts as my webtier in MVC structure.
now I've got a string of data from database. and load the string in my formbean
successfully. but my problem ishow to load the string I got from the
DBand show the string in a jsp(view).any suggestion will be greatly
I have an ActionServlet that needs to be run everytime
a user makes any http request to my site. How and
where should I tell the controller to do this?
__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
Hi all !
I have read about the trouble when reading Japanese from
Resource.properties file in the mail archive. Actually I had the same
trouble myself too.
Finally I got through this with below solution.
1) Save the Resource.propeties file by "JIS" encoding.
2) Set the charset of jsp to
Hello all !
Is there a recommended way to call EJB from the struts framework?
What I am doing now is...
I have StatefulSessionBean "EJB" and "EJB" has a
method getHello() which simply returns "Hello".
(1)ActionForm class
(a) create setEJB(EJB ejb) and getEJB() methods.
(2)Action class
Thanks for the idea Bill, this idea looks a little more elegant than my Struts hack
idea since it wouldn't involve having to re-hack Struts each time it is re-released.
I'll want to mull it over some more but at first glance this looks pretty doable.
Also thanks to Tuesday's reply from Robert
Would you be able to use a servlet filter out the front to do some custom
mapping of url's for your own purposes?
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 2:22 PM
Subject: Re: struts-user Digest 22 Aug 2001
Use a Filter part of Servlet 2.3. I assume you could map all requests
to a custom ActionServlet also, but ultimately a Filter is the way to go.
I'm using Resin 2.0 which supports Servlet 2.3 and filters are working
great.
Erik
- Original Message -
From: Calvin Lau [EMAIL
Why not use the Action to populate request scoped variables that you then
bean:write inside template:put tags?
Or have a look at the source code to the template:put tag and
reverse-engineer it! :)
Erik
- Original Message -
From: Marcelo Vanzin [EMAIL PROTECTED]
To: [EMAIL
Are you talking about the struts-example webapp or is it an app of your own
?
See to it that the struts.jar is not in your classpath while your tomcat
starts up.
Rakesh Ayilliath
[EMAIL PROTECTED]
- Original Message -
From: Bhamidi Krishna [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
I have a custom tag that I've written, and I want it to talk to the Action
Servlet (to get mappings out). How can I do this?
When I'm in the Jsp, can I access the action servlet? Or is it out of scope
by then?
=**
If you are not the
If anybody has done this before, what is a good way of caching custom tag
results? For instance, I have a custom tag, that generates image tags (by
dynamically building up the url). I'd rather it didn't go through the same
process 4 times for the same image. How can I get around this?
Thanks for
81 matches
Mail list logo