I had the same problem, and besides setting the form to session scope
you could do the following: Instead of storing your list of languages in
an ArrayList, store them in an array of Strings. Then on your jsp you
should be able to iterate over this list and sent all languages via the
html:hidden ta
Where to find the struts menu tutorial?
Peter
-Ursprüngliche Nachricht-
Von: news [mailto:[EMAIL PROTECTED] Auftrag von Danny Lee
Gesendet: Dienstag, 13. Dezember 2005 10:45
An: user@struts.apache.org
Betreff: Re: Want dynamic menus
Struts menu is just fine,
works with latest stuff and
Could you post your complete action mapping and
your corresponding Action (or only the important parts?)
Peter
-
[EMAIL PROTECTED] napisał(a):
> In that case, when action mapping looks like this
> (as you wrote
In that case, when action mapping looks like this
(as you wrote in your mail before):
then you have to do the following at the end of your
action (after all work has been done):
return mapping.findForward( "ok" );
where the "ok" has to be the same in the method and in
forward name para
Hi!
If you only want your Action to forward to the jsp, and do
nothing else, use a ForwardAction like this:
The parameter attribute defines the target of your
forward action, that is your jsp.
Greetings
Peter
-
Hello,
I ha
-Ursprüngliche Nachricht-
I think in your jsp
has to be
if you have told your web.xml to map all *.do requests
to struts like this
YourAppName
org.apache.struts.action.ActionServlet
config
/WEB-INF/struts-config.xml
1
YourAppName
*.do
Hope that helps
Hi all!
I have got the following problem: an external script submits a request to my
web-app ans is not
interested what happens with it. As set in the struts-config.xml, the
request parameters are
used to populate a DynaValidatorForm, which is validated as specified in my
validation.xml.
If valida
I understand what you mean, but my example has been very simple
and only a little part of my page. I have much more text fields
on my page, and everything I need is stored in a Bean in session
scope. So using a PreAction to copy my whole Bean to an ActionForm
with a lot of properties would be a lot
Hi all!
Lets say I have a form with two text fields on a jsp page:
Both text fields are validated (I use a DynaValidatorForm) and a text is
required for both. If the user changes both text fields (lets say deletes
project and changes version), validation fails and the user is send back to
the
Hi all!
Googling and seraching the archive did not solve my problem, so
I will have a try. In my struts-config.xml, I have defined a
DynaValidatorForm and an action:
...
As you can see, this form holds a list of projects in a collection,
which has to be populated before the correspo
Hi list!
I have some problems comparing values with logic tags. I have searched the
mailing list archive,
but I only found solutions that look pretty the same as what I have done,
but it still does not
work. So perhaps someone can help. I have a bean which stores a list of
projects. Because
the si
Hi all!
I got confused when I experimented with tiles to learn how it works. Here is
what I have done.
I have created a DeafultLayout.jsp:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
TilesTest
Turning validation off and changing tiles-config.dtd into
tiles-config_1_1.dtd like suggested by Laurie Harper did not
work. So I removed the DOCTYPE declaration and it seems to work.
I wonder why the xml parser tries to connect to
http://jakarta.apache.org/ for my tiles-defs.xml, I always thought
Hi all!
I would like my web-app (using Struts 1.2.7, Tomcat 5.5.9, Windows 2000)
to use Tiles, and so I updated my struts-config.xml with a tiles plugin
In my WEB-INF folder there is the following tiles-defs.xml:
http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>
Hi!
I would like my web-app to read in a *.properties file at startup (not for
i18n, but the good old
java.util.Properties, for example to get the e-mail address of the admin of
the web-app). So
I wrote a ServletContextListener which will load the properties-file and
store it into servlet
context
Hi!
I wolud like to do the following:
If an Action catches an Exception, I would like to forward to an error
page that shwos some general message, such as "There has been
an error accessing tha database." But I would like to provide a
link or something else (which is shown to for example all admi
Hi!
I have extended the RequestProcessor's processPreprocess() method
in order to perform a simple user authentication mechanism using
cookies. If a cookie identifying a user is found, but the users member-
ship has expired, I would like him to be forwarded/redirected to a
corresponding error page
Are you using Windows? Than this it no tomcat specific problem. yout
struts.jar
is not deleted because windows locks this file. i had the same problem. the
solution is
to add the directory META-INF to your project. put a file named context.xml
into it with
the following lines:
when the attribu
>Should it be stored in the ServletContext for application scope? But
>how do I access this instance from my Actions?
>getServlet().getServletContext().getAttribute(xxx)
is it the same as request.getSession().getServletContext().getAttribute(xxx)
?
Peter
---
Hi!
I have maybe a simple question:
My web-app has to get data out of a database. I have a class DatabaseHandler
which
holds a connection to the database and provides methods to query it. I would
like to
have only one instance of this class in my web-app. But I don't know where
to put it.
Should
Its the filename, but where is it stored on your harddisk?
With Win2003 and Tomcat I found my log-file in C:\WINNT\SYSTEM32!
Peter
-Ursprüngliche Nachricht-
Von: Vijay K Anand [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 4. Juli 2005 14:58
An: Struts Users Mailing List
Betreff: Re: log4j l
Hello all!
I still have a problem that struts creates a session although it should not
do so.
I have isolated the problem and there are only two possible locations left.
One of
them is this:
I have an index.jsp specified in my welcome.file-list in web.xml. This
index.jsp does
the following:
<%@ t
No, there is no filter or something else, only the things I included
in my first mail (besides the login.jsp and home.jsp to which the
success and failure forwards point to)
Peter
-Ursprüngliche Nachricht-
Von: Ed Griebel [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 29. Juni 2005 18:53
Hello again
As Michael suggested I put a session="false" in the page directive in my
index.jsp like this
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page session="false" %>
but the problem still is there. my session is not null!
Peter
-Ursprüngliche Nach
Hello all!
I have a problem with struts and sessions, perhaps someone has an idea:
My web.xml contains the following welcome file list:
index.jsp
My index.jsp only forwards like this:
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
My struts-config uses a global
Hi all!
Here a question from a newbie:
Is it possible to extend the ForwardAction class to add some functionality
chained to the forward?
My struts-config entry would look like this:
Does Struts recognize that MyForwardAction extends ForwardAction so that is
uses the parameter-attribute?
Pete
26 matches
Mail list logo