Hi,
I have a form with several buttons in it, one of them is a save button,
that opens a pop-up window where you fill the name under which you want to
save the informations you filled in the opener form.
My problem is that I would like to validate the opener window before
openning
the pop-up
I am trying to figure out how to send a parameter name and value in a html:submit /
tag that is in the middle of a form (with a different submit at the end).
The basic idea behind it is:
form
hidden name=action value=something
input text
input text
input checkbox
input
hi, if you are using struts 1.0, there is no way to create links (or
checkboxes... )dynamically, unless you use nightly builds or wait for the
struts 1.1 (as far as I know).
I had the same problem with struts 1.0 and my solution was like this. though
I have still some doubts on this solution.
in
i think you will able to get this values if you have written the form class i.e; the
set and get method for each of those variable i.e; for
text1,text2,checkbox,select.
eg:
Inside your form class
you should have
setText1(String x){
}
String getText1(){
}
I think this will helps you,
Kicha
Hi guys,
maybe it sounds quite as a basic question, but I don't know the answer.
I have images, JSP include pages and other staff referenced within my page.
I wrote that references like this.
jsp:include page=../include/header.jsp flush=true/or img
src=../images/btnFirst.gif / They work on my
Try this in your m/c and others m/c.
img src=/images/btnFirst.gif /
Hudayioglu, Fehmi wrote:
Hi guys,
maybe it sounds quite as a basic question, but I don't know the answer.
I have images, JSP include pages and other staff referenced within my page.
I wrote that references like this.
Hi
Is there any expected date that the next version of struts will come
out? Just roughly, first quarter 2002, second, third?
Is the next big version going to be 1.1?
Cheers
Tony
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL
Might be wrong, but
forward is only within a webapp - redirect is between webapps
Alexander Jesse
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 11:06 PM
To: [EMAIL PROTECTED]
Subject: forwarding to another webapp
Is there any
Indeed ! I didnt have taglib defined.
It's weird that compiler didnt complain about it.
thanx
Maris
-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 9:36 PM
To: Struts Users Mailing List
Subject: Re: logic:present
Hi,
How can I return to correct page after submitting a form which can be
called from
several places..
What I have is a actionform which can be accessed from many different
places.
ie. I have page A with a link:
html:link page=/editArticle.do?action=Edit paramId=id
paramName=article
Hi,
assuming you use validation as done by David's extensions (- validation.xml,...)
you could change the Javascript-stuff in the validation.xml file
to call the pop-up-window...
hope this helps
Alexander Jesse
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent:
Hi,
if you have a clear entrance- and exit-point for your form (always enter through
the same action and process only within on e action, not allowing to
jump away) you could create the list, put it into the session in the entry-action
and from then on just fetch it from the session. When the
Hi Srini,
You might want to look at:
- Tiles (http://www.lifl.fr/~dumoulin/tiles/)
- Struts-Menu (http://husted.com/struts/resources/struts-menu.zip)
you might also try looking at the Standard struts templating mechanism.
Jon.
-Original Message-
From: saisrinivas [mailto:[EMAIL
I have a page which calls an Action in the standard way. However in some
situations, ie as a result of logic executed in my Action class, I need to
generate a popup window on top of the page before proceeding. Is it
possible to do this from within my action?
--
To unsubscribe, e-mail:
Hi,
Does anybody know how to prevent the struts console from quadruple spacing
(!!) the lines in my struts-config file in jbuilder 5 pro. It's rather
difficult to work the file for those who don't have the plugin.
Thanks in advance
Jin
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
Hmm.. Nope. mapping.getInput() always returns the same thing regardless
of the
page from which we came from.
Here's a bit more detailed explanation of what's going on:
I have a page (action: listArticles.do) which lists all articles. On
this page if you
click on the edit - link,
Hi Tuomo,
Mapping.getInput will return whatever you have defined for the input
attribute of the action mapping in your xml; so could you not define several
mappings. These could each point to the same Action put provide a different
input attribute.
Jon.
-Original Message-
From: Tuomo
Tuomo,
Not totally finalised but at the moment I do it a bit
like the example below.
If you searched the archives for 'logon page' there
are ways you can forward to the logon page have it
return to the page that started it, which is the same
thing. These example are probably better than mine!
--- Keith Bacon [EMAIL PROTECTED] wrote:
Tuomo,
Not totally finalised but at the moment I do it a
bit
like the example below.
If you searched the archives for 'logon page' there
are ways you can forward to the logon page have it
return to the page that started it, which is the
same
Raul,
Did you did you work out the solution to this,
I think what you need to do is for the Form object that you've defined
that maps this form you need a property that relates to the multiple box
e.g.
if i have a jsp mainmenu.jsp
with
html:select property=blah multiple=true size=4
I don't see how that would work. If he just gets a normal validation
problem, but no exceptions (the normal case) then he needs to go back to the
jsp, not to some generic error.jsp. Isn't there a way to set up a generic
exception handler page so that if the container catches an exception it
quick question:
i have tomcat 3.2.4 and want to run the example struts-example.war.
i have dropped this war file into the webapps directory and then restart
tomcat - it tries to run then closes. nothing
good in the log files either.
i have tomcat 4.0 and do the same, no problem, tomcat and
Hi Jin,
Are you using the latest version? I believe this was
fixed in the final 1.1 release. If it's not, let me
know and I will fix it.
BTW, this bug is because of a bug in JDOM (which I use
for manipulating the config file XML).
Thanks,
-james
[EMAIL PROTECTED]
Hi,
Yes you can add an error-page tag your web.xml and throw an exception to the
web container. You might however want to catch the exception in the validate
method and morph it into an ActionError. I guess it depends if the user can
do anything about the error. If they can't then I'd just throw
In a way this is exactly what I do right now.. But the problem is the
request attributes parameters sent to the 'returnTo' page.. These are
lost when using this technique..
In my version I also set the request attributes as hidden form fields
and pass them
on like that.. But I wasn't sure if
I shall download it now, thanks
- Original Message -
From: James Holmes [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 1:16 PM
Subject: Re: struts console
Hi Jin,
Are you using the latest version? I believe this was
fixed in the
It seems like you are wanting to bypass the authentication check and I don't
that is permitted using form-baased authentication.
-Original Message-
From: David Bolsover [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 5:15 PM
To: Struts User
Subject: FORM Authentication to
Tony,
I suppose you can use bean:define
bean:define id=localMessageId value=messageId /
%
String newMessageId = http:/localhost?messageId= + localMessageId;
%
OR
a href=http://abc?messageId=%= localMessageId %.../a
I haven't tried it but...
HTH
Andrej
-Original Message-
Xavier,
I would probably handle it in multiple steps (veeery personal opinion):
- save calls the Action that performs the validation
- if the validation fails, return the same page with errors on top (for
example) without opening the pop-up
- if the validation succeeds, you can return the same
Anthony,
the Action itself has no idea of the front end (the HTML/Javascript pages).
It would work just as well if the presentation layer was a Java Swing GUI or
whatever. So I'd say that no, you can't open a JS window from your Action.
What you can do is playing with the Action execution and
there was a recent question in this list that I am
trying to understand the implications of.
I think that these are questions I should know the
answer to, and possibly look up elsewhere, but there
is some struts content eventually...
If there are multiple web-apps on the same server or a
Hello:
I have what some of you might think is a simple question. I have a page that
displays me a list of users with links to each user's details. When a link
is clicked the link sends a request to /loadUserIntoSessionAction. What I
would like to do in that action is take the user's details
Hi Tuomo
I'm about to work on that now. I'm thinking of setting
up a ChainToPage class in the session. This would have
properties
// The global forwards to forward to
String forwardTo
// Name of Action this was set up for.
String forUseBy
// parms eg. selectedListItems,
Juan,
I'll give you a few quick ideas and if you have trouble with particular
pieces of it you can write back with more detailed questions.
1) Use an html:link tag from the Struts html taglib to generate a link
to your action that includes information that identifies which user was
chosen
Comments interspersed below...
- Original Message -
From: Sandeep Takhar [EMAIL PROTECTED]
To: Struts Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 9:38 AM
Subject: Different web apps and struts
there was a recent question in this list that I am
trying to
This is somewhat offtopic but definitely related to web development and
I'm sure someone on this list has run up against this issue before.
I'm looking for a java library to generate dynamic SQL. Basically I want
the ability to do something like:
Query q = new Query();
q.type(SELECT);
I'm afraid the it's still broken
- Original Message -
From: Jin Bal [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 1:48 PM
Subject: Re: struts console
I shall download it now, thanks
- Original Message -
From: James Holmes
Stephen:
I appreciate the quick reply. Numbers one and two below I have exactly as
you suggested. I will look into the documentation for numbers three and
forward.
Again thanks for your help.
**
Juan Alvarado
Internet Developer -- Manduca Management
Might want to have a look at JDO or the database package provided by
Expresso.
JDO:
http://jcp.org/aboutJava/communityprocess/review/jsr012/index.html
http://castor.exolab.org/index.html
Expresso:
http://www.jcorporate.com/econtent/Content.do?state=templatetemplate=2reso
urce=636db=default
Hi,
I have a problem. The following is my jsp. It is defined in struts-config as
/showSelectBox. What I want to do is something like
/showArticleList.do?action=/showArticleList. (I would like to call that
inside a template ).
So if I call the action with that parameter /showArticleList is
Toplink is a popular commercial-level package for transparent object
persistence. Something else a coworker pointed out to me recently was the
CachedRowSet object from Sun. I believe it's still in beta, but take a
look...some very neat features implemented in it that might address what
you're
I've looked at these actually, but at this time I don't really want to
delve into an Object - Database mapping or object persistance. I just
want a utility class to generate raw SQL statements. My biggest problem
is not mapping the object to and from the database but generating
'search' type
Srini:
I have placed an Expresso walk through with screen shots etc that you can use to get
a quick view of the main features. It is all hyperlinked, so you can view only the
parts that you want to consider.
http://webAppWriter.com/showdown
It also has 30 or so sample apps you can download, and
Hi..
Makes sense actually.. Not sure if we have to go so deep as to add new
configuration
fields. Maybe just extending one of the main controller modules..
ActionServlet, Action, ActionForward, ActionMapping etc.
Gotta look into that..
But one possible problem:
1. the user is on a page with a
Hi all
This is my first post - so excuse me if it is really basic but I am trying
to get the html:options tag to work as documented. My code looks like:
jsp:useBean id=nameTitles scope=page class=java.util.HashMap
jsp:scriptlet
nameTitles.put(Mr,null);
Stephen:
I followed your steps but I'm having some problems pre-populating the form.
Let me give you some more details and hopefully you can help me out here.
I have a page that lists a set of users with links to each user's details.
The action on the link is set up as follows in
My first guess is
You need to rewrite your action definition from
action path=/loadUserIntoSessionAction
type=com.manduca.protrack.LoadUserIntoSessionAction
scope=request
to
action path=/loadUserIntoSessionAction
Ok I will give it a try.
Thanks
**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]
-Original Message-
From: Stephen Owens [mailto:[EMAIL PROTECTED]]
Sent:
I was wondering something similar... I am putting together (trying) a
large app to run a bunch of things like:
- Customer contact database
- Project tracking
- Problem tracking que
- Billing information
Users can jump between these sections...
All these will share and support each other.
The Session is part of the request object. If your action is redirecting a
page from one web-app to another, it is probably also redirecting the
request object, therefore the session as well.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday,
If you did reply this mail, can you do it one more time? My e-mail was
broken that I didn't receive any mail
Thanks
-Original Message-
From: Julia Yang
Sent: Tuesday, December 11, 2001 5:11 PM
To: '[EMAIL PROTECTED]'
Subject: Help, How to display chinese in jsp by using message tag ?
Would it be possible to simulate a common session via - for example - an
external Stateful Session EJB? All the applications could retrieve the
simulated session via JNDI and the application server will take care of
making it available between clusters, distributed environments and so on.
The
Subject: Subject: test
1647:From: Mihails Gulajevs [EMAIL PROTECTED]
===
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
No. Not true. By the servlet spec, webapps are completely separate. Sessions are
not shared.
- Original Message -
From: Dimitar Stavrakov [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 11:53 AM
Subject: RE: Similar Question as -
You're right. This would be one way to do it. The point is, to share session
between webapps you have to do it yourself.
- Original Message -
From: Sobkowski, Andrej [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 12:08 PM
Subject:
Subject: Similar Question as - Different web apps and struts
I was wondering something similar... I am putting together (trying) a
large app to run a bunch of things like:
- Customer contact database
- Project tracking
- Problem tracking que
- Billing information
Users can jump
Stephen:
Your suggestions worked beautifully. I'm definetely starting to dig this
struts stuff. It makes the work a lot easier once it starts to make sense.
Take care,
**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL
Here is an idea I had that I am just starting to try out.
I created a method that can take a bean [could be a FormBean, but mine is
more of a value object] and make it into an SQL statement. If there are
null values, they are not included in the WHERE clause.
First I needed a way of taking a
Hi,
My guess is that the code being used to load the file off disk is decoding
the text using the wrong charset to decode. In the UK, the JVM's default
charset is normally iso-8859-1 and this is used when loading any text files
from disk and converting them into double byte unicode (Java
Thanks for you reply. You gave a good point. But I still don't know how
to make it work. Can you or any body tell me how to fix it if you
happened to know.
What I did was: edit the application_zh.properties in note pad and save
in UTF-8 encoding.
In my jsp I tried each of the following
Have you tried putting the contentType in the JSP page directive like I
had previously suggested? The html spec at http://www.w3.org/TR/html4/
section 5.2.2 says:
To sum up, conforming user agents must observe the following
priorities when determining a document's character encoding (from
Tom,
you may want to try with the following:
table
logic:messagesPresent message=true
tr
html:messages id=message message=true
tdbean:write name=message//td
/html:messages
/tr
/logic:messagesPresent
/table
Please note the message=true attribute in html:messages. Without
Thanks Andrej.
Your suggestion worked. Now this message will be in the archives for others
to find :-)
Thanks again,
Tom
- Original Message -
From: Sobkowski, Andrej [EMAIL PROTECTED]
you may want to try with the following:
table
logic:messagesPresent message=true
tr
I did, also put double quotes around the Chinese character but it gave
me the following jsp exception for some reason
weblogic.utils.ParsingException: nested TokenStreamException:
antlr.TokenStreamI
OException
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:900)
at
Hi,
I have an action class that does one thing. I have another action class that
does another thing. How can I have a page that populates a form and submits
to one action class and then pass off the form to another action class for
further work?
Thanks
Alex
--
To unsubscribe, e-mail:
Subject: Re: Dynamic SQL query library
From: Vic Cekvenich [EMAIL PROTECTED]
===
While not politically correct I too use a CachedRowSet, by setting a
property in my FromBean of rowset to accomplish this. For more see
http://developer.java.sun.com/developer/earlyAccess/crs
Vic
John M.
Hi,
I have a generic action class that I want to set up that when the class is
successful it send the user back to the page from which they came. How do I
get that information? And, how would I structure my class to allow it to
send the user back?
Thanks for any info.
Alex
--
To unsubscribe,
I'm interested in finding out how other people are passing data objects between
requests for updating.
For instance -
User clicks Edit Record
I load the data object from the database, copy the properties to the form, and put the
data object in the session.
When the users presses save on the
Ryan,
I usually just discard the data object, other than properties on the
form, either displayed or hidden, that I need to identify it or populate
it. Then I reload it, update it, and finally update the DB when/if the
form is submitted.
-Original Message-
From: Ryan Cornia
We are currently using XML with XSLT in JSPs, in the following manner, and
we'd like to integrate this approach with Struts:
We use a custom tag (similar to the x:transform tag slated for inclusion
in the standard JSP taglibs) that applies a stylesheet to XML included in
the body of the tag.
Anthony,
Here's another option. If, in your Action, it's determined that the popup
is needed, set a request attribute. Then in your JSP, check for the
existence of the request attribute, using logic:present for example, and
create a custom tag to generate the required Javascript. The custom
Just joining in.
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Hi,
I'm using struts on Resin 2.0.b2 and I'm getting this error when I run the
example:
500 Servlet Exception
/struts-example/mainMenu.jsp:16: bean `user' has no get method for
`username'
Any ideas?
Thanks!
_
Get your FREE
Hi,
we are currently working with Struts and a single database (mysql). Now, we
wanted to use a second database pooling for a oracle database.
We updated our struts-config to contain a second data-source tag.
data-sources
data-source
set-property property=key value=mysql/
Hi,
The problem with morphing it into an ActionError is that, as the problem the
dynamic list wasn't created, the JSP page will not find its normal expected
dynamic list and error out. With struts it seems what happens in this case
(ie tag errors) the user ends up getting a blank screen.
I
I usually get that problem when there is a problem with the actual xml in
struts-config (eg, I left out a closing tag, etc).
Is this exactly like your struts-config xml looks? If so, you have a problem
at the end
- there are 2 closing /data-sources tags - one is actually
data-sources--
If that
Hi,
I just upgraded to Tomcat 4.01 and get the following exception:
javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:871)
.
java.lang.NoSuchMethodError
at
Is there a way to have multiple submit buttons on a form and be able to tell which
button was pressed in the following action?
Regards,
Lachlan
Yes.
The nightly builds contain a patch I submitted, called LookupDispatchAction.
It keys off of the use of ApplicationResource messages for button labels and
allows reflection to call a different method for each button pressed. The
Javadocs explain it in great detail.
Even without that base
Assume that the ActionForm has the getter for the below myhashtable that
returns a Map.
Assume that the .value returns an Array of Strings (or whatever)
I want to build a table with 4 columns in it with the logic:iterate .
I copied the below code from the STRUTS Developers Guide:
visit the strutsx.org and look at the image button patch.
-Original Message-
From: Lachlan Holmes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 5:26 PM
To: Struts Users Mailing List
Subject: multiple buttons on a form
Is there a way to have multiple submit buttons on a
I'm using JDBCRealms, TomCat 4.01, Struts 1.0 with form authentication
With cookies enabled in browser, no trouble; with cookies off in Netscape
4.7 I get:
Invalid direct reference to form login page
I'm using the following code for the form.
form action=j_security_check
Hi
Can someone please recommend a good stress testing tool that works well
with Struts. I will need one that handles the jsession field in the
urls which Struts write. So far I have had trouble finding a tool which
works with a different jsession id, which is what Struts does each session.
Ive use JMeter from apache quite successfully...
regards
Rob
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 13, 2001 4:50 PM
Subject: Good Stress Tool For Struts
Hi
Can someone please recommend a good stress
I agree to Vic on this , I had been using it for past an year or so,
though its still in beta but its very handy in handling huge chunks of
data which need to be scrollable in JSP's as it can be used as a bean
and also as Entity bean as it is a persistent and connected data object
too.
I am
We had a very bad experience with CachedRowSet, in fact we had to take it
out of our code after it had gone into production. CachedRowSet it in beta
and there is no good documentation for it. It handles long data type (of
Oracle) very poorly and is quite unstable. It promises a lot of funky
try this if Map.value = { myvalue, mydesc, myotherdata }
table
logic:iterate id=element name=myhashtable
tr
tdNext element contains:/td
logic:iterate id=strObj name=element
tdbean:write name=strObj / !-- exceptionally form because
bean strObj is a String -- /td
Let me know if you don't get any other offers. I haven't used expresso but
I'd be happy to help. I'll be in the States from Thurs and CA from Jan 7 if
it makes a difference.
Lachlan
- Original Message -
From: John McClain [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December
Hi, all.
How do I convert an ActionForm to a bean so that I can readily access
the ActionForm property to other Action classes.
thanks,
Joy
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Hi
How can I force the jsession variable to written in the url instead of
a cookie? Is there a global setting I can use somewhere?
Cheers
Tony
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
90 matches
Mail list logo