Hi,
I am new to struts, so I don't know clearly about it. Can anybody explain to
me the roles of struts in an web application?
I saw some versions of struts available at struts home page (e.g. binary,
source or something like that). Could you give me the differences between
these versions?
By
*.tld's are resources of your aplication so you must put it under your
root directory. WEB-INF directory contains your private files, those
files will not be serve to the client. If you put the files out of
WEB-INF but under your root directory they will be public and visible
for anyone.
Java
Hi
my problem is : how to make GenericDataSource visible to JNDI ?
I need to interface a CachedRowSet object - BTW, is there anybody out here using
Sun's CachedRowSet ? - with struts's GenericDataSource in a struts-based
application. CachedRowsSet can connect to a DataSource object using
I followed your instructions, struts-config.xml is red as the action
mappings
trace appears in the cmd shell from which I start orion but when I access
the
struts-example (or any other one) I got the damned HTTP 500 Internal Server
Error
By the way, moving only the org/apache/struts/resources
unsubscribe me
Hi,
To help me, please follow these instructions :
Launch the struts exemple.
go to : struts-example/editRegistration.do?action=Edit. I will call this
page the dashboard.
Then, add a new url and save it. You will be back to the dashboard.
If you decide to refresh the page, your browser will
unsubscribe me
Hi,
I have this code:
form:form action="logon.do" focus="username"
Username: form:text property="username" /br
Password: form:password property="password"/brbr
form:submit value="Logon"
onclick =
unsubscribe me
unsubscribe me
Hi,
I 'am using staruts for a small pilot project.
On the form bean when validate method collect errors and shows in JSP,
I want at the same time my cursor should move to the first error field. how
I can acheive this..
does anybody knows about this...
Thanks N Regards
TAHIR IQBAL
Information
Please unscbscribe me from the Struts mailing list..
thanks
Avinash
unsubscribe me
Using struts ? I don't think such a mechanism is built in struts. With my
previous client i have done something similar to thisThe logic goes like
this...
In the BODY tag, use a conditional if-else statement.
Basically your errors are encapsulated in an errors session object.
In the if{}
I'm looking for comments on the multi-page form thing I posted about
yesterday.. For those that missed it:
http://garion.appliedtheory.com/Forms_with_Struts.html
I think it does a fairly good job of seperating the page flow for a
form, from the ActionForm and Action classes.. It requires a
Hi
I am trying to iterate through the values of a Hashtable hotspots... below
is the code that i am using to do this. I have floorplan in session scope
and floorplan.getHotSpots() returns the hot spots. I know that i need to
have HotSpotInfo bean in page scope but i am not sure that i am doing
Here we go. (sorry for the delay)
Please note we have modified Struts text tags but disabled options like
JavaScript events (like OnClick) as we do not use them. This may be a
problem for some of the users.
Biju Isac
(See attached file: DateTag.zip)
My ActionForm contains another JavaBean along with native types. For
example:
public class MyForm extends ActionForm
{
public void setString( String str);
public String getString( );
public void setData( MyObject str);
public MyObjectg getData();
}
I have this working fine right now but the
Hi,
I want to output a ResultSet as HTML-table in a JSP.
This should be a very general request.
Has anyone an elegant solution who wants to share?
Gru
Michael
--
Java - write once, run anywhere
I have done this using nested Iterate tags. I built a vector out of the
Result set and then did as follows:
logic:iterate id="eachrow" name="resultsvector"
tr
logic:iterate id=eachcol" name="eachrow"
tdbean:write name="eachcol"//td
/logic:iterate
/tr
/logic:iterate
-Original
Hmm I didn't catch that nuance... thanks for pointing that out, it does
indeed change the picture.
In any case, I finally got my own application to work as intended --
using one JSP page, one ActionForm, and one Action --
1. The JSP page's initial invocation notices that there is no
Here is the trace I got for struts-test, the log files don't mention any
error.
The only thing that I see is the line "Not registered, use system
identifier"
Olivier
Orion/1.4.5 initialized
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN',
Olivier,
Thats looks like my trace, but can you post your
global-application.log file found in the orion logs directory?
Shawn
-Original Message-
From: Olivier Baujard [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 3:49 AM
To: '[EMAIL PROTECTED]'
Subject: RE: FIXED:
Vincent Dussud wrote:
Is there a solution ? Can i specify a 'redirect' tag instead of 'forward'
tag in the struts-config.xml (in order to have the right url :
editRegistration.do)?
As far as I know this is the way struts is supposed to work.
Struts is ment for building web applications,
not
There is a method something like:
html:errors property="firstName"/
[EMAIL PROTECTED] wrote:
Hi,
I 'am using staruts for a small pilot project.
On the form bean when validate method collect errors and shows in JSP,
I want at the same time my cursor should move to the first error field. how
This is really not realistic. I did try adding an errorPage directive to my
JSPs. This didn't help either. It didn't catch these.
I'm having a design problem with my system, which is not really Struts
specific, but since there are a lot of EJB users here, I thought I'd
throw it on this list for comments --
My business logic is all implemented in a Stateful EJB Session bean. All
Struts users get one instance of the
HI,
Does anybody know the trick how I can disable all or some text fields on JSP
to make sure use can not change anything on the form..
Thanks N Regads
TAHIR IQBAL
unsubscribe me
Hi all,
I've just installed struts 1.0b1 (JBoss with embedded Tomcat 3.2.1, and jdk
1.3 under WinNT 4.0), and although most pages in the sample apps work
properly, I'm hitting errors in several of them.
They arise in the three examples of "HTML Tags" in struts-test, as well as
in index.jsp and
I'm not sure about this, but I think you could return
true and then it should submit too.
David
--- "Dorai, Harish (c)" [EMAIL PROTECTED]
wrote:
It seems the "onclick" event overrides the submit
action and hence your form
is not getting submitted. Instead of using
"form:submit" use the
IE accepts the readonly attribute on the input field.
However, Netscape ignores it.
Therefore, to be safe, you should handle this in your action.
[EMAIL PROTECTED] wrote:
HI,
Does anybody know the trick how I can disable all or some text fields on JSP
to make sure use can not change
i also got this problem in weblogic but when we refresh the browser it seems
to work fine.
-Original Message-
From: Scott Cressler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 11:22 AM
To: '[EMAIL PROTECTED]'
Subject: Problem finding classes after forward
I'm trying to
I have used the CacheRowSet however I get the
connection from GenericDataSource manually and
associate it with the CachedRowSet.
You might want to do a search at JavaWorld, there was
an article within the last 5 months that talks all
about the CachedRowSet.
--- Christophe ThiƩbaud [EMAIL
Many apologies for resending this, but I had not finished subscribing when I
sent it the first time, and I don't know if it was, therefore, filtered out
(since I didn't receive it ;-).
Sorry, but I'm still having the problem described below:
-Original Message-
From: Scott Cressler
So how did that work out? Putting "unsubscribe me" it in the subject and the
body was a good try. If it didn't work try the following:
To remove your address from the list, send a message to:
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Thanks a ton for clarification on this.
Shelly
Ana Narvaez Vila wrote:
*.tld's are resources of your aplication so you must put it under your
root directory. WEB-INF directory contains your private files, those
files will not be serve to the client. If you put the files out of
WEB-INF
While "walking through the example application", I came across this
quote:
"When we've introduced these type of mappings before, and mentioned that
the struts-config.xml was parsed when the ActionServlet was initialized.
But we should make it clear that when the Struts digester parsed this
Do you have an example of how you'd control this in the Struts action, as
I'm having the same problem with Netscape and can't solve it.
Thanks in advance for any help.
-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: 05 April 2001 16:22
To: [EMAIL PROTECTED]
We do not currently use ActionForms, so Im not sure if that would be a better
place to do this, however, here is what we have done.
We have not yet added security to fields depending on the user, however, that
should not be too big of a deal to add.
We have a set of fields that may never be
It's in the subscription.jsp look for the
logic:equals action="Delete"
Firmin David wrote:
Do you have an example of how you'd control this in the Struts action, as
I'm having the same problem with Netscape and can't solve it.
Thanks in advance for any help.
-Original Message-
The controller servlet (ActionServlet) is responsible for identifying the
action form and populating it with data from the request, before calling the
perform() method on your actioin class. So you are correct that the code
from EditRegistrationAction will never execute (why is it there then???).
Hi Bryan,
Can you put the stateful session bean within a JavaBean with synchronized
methods so that all access to the stateful session bean is through the
JavaBean?
--Abraham
-Original Message-
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05,
Hi Scott,
This might be a problem with WebLogic. I think this problem is prevelant in
WebLogic 5.1. You might want to do a search on ClassCastException in the
WebLogic 5.1 docs and newsgroups.
--Abraham
-Original Message-
From: Scott Cressler [mailto:[EMAIL PROTECTED]]
Sent:
this means that the struts digester allows you to define some application
logic DECLARATIVE instead of PROGRAMMATIC (hard coded)
i would say this is *pretty* cool ;=)
joe
At 18:31 05.04.01, you wrote:
While "walking through the example application", I came across this
quote:
"When we've
Ummm, I'm not using WebLogic ;-)
I've figured out some of the problem. I can't do a jsp:useBean of my
formBean because (in ActionServlet.processActionForm() ) the bean is put
into the request as an ActionForm, not as my class. So I can cast it to
ActionForm, but not to my class
Thanks,
That proposal would probably work, but it might be a little
over-complicated (although I am starting to suspect that every solution
is going to be yucky). I think I couldn't do your idea with just a
simple bean with a simple syncronized getter method; instead, the
wrapper bean would
I think that's the way you'd want to go. Essentially you're sharing the
reference to the EJB across mutliple threads, which kind of violates the "1
client - 1 instance" doctrine of stateful session beans (kind of in that
it's the same logical client, but two physical instances of client, if you
Now that I think about it, perhaps a solution to this would be a great
general-purpose configuration feature for Struts. On a
per-web-application level (e.g. in struts-config.xml), there might be an
option such as:
syncronize_requests = x
where x might be:
none - the default -- the
I usually try to stay far away from doing lock/unlock type things with
threaded access - really testing it can get too hairy, and problems tend to
be hard to trace.
The practice we use here for EJBs is thus (it's actually not too hard to do,
and hides the fact that you're using EJBs from the
I am having a common problem all over the place.
Struts allows you to associate a bean(the ActionForm)
with a given .jsp. It then magically gets and sets
input fields for you. Great.
But all of the other struts tags require a reference
to a bean by name, using the name="foo" argument
to the
I like this. I have seen the business interface idea described before but I
like the handler as a way to hide EJB calls from the front-end code. Do you
typically access entity beans from stateless session beans or do you call
entity beans directly from the front end? Do you have business
So in your scenario (as a proposed solution to my problem), I would add syncronization code to xxxHandler.java?
That seems elegant; I had never thought of implementing a separate handler
class for my EJB's, although it's always been on my "to-do" list to try having
Bean and Remote implement a
The form bean is associated with an action, not a jsp. The jsp may contain
an html:form which references an action, thereby gaining access to the form
associated with that action. A jsp could have multiple html:forms.
The form bean associated with the action is available in request scope for
Let me ammend my comment. The formbean will only be available in the jsp if
the action that forwards to that jsp specifies the form when it is defined
in struts-config.xml. Otherwise the formbean isn't created until the jsp
submits to the action that is defined as having the form.
I don't disagree that DECLARATIVE logic is pretty cool. I'm simply
interested in a practical example so I can see how to do it using the
Struts framework. Where do you put the declarations? In
struts-config.xml? Is there a required or recommended format? How do
you access the properties of
I was just looking at this code to try to figure out my problem (Problem
finding classes after forward (resend)). I have learned some things,
although I wouldn't say I really understand all of them, yet.
When you go into the ActionServlet and are being directed to an Action, if
there is a
Hi all,
Is it possible to convert the below HTML into a struts tag ? Thanks
for your information.
input type="submit" name="%= Constants.SEARCH %" value="bean:message
key="searchResource.search"/"
p.s All names are declared in a Constants file so that they can be
accessed
You are using redirect="false", correct? It shouldn't matter what type is
used when the action form is put in the request. setAttribute takes an
Object so you can put anything in there but it will actually be the type of
the form bean specified in struts-config.xml. Can you submit the section of
OK, problem solved!
The problem was a (for me) very esoteric aspect of Java. The class loader
used when loading the class when it was created (within struts) was
*different* from the class loader used when attempting to load the class,
e.g., for casting, within my .jsp files. This made a
Problem solved. See solution in response to RE: how to access related
ActionForm from within .jsp?
Scott
-Original Message-
From: Scott Cressler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 11:03 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Problem finding classes after
Thanks for your advice. I really just wanted
to prevent having to duplicate hard coded form bean
names, i.e. in my jsps and in the config.xml.
I wrote a tag to get it from the action mapping,
but alas, that didn't work either. For one, my
action mapping was null(probably some misconfig on
my
I use DiskMultiPartRequestHandler to handle file uploads.
When I upload a file on Netscape Communicator 4.77, for some reason some of
the bytes are dropped. The same file uploads fine on Netscape 6.0 and IE.
Foo.ear, for example, is 63818 bytes on NC 4.77 while it's actual size of
64754 bytes
Hi - I'm working on a web application and trying to implement a multi-page
form (wizard style), with 'Next' 'Back' buttons on each page to step
forwards back through the wizard. Is there a 'struts' way of doing this?
Currently, I'm trying it with 1 ActionForm class and 1 Action controller.
It looks like this:
!-- Login --
action path="/login"
type="com.vantra.volts.core.action.LoginAction"
name="loginForm"
scope="request"
I followed the instructions on installing Struts with
WebLogic 5 on Solaris and I ran into some problems.
When I startup weblogic the example war file seems to
deploy ok. However, when I try to run
http://machinename:7001/strutsexample it throws the
following exception below. (I also included
It looks like your struts-config.xml is good but
when you say is hangs, what do you see in the log or
dos window.
Also which browser are you using? Does the browser
return an error message after timing out?
Can you view source on the blank page?
Can you system.out.println in the action
Can you make that you are pointing to the classes directory of the web app
and struts.jar on
the WEBLOGIC_CLASSPATH. And I would look also make sure SP8 is installed.
--Abraham
-Original Message-
From: Meredith Kurry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 5:31 PM
I wish I could help you further but I am not familiar with servletmill or
Powertier.
It sounds like it is a servletmill issue.
Can you get a simple example working. For example mainmenu.jsp just prints
out "Got Here" the
Action classes just return mapping.findForward("success") and the other
Yup,
that's where I would put the synchronization. At first guess I would think
this would be simpler than the general purpose approach, because you've placed
all responsibility for synchronization in a distinct spot - the
xxxHandler. Any user of the handler doesn't have to even think about
How are you gentlemen!! Somebody set up me the bomb.
I have installed Struts OK, and I've even run the 'struts-example'
application (which means that Struts is working fine with me otherwise.) I'm
trying to create a small application, but I am having problems.
When I type
Hi struts-user,
I know locale of user saved under the org.apache.struts.action.Action.LOCALE_KEY key
in his session object .
But now I want to maintenance it in my own object.
So other class of Struts may not work rightly such as taglib.MessageTag .
How to resolve it except rewrite these class?
I *think* this is the struts equivalent:
html:submit property="%=Constants.SEARCH%"
bean:message key="searchResource.search"/
/html:submit
You may be able to get by without the property attribute, though.
"Nanduri, Amarnath" wrote:
Hi all,
Is it possible to convert the below HTML
Good grief -- what a twistly little maze of passages,
all alike (or was that, a maze of twisty little passages, all alike?) Thanks
for laying out those extra thoughts. I think you're right that the GP approach
puts too much of a burden on the client to use it correctly. I still maintain
that a
What mechanism should be used to intercept all requests in a struts
application? I'm looking for something similar to a Tomcat
RequestInterceptor but applicable only to a specific ServletContext. I want
to be able to do some housekeeping before the first call to
servlet.service() for that
I implemented your solution -- xxxHandler.java for
my stateful session bean, and a new interface which the bean, remote interface,
and handler all implement (or extend). Also added EJB creation, and method
pass-through (with syncronization) to the handler class. Lastly, changed
all my Struts code
As others pointed out, you cannot use READONLY as it does not support
Netscape. We have got around this problem by using javascript (please note
actionform/actionclass demands a round-trip back to the server). We have
used OnFocus event, basically onFocus of a readonly text field we set focus
on
77 matches
Mail list logo