download httpunit; try the examples; there is no difference between struts
generated frontend or not struts generated. you will need the jtidy too, to
parse the html files (response). with httpunit you can test the
functionality from websites -named black box tests.
the interessting thing with
Sarica GRATUITAMENTE MSN Explorer all'indirizzo http://explorer.msn.com
I put a special header and footer on all my pages. I'd like
to do this with the template tags. Template tags allow
you to pass named parameters to the template. However, I need
to pass a list of things (navigation URLs) into my header
so it can print a list of hyperlinks. It doesn't seem possible
Hi,
... I don't understand you answer ... :-o
how can you get the indexId value? What is somevalue?
Suppose you have:
!--The property getTitoliStudio of class Curriculum return a Vector--
logic:iterate id=iterateId property=titoliStudio name=curriculum
html:form action=/addTitoloStudio
What Chris want to say is to use the indexId attribute like this :
!--The property getTitoliStudio of class Curriculum return a Vector--
logic:iterate id=iterateId property=titoliStudio name=curriculum indexId=myId
html:form action=/addTitoloStudio
.. bean:write
Hi, there. These are tag library declarations that are modified into
your application web.xml and thus declared in your JSP FILE ( %@
taglib uri=/WEB-INF/struts-bean.tld prefix=bean % )as an example.
Thus you can refer to ie the prefix=bean bean:write/ or
bean:message/ as write and message tags
Hi,
Could any one tell me how to get the index number in a iterate tag? For example, I
want to show a html table in screen like below.
No. Name. Address..
---
1 AAAXX
2 BBB xxY
3 CCC
I put a special header and footer on all my pages. I'd like
to do this with the template tags. Template tags allow
you to pass named parameters to the template. However, I need
to pass a list of things (navigation URLs) into my header
so it can print a list of hyperlinks. It doesn't
WOW!!! It's magic!
Is it possible to put the index value in an hidden field?
Thank you!
-Messaggio originale-
Da: Heritier Arnaud [mailto:[EMAIL PROTECTED]]
Inviato: venerdì 24 agosto 2001 11.05
A: '[EMAIL PROTECTED]'
Oggetto: RE: Index within iterate tags
What Chris want to say is to
Hi all,
some time ago I've written about my problem including *.do in jsps.
E.g. in the template tags. The problem is caused be the way, how
Action/ActionServlet controls the invocation of its view.
The request is either forwarded or redirected to the view and neither
forwarding nor
[EMAIL PROTECTED] wrote:
You can put the list in an request scoped bean with defined name.
The template can then access it, e.g. with ligic:iterate
That's what I'm doing at the moment with the old jsp:setProperty
and jsp:include tags. I guess what I'm asking is can I do
this cleaner
You should do it like this but I didn't test it :
html:hidden name=my_hidden_field_name value=%=myId%%
-Message d'origine-
De: Paolo Balzarotti [SMTP:[EMAIL PROTECTED]]
Date: vendredi 24 aout 2001 11:40
A: '[EMAIL PROTECTED]'
Objet: R: Index within iterate tags
WOW!!! It's
logic:iterate name=myBeanName property=myBeanProp id=indexedBeanName
indexId=myIndexName
this will:
1) iterate over the collection / array obtained by calling 'getMyBeanProp()'
on the bean named 'myBeanName'
2) place the current element in the iteration in page context against the
name
I've just tried using FastTreeMap, and found that it had been deprecated.
Why? Is there replacement (other than the standard classes)? Can someone
update the online documentation to reflect this deprecation?
Thanks.
David Corbin
You mean something like this?
logic:iterate id=x
template:get name=%= x % /
/logic:iterate
I am not sure, whether this is possible in the
soon-to-be-deprecated template
tags or in the tiles tags, but the idea is good.
No, I mean a caller like:
template:insert
Hi,
i have a problem in using Struts.
My home.do launch my homeAction.class and my homeForm.class . So all attributes of my bean are filled .
But, when my jsp desire to use my bean (homeForm.class) using jsp:useBean.., it instanciate a new bean of homeForm.class (So all attribute are null) and it
Hi Guys,
I wondered what approach you guys took when implementing security,
authentication and authorisation. I have the common scenario where the
application I am creating allocates roles to certain types of users, allows
them to login, then restricts access to certain pages and within the
Hi all.
I'm sorry..but the previous mailwas empty :-)
I downloaded from the web a struts-logon example and executed it successfully using Tomcat 3.2.3.
Then I've tryed to run the same example using VAJ e WebSphere Test Environment, butthe server throws aRuntimeExceptionwhenparses the tag
Take a look at the
bean:write tag. If you use"homeForm" for the "name" property and
one of the form's properties for the "property" property you're all
set.
Example: bean:write
name="homeForm" property="someproperty"/
Regards,
Guus
- Original Message -
From:
stephane roro
Personally, I would tend to want to stand pat on the Struts tag
extensions while the JSPTL is being sorted out. Ideally, I believe we
would want to include a bare minimum number of tags with Struts, and
leave everything else to places like Jakarta Taglibs. It's possible that
Nial might want to
Ok, after spending over 2 hours trying to debug this can I get some eyes on
this please? Does anyone see anything wrong with this method ran against
the attached datafile:
protected void initMappings(InputStream input) {
Digester digester = new Digester();
digester.setDebug(1);
Hello Sean,
You can create only ONE instance of Digester in your application. If
it can help you...
Friday, August 24, 2001, 5:26:22 PM, you wrote:
S Ok, after spending over 2 hours trying to debug this can I get some eyes on
S this please? Does anyone see anything wrong with this method ran
Oleg,
I am running this from a main() test program and only one instance it being
created. Do you see anything wrong with the rules? XML file?
Sean
Hello Sean,
What is wrong with your code - explane please.
P.S. May be I am wrong but try to avoid such patterns as
*/patternset
Friday, August 24, 2001, 5:37:58 PM, you wrote:
S Oleg,
S I am running this from a main() test program and only one instance it being
S created. Do you see
We actually do more or less the same. During the login phase we retrieve the
user profile which includes the authorization information and store this in
the session context. Each action can then take some access control decision
based on this information.
However I am currently trying to use
rey--
that seems like a reasonable approach, but i've read in more than one post on
this board that subclassing the ActionServlet should be avoided. wouldn't it be
better to put this code directly into the action servlet and rebuild struts?
i'd also be interested in hearing the rationale behind
I would highly recommend looking at JAAS for authentication/authorization.
I'm using it in conjunction with Struts right now (using JBoss/Tomcat) and
everything is working fine. I'm still in development and haven't gone live
yet, but so far so good.
JAAS takes a little while to get your head
Sean,
If it means anything to you, I had a working use of Digester (for months)
that suddenly failed when I upgraded to a recent (sorry, don't recall which)
post-1.0 nightly binary release. My app suddenly failed. As best I could
determine, none of the rules were firing.
I did not have the
Jonathan M Crater wrote:
i'd also be interested in hearing the rationale behind the desire not to
subclass ActionServlet from those of you who prefer to avoid it.
Offering alternatives to subclassing ActionServlet so that other
resources (like things for ValidatorForm and Tiles) can be loaded
Hello Sean,
Friday, August 24, 2001, 5:51:33 PM, you wrote:
S Oleg,
S The problem is that none of the rules are being fired at all, no objects are
S getting created, nothing at all. The patterns match what is in the file,
S the file is valid, I should see some Factory objects get created,
wouldn't it be better to put this code directly into the action
servlet and rebuild struts?
That goes against my code-reusability instincts. I strive to use
the default struts build and default tag libraries.
The other possibility would be to put this in the Action class.
Before it checks the
I am using the 1.0 release, just again downloaded from the jakarta set fresh
in case something else is wrong. Nada, a no go still ... Any other ideas?
Sean
P.S. URL used:
http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1
.0/
Hello,
I don't know if I understand your question completely, but are you
saying that having a servlet (or the ActionServlet) as a welcome page
would solve your problem? Or must it be a .jsp?
I am using the ActionServlet to forward to my welcome page. I have
index.do listed as my
i would prefer not to put the authentication code in the action because
it opens the possibility of having authentication logic in each and
every action, which would essentially defeat one of the main purposes of
having a controller in the first place--one point of access for security
reasons.
Greetings. I'm using the digester to read a poor-person's DB and am
wondering if there is a way for the digester to call my own factory methods
for creating objects instead of using the Digester's addCreateObject
method. If there was a way of registering factory methods for object
creation,
Hello,
I'm new to Struts, and really like what I see. I didn't see this in the
docs, so maybe someone can answer this.
I'm working on a small sample app that displays an Employee Id on a form for
maintenance. I need to display the ID as static text if the Employee record
already exists, or in
Hi,
I have an elementary question. I want to encode the URL of my jsp page that
I call using findForward() say something like a mode parameter.
So my jsp url will look like:
http://localhost:8080/someURL/doSomething?mode=21
How can I do that?
Krishna
You probably want to take a look at the logic tags. Here's some code
from one of mine that tests whether the key is null. Records with null
keys are new.
tr
td align=right nowrapArticle ID:/td
logic:notPresent name=articleForm property=key
td align=leftnbsp;html:hidden property=key/font
I would agree that subclassing the ActionServlet is usually preferable,
but would point out that the strategy is to provide a BASE action with
the authentication code, that others would subclass. So the
authentication code would only exist once, in the base class.
-- Ted Husted, Husted dot Com,
Struts has logic tags so you don't need to
use your scriptlet at all for this.
See the tag documentation for this.
-- Larry Maturo
-Original Message-
From: Esbrook, Scott [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 9:58 AM
To: [EMAIL PROTECTED]
Subject: referring to a
We're trying to get struts installed on an intranet server with no internet
connection. We're running tomcat 3.2.3 and struts 1.0. We're just trying
to get a simple little app running that uses the struts-bean tag to pull a
hello world message from the resource file. I've changed the DOCTYPE
i would prefer not to put the authentication code in
the action because it opens the possibility of having
authentication logic in each and every action
In my case, each action needs a different authentication.
For example, some users have read-only access and some
have modify access.
Devon
Have you looked at Nic's extensions for Role-Based Actions?
http://husted.com/about/struts/struts-security.htm
[EMAIL PROTECTED] wrote:
i would prefer not to put the authentication code in
the action because it opens the possibility of having
authentication logic in each and every
Just put it in as a Global Forward, something like this
forward name=itemFindScript
path=/do/item/Search?column=script/
or in your case
forward name=something
path=/do/Something?mode=21/
or, using extension mapping
forward name=something
Hi Ted,
thankyou for the mail,
but what if mode and value (either one or both) keep getting generated
dynamically dependent on the actionForm ?
Krishna
Just put it in as a Global Forward, something like this
forward name=itemFindScript
Then you would use a html:link tag with the actionForm as the source.
http://jakarta.apache.org/struts/struts-html.html#link
Bhamidi Krishna wrote:
Hi Ted,
thankyou for the mail,
but what if mode and value (either one or both) keep getting generated
dynamically dependent on the
Hi Bill,
I just want to have what works with uncompiled jsp's work with compiled jsps!
My welcome page is called index.jsp, but when I compile it and put it in a jar
file, it is not found for the first page (though I can call it directly). Is
this some kind of bug?
Cheers,
Dave
PS I can
Thanks chuck,Ted...I am on my way to the suggested URL(s)...
Venkat.
-Original Message-
From: Chuck Amadi [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 2:10 AM
To: [EMAIL PROTECTED]
Subject: Re: Hard time understanding tld(s)...
Hi, there. These are tag library declarations
On Fri, 24 Aug 2001 12:40:04 -0400, [EMAIL PROTECTED] wrote:
||| PS I can work around it with a index.htm as a welcome page that redirects you
||| with javascript to index.jsp, but that's very clumsy!
An ever-so-slightly-less-clumsy way to do this it to have an index.jsp
that looks
Joey Gibson wrote:
An ever-so-slightly-less-clumsy way to do this it to have an index.jsp
that looks like this:
jsp:forward page=/myaction.do/
But if index.jsp is precompiled (and removed) this won't function as a
welcome file (i.e. something that will be shown if they request
With minimal changes, the best way is to do something like this:
html:select property=singleSelect size=5
html:options property=indexList labelProperty=selectList/
/html:select
where indexList is an array of your index values.
The other way is to create say a
I was going through the userguide for struts on the apache site.Under the
subsection 3.3.1 there is this html using the tags, I think that the prefix
html is wrongly used for the message as i failed to see a tag message in
struts-html.tld.
I enclosed the html below and used the ##--## to point
On Fri, 24 Aug 2001 10:34:03 -0700, John Raley [EMAIL PROTECTED] wrote:
||| Joey Gibson wrote:
|||
|||
|||An ever-so-slightly-less-clumsy way to do this it to have an index.jsp
||| that looks like this:
|||
|||jsp:forward page=/myaction.do/
|||
||| But if index.jsp is precompiled
Hi,
It does not work. It complains about ending the template:put tag
Shelly
Assenza, Chris wrote:
template:put name=abc direct=truebHello, I'm HTML in a
template/b/template:put
Chris
Christopher Assenza
Phone: 412.201.6026
Fax: 412.201.6060
Email: [EMAIL PROTECTED]
Shelly,
I've cut and paste the template for one of our pages (minus a lot of extra
puts). This does indeed work.
template:insert template=/template.jsp
template:put name=title direct=truebean:message
key=acctmaint.window.title //template:put
template:put name=test
Ignore the word wrapping, sorry. :)
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 Message-
From: Assenza, Chris [mailto:[EMAIL PROTECTED]]
maybe you're having problems with the b tag, try removing it to see if you
get the same complaint.
-Original Message-
From: Shelly Dhiman [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 2:30 PM
To: [EMAIL PROTECTED]
Subject: Re: URGENT: PLEASE HELP
Hi,
It does not work. It
I would like to write a tag that is essentially html:select +
html:options + domain data from a database.
Is there a standard way to construct such a tag? Should I just write the
whole thing by hand? Should I write it be calling the other tag classes?
David Corbin
Hi all...
Please, inform me how to implement html:select tag?
I'm stuck up there.
Please, help.
Sandeep
Short answer:
html:select property=designId
html:options collection=designs property=id
labelProperty=name/
/html:select
Long answer can be found at http://jakarta.apache.org
Jay Patel
972-701-9773
972-849-0373 Mobile
[EMAIL PROTECTED]
Hi Sandeep --Hope this helps
html:select property=facCd
html:options
collection=FACILITY
property=facCd
labelProperty=facDes
/
/html:select
From: s k m [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL
Funny, I was just griping about this to a friend last night: that tags
aren't composable like functions and classes. IMO it's a major weakness
in JSP. There was some discussion earlier on this list, see Using tags
from Java code. The short answer is you do it all yourself.
David Corbin
Hi jay...
Thank you for your urgent reply.
i'm trying out , but confused.
will u please, send one example?
sandeep
On Sat, 25 Aug 2001 Jay Patel wrote :
Short answer:
html:select property=designId
html:options collection=designs
property=id
labelProperty=name/
Hi Supriya..
thank you..
will u please send me one example on it? how to iterate it?
Sandeep
On Sat, 25 Aug 2001 SUPRIYA MISRA wrote :
Hi Sandeep --Hope this helps
html:select property=facCd
html:options
collection=FACILITY
property=facCd
From the subscription.jsp of the struts-example:
%-- In real life, these would be loaded from a database --%
%
java.util.ArrayList list = new java.util.ArrayList();
list.add(new org.apache.struts.webapp.example.LabelValueBean(IMAP
Protocol, imap));
list.add(new
Hello all,
I looked in the archives but couldn't find an answer to my question. I'd
like to convert my working form-based login page to use struts' html form
taglib. I get the following Exception when trying to load login.jsp:
javax.servlet.ServletException: Cannot retrieve mapping for action
You will need to add the Action mapping in your struts-config.xml file. You
will also need the form-bean mapping that your form will use to pass the
form data to the action class.
Here is an example.
form-beans
!-- Loin form bean --
form-bean name=loginForm
Hi Jay,
this will add only text which will be displyed in drop down box. how do I set values
for it?
i ve hash table from which i want to keep keys as values and hashtable values as
displyed text in drop down box.
Sandeep
On Sat, 25 Aug 2001 Jay Patel wrote :
From the subscription.jsp of the
You are seeing that behavior is because Hashtable returns a Collection of
Values when values() is invoked. It would be easier if you just had a bean
that contained key and value information and have that bean in a Collection.
Jay Patel
972-701-9773
972-849-0373 Mobile
[EMAIL PROTECTED]
No, it should be bean:message like the others. Please feel free to
report this at bugzilla.
Venkat Jonnalagadda wrote:
I was going through the userguide for struts on the apache site.Under the
subsection 3.3.1 there is this html using the tags, I think that the prefix
html is wrongly used
In any event, it's not a bug in Struts, so you might want to take it up
with the support group for your container.
[EMAIL PROTECTED] wrote:
Hi Bill,
I just want to have what works with uncompiled jsp's work with compiled jsps!
My welcome page is called index.jsp, but when I compile it
Yep, that's the conclusion I came to. I already posted to tomcat user mailing
list, but no response.
Dave
Ted Husted [EMAIL PROTECTED] on 08/24/2001 04:07:41 PM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject: Re: welcome file
Hello,
Has anyone using Tomcat run into the
following error when using Ted's indexed tag:
org.apache.jasper.compiler.CompileException:
C:\applications\stapp-tomcat\build\stapp\app2.jsp(119,21) Attribute indexed
invalid according to the specified TLD at
If you are using container-managed authentication, why use a Struts
FormBean? You can get the username from the container using the
getCallPrincipal() method of HttpServletRequest to get the logged in user's
principal.
If you absolutely want to use an ActionForm via Struts, keep reading.
You
Sorry,
had to to vent, been parsing/generating a lot of xml lately.
The
fact that xml has only three letters doesn't change my
opinion!
Have a
good weekend folks.
Kurt
Generally, I would tend to first put static parameters into the Global
Forward, so they can have logical names, and then let the Struts
html:link tag add whatever else was needed. If more than one set of
dynamic parameter is needed, because of normalization issues, then a Map
can be passed to the
Disregard this message. I was able to fix the
problem. The struts-html.tld file was the incorrect one.
cameron
- Original Message -
From:
cahana
To: [EMAIL PROTECTED]
Sent: Friday, August 24, 2001 4:10
PM
Subject: indexed tag
Hello,
Has anyone using
Hello All,
Sorry for this posting, but I figured someone on this mailing list would
have some helpful knowledge on this problem.
I configured a Logger class that utilizes Log4J. I'm using an xml
configuration for my logging preferences. I'm deploying to a war file to
Weblogic 6.0. Does
Hi Jay,
Many many many thanxs. Thanxs to u we crossed a hurdle. Many more hurdles are to be
crossed, but then my spirits are up.
Thanxs once again.
I would surely be in touch with U.
Regards,
Sandeep Mahajan
Team
Thanks for the quick reply but this seems like too much work just to get
some consistency across my .jsp forms. I would think there would be a way
for struts to let forms posted to j_security_check pass through to the
servlet container instead of the normal Action classes. I want the
container,
I haven't seen ServletUnit. Where do you get it from? Can it be used to
load-test a site?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: ServletUnit with Struts
Hi,
I'm trying to
Ted,
Maybe I am mistaken, but I think he wants to add the parameters in
the perform method of his Action. So in the case the html:link tag
might not work.
For cases like these (and I am open to better suggestions) I have
extended the Action Forward class to make a ParameterActionForward
Jonathan:
Another approach you may want to look at is the way we've done the Struts
integration with our own OSS framework, Expresso: We subclass Action in
our Controller class, and the Controller class actually does all of the
authentication/authorization work for us.
There of course more to
Hi,
Just curious.
Why is it so difficult to make Struts working with JBuilder 5? Where is the
problem, Jbuilder 5 or Struts?
Why can't we treat struts.jar the same as other struts, i.e., why cannot we
put struts.jar into classpath?
Thanks!
Xin
84 matches
Mail list logo