Hi Sachin,
Thanks for your reply.
You are quite true, I don't have much time to actually go through the whole
Documentation.
But I assumed that if I'm giving a simple .html name in my a href tag, it would be
a normal HTML call and not follow Struts framework since there is no entry in
Hi,
We have upgraded to Struts 1.2.2 , but we have encountered a problem. Embedded
JavaScript validators use the following code
function validateRequired(form) {
var isValid = true;
var focusField = null;
var i = 0;
var fields = new Array();
var
Hi Priya,
I dont think that the action (not being actually a struts action)
should have a corresponding mapping in struts-config.xml in your case. Use
html:link tag instead of A tag. I think this will solve your problem.
Jitender Kumar C.V.
Christoph Kutzinski wrote:
ISO-8859-1 should be no problem since it contains all german umlauts.
True. But I have standardized on UTF-8 for all text output in my
applications, since I sometimes also have to deal with cyrillic stuff,
and I don't want to adjust my encodings and the input filter
Carl-Eric Menzel wrote:
Christoph Kutzinski wrote:
ISO-8859-1 should be no problem since it contains all german umlauts.
True. But I have standardized on UTF-8 for all text output in my
applications, since I sometimes also have to deal with cyrillic stuff,
and I don't want to adjust my encodings
Since you see to experience your problem in request processing, may be
set the encoding with the VM: -Dfile.encoding=ISO-8859-1 or UTF-8 if
you like. Also the locale of your operating system might play a role.
If its a UNIX/Linux box, do you have the german locale installed?
Regards
Martin
Hi there,
since I've been searching for answer for hours and nothing have found, I'd
like to ask You for help.
I'd like to define 2 (or more) MessageResources files (two differents
bundles) by inserting into struts-config.xml this:
message-resources
hi Honza Spurn ,
Try this out ..
RequestUtils.message(pageContext,countries,locale, country.usa.label,
null);
It will return u the appropriate string. It may work.
sachin
xoriant, mumbai
-Original Message-
From: Honza Spurn [mailto:[EMAIL PROTECTED]
Sent: Friday, September 17, 2004
I do not under stand ur problem.
when u accessing the database some error occured?
then plz specify the errorstring
On Fri, 17 Sep 2004 viji.george wrote :
hello people,
can anyone suggest a site where i can find a sample application or the
solution to the problem in accessing the
hi vineesh ,
go to java.sun.com and search for tutorial they hv wonderfully designed
tutorials for the beginners .
sachin
xoriant, mumbai
-Original Message-
From: vineesh . kumar [mailto:[EMAIL PROTECTED]
Sent: Friday, September 17, 2004 1:19 PM
To: Struts Users Mailing List
Subject:
Sachin Bhutada wrote:
hi Honza Spurn ,
Try this out ..
RequestUtils.message(pageContext,countries,locale,
country.usa.label, null);
It will return u the appropriate string. It may work.
Hi there,
thanks for hint. This should work, there's no problem probably in it. Only
think I can see on
Has anyone got an example of posting an XML message via the web to a sruts
action on an external site and how I should handle that request in the
struts action?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
you can do this in several ways but you always need to reload the JSP
page and use a bit of javascript.
If you fill your combobox in the JSP, then simply reload the page with
an additional request parameter containing the selected option. In your
JSP code you must check the presence of this
In the action class, just call request.getInputStream().
On Fri, 17 Sep 2004 08:57:56 +, Mark Benussi
[EMAIL PROTECTED] wrote:
Has anyone got an example of posting an XML message via the web to a sruts
action on an external site and how I should handle that request in the
struts action?
I've found it out! So simply and It wasnot clear to me!
I'm sorry for this question, since it is so easy:
When You specify additional resources, such
message-resources key=identifier parameter=sources.file /
so You can sipmly access whole MessageResources class by for example in JSP:
The code snippet below uses JDOM but should easily be adaptable to
anything else. Hope it helps. On the server side read the data from the
request's inputStream. If however you want to use multipart messages
things get slightly more tricky.
URLConnection conn = ...
// configure
Hi Everbody!
I've got the following problem:
In my MitarbeiterAction.java I've got the following Code:
...
public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest req,
HttpServletResponse res) throws Exception
{
ActionMessages
use bean:message tag or html:message tag for accessing messages in the
same way as you use html:error tag.
Jitender Kumar C.V.
I would try this:
bean:define id=actionMessages name=%=
org.apache.struts.Globals.GLOBAL_ERROR%
type=org.apache.struts.action.ActionMessages/
%= actionMessages.getMessage(...) %
I dont know if it works, since I have no way now to test it...
You have to find somewhere value of GLOBAL_ERROR and
Jitender K Chukkavenkata schrieb:
use bean:message tag or html:message tag for accessing messages in the
same way as you use html:error tag.
Jitender Kumar C.V.
Hi!
Can you give me an example how i use html:message in this case?
U can use
First method:
html:messages id=message
bean:write name=message/
/html:messages
Or, you can place specific messages at different locations
html:messages id=message property=%=
org.apache.struts.action.ActionMessages.GLOBAL_MESSAGE %
bean:write name=message/
Hi All,
I am coming up against a limitation of using DynaActionForm that I wonder if someone
can confirm or deny.
All our Action classes extend a SecuredBaseAction. This SecuredBaseAction does a few
important things per request like making sure the user is validated and also loading
page
Please tell me Y are you using the shaded code when the classes being used
are depricated.
If i use this:
html:messages id=message
property=%=org.apache.struts.action.ActionMessages.GLOBAL_MESSAGE %
bean:write name=message/
/html:messages
i get no message in my
hei
just check this :+
Are you setting attribute message=true ?
html:messages id=message message=true blah...blah blah
Thanks.
Jitender Kumar C.V.
Now it works
Thank you very much!!
Jitender K Chukkavenkata schrieb:
hei
just check this :+
Are you setting attribute message=true ?
html:messages id=message message=true blah...blah blah
Thanks.
Jitender Kumar C.V.
Now, my understanding was that DynaActionForm manages to populate a map of
form fields, match them up against validation rules, and if it fails, it
would KEEP the previous request but add errors into it and FORWARD back to
the view, therefore KEEPING all the request attributes. It does not
Return Receipt
Your problem in db access
document
:
Return Receipt
Your suggestion needed.
document
:
Hello Friends,
This is Kranti Parisa, Software Engineer.
I am working with Patni Computer Systems Ltd.
Our Project is using the Struts Framework.
So I will be in this mailing list from 2day onwards...
Have a nice time..
Bye for now
Kranti Parisa
I would agree with him. I can suggest you the same.
Jitender Kumar C.V.
Waaarm welcome Kranti...Have funn...
Jitender Kumar C.V.
but that's bad practice. very bad.
-Original Message-
From: Jitender K Chukkavenkata [mailto:[EMAIL PROTECTED]
Sent: 17 September 2004 12:51
To: Struts Users Mailing List
Subject: Re: DynaActionForm and previous request attributes (no answer
found in archives for similar problems)
Hi Jitender,
Thanx for ur warm welcome...
Hey r u from A.P.??
'coz ur names look like that..
iam from A.P., VIJAYAWADA
anyways it doesnt matter..nice to meet u ...
--
Kranti
On Fri, 17 Sep 2004 17:23:38 +0530, Jitender K Chukkavenkata
[EMAIL PROTECTED] wrote:
Waaarm welcome Kranti...Have
what I have already described in some detail. the use of base actions is a good
pattern to use as one can group common behaviour into them, such as authentication or
ensuring other properties. in our case we do both, security AND ensuring some session
lists for user (i.e those things that make
how to invalidate the session when user clicks the close(cross) button
which will display at the right side of the browser when we open a
page..
On Fri, 17 Sep 2004 08:01:45 -0400, James Mitchell [EMAIL PROTECTED] wrote:
What is 'bad practice'?
--
James Mitchell
Software Engineer / Open
Hello world,
Maybe, it's not designed for that, but i wonder if i can
use data-source /data-source struts conf to access a local
file system (file://...) ?
I know this request is a bit strange, but it's for a very
temporary solution. No sql server available for the moment ...
Is it possible?
managing a request attribute in the session by setting it and then making sure we
pop it out at the view is messing and defies the semantic use of the request scope.
that's why it is bad practice.
Don't shoot me if I'm wrong but HTTP is stateless so without any of:
cookie, session, browser
You would need a JDBC driver that supports file based storage. You are
better off using HSSQLDB. I can help you with that.
--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message -
From: liooil [EMAIL PROTECTED]
To:
You can put JavaScript on every page that will attempt to send the browser
to a specific url when the browser is closing, but that would be browser
specific and it is VERY likely that your action will never get called for
most users. This is the web, if you want that feature you will need to go
when i submit my form to the action, the action maps my form to a DynaActionForm and
binds the values.
now, along with my form, i actually do submit something called PID (page id) which is
the current page at time of submission. therefore, my dyna form will have the page id
for which i need
yes, please. I would appreciate your help
so let's go...
Where i can i fin such a JDBC connector ?
And how i configure/use it ?
Thx,
___[ Pub ]
Inscrivez-vous gratuitement sur Tandaime, Le site de rencontres !
not quite .. when i arrive initially at the view governed by somePage.jsp yes, there
are a bunch of request attributes set up. on this page is my form. as a hidden
variable to the form I copy the existing page id because this must be present for our
SecuredBaseAction to know what properties to
Hello,
Is there some sort of Struts tag that I can use to set the property of a
bean?
I have a small fragment that I want to look like this:
logic:equal name=formBean property=event.date value=
%-- Set the event.date property on formBean to a default value --%
/logic:equal
html:select
Is there some sort of Struts tag that I can use to set the
property of a bean?
I have a small fragment that I want to look like this:
logic:equal name=formBean property=event.date value=
%-- Set the event.date property on formBean to a default
value --% /logic:equal html:select
I was hoping for something like this. Does JSTL understand the dot notation
like Struts tags do?
==
==
Try JSTL:
c:if test=${empty formBean.event.date}
c:set target=formBean property=event.date value=1/1/2004/
/c:if
Note: this code has not been
I was hoping for something like this. Does JSTL understand
the dot notation like Struts tags do?
Not quite sure what you mean. Certainly JSTL's EL (expression language) is
the same as that used by the Struts-el tags.
--
Tim Slattery
[EMAIL PROTECTED]
By dot notation I just mean the dot notation for properties, like event.date
really means getEvent().getDate().
Thank you very much for your help!
-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
Sent: Friday, September 17, 2004 9:08 AM
To: 'Struts Users Mailing
By dot notation I just mean the dot notation for properties,
like event.date really means getEvent().getDate().
Of course JSTL honors that convention.
--
Tim Slattery
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL
I'm having a challenge getting the Validator plug-in to work. It's my first crack at
it, so forgive if I'm missing something obvious. Better yet, if I am missing
something obvious, tell me what it is.
When I call up my action, I'm getting a Resources not defined for Validator
exception. My
I use WSAD 5.0 for dev and out of nowhere it started using up all my
machine's memory (1G). There's not much in the log which is below. While
I'm waiting for support to call I was wondering if anybody has ever seen
anything like this? This is happening when all I'm doing is editing a file
I experienced this last week, had to rebuild my projects and update WSAD to
5.1. Just out of interest are you working for IBM, I know they are doing
some work there.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Do you have the plug-in set in the struts-config.xml?
Dave Bender
[EMAIL PROTECTED]
Dave,
On Fri, 17 Sep 2004 09:26:18 -0500, Dave Bender [EMAIL PROTECTED] wrote:
snip
When I call up my action, I'm getting a Resources not defined for Validator
exception. My logs say:
87406 DEBUG [HttpProcessor[8080][2]] org.apache.struts.action.RequestProcessor -
Validating
Fixed.
It needs to use the ${ } notation in c:set like shown below:
c:if test=${empty formBean.event.date}
c:set target=${formBean.event} property=date value=10/7/2004/
/c:if
Thanks to everybody for their help.
-Original Message-
From: Asleson, Ryan
Sent: Friday, September 17,
Dave,
On Fri, 17 Sep 2004 10:20:53 -0500, Dave Bender [EMAIL PROTECTED] wrote:
snip
I'm concluding that if I have multiple modules, I need the Plug-Ins plugged into
each module, correct? The benefit being I can keep validation rules contained in
different files for different modules if I
On radio buttons
http://www.jguru.com/faq/view.jsp?EID=1028442
has helped me. With the special problem you described. Can you set the
value somewhere in the session and pick it up again in the second
form's reset method? Maybe I didn't understand your problem entirely...
Ricardo Gladwell [EMAIL
Seyhan Basmaci wrote:
Hi,
We have upgraded to Struts 1.2.2 , but we have encountered a problem. Embedded
JavaScript validators use the following code
function validateRequired(form) {
var isValid = true;
var focusField = null;
var i = 0;
var fields = new
This it test mail. Kindly ignore it.
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
As per the Tiles Definition file syntax
In the tiles definition we can specify the role
(Role to be checked when definition will be inserted in a page.)
Similarly, It is possible to associate a role with tiles: put attribute.
I'm intending to allow the definition to be used based on the
Martin Schaefer wrote:
Can you set the
value somewhere in the session and pick it up again in the second
form's reset method? Maybe I didn't understand your problem entirely...
Thanks, that worked perfectly :) But, the JavaDoc states that the
reset() method should not be used for initialisation.
FYI
Regards,
Matthias
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Takashi Okamoto
Sent: Friday, September 17, 2004 6:23 PM
To: [EMAIL PROTECTED]
Subject: [Myfaces-develop] [FYI] Nirvana - HTML2JSF converter
Hi,
I would like you to inform Nirvana
If you want to have a default value, simply set the default value in the form bean.
Eg :
XYZForm{
String name = Ryan;
public String getName(){
return name;
}
public String setName(String name){
this.name = name;
}
}
-Original Message-
From: Asleson, Ryan [mailto:[EMAIL
We cannot put a method inside another method.
When using the Struts, we start with:
public final class MyClass extends Action
{
public ActionForward execute( ActionMapping
mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response )
Isn't an Action's 'input' parameter supposed to be context relative?
I thought that it was supposed to be, but I'm seeing otherwise when
my form, which is in a module, fails its validation test.
Instead of returning to the input form, it is forwarding to the input
form prefixed with the module
After thinking about the flavors of Dispatch actions I use, and after
having used them as my primary type of Actions for the past 3+ years,
I've decided to go back to just using regular Actions. I like the
modular self contained Actions.
My question is more of design practice for those that
I would write a Struts Plug-In (very easy) and initialize the
smtpServer variable (and similar variables) there, making the
configured value available to the rest of the application (including
your Actions) by setting an Application scope attribute (this also
abstracts the configuration so
I have a problem and a proposed solution. I would greatly appreciate any feedback
about the proposed solution.
Problem:
===
I'm currently using a Struts application with a connection pool (using DBCP as
supplied by Tomat). When a database update is needed, the Struts actions will call
Overload each existing DAO method with a secondary method that accepts
the Connection as a parameter instead of getting it on its own. Then let
your service layer object obtain the Connection, set autocommit to
false, invoke all the DAO methods you need, passing the customized
Connection to
I personally use #3. In fact, all my projects have a pretty
internally-standard packaging scheme (my own creation)...
com.company.project
|
*---actionforms
|
*---actions
|
*---business
|
*---config
|
*---daemonthreads
|
*---exceptions
|
*---listeners
|
*---plugins
|
Forgot to mention, although you probably guessed... Any other class
specific to the app that doesn't fit any of the categories (things like
helper classes used in may different Actions) are in com.company.project.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
Frank W. Zammetti (MLists) wrote the following on 9/17/2004 2:54 PM:
I personally use #3.
snip
com.company.project
|
*---actionforms
|
*---actions
|
Won't you end up with a TON of Actions though in one package?
EmployeeUpdateAction
EmployeeDeleteAction
EmployeeSearchSetUpAction
Rick,
I have been using the following package layout for a while and it seems to make sense.
For example, let's say the foo web application consists of various sub applications
like
account, store, product download, etc
com.acme.applications.web.foo.account.action
Yes, that's exactly what happens. I understand your approach, even like
it! :)
I think what it comes down to is do you break things up in an
object-oriented way or a functional way?
It can be argued that done as you say, you are breaking it up based on
objects, which mimics how we generally
Robert Taylor wrote the following on 9/17/2004 2:58 PM:
com.acme.applications.web.foo.account.action
com.acme.applications.web.foo.account.service
Yea that was my option 2 I posted. I'm still debating about this one as
well. I can see both approaches being decent:
I had thought about this but it involves duplicating each DAO method. Also
if I ever wanted to switch to EJB I would have to undo all of the methods
again. Its definitely an option though. I was just hoping for something
that would involve less changes to my DAO's.
Thanks for the feedback.
Yep. I usually bunch all action type stuff in the action package.
Like forms, action utils, value objects used in actions, etc...
I guess it more or less represents the presentation part of the package
and the service represents the business part. I only see a need to dissect
it into these two
Sean, have you looked at Spring? It uses AOP and you can set up transactions
declaratively.
I'm just starting to investigate using Spring and I'm really impressed.
Like you I had a requirement to demarcate transactions at a high level so that
all business objects within the transaction were
Why not write an InitServlet that is set to initialize prior to the struts
ActionServlet in web.xml? This could override the init() method and provide
the services you need.
From web.xml
!-- Init Servlet - loads logging (log4j) --
servlet
servlet-nameinit/servlet-name
You summed it up perfectly. And that test case works for me too. As does
my own now. I've no idea what I changed between last night and now, but
everything's now fine! I'm glad of that but I hate mystery bugs...
L.
Kris Schneider wrote:
This worked on TC 5.0.28:
/WEB-INF/tags/tag1.tag:
Why can't you call the init() method from inside the execute() method (at the
beginning of it )?
Anna
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Fri 17/09/2004 2:06 PM
To: [EMAIL PROTECTED]
Subject: No Way to Put the init() Method Inside the
We use option one - separate packages for actions, forms, dao, services,
util, etc.
Rick Reumann
[EMAIL PROTECTED]
hihi all,
has anyone encountered a SAX xml parsing error due to some
property/attribute of a physical file?
i'm getting that right now. an xml file created by a legacy VMS system
is causing SAX parsing exceptions. BUT, if i copy and paste the
contents of that file into my own file, i don't get
what about using the crossContext feature of tomcat? (and here i go out
on a limb without checking how sturdy it is, but I can't find much docs
on this) Could I set up a servlet that was just a bunch of JSP's that I
use in all the apps?
too many questions ;)
On Fri, 2004-09-17 at 08:32,
I have a site running on a third-party box that uses Apache in front of
Tomcat. I need to restrict the entire site to a series of IP addresses.
Using the Deny, Order and Allow commands in a .htaccess file works for
whatever is in Apache's public document root. However, it doesn't
prevent
Hi,
After reading the email archives and the documentation, it is clear that
the html:link tag cannot be used with a module attribute and a page
attribute at the same time. I was just wondering why this is? Is there a
strong reason this was not implemented, or is it just a piece of missing
You could take a look at the Spring framework - very cool!
|-+
| | Sean Schofield |
| | [EMAIL PROTECTED]|
| | chof.com|
| ||
| | 09/17/2004
Don't know about Apache, but what about configuring Tomcat - doc say there
are remote filters which looks like they would do what you want:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/valve.html
Niall
- Original Message -
From: Erik Weber [EMAIL PROTECTED]
To: Struts Users
Thanks Niall.
The problem is, some stuff is served out of Apache's doc root, while
other stuff is served by Tomcat. I am hoping to find a central place to
install the IP restriction.
The valve won't restrict what is in Apache's doc root, and the .htaccess
file won't restrict what is dispatched
Has anybody integrated JTidy or any of the other HTML-prettifiers with
Struts? I find Tidy does a good job of cleaning up JSPs, which tend to get
pretty spaced out particularly when there are lots of includes, but I don't
have a clear idea of where it would plug in. Would it make sense to put
Hi
I have not used Struts with Jtidy but I've used the two technologies in
different projects. The way I see it you create a servlet filter that uses
the Tidy.parse method to parse the JSP output. Then you map the filter to
the main JSPs that includes the rest of the content. Everytime the
90 matches
Mail list logo