validate
Hi: This might not be the right place to post the message. But if someone can help me here, I appreciate it. I have a text field that can be ANY characters. Which method should I call to validate it? I don't think I should call isLetterOrDigit(char ch), because letter means a-zA-Z. but character means more than letter, for example, '#' is a character, but it is not letter. Am I right? Which method should I call to validate the field to be ANY characters? I appreciate your help. Thanks. Jenny __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: validate
Richard: Thank you for your reply. I might misunderstand character. letter is a-zA-Z, right? What is character? space or tab is character. Right? Could you correct me if I am wrong. Sorry for asking the simple question. Regards, Jenny --- Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote: Jenny, If your input can contain ANY characters then what do you need to validate for? Why don't you just check for an empty string? Am I missing something here? -Richard -Original Message- From: jenny zhang [SMTP:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 1:47 PM To: Struts Users Mailing List Subject:validate Hi: This might not be the right place to post the message. But if someone can help me here, I appreciate it. I have a text field that can be ANY characters. Which method should I call to validate it? I don't think I should call isLetterOrDigit(char ch), because letter means a-zA-Z. but character means more than letter, for example, '#' is a character, but it is not letter. Am I right? Which method should I call to validate the field to be ANY characters? I appreciate your help. Thanks. Jenny __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: validate
Richard, Eddie, Khalid. Thank you very much for giving me so clear explanation. Jenny - Original Message - From: Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, December 16, 2002 5:30 PM Subject: RE: validate Jenny, Yes, a character can be a letter, number or any non-alphanumeric character include tabs, spaces, newlines, etc. It also comprises all Unicode characters as well. What is the requirement for validation? If it must be a printable character, then you can check for !Character.isISOControl( ch ) Regards, Richard -Original Message- From: jenny zhang [SMTP:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 2:05 PM To: Struts Users Mailing List Subject: RE: validate Richard: Thank you for your reply. I might misunderstand character. letter is a-zA-Z, right? What is character? space or tab is character. Right? Could you correct me if I am wrong. Sorry for asking the simple question. Regards, Jenny --- Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote: Jenny, If your input can contain ANY characters then what do you need to validate for? Why don't you just check for an empty string? Am I missing something here? -Richard -Original Message- From: jenny zhang [SMTP:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 1:47 PM To: Struts Users Mailing List Subject: validate Hi: This might not be the right place to post the message. But if someone can help me here, I appreciate it. I have a text field that can be ANY characters. Which method should I call to validate it? I don't think I should call isLetterOrDigit(char ch), because letter means a-zA-Z. but character means more than letter, for example, '#' is a character, but it is not letter. Am I right? Which method should I call to validate the field to be ANY characters? I appreciate your help. Thanks. Jenny __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: documenting jsp tags
Anand, welcome back. Jenny - Original Message - From: Anand Belaguly [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, September 23, 2002 1:35 AM Subject: RE: documenting jsp tags This may help for documenting JSP files. http://opensource.yourdecor.ca/jspdoc/ Anand -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 22, 2002 10:22 PM To: [EMAIL PROTECTED] Subject: Re: documenting jsp tags JSP tags are java code that is documented with javadoc like everything else. The only way to document tlds is to use xml comment lines but the tag's javadocs should let you know how to use the various attributes. Dave From: A Stephen [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: documenting jsp tags Date: Sun, 22 Sep 2002 19:13:14 -0700 Greetings, Is there a javadoc like facility, that documents TLD's /jsp Tags ? Thank you, A Stephen. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
urgent!!!---Re: does struts has the functionality?
I have a question about using jspTags pager(http://jsptags.com/tags/navigation/pager/ ). Anand, I am sorry to send this email to you directly. I know you are expert on using jspTags pager. I urgently need your help. I hope you can recieve my email, and help me! If someone has used the jspTags pager before, please help me!! I am stunk here. Senario: There are lot of payments history records for a user. I will retrieve 500 records from DB at one time, and put them into session. When the next 500 records are retrieved, they will replace the first 500 records in the session. For example, if a user have 1200 records totally, at first time, the first 500 records will be retrieve from DB. To display the records, I use jspTags pager (http://jsptags.com/tags/navigation/pager/). On one page, 50 records will be displayed. So the first 500 records will be displayed on 10 pages. When user click on the last page(10th page), I want the next 500(501-1000) records to be retrieved, replace the first 500 records in the session, and then to be displayed to user. To achieve this, in my action class, I need to keep track the page number that the user click on.When the action class find that the last page(10th page) is clicked, The next 500 records will be retrieved, and be displayed to user. My Jsp name: paymentHistory.jsp My status and problem: The first 500 records can be displayed on 10 pages correctly. When I click on the page index(for example, I click on page 2), the URL changed to http:///rootcontext/paymentHistory.jsp?pager.offset=50. BUT MY ACTION CLASS IS NEVER BE CALLED.I AM STUNK HERE!!! My question: 1. How can I make the my action class to be called whenever user click on a page index?( I tried put html:form action=paymentHistory.do in my paymentHistory.jsp. but it shows same result. So I guess when user click on page index, it does not submit the form). 2. How can I pass pageNumber as a request parameter? (I tried put pg:param name=pageNumber / inside pg:pager. It doesn't show pageNumber on URL. I also tried to put ?number=%= pageNumber % in the line a href=%= pageUrl %?number=%= pageNumber %%= pageNumber %/a. It doesn't work. The following is my paymentHistory.jsp: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN %@ page language=java import=org.apache.struts.webapp.example.Payment % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % !-- for page navigation-- %@ taglib uri=http://jsptags.com/tags/navigation/pager; prefix=pg % html:html locale=true head titlehistory/title META name=GENERATOR content=IBM WebSphere Studio /head body table align=center cellspacing=0 cellpadding=0 border=0 width=480 tr td align=centerPayment History/td /tr /table hr !--This following table is used to display account history-- table align=center cellspacing=0 cellpadding=0 border=0 !-- payment history header -- logic:present name=payments tr td Amount /td td Balance /td /tr html:form action=/paymentHistory.do pg:pager maxPageItems=1 logic:iterate id=aPayment name=payments scope=session tr pg:item td bean:write name=aPayment property=amount/ /td td bean:write name=aPayment property=balance/ /td /pg:item /tr /logic:iterate /table !-- page navigation area -- pg:index pg:prev a href=%= pageUrl %[ (%= pageNumber %) Previous ]/a /pg:prev pg:pages a href=%= pageUrl %%= pageNumber %/a /pg:pages pg:next a href=%= pageUrl %[ Next (%= pageNumber %) ]/a /pg:next /pg:index /pg:pager /html:form /logic:present /body /html:html Thanks for your help. -Original Message- From: Jenny [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 14, 2002 12:14 PM To: Struts Users Mailing List Subject: Re: does struts has the functionality - Original Message - From: Anand Belaguly [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, September 14, 2002 1:58 PM Subject: RE: does struts has the functionality Jenny, Thanks for the link, it looks good.I will try it sometime. We have used the jspTags pager for recordsets more than 2500 records(one time query) and it gets displayed in less than 2 seconds.Also it is very easy to use, you just need to encapsulate ur presentation logic with these tags. Anand - Original Message - From: Anand Belaguly [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, September 13, 2002 4:42 PM Subject: RE: does struts has the functionality This works pretty good. http://jsptags.com/tags/navigation/pager/ Anand -Original Message- From: jenny
Re: urgent!!!---Re: does struts has the functionality?
I have figured out how to have my action class be called whenever user click on a page index(solution is to have url=/rootcontext/paymentHistory.do). So the first question I asked below is solved. Now I encountered another problem. When user click on the 10th page(Please see the following senario for detail), the first 500 records will be removed from session, and the next 500 records will be retrieved from DB, and displayed to user. From logic view of point, the second 500 records should be displayed from page 11-20. But now, the page number still shows 1-10, and only the last records on 10th page is from second 500 records(the last record). The rest of the records dispalyed are still from the first 500 records. This is not correct. My question: How can I have the page index to be displayed correctly, and works correctly? Thank you very much for your help. Jenny - Original Message - From: Jenny [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, September 22, 2002 6:59 PM Subject: urgent!!!---Re: does struts has the functionality? I have a question about using jspTags pager(http://jsptags.com/tags/navigation/pager/ ). Anand, I am sorry to send this email to you directly. I know you are expert on using jspTags pager. I urgently need your help. I hope you can recieve my email, and help me! If someone has used the jspTags pager before, please help me!! I am stunk here. Senario: There are lot of payments history records for a user. I will retrieve 500 records from DB at one time, and put them into session. When the next 500 records are retrieved, they will replace the first 500 records in the session. For example, if a user have 1200 records totally, at first time, the first 500 records will be retrieve from DB. To display the records, I use jspTags pager (http://jsptags.com/tags/navigation/pager/). On one page, 50 records will be displayed. So the first 500 records will be displayed on 10 pages. When user click on the last page(10th page), I want the next 500(501-1000) records to be retrieved, replace the first 500 records in the session, and then to be displayed to user. To achieve this, in my action class, I need to keep track the page number that the user click on.When the action class find that the last page(10th page) is clicked, The next 500 records will be retrieved, and be displayed to user. My Jsp name: paymentHistory.jsp My status and problem: The first 500 records can be displayed on 10 pages correctly. When I click on the page index(for example, I click on page 2), the URL changed to http:///rootcontext/paymentHistory.jsp?pager.offset=50. BUT MY ACTION CLASS IS NEVER BE CALLED.I AM STUNK HERE!!! My question: 1. How can I make the my action class to be called whenever user click on a page index?( I tried put html:form action=paymentHistory.do in my paymentHistory.jsp. but it shows same result. So I guess when user click on page index, it does not submit the form). 2. How can I pass pageNumber as a request parameter? (I tried put pg:param name=pageNumber / inside pg:pager. It doesn't show pageNumber on URL. I also tried to put ?number=%= pageNumber % in the line a href=%= pageUrl %?number=%= pageNumber %%= pageNumber %/a. It doesn't work. The following is my paymentHistory.jsp: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN %@ page language=java import=org.apache.struts.webapp.example.Payment % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % !-- for page navigation-- %@ taglib uri=http://jsptags.com/tags/navigation/pager; prefix=pg % html:html locale=true head titlehistory/title META name=GENERATOR content=IBM WebSphere Studio /head body table align=center cellspacing=0 cellpadding=0 border=0 width=480 tr td align=centerPayment History/td /tr /table hr !--This following table is used to display account history-- table align=center cellspacing=0 cellpadding=0 border=0 !-- payment history header -- logic:present name=payments tr td Amount /td td Balance /td /tr html:form action=/paymentHistory.do pg:pager maxPageItems=1 logic:iterate id=aPayment name=payments scope=session tr pg:item td bean:write name=aPayment property=amount/ /td td bean:write name=aPayment property=balance/ /td /pg:item /tr /logic:iterate /table !-- page navigation area -- pg:index pg:prev a href=%= pageUrl %[ (%= pageNumber %) Previous ]/a /pg:prev pg:pages a href=%= pageUrl %%= pageNumber %/a /pg:pages pg:next a href=%= pageUrl %[ Next (%= pageNumber %) ]/a /pg:next /pg:index /pg:pager /html:form /logic:present /body /html:html Thanks for your help. -Original Message- From: Jenny [mailto:[EMAIL PROTECTED]] Sent: Saturday
Re: does struts has the functionality
Hi, there: The link http://jsptags.com/tags/navigation/pager/ that Anand provided is very good for page navigation. However, I have two questions regarding to using it. First, in order to use it, we have to add the following in our web.xml. taglib taglib-uri http://jsptags.com/tags/navigation/pager /taglib-uri taglib-location /WEB-INF/jsp/pager-taglib.tld /taglib-location /taglib Because the taglib-uri refer to http://jsptags.com/tags/navigation/pager. That means if the link doesn't work, our program will not work. In that case, is it safe to use it? Second question. I have 2000 records totally. I want to retrieve 1000 records from DB at one time and display it to user. When user navigate to the last page of the first 1000 records, user should still be able to click next to navigate to the second 1000 records. How can I have next in the last page of the first 1000 records. From my understanding, the jspTags pager will take the first 1000 records as the total search result, therefore, at the last page of the first 1000 records, it will not display next navigation ability. But in my senario,I still need the ability because I still have another 1000 records to show. At the last page of the second 1000 records, there should be no next navigation ability.In order to achieve this, do I need to modify the taglib, or just modify my JSP file. I tried to describe my senario as clear as possible. It may still not clear to you. Please feel free to ask me to clarify if you have any doubt. Thank you for your reply. Jenny -Original Message- From: Jenny [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 14, 2002 12:14 PM To: Struts Users Mailing List Subject: Re: does struts has the functionality - Original Message - From: Anand Belaguly [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, September 14, 2002 1:58 PM Subject: RE: does struts has the functionality Jenny, Thanks for the link, it looks good.I will try it sometime. We have used the jspTags pager for recordsets more than 2500 records(one time query) and it gets displayed in less than 2 seconds.Also it is very easy to use, you just need to encapsulate ur presentation logic with these tags. Anand - Original Message - From: Anand Belaguly [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, September 13, 2002 4:42 PM Subject: RE: does struts has the functionality This works pretty good. http://jsptags.com/tags/navigation/pager/ Anand -Original Message- From: jenny zhang [mailto:[EMAIL PROTECTED]] Sent: Friday, September 13, 2002 1:32 PM To: Struts Users Mailing List Subject: does struts has the functionality Hi, there: Does struts has the functionality of supporting page navigation? I have over 100 search results, I would like display them inseperate pages(10 records/page). In each page, I would like have previous, next button. I am not sure if struts has the functionality. If you know this, could you please share the info? I appreciate your info. Thanks __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
To Anand: Re: does struts has the functionality
Anand: Thank you. I have one more question.in your previous email, you said We have used the jspTags pager for recordsets more than 2500 records(one time query).My understanding is that you got all the records one time from Database. Where did you keep those records? Is it in session, or somewhere? The middle tier developer in our company wants to get 20 records(20 records/page)from Database at one time. For example, in order to display the first page, the first 20 records will be retrieved from database. When user click next,next 21-40 records will be retrieved and displayed on the next page.The reason he wants to do it that way is he doesn't want to keep many records in session. For me, I prefer to retrieve all records once. I think I should convince him. But I am not sure I have enough reasons. Could you please give me your suggestons, and your solutions? I really appreicate your help. Thank you very much. Jenny - Original Message - From: Anand Belaguly [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, September 14, 2002 5:20 PM Subject: RE: does struts has the functionality Jenny, I believe you can use the arrows instead of pages. You can even put images developed by your graphic designers. Here is the code snippet. %@ taglib uri=http://jsptags.com/tags/navigation/pager; prefix=pg % pg:pager pg:param name=keywords/ ex:searchresults pg:item %= searchResult % /pg:item /ex:searchresults pg:index pg:prev a href=%= pageUrl %[-- Back]/a /pg:prev pg:next a href=%= pageUrl %[ Next -- ]/a /pg:next /pg:index /pg:pager Hope this helps. Anand -Original Message- From: Jenny [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 14, 2002 12:14 PM To: Struts Users Mailing List Subject: Re: does struts has the functionality Anand: Thanks for your valuable information. It is very helpful.I am going to use it. One more question(sorry to bother you again), the designer wants to use - -(graphic staff) instead of using numbers for page navigation. Since jspTags pager uses build-in variable pageNumber, it is not possible to achieve what the designer wants. Is my understanding right? I really appreciate your reply. Thank you in advance for your reply. Best regards, Jenny - Original Message - From: Anand Belaguly [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, September 14, 2002 1:58 PM Subject: RE: does struts has the functionality Jenny, Thanks for the link, it looks good.I will try it sometime. We have used the jspTags pager for recordsets more than 2500 records(one time query) and it gets displayed in less than 2 seconds.Also it is very easy to use, you just need to encapsulate ur presentation logic with these tags. Anand -Original Message- From: Jenny [mailto:[EMAIL PROTECTED]] Sent: Friday, September 13, 2002 7:18 PM To: Struts Users Mailing List Subject: Re: does struts has the functionality Anand: Thanks for your reply. This is an excellent link. I also got another link from Dave(in our group). The link URL is: http://edhill.its.uiowa.edu/display/. I am not sure if you knew that link. Both the link you provided and the above link are excellent. Now, I am not sure which one should I choose. I have large results sets. Does the solution you provided me has performance issue? I appreciate your opinions on this. Thanks, Jenny - Original Message - From: Anand Belaguly [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, September 13, 2002 4:42 PM Subject: RE: does struts has the functionality This works pretty good. http://jsptags.com/tags/navigation/pager/ Anand -Original Message- From: jenny zhang [mailto:[EMAIL PROTECTED]] Sent: Friday, September 13, 2002 1:32 PM To: Struts Users Mailing List Subject: does struts has the functionality Hi, there: Does struts has the functionality of supporting page navigation? I have over 100 search results, I would like display them inseperate pages(10 records/page). In each page, I would like have previous, next button. I am not sure if struts has the functionality. If you know this, could you please share the info? I appreciate your info. Thanks __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca
path problem
Hi, All: I have a index.jsp and a folder called templates in same directory as WEB-INF directory does. In the template directory, I have welcome.jsp. In my index.jsp, I will refer welcome.jsp. The way I refer it is as following: index.jsp --- % page language=java % % taglib uri=/WEB-INF/struts-template.tld prefix=template % template:insert template=/templates/welcome.jsp ... ... /template:insert I made a myApp.war file that include the above files and folders and other files. After I deployed the war, When I run the application as http://localhost:7001/myApp/index.jsp, (myApp is my war file name, I deployed the war on weblogic7.0 and run it on weblogic server). But when I run index.jps, I got error: Included resource or file /myApp/templates/welcome.jsp not found from requested resource /myApp/home.jsp. I think I should config something somewhere, but I can't figure out what to do. If you know how, please help me. Thanks, Best regards, Jenny
Re: path problem
Hi, Boney: Thank you for your reply. I have tried both way(Sorry I forgot to mention it in the previous email)--- have / before templates and remove / before templates, in both way, I got exactly the same error. Jenny. - Original Message - From: Boney Sze [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, September 08, 2002 10:42 PM Subject: Re: path problem hello Jenny, try this one... template:insert template=templates/welcome.jsp try removing the / before templates which is your templates directory. Boney Jenny wrote: Hi, All: I have a index.jsp and a folder called templates in same directory as WEB-INF directory does. In the template directory, I have welcome.jsp. In my index.jsp, I will refer welcome.jsp. The way I refer it is as following: index.jsp --- ... ... I made a myApp.war file that include the above files and folders and other files. After I deployed the war, When I run the application as http://localhost:7001/myApp/index.jsp, (myApp is my war file name, I deployed the war on weblogic7.0 and run it on weblogic server). But when I run index.jps, I got error: Included resource or file /myApp/templates/welcome.jsp not found from requested resource /myApp/home.jsp. I think I should config something somewhere, but I can't figure out what to do. If you know how, please help me. Thanks, Best regards, Jenny - Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: want to have errors to be displayed in different page
Adrian and Aaron: Thank you very much for answering my question. But I haven't gotten there. It seems that errorpage.jsp is never been called. The details is as following: I am practising struts-example1.1-b2. I tried to have errors displayed in different page(errorpage.jsp)(The example itself has errors displayed in logon.jsp page).The following is part of struts-config.xml that related to this problem. actionpath=/logon type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session input=logon exception key=expired.password type=org.apache.struts.webapp.example.ExpiredPasswordException path=/changePassword.jsp/ /action Notice, in the input attribute, it has input=logon. In order to have errors displayed in errorpage.jsp page, I changed input=/errorpage.jsp(errorpage.jsp is in same folder as logon.jsp). When I enter wrong user name and password in logon.jsp and click submit button, the URL changed to http://localhost:8080/Struts-example/logon.do,(which is what I expected), but the page under the URL is totally blank(it suppose to show the content of errorpage.jsp). For testing purpose, I have a very simple erropage.jsp for now. The following is the content of my errorpage.jsp: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html locale=true head titleerrorpage/title /head body This is the error page /body /html:html It suppose to show This is the error page. But nothing shows. The interesting thing is: when I tried the above changes with struts-example(version 1.0),it works perfectly fine. In struts-example(version 1.0) itself,it has input=/logon.jsp. I changed it to input=/errorpage.jsp. So I guess 'input' attribute in verson 1.1.b2 has different meaning, but I can't figure out what's the different. I am stuck here. Hope you can help me out. Sorry to bother you. Best regards. Jenny - Original Message - From: Adrian Brown [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 3:54 AM Subject: Re: want to have errors to be dispalyed in diffrent page Hi Jenny, In case no one else answered this, you need to put some errors in your session before they can be captured and displayed by the errorpage.jsp. Try the following code in your action: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.login)); saveErrors(request, errors); And make sure there is a corresponding entry in your ApplicationResources.properties file, such as: error.login=There was a problem with our application logging in. Please wait ten minutes and try again or contact an Administrator. Hope that helps. Adrian --- Jenny [EMAIL PROTECTED] wrote: Aaron: I figure out you must mean this- to change input attribute in struts-config.xml. I have done this. The following is part of my struts-config.xml file: action-mappings action path=/login type=...LoginAction name=loginForm input=/errorspage.jsp scope=request . /action /action-mappings Note: I have input=/errorspage.jsp. It is point to errorpage, not login page. But in errorpage, I only get Please correct the following errors before you proceed:, there is no specific error message showed, so user don't know which field is wrong. Does anyone know what could cause the problem? Thanks. Jenny - Original Message - From: Jenny [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, August 29, 2002 5:42 PM Subject: Re: want to have errors to be dispalyed in diffrent page Aaron: Thank you for your reply. But I am not sure I get what you mean. You said change the input attribute for your action to point to the page you want your errors displayed on.. In my login.jsp page, I have: ... html:text property=userName / ... html:password property=password/ .. How can change the input attribute to point to my errorpage.jsp. What do you mean by input attribute? Could you explain in a little bit detail? Thank you very much Jenny - Original Message - From: Aaron Oathout [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 5:26 PM Subject: Re: want to have errors to be dispalyed in diffrent page Just a guess as I haven't tried this, but it would seem to me you could change the input attribute for your action to point to the page you want your errors displayed on. Anybody thats tried this care to confirm or correct my assumption? Aaron
To Aaron: Re: want to have errors to be displayed in different page
Thank you, Aaron. The explaination is in very detail. But I still not clear about one thing. In the following part of your code: ul html:messages id=error libean:write name=error//li /html:messages /ul you use id=error. Where should define error? I tried to clear it by myself, but it seems not easy for me to find answer by myself. Please give me a hint. Thank you so much regards Jenny - Original Message - From: Aaron Oathout [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 6:10 PM Subject: Re: want to have errors to be dispalyed in diffrent page No problem, in struts-config.xml you should have an action defined like the following (different values of course): action path=/logon type=org.ifmc.struts.action.AuthenticationAction name=logonForm scope=request validate=true input=template.logon.layout parameter=process forward name=continue path=/showPortal.do redirect=true / /action The input attribute is used by the action when validation fails. Instead of having it point to login.jsp in your case, have it point to errorpage.jsp. In errorpage.jsp, put something like the following where you want the errors displayed (this is assuming struts 1.1x, can't remember syntax for 1.0, but there is something similar): logic:messagesPresent bean:message key=errors.header/ ul html:messages id=error libean:write name=error//li /html:messages /ul /logic:messagesPresent Hopefully this helps. Maybe this link will help clear it up also ( take a look at section 3.3.4 ). http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_view.html Aaron On Thu, 29 Aug 2002, Jenny wrote: Aaron: Thank you for your reply. But I am not sure I get what you mean. You said change the input attribute for your action to point to the page you want your errors displayed on.. In my login.jsp page, I have: ... html:text property=userName / ... html:password property=password/ .. How can change the input attribute to point to my errorpage.jsp. What do you mean by input attribute? Could you explain in a little bit detail? Thank you very much Jenny - Original Message - From: Aaron Oathout [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 5:26 PM Subject: Re: want to have errors to be dispalyed in diffrent page Just a guess as I haven't tried this, but it would seem to me you could change the input attribute for your action to point to the page you want your errors displayed on. Anybody thats tried this care to confirm or correct my assumption? Aaron On Thu, 29 Aug 2002, Jenny wrote: Dear friends: I am using struts to develope web application. I use html:errors/ in login.jsp, and I implemented validate(..) method in LoginActionForm class. If user enter invalid username or password in login page(login.jsp), I want the errors to be displayed in another page(errorpage.jsp), other than in login page. Is there a way to fulfill this? Your help is appreciated. Thanks, Jenny __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
want to have errors to be dispalyed in diffrent page
Dear friends: I am using struts to develope web application. I use html:errors/ in login.jsp, and I implemented validate(..) method in LoginActionForm class. If user enter invalid username or password in login page(login.jsp), I want the errors to be displayed in another page(errorpage.jsp), other than in login page. Is there a way to fulfill this? Your help is appreciated. Thanks, Jenny __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: want to have errors to be dispalyed in diffrent page
Aaron: Thank you for your reply. But I am not sure I get what you mean. You said change the input attribute for your action to point to the page you want your errors displayed on.. In my login.jsp page, I have: ... html:text property=userName / ... html:password property=password/ .. How can change the input attribute to point to my errorpage.jsp. What do you mean by input attribute? Could you explain in a little bit detail? Thank you very much Jenny - Original Message - From: Aaron Oathout [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 5:26 PM Subject: Re: want to have errors to be dispalyed in diffrent page Just a guess as I haven't tried this, but it would seem to me you could change the input attribute for your action to point to the page you want your errors displayed on. Anybody thats tried this care to confirm or correct my assumption? Aaron On Thu, 29 Aug 2002, Jenny wrote: Dear friends: I am using struts to develope web application. I use html:errors/ in login.jsp, and I implemented validate(..) method in LoginActionForm class. If user enter invalid username or password in login page(login.jsp), I want the errors to be displayed in another page(errorpage.jsp), other than in login page. Is there a way to fulfill this? Your help is appreciated. Thanks, Jenny __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: want to have errors to be dispalyed in diffrent page
Aaron: I figure out you must mean this- to change input attribute in struts-config.xml. I have done this. The following is part of my struts-config.xml file: action-mappings action path=/login type=...LoginAction name=loginForm input=/errorspage.jsp scope=request . /action /action-mappings Note: I have input=/errorspage.jsp. It is point to errorpage, not login page. But in errorpage, I only get Please correct the following errors before you proceed:, there is no specific error message showed, so user don't know which field is wrong. Does anyone know what could cause the problem? Thanks. Jenny - Original Message - From: Jenny [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, August 29, 2002 5:42 PM Subject: Re: want to have errors to be dispalyed in diffrent page Aaron: Thank you for your reply. But I am not sure I get what you mean. You said change the input attribute for your action to point to the page you want your errors displayed on.. In my login.jsp page, I have: ... html:text property=userName / ... html:password property=password/ .. How can change the input attribute to point to my errorpage.jsp. What do you mean by input attribute? Could you explain in a little bit detail? Thank you very much Jenny - Original Message - From: Aaron Oathout [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 5:26 PM Subject: Re: want to have errors to be dispalyed in diffrent page Just a guess as I haven't tried this, but it would seem to me you could change the input attribute for your action to point to the page you want your errors displayed on. Anybody thats tried this care to confirm or correct my assumption? Aaron On Thu, 29 Aug 2002, Jenny wrote: Dear friends: I am using struts to develope web application. I use html:errors/ in login.jsp, and I implemented validate(..) method in LoginActionForm class. If user enter invalid username or password in login page(login.jsp), I want the errors to be displayed in another page(errorpage.jsp), other than in login page. Is there a way to fulfill this? Your help is appreciated. Thanks, Jenny __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
struts with Jbuilder6
Greetings: I want to use struts with JBuilder6, but I don't know how to set up it. Could you help me if you know how to do it? Thank you very much. Jenny __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts with Jbuilder6
Melissa, Thank you very much! I have set up the environment just now. But when I test index.jsp(web run), it shows me the error: weblogic.management.configuration.ConfigurationException: error settin attribute Path to value C%|/project/secondstrutsproject for mydomain:Name=JBuilder_WebRun,Type=Application - with nested exception: [javax.management.MBeanException] at weblogic.management.internal.xml.ConfigurationParser$ConfigurationHandler.pa rseMBeanAttributes(ConfigurationParser.java:320) at weblogic.management.internal.xml.ConfigurationParser$ConfigurationHandler.st artElement(ConfigurationParser.java:184) at weblogic.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1335) at weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVa lidator.java:823) at weblogic.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentS canner.java:1852) at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat ch(XMLDocumentScanner.java:1233) at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca nner.java:380) at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:900) at weblogic.management.internal.xml.ConfigurationParser.parse(ConfigurationPars er.java:103) at weblogic.management.internal.xml.XmlFileRepository.loadDomain(XmlFileReposit ory.java:222) at weblogic.management.internal.xml.XmlFileRepository.loadDomain(XmlFileReposit ory.java:186) at java.lang.reflect.Method.invoke(Native Method) at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl .java:562) at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5 48) at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea nImpl.java:285) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437) at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178) at $Proxy1.loadDomain(Unknown Source) at weblogic.management.AdminServer.configureFromRepository(AdminServer.java:183 ) at weblogic.management.AdminServer.configure(AdminServer.java:168) at weblogic.management.Admin.initialize(Admin.java:207) at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:317) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169) at weblogic.Server.main(Server.java:35) Reason: Fatal initialization exception. I noticed that it uses 8080 as port number, but in fact, in weblogic, the port number is 7001. Why it shows the above error message? How to fix it. Could you please help me? Thanks! Jenny - Original Message - From: Melissa L Kelley [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 6:32 PM Subject: Re: struts with Jbuilder6 On Tue, 21 Aug 2001, Jenny wrote: You can try this tutorial link for getting started with JBuilder 5 and work from there to get it working with JBuilder 6. There are plug-ins for JBuilder and Struts at Borland's Code Central site as well (look in open tools). Tutorial: http://www1.tramsasp.com/?section=dev Code Central: http://codecentral.borland.com/codecentral/ccweb.exe/home I haven't used JBuilder 6, but I can say that I haven't had any problems developing struts apps with JBuilder 5. -- stu: www.stuology.net It just no longer is plain simple safe fun when it's the psycho chimp that has the ray gun Stuology -- A million monkeys can't be wrong Greetings: I want to use struts with JBuilder6, but I don't know how to set up it. Could you help me if you know how to do it? Thank you very much. Jenny __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- stu: www.stuology.net It just no longer is plain simple safe fun when it's the psycho chimp that has the ray gun Stuology -- A million monkeys can't be wrong -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: :struts with Jbuilder6
yes, I can. Jenny - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 9:50 PM Subject: ´ð¸´:struts with Jbuilder6 can you in chinese at you system? - ÔʼÓʼþ - ·¢¼þÈË: Jenny ·¢ËÍʱ¼ä: 2002Äê8ÔÂ22ÈÕ 5:40 ÊÕ¼þÈË: Struts Users Mailing List Ö÷Ìâ: struts with Jbuilder6 Greetings: I want to use struts with JBuilder6, but I don't know how to set up it. Could you help me if you know how to do it? Thank you very much. Jenny __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]´ÓÍøÕ¾µÃµ½¸ü¶àÐÅÏ¢¡£MSN Explorer Ãâ·ÑÏÂÔØ:http://explorer.msn.com/lccn __ Post your ad for free now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]