FW: action as the welcome page
-Original Message- From: Gogineni, Pratima Sent: Wednesday, August 15, 2001 11:59 AM To: '[EMAIL PROTECTED]' Subject: action as the welcome page Hi, I have seen some messages in the news groups which seem to indicate that it may be possible to set an action as the welcome page, though a couple of people were having problems with it. I tried doing this - set my welcome page to login.do (also tried /login.do). After authentication I get a 404 error that says ADM/login.do not found (ADM is my context). The /login action has been defined in struts-config.xml and I can forward to it through a jsp page. Im trying to find out if anyone else has been able to do this, if it is possible to do this at all, if I am doing something wrong ... Thanks Pratima -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 10:29 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: action mapping not working ...but when you finish going through the Action class (Question), you want to then go to the jsp, not the action again, which would give you an infinite loop! ;-) Dave Larry Maturo [EMAIL PROTECTED] on 08/15/2001 01:23:32 PM Please respond to [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: action mapping not working Hi Dave, You wrote: Presumably you call your action Question from somewhere, execute it, and when it's done, you forward to question.jsp, not to the Question action again! Actually, I need to go through the Action Class each time, to repopulate the jsp from the database, since it represents a question, and I want the answers to contain whatever the user last entered, and I stored in the database for them. A breakpoint in my Action Class indeed shows it gets hit each time I press back or next. Again, thanks for the help. I don't need to understand it as long as it works. Ah yes, the enigma that is struts. :-) -- Larry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 12:13 PM To: [EMAIL PROTECTED] Subject: RE: action mapping not working Larry, Presumably you call your action Question from somewhere, execute it, and when it's done, you forward to question.jsp, not to the Question action again! Hence the action has already executed, and you want to go to the jsp page. With the others, I guess you want to perform the action and then display the jsp, so the forward here should be another action, and the forward for the ReviewInstructions action is then a jsp page. Cheers, Dave Larry Maturo [EMAIL PROTECTED] on 08/15/2001 01:02:57 PM Please respond to [EMAIL PROTECTED] To: David_Hay/Lex/Lexmark.LEXMARK@sweeper.lex.lexmark.com, [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: action mapping not working Hi Dave You wrote If you want the action to be called, you should forward to the action, not the jsp eg forward name=showLog path=/ShowLog.do / Below is my new mapping: action path=/Question type=com.athensgroup.eval.action.QuestionAction name=QuestionForm scope=request input=/jsp/Question.jsp forward name=success path=/jsp/Question.jsp/ forward name=instructions path=/ReviewInstructions.do/ forward name=summary path=/ReviewSummary.do/ /action I don't understand why it works, but it does. Thank you. Any idea why sucess works even though it is different than the others? -- Larry
action as the welcome page
Hi, I have seen some messages in the news groups which seem to indicate that it may be possible to set an action as the welcome page, though a couple of people were having problems with it. I tried doing this - set my welcome page to login.do (also tried /login.do). After authentication I get a 404 error that says ADM/login.do not found (ADM is my context). The /login action has been defined in struts-config.xml and I can forward to it through a jsp page. Im trying to find out if anyone else has been able to do this, if it is possible to do this at all, if I am doing something wrong ... Thanks Pratima -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 10:29 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: action mapping not working ...but when you finish going through the Action class (Question), you want to then go to the jsp, not the action again, which would give you an infinite loop! ;-) Dave Larry Maturo [EMAIL PROTECTED] on 08/15/2001 01:23:32 PM Please respond to [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: action mapping not working Hi Dave, You wrote: Presumably you call your action Question from somewhere, execute it, and when it's done, you forward to question.jsp, not to the Question action again! Actually, I need to go through the Action Class each time, to repopulate the jsp from the database, since it represents a question, and I want the answers to contain whatever the user last entered, and I stored in the database for them. A breakpoint in my Action Class indeed shows it gets hit each time I press back or next. Again, thanks for the help. I don't need to understand it as long as it works. Ah yes, the enigma that is struts. :-) -- Larry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 12:13 PM To: [EMAIL PROTECTED] Subject: RE: action mapping not working Larry, Presumably you call your action Question from somewhere, execute it, and when it's done, you forward to question.jsp, not to the Question action again! Hence the action has already executed, and you want to go to the jsp page. With the others, I guess you want to perform the action and then display the jsp, so the forward here should be another action, and the forward for the ReviewInstructions action is then a jsp page. Cheers, Dave Larry Maturo [EMAIL PROTECTED] on 08/15/2001 01:02:57 PM Please respond to [EMAIL PROTECTED] To: David_Hay/Lex/Lexmark.LEXMARK@sweeper.lex.lexmark.com, [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: action mapping not working Hi Dave You wrote If you want the action to be called, you should forward to the action, not the jsp eg forward name=showLog path=/ShowLog.do / Below is my new mapping: action path=/Question type=com.athensgroup.eval.action.QuestionAction name=QuestionForm scope=request input=/jsp/Question.jsp forward name=success path=/jsp/Question.jsp/ forward name=instructions path=/ReviewInstructions.do/ forward name=summary path=/ReviewSummary.do/ /action I don't understand why it works, but it does. Thank you. Any idea why sucess works even though it is different than the others? -- Larry
Re: action as the welcome page
supposing for http://xyz/abc i want to goto an action and display someresults, the following works for me. the following welcome-file-list is needed otherwise, it doesnot work. i get a 404 error. web.xml welcome-file-listwelcome-fileindex.cm/welcome-file/welcome-file-list config.xml !-- Display Index Page -- actionpath=/index name=indexPage type=com.cm.action.IndexPageAction forward name=success path=/server.jsp/ /action hope this helps. ramakrishna. - Original Message - From: Gogineni, Pratima [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 11:58 AM Subject: action as the welcome page Hi, I have seen some messages in the news groups which seem to indicate that it may be possible to set an action as the welcome page, though a couple of people were having problems with it. I tried doing this - set my welcome page to login.do (also tried /login.do). After authentication I get a 404 error that says ADM/login.do not found (ADM is my context). The /login action has been defined in struts-config.xml and I can forward to it through a jsp page. Im trying to find out if anyone else has been able to do this, if it is possible to do this at all, if I am doing something wrong ... Thanks Pratima -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 10:29 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: action mapping not working ...but when you finish going through the Action class (Question), you want to then go to the jsp, not the action again, which would give you an infinite loop! ;-) Dave Larry Maturo [EMAIL PROTECTED] on 08/15/2001 01:23:32 PM Please respond to [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: action mapping not working Hi Dave, You wrote: Presumably you call your action Question from somewhere, execute it, and when it's done, you forward to question.jsp, not to the Question action again! Actually, I need to go through the Action Class each time, to repopulate the jsp from the database, since it represents a question, and I want the answers to contain whatever the user last entered, and I stored in the database for them. A breakpoint in my Action Class indeed shows it gets hit each time I press back or next. Again, thanks for the help. I don't need to understand it as long as it works. Ah yes, the enigma that is struts. :-) -- Larry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 12:13 PM To: [EMAIL PROTECTED] Subject: RE: action mapping not working Larry, Presumably you call your action Question from somewhere, execute it, and when it's done, you forward to question.jsp, not to the Question action again! Hence the action has already executed, and you want to go to the jsp page. With the others, I guess you want to perform the action and then display the jsp, so the forward here should be another action, and the forward for the ReviewInstructions action is then a jsp page. Cheers, Dave Larry Maturo [EMAIL PROTECTED] on 08/15/2001 01:02:57 PM Please respond to [EMAIL PROTECTED] To: David_Hay/Lex/Lexmark.LEXMARK@sweeper.lex.lexmark.com, [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: action mapping not working Hi Dave You wrote If you want the action to be called, you should forward to the action, not the jsp eg forward name=showLog path=/ShowLog.do / Below is my new mapping: action path=/Question type=com.athensgroup.eval.action.QuestionAction name=QuestionForm scope=request input=/jsp/Question.jsp forward name=success path=/jsp/Question.jsp/ forward name=instructions path=/ReviewInstructions.do/ forward name=summary path=/ReviewSummary.do/ /action I don't understand why it works, but it does. Thank you. Any idea why sucess works even though it is different than the others? -- Larry