We are running Struts with Weblogic 6.1sp2 with no particular problems.
AFAIK, there shouldn't be major problems setting up the environment...
The only issue we have (still) is with file upload. All the rest works
smoothly..
asd asd [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
All,
this may be somewhat OT, but it may be worth a short discussion (though this
message is pretty long) :)
We're using Struts (of course!) as part of a J2EE architecture that also
includes EJB. To clearly separate the validation processes, we use the
Struts Validator to perform the
Hello,
the new version of the Form-to-VO and VO-to-Form mapper is now available at
http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp
It allows you to perform in ONE line of code the mapping between
ExampleForm
+getLastName:String
+setLastName(String)
+getDateOfBirth:String
this, it probably
doesn't have the servlet reference set on it.
ServletContext application =
getServlet().getServletContext();
Otherwise what you are doing should be fine.
David
--- Sobkowski, Andrej [EMAIL PROTECTED]
wrote:
Hello,
I've been using the Struts Validator (nightly build
Hello,
I've been using the Struts Validator (nightly build of November) with no
problems for a few months (great work!).
Now I need to call the validation method of a specific nested form based
on a condition:
ParentForm
+useChild: boolean
+getChildForm:ChildForm
If useChild returns true, I
Hello,
check out Arron's nested tags site:
http://www.keyboardmonkey.com/struts
In general, there's nothing you _need_ to do to use nested forms, it's a
built-in functionality of Struts (I'm using a nightly build of the end of
November). In other words, when you define your JSP property
What about using reflection? You can automatically loop on all your get
methods and store them in a Collection without having to do it manually. The
problem with this is that you can't control the ordering... I don't know if
it's acceptable for you.
Another good thing of automatic reflection is
Arron,
I use it and I like it :)
Andrej
-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 9:01 PM
To: Struts Users Mailing List
Subject: Nesting Beans/Iterators/Logic tags whatever else...
Some people on this list have been
Hmm, not sure this is the place to ask this kind of questions...
Anyways, here you go. Define a rule saying that:
- when a message arrives...
- ... any messages coming from [EMAIL PROTECTED] should be
moved to a separate folder ...
- ... except the ones addresses directly to you or where you are
Hi All,
after reading a lot about problems related to mapping an ActionForm (somehow
a set of String properties mapping the data on the Presentation layer) to
more business-oriented objects (Value Objects for example), I've written a
simple mapper that will allow you to:
- keep 'em separated
Sorry, it looks like the ZIP file is corrupted. I'll fix it tonight so that
the code is available tomorrow. The documentation should cover most of the
details required to understand the main principles of the package.
Thanks.
Andrej
-Original Message-
From: Sobkowski, Andrej [mailto
The _Struts library_ (struts.jar) must be in your Weblogic classpath (and
it's not in your case, as it doesn't find org.apache.struts.action.Action.
Three solutions:
- add struts.jar to your system CLASSPATH
- add struts.jar to your Weblogic classpath by modifying the startup script
(something
Small addition to my previous message (sorry, I responded without reading
with too much attention):
- if yours is a *.war archive only, then adding struts.jar to your
WEB-INF/lib directory should work. My previous suggestions are still valid
but may not solve the problem.
- if yours is a *.ear,
, or as an
.ear with a web app component.
It's not then visible to the EJBs, since the EJB classloader
is a parent of
the web classloader, but that shouldn't matter - EJBs don't have any
business using Struts classes, right?
Sean
- Original Message -
From: Sobkowski, Andrej [EMAIL
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
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
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
the validation process distinct from the Action; if
possible, the call to the validate(..) method should be hidden and
automated. If it's not possible, I guess I'll survive... :)
Thanks.
Andrej
-Original Message-
From: Sobkowski, Andrej [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001
Hello All,
I'm trying to use the Struts validator but it doesn't seem to be working in
my - relatively common - case.
I have a modify.jsp page that is displayed upon calling
/modifyAction?command=init (using the DispatchAction). No validation must be
performed at this point. The user then
Hello,
two comments/questions:
- in my opinion, sorting data is somehow business processing. Suppose that
you have a long list of results that is paged (ie. retrieved in chunks from
the data store). Sorting the data using a different criteria may involve
re-accessing the data store to retrieve a
Hi,
are you sure it's
jsp:getProperty name=thisCr property=getModel.title/
and not (note the change getModel - model)
jsp:getProperty name=thisCr property=model.title/
I guess you want to call yourBean.getModel.setTitle(..). My 2c..
HTH
Andrej
-Original Message-
From: [EMAIL
Hello,
mixing your ActionForms with your business objects is not optimal. You will
lose the ability to use more business-related types such as
java.util.Date (ActionForms mainly allow String only) - and also somehow
break the layered architecture (separation vs business processing).
Check out
Use tokens (chech out the *Token*(..) methods in the Action class) to ensure
that the user submits the form only once...
Andrej
-Original Message-
From: Frédéric Houbie - ABSIS-GROUP [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 10:09 AM
To: Struts-User
Subject: Quickly
Beth,
I haven't compiled the following but I guess you should use either
Integer.valueOf(String).intValue() OR
Integer.parseInt(String)
that return an int instead of String.valueOf(int) that returns a String.
A second suggestion would be to use the logic JSP tags greaterThan or
similar.
Ex:
errors.add(customerror, new ActionError(error.customFileError, ,
9);
with
error.customFileError = Can't process file {0}. Error in line {1}
HTH
Andrej
-Original Message-
From: Régis Melo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 8:00 AM
To: [EMAIL
eform = (EmployeeForm) form;
employeeManager.add(eform.getEmployeeVO());
}
}
etc... very simplified example, but hopefully this is a bit clearer... I
use this all the time, and would be interested to hear what other ppl
think as well...
cheers
dim
On Thu, 22 Nov 2001, Sobkowski, Andrej
this all the time, and would be interested to hear what other ppl
think as well...
cheers
dim
On Thu, 22 Nov 2001, Sobkowski, Andrej wrote:
Michelle,
thanks for your reply... but I'm not sure I understand your answer.
Probably
my message wasn't clear.
To use
Hello,
we're working on a quite large project with J2EE (including EJBs) and we're
using Struts (we're still in the early phases). To design a clean
application, I've defined different object conversions:
* Request phase
- the ActionForm is converted to a Value Object
- the Value Object is
Careful:
!-- jsptag / --
The JSP tag will be evaluated (though not shown on the browser since the
results will be commented out. And yes, they'll be visible by the client.
%-- jsptag / --%
The JSP is not evaluated and the commented part will not be sent to the
resulting HTML page
At least I
to the back end (no unnecessary
handling of the data).
HTH,
Michelle
From: Sobkowski, Andrej [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Design question - Action Form vs Business Delegates/Value Objects
Date: Thu, 22
Hi,
you can try something like:
!-- This is JS stuff - see link below if interested --
script language='JavaScript' src='/javascript/AnchorPosition.js'/script
script language='JavaScript' src='/javascript/PopupWindow.js'/script
script language='JavaScript'
Hello,
This may be OT but... I'm trying to find the best way to define reusable
HTML components in Struts since we have a lot of pages with quite a few
common pieces. For example, I'd like to reuse:
- a date field with a popup Javascript calendar
- a set of phone fields (regional code, number,
Hello,
I guess you could subclass ActionServlet and overwrite an existing initABC()
method:
public class MyActionServlet extends ActionServlet {
...
protected void initOther throws ServletException {
super.initOther(); // don't forget this one.. :)
myInit();
}
protected void
Rob,
here's an message I sent a few days ago. It relies on Javascript which isn't
optimal... but it does the job.
Andrej
START COPY-AND-PASTE
Why don't you separate the value displayed from the action sent using a
Javascript method:
script language=javascript
function
Hello,
I just wanted to post this message as I've wasted 2 hours trying to
understand what was wrong and I finally got it. There have been many
messages related to using Javascript to submit to different actions so I
hope someone will find the following useful.
* Situation (that generates an
Hello All,
by using a JSP tag to check if the user is logged, aren't you mixing somehow
logic and presentation? In theory, you should provide a way that is
independent of the fact that you store your user in the session (though
Struts does it that way). Furthermore, you may need to not only
Why don't you separate the value displayed from the action sent using a
Javascript method:
script language=javascript
function submitWithAction(action) {
document.yourFormName.action.value=action;
}
/script
input type=hidden name=action (this can be generated with
html:hidden)
html:submit
39 matches
Mail list logo