My logic Tag Does Not Seem To Work

2003-10-27 Thread Caroline Jen
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

Why the Forward Does Not Achieve In One Step?

2003-10-27 Thread Caroline Jen
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

Forward Cannot Be Achieved In One Step

2003-10-28 Thread Caroline Jen
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

Re: Forward Cannot Be Achieved In One Step

2003-10-28 Thread Caroline Jen
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

RE: Forward Cannot Be Achieved In One Step

2003-10-28 Thread Caroline Jen
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

RE: Forward Cannot Be Achieved In One Step

2003-10-28 Thread Caroline Jen
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:

RE: Forward Cannot Be Achieved In One Step

2003-10-28 Thread Caroline Jen
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 > > ---

Re: Forward Cannot Be Achieved In One Step

2003-10-28 Thread Caroline Jen
_KEY); > > // Remove user login > > session.removeAttribute(Constants.USER_KEY); > > // Return success > > return (mapping.findForward(Constants.SUCCESS)); > > Barry > > > > > > > > > > - Original Message - > From: "Ca

isUerInRole and request.tld

2003-10-29 Thread Caroline Jen
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

How To Submit A Propery/Value Pair That Is Not Selected/Filled-Out By Visitors of the Website?

2003-10-30 Thread Caroline Jen
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

findByProperty() in the scaffold.sql.AccessBase - Need One Additional Parameter to the Pair of Property/Value

2003-10-30 Thread Caroline Jen
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

Modifying the ParameterAction Class in the org.apache.struts.scaffold

2003-10-30 Thread Caroline Jen
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

Hidden Field

2003-10-30 Thread Caroline Jen
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? _

Re: findByProperty() in the scaffold.sql.AccessBase - Need One Additional Parameter to the Pair of Property/Value

2003-10-31 Thread Caroline Jen
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

Buttons in Struts

2003-10-31 Thread Caroline Jen
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

Session Times Out

2003-11-02 Thread Caroline Jen
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? __

Why the Action Mapping Cannot Be Retrieved?

2003-11-05 Thread Caroline Jen
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

RE: Handling Session Timeout

2003-11-05 Thread Caroline Jen
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

FAQ (Passing Variables Between Actions); But, Stuck and Need Help

2003-11-06 Thread Caroline Jen
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

Re: FAQ (Passing Variables Between Actions); But, Stuck and Need Help

2003-11-06 Thread Caroline Jen
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. > > >

Off Topic, Problem With Passing Business Bean in Between Classes As Part of My Struts Application

2003-11-27 Thread Caroline Jen
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

re: Getting ArrayList of objects from my form bean into my drop down list -> solution

2003-11-28 Thread Caroline Jen
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;

How To Display the Information That Is Wrapped In a Session Object

2003-11-28 Thread Caroline Jen
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

How Do I Create This Drop-Down List in Struts?

2003-11-29 Thread Caroline Jen
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

Drop-Down List - Cannot Retrieve Definition From Form Bean Null

2003-12-01 Thread Caroline Jen
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

Please Give Me A Clue - ClassCast Exception

2003-12-04 Thread Caroline Jen
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

Very Troubled in Finding Ways to Pass a Variable to a Class

2003-12-05 Thread Caroline Jen
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,

Re: Very Troubled in Finding Ways to Pass a Variable to a Class

2003-12-06 Thread Caroline Jen
; > you can define the hidden attribute using > > value="<%=request.getRemoteUser();%>"/> > Good luck. > > - Original Message - > From: "Caroline Jen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Fr

RE: Very Troubled in Finding Ways to Pass a Variable to a Class

2003-12-06 Thread Caroline Jen
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

Mail Messages Using JavaMail in Struts

2003-12-06 Thread Caroline Jen
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

Pass A String From Servlet And Write Out Its Value in JSP

2003-12-07 Thread Caroline Jen
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

Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

2003-12-07 Thread Caroline Jen
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

Re: Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

2003-12-07 Thread Caroline Jen
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.

Re: HELP: about to get datasource of struts and pass to logic beans...

2003-12-08 Thread Caroline Jen
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

Re: Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

2003-12-08 Thread Caroline Jen
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

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Caroline Jen
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

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Caroline Jen
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:

Each Time the Server Restarts, the Browser Does Not Display the Welcome Page.

2003-12-08 Thread Caroline Jen
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

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Caroline Jen
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

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
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 >

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
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

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
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

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
-- 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

Stuck With My First Struts Exercise -- Tomcat Cannot Find The MessageResources.properties File

2003-02-27 Thread Caroline Jen
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

RE: Stuck With My First Struts Exercise -- Tomcat Cannot Find The MessageResources.properties File

2003-02-27 Thread Caroline Jen
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&#x

<    1   2