Please point out my mistakes. Does the 'name'
attribute of the logic tag accept an object only? For
example, I created a session this way:
HttpSession session = request.getSession();
String username = request.getRemoteUser();
session.setAttribute( "user", username );
In the LogoffAction, I inva
Hi, I have the following code in the navbarMenu.jsp:
LOGOUT
and in the struts-config.xml, I have:
and
In the LogoffAction.java, I invalidate the session and
I want the user to go back the welcome page.
The problem is that it takes two steps for the user to
go back to the welcome pa
Hi, I have the following code in the navbarMenu.jsp:
LOGOUT
and in the struts-config.xml, I have:
and
In the LogoffAction.java, I invalidate the session and
I want the user to go back the welcome page.
The problem is that it takes two steps for the user to
go back to the welcome pa
o the welcome page in one
step?
--- "Ruth, Brice" <[EMAIL PROTECTED]> wrote:
> Is your "Menu" actionforward the welcome screen you
> want to get to? And
> does your Action return an ActionForward to this?
>
> Caroline Jen wrote:
>
> >Hi, I have th
o which
> represents an action.
> I guess its only available in 1.1 version of Struts.
>
>
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: 28 October 2003 17:05
> To: Struts Users Mailing List
> Subject: Re: Forward Cannot Be Achieved
plus a LOGON buttion is provided.
As long as two actions are involved, the user does not
get back to the welcome page by just click on the
LOGOFF button "only once".
Need your guidance on how such a situation is usually
handled?
--- Caroline Jen <[EMAIL PROTECTED]> wrote:
Yansheng Lin <[EMAIL PROTECTED]> wrote:
> At the end of your first action execute() method, do
>
> a redirect to the second action. Something like the
> following:
> return new ActionForward("secondAction.do");
>
> Hope this helps!
>
> -Yan
>
> ---
_KEY);
>
> // Remove user login
>
> session.removeAttribute(Constants.USER_KEY);
>
> // Return success
>
> return (mapping.findForward(Constants.SUCCESS));
>
> Barry
>
>
>
>
>
>
>
>
>
> - Original Message -
> From: "Ca
I have checked the syntax of the isUserInRole in the
request.tld, which is:
<%-- do something --%>
Is it possible to specify more than one role? What is
the syntax of specifying that? My application has
many roles. In some cases, both "administrator" and
say, "contributor" share doing the s
In the welcome page, all visitors of the web site can
choose to view any article that is available in the
database. But, visitors will not be able to delete or
update any of those articles (DELETE, UPDATE, etc.
buttons are not provided). This part of my struts
application works well. I have a dr
I am using the findByProperty method in the
org.apache.commons.scaffold.sql.AccessBase. The
findByProperty method takes "one" pair of
property/value as it parameters. As such, visitors of
the web site can query all articles in the database by
providing 'author' as the property and supply the name
I am trying to modify the behavior of the
ParameterAction.java in the org.apache.struts.scaffold
to tailor it to my specific need.
I put the struts.jar and struts-scaffold.jar in my
classpath while compiling the sub-class. Nonetheless,
I got
cannot resolve symbol
symbol: class ParameterAction
works well because "author" is expected literally as
the value of a property called "dispatch".
I also want to pass
String username = request.getRemoteUser();
as the value of a property called "keyValue".
But,
or
gives me problems. What is the proper way of doing it?
_
Please help. Need your clever ideas. Thank you.
--- Caroline Jen <[EMAIL PROTECTED]> wrote:
> I am using the findByProperty method in the
> org.apache.commons.scaffold.sql.AccessBase. The
> findByProperty method takes "one" pair of
> property/value as it paramet
We have for the submit buttion in
struts. I am trying to add some additional features
to the submit button:
Read/Send Mails
I wonder if there is something like it in struts.
__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/prom
I check if session expires for each action in the
application. If the session times out, I forward the
user to index.jsp so that the user can log on again.
How do I inform the user with a message that he/she is
at the welcome page because the session has expired?
__
I got this message in the browser:
[ServletException in:/article/content/menu.jsp] Cannot
retrieve mapping for action /do/editor/Category'
The menu.jsp is a tile in my application. This is my
tile menu.jsp:
View
Articles
If I change the statement that causes the
ServletException to
People have suggested servlet filter is a good choice
to check session time-out that if I want all servlets
and JSPs remain intact.
I do not have any idea how it works in Struts. First
of all, I think this servlet filter has to be declared
in the web.xml. I have many actions in the struts
applic
Passing variables from one action to another is a
frequently asked question. The answer is to use
either hidden fields or a session object.
The story starts with searching the database. My
application offers options to search the database by
author, title of the article, article ID, or . I
config.xml
-Caroline
--- Adam Hardy <[EMAIL PROTECTED]>
wrote:
> On 11/06/2003 08:26 AM Caroline Jen wrote:
> > Passing variables from one action to another is a
> > frequently asked question. The answer is to use
> > either hidden fields or a session object.
> >
>
It is not a Struts problem. But, it is the problem I
encounter in my Struts application. Please help. I
am NOT showing all my code. For example, I skip the
DAO interface, and the class that returns a connection
object from the connection pool. Nonetheless, those
classes are irrelevant to my qu
What a good timing to see this post. I was about to
do the same thing in the next day or two.
I have an ArrayList of JavaBean objects created from
accessing the database:
while(rs.next())
{
editorBean=new
EditorBean(rs.getString("user_name"));
editors.add(editorBean);
}
return editors;
1. I my action class, I reference a bean
EditorBean editor = EditorBean.findEditorData(
username );
2. this bean accesses the data access logic and the
bean gets populated by information fetched from the
database (see the code below)
3. In the action class, I then wrap editor in a
session objec
My ArrayList is a collection of bean object. The
ArrayList is created this way:
public Collection findEditors( String userrole, String
category )
{
..
EditorBean editorBean = null;
ArrayList editors = new ArrayList();
// database access code
while( rs.next() )
{
e
My drop-down list got an error message:
org.apache.jasper.JasperException: Cannot retrieve
definition for form bean null
I have tried to display the drop-down list in two
ways:
First:
Second:
The editors is a Collection of EditorBean passed to
the JSP this way:
HttpSession session = r
My application got a ClassCastException at scaffold,
ProcessAction.executeLogic. I have no idea about how
and where to detect the problem. I would appreciate
if someone could provide a clue.
2003-12-04 23:08:38 action: *** ACTION EXCEPTION:
java.lang.ClassCastException
at
org.apache.str
I have a class FindEditorData.java. I want to pass a
vairable 'username' to this class for some processing.
This class is invoked from a JSP:
View Articles
and the value of the 'username' is obtained this way:
String username = request.getRemoteUser();
Due to my limited knowledge in Struts,
;
> you can define the hidden attribute using
>
> value="<%=request.getRemoteUser();%>"/>
> Good luck.
>
> - Original Message -
> From: "Caroline Jen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Fr
hy can't
> you utilize it from
> one of these places that you do have access to these
> things? What
> exactly is stopping you here? Once you tell us, then
> you will have
> illustrated the problem.
>
> -J
>
> > -Original Message-
> > From: Car
Has a Struts application been built to handle
send/view personal mail messages using JavaMail?
If the answer is "yes", please provide information how
to contact the developer of the application.
__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
ht
My servlet has a String called 'category'. I want to
pass the String to a JSP. Therefore, I have the code
shown below in the servlet:
session.setAttribute( "c", category );
OR
request.setAttribute( "c", category );
And, I do the following in my JSP:
<% String keyValue = (String)session.getAttr
I want to pass two hidden fields; username and keyName
from a JSP via a SUBMIT button:
<% String username = request.getRemoteUser();%>
View Articles
and an action mapping:
How come the username is not passed to the
FindEditorData.java while the keyName is successfully
pa
My code was shown in my original message. I used two
tags to pass two hidden fields, one
is successfully passed while the other shows null. By
the way, I do not use 'request' to retrieve the value
of the hidden field because my Java class is a
scaffold.ProcessAction type. I simply use getXxx.
There are lots of classes involved. I will give you
an example:
1. my LogonAction calls EditorService.java (business
delegate)
2. EditorService.java calls MySQLEditorDAO.java (data
access object implements EditorDAO.java, which is a
data access interface)
3. the MySQLEditorDAO.java returns Editor
roperty,value
)
);
list.setLegend( property,value );
return new ProcessResultBase( list );
} // end execute
} // End FindEditorData
--- Caroline Jen <[EMAIL PROTECTED]> wrote:
> I want to pass two hidden fields; username and
> keyName
> from a JSP via a S
name or the
> keyName hidden variable? If
> it is the username, then I'd suspect that
> request.getRemoteUser() in your
> JSP is returning null.
>
> Regards,
>
> Richard
>
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Se
r
> doesn't know about the user being authenticated and
> will return null.
>
> Regards,
>
> Richard
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 2:56 PM
> To: Struts Users Mailing List
> Subject: RE:
While the server is running, I am able to be
redirected to the welcome page after I click on any of
the LOGOUT buttons in my application. And while I am
at the welcome page, I can see
http://localhost:8080/NameOfMyApplication/do/Main in
the address bar. But, if I shut down the server and
restart
t;Yee, Richard K,,DMDCWEST" wrote: > Caroline, >
> Are you having
> >problems with the username or the > keyName hidden
> variable? If > it is
> >the username, then I'd suspect that >
> request.getRemoteUser() in your >
> >JSP is returning null. &g
user name is sent
> with each subsequent
> request depends on the browser and type of
> authentication." Are you using
> basic authentication or are you authenticating the
> user yourself?
> If you are doing it yourself (ie. through a db
> lookup) then the server
>
ou dump request parameters that you are
> getting in your FindEditorData?
>
> Hidden input tags work fine.
>
> Regards,
>
> Richard
> --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > Hi, I think that we are in different time zones.
> >
> > As you have mentio
line,
> As a sanity check, in your bean, initialize the
> username variable to something ie. "XX". and
> re-run your app. This will show if your setUsername
> is
> ever called.
>
> -Richard
>
> --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > I do n
-- Richard Yee <[EMAIL PROTECTED]> wrote:
> Caroline,
> As a sanity check, in your bean, initialize the
> username variable to something ie. "XX". and
> re-run your app. This will show if your setUsername
> is
> ever called.
>
> -Richard
>
> --- Ca
I am trying to run my first Struts -- using the
tutorial "Login" example at
http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#struts
There is a MessageResources.properties file that
allows for all strings displayed in an application to
be defined. Nonetheless, After I
entered http
F/struts-html.tld
/WEB-INF/struts-html.tld
/WEB-INF/struts-logic.tld
/WEB-INF/struts-logic.tld
/WEB-INF/struts-template.tld
/WEB-INF/struts-template.tld
---
Caroline Jen
--- James Mitchell <[EMAIL PROTECTED]> wrote:
> I
101 - 145 of 145 matches
Mail list logo