This is the only solution I can think of:
public class RedirectServletRequest extends HttpServletRequest {
public RedirectServletRequest(HttpServletRequest req) {
this.request = req;
}
public String getParameter(String name) {
if (
container called form
based login page?
Paddy,
Looks like you've been here before!! :-)
It'll take me a bit of time to digest this, but I'll have a look.
Does this actually work for you?
Thanks
Martin
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: 26 March 2004 15
I spent a few hours trying it out yesterday. There is a Tiles ReloadAction
which I tried to set in the struts-config and tried to call it. But it
didn't help. Finally I went with the Tomcat manager ( app reload ). If
Tomcat recognizes class changes ( WEB-INF/classes ), maybe there is a way to
I used your code ( Thanks ) and I finally got it to work with a Filter. We
have a login filter in our app. So I added a method which runs only in
development mode.
* Set the DEVELOPMENT_MODE system property during development.
* Add the WEB-INF directory to the classpath. ( does Tomcat include
The parseModuleConfigFile method in ActionServlet ( called by init() ) seems
to get the resource and reparse the information. Unless there is a screw up
somewhere there, I don't know why the re-read should fail.
I will see if that can be reproduced.
Thanks
-- pady
[EMAIL PROTECTED]
) {
ex.printStackTrace();
}
}
}
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 9:37 AM
To: Struts Users Mailing List
Subject: RE: Automatically detecting struts-config changes and reload app
Why not use c:out value=${uniqueKey} / instead of
c:out value=${myForm.value(${uniqueKey})} / ???
This works for me:
c:set var=testVar value=Hello /
c:set var=testVar1 value=World /
c:set var=hello
c:out value=${testVar} /-c:out value=${testVar1} /
/c:set
c:out value=${hello} /
Thanks
--
This is what we did in our Action:
// generate the file
File file = generate();
// download
response.setContentType(text/plain);
response.addHeader(Content-Disposition, attachment;filename= +
file.getName());
return new ActionForward(/logs/ + file.getName());
Thanks
-- pady
[EMAIL PROTECTED]
Anybody have an example of this ? I searched in the user/developer guides
and Google and couldn't find much.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 8:32 AM
To: Struts Users Mailing List
1. Make sure you define a security-role element for 'administrator' in
web.xml. Also the auth-constraint has role-name as 'administrador'. Maybe a
spelling error ?
2. And the role should be defined in tomcat-users.xml also. And the users in
this role would alone be allowed access.
Thanks
--
Use only HTTP POST and send a hidden parameter which identifies the request
origin. So if this is not set, redirect to some default page.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Mark Shifman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 1:17 PM
To:
I don't have sample code but are you looking for something like this:
// in Action execute...
ActionErrors errors = new ActionErrors();
// add errors...
...
// set in request
request.setAttribute(org.apache.struts.action.ERROR, errors);
// forward to same page...
Thanks
-- pady
[EMAIL
In sample1.jsp:
Instead of pointing to action1.do, point to a javascript function which will
do a win.open(action1.do?form param values). Then do a refresh on
current page.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Monday,
For me, clicking on Standard Area Page: took me to the page with SoA site
- Standard area It seems to work ok.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: w i l l i a m b o y d [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 12:57 AM
To: [EMAIL
If you are using JDK 1.4 and not using log4j, then look in
JAVA_HOME/jre/lib for a file called logging.properties. Set the .level to
OFF. The levels in descending order are: SEVERE (highest value) WARNING INFO
CONFIG FINE FINER FINEST (lowest value) In addition there is a level OFF
that can be
c:if test=${fn:startsWith(url, '/')}
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 11:12 AM
To: Struts Users Mailing List
Subject: [OT] JSTL : test the first char of a String
Hello,
I'm using JSTL
Assuming you can get a Collection of roles, using jstl,
c:forEach items=${requestScope.ROLES} var=role
c:if test=${role.name == 'myRole'}
Do something...
/c:if
/c:forEach
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: sean jones [mailto:[EMAIL PROTECTED]
Sent: Tuesday,
Can you set a hidden field when a tab is chosen ? If not, you can do a
ActionMapping.getPath() and get the path.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Skip Hollowell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:04 AM
To: [EMAIL PROTECTED]
Subject:
a configuration setting (like a parameter to the Action
servlet?) that will set the message level.
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 8:21 AM
To: Struts Users Mailing List
Subject: RE: Questions about debug and info messages
I think u cant find it - atleast on most UNIX systems there is no direct
method, like a system command, to find out. If you have created the file,
then you can save the time of creation.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Chiming Huang [mailto:[EMAIL
We do this in our web app. We have a config xml with all our functional
categories defined. All these categories are accessed from the webapp using
a menu. We have a second config file that defines all the users/roles. Each
role is assigned to one or more functional categories. When user logs in,
, 2004 10:51 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts/filters
Pady,
thats great...May I have a look at the samples if possible...That would help
me a lot with the initial learning curve.
Thanks!
Pady Srinivasan [EMAIL PROTECTED] wrote:
We do this in our web app. We have a config xml
You can try something like the Interceptor pattern. For a specific request,
register a series of command classes with a Manager. The Manager calls each
interceptor in the order specified. This way you can add commands ( steps )
without changing existing code. Almost like Struts Action
That is the biggest piece of bull sh$t I have heard. They are not replacing
because of talent, but pure economics combined with greed. A basic course in
MacroEconomics will help. Speaking of talent, there are plenty of real
smart guys in the States...
BTW, I am from India and a US citizen
That is the only ( somewhat ) convincing argument that has kept my hopes up
in this country...hoping that the rich put this money to good use in some
other field and generate jobs. Which BTW is happening in the healthcare
industry. They have around 2 million jobs there and they are recruiting
Why not have a hidden variable whose value is set by the jsp ? If you have
to change the hidden field value from the html page, then use javascript
code.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: John Habbouche [mailto:[EMAIL PROTECTED]
Sent: Thursday, September
Is the pageName attribute defined with rtexprvalue set to true in the tld ?
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Robert Upshall [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2003 2:16 PM
To: Struts Users Mailing List
Subject: can somebody explain
Is there a way to make Struts print out more messages to standard out ? Like
when it loads the form-bean and resets form values into the jsp ?
Thanks
-- pady
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
your action's name=Resume to, perhaps,
name=resumeInformation.
Regards,
David
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 5:33 PM
To: [EMAIL PROTECTED]
Subject: form value not loaded...
I have a simple form that is associated
I don't know if this works in 1.01 but I tried in 1.1.
You can use the HttpServletRequest passed into the validate method to find
out which button was pressed ( getParameter(Button2) ), and return an
empty ActionErrors.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From:
JBuilder seems to translate/compile every jsp in current project everytime
you run the project ( it uses Tomcat for running the web app ). I couldn't
find a setting to make JB only translate/compile JSP pages that have changed
since the last build. It gets real slow when there are many JSP pages.
level of struts...
Hi Pady,
You might try adding this to your action servlet in web.xml:
init-parm
param-namedebug/param-name
param-value99/param-value
/init-param
Let me know if this works for you,
Peter
--
Peter Smith
Software Engineer
InfoNow Corporation
From: Pady Srinivasan [EMAIL
I am using the html library from struts, otherwise use JSTL libraries for
my other requirements. I was curious if anybody uses both these tag
libraries together ? If so, which ones do you use from which library and why
? Also, is there any document/article comparing the 2 tag libraries ?
struts and JSTL tags...
pady this has been discussed many many times before in this list.
please search the archives.
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:58 PM
To: [EMAIL PROTECTED]
Subject: Combining struts and JSTL tags
That was the answer I was looking for.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:58 PM
To: 'Struts Users Mailing List'
Subject: RE: Combining struts and JSTL tags...
I am using the
I was wondering why Struts doesn't put closing tags on the html generated.
Like html:text property=name /
Generates
input type=text name=name value=
Where is the / or /input ? Is there a reason for not generating this ?
Thanks
-- pady
[EMAIL PROTECTED]
I have defined a custom tag that emulates "tabs".
This will help splitting a form across multiple tab pane. Each tab is a
hyperlink that sets a hidden form variable and submits the current form ( so
that the data is saved ). When I define a form and specify normal html
elements, the tab
I am writing my first struts app. If I have a jsp page ( with a html form )
that has a corresponding ActionForm and the Action points back to the same
jsp page, shouldn't the form now be reloaded with the values entered ? I see
that in the Action.execute method, the ActionForm is loaded with
I have a simple form that is associated with an Action that points back to
the same form. When I submit the form with some values for the fields, when
redisplaying the form after the Action, the value are not loaded. I did a
bean:write on the fields before displaying the form and the values are
mapping is set to false. This, however, will
work regardless of the redirect attribute setting if your
form is in session scope.
robert
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 4:36 PM
To: [EMAIL PROTECTED]
Subject: basic
=com.heroix.firenze.webui.actions.TabChangeAction
forward name=success path=/jsp/tiles_insert.jsp/
/action
/action-mappings
Regards,
David
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 4:59 PM
To: Struts Users Mailing List
Subject: RE: basic struts question...
I
of your form tag.
Secondly, you've got to be kidding me about not creating an Action class
and then asking the list why your stuff isn't working when the
documentation answers your question. Come on.
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Tuesday
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 11:21 AM
To: Struts Users Mailing List
Subject: RE: basic struts question...
As I said, I was NOT getting an error mentioning missing action class till
now ( had to restart Tomcat ). Now
I have a html form that has 2 hyperlinks which when clicked, I have to
submit the form field values. Is there any way of achieving this besides
using javascript to get the form values and building a URL ? ( like a GET
method )
Thanks
-- pady
[EMAIL PROTECTED]
If I have an action-mapping defined as
action-mappings
actionpath=/taglib/jsp/submit
type=com.heroix.firenze.webui.actions.TabChangeAction
forward name=success path=/jsp/tiles_insert.jsp/
/action
/action-mappings
When I access
Mailing List
Subject: RE: basic struts question...
You need to append the .do extension to your request URL.
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 3:35 PM
To: [EMAIL PROTECTED]
Subject: basic struts question...
If I have
I would do this using Servlet Filters.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 11:03 PM
To: Struts Users Mailing List
Subject: Re: login test in a jsp page - any suggestions
How can I set
I think you can do this with TilesServlet instead of ActionServlet as your
front controller.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 9:30 AM
To: Struts Users Mailing List
Subject: tile
You can do a ActionMapping.setForward to any URI to forward to.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Hue Holleran [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 10:52 AM
To: Struts Users Mailing List
Subject: RE: Forwarding to existing Servlet
getServletContext().getResource(path) -- returns an URL
or
getServletContext().getRealPath(relativePath) -- returns a String
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Cameron Hickey [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 3:25 PM
To:
Request to Main.jsp -- call login.jsp ( pass the url to forward as a
parameter ) --
getServletContext().getRequestDispatcher(url).forward(request, response)
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August
that in but forgot my TilesPlugIn.
Regards,
David
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 3:11 PM
To: [EMAIL PROTECTED]
Subject: using tiles...
Since I couldn't find a separate mailing list for Tiles, I am posting here.
I started using
I figured it out. I had defined the definitions wrongly and was getting an
error during webapp loading itself.
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 8:15 AM
To: Struts Users Mailing List
Why not use a servlet filter ?
Thanks
-- pady
[EMAIL PROTECTED]
-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 4:16 PM
To: Struts-Users
Subject: login test in a jsp page - any suggestions
Hi;
I want to put a test in every jsp page
Since I couldn't find a separate mailing list for Tiles, I am posting here.
I started using Tiles recently ( bundled with Struts 1.1 ). I am having
problem using definitions. I get this error:
javax.servlet.ServletException: Can't get definitions factory from context.
at
55 matches
Mail list logo