RE: OS / Browser tag?
I like the idea for the OS and Browser check. However I would suggest that the checks be made separately and not within one tag. How about if we can modify the logic:present to have two more parameters? ( that can also go for notPresent ). E.g. logic:present os=unix !-- the code -- /logic:present logic:present browser=Netscape version=4.0 !-- the code -- /logic:present Above approach will result in less of a learning curve and fewer tags. My $0.02 Jay Patel [EMAIL PROTECTED] -Original Message- From: Assenza, Chris [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 8:13 AM To: '[EMAIL PROTECTED]' Subject: RE: OS / Browser tag? I have something written that will do the server-side browser detection, etc. but not a tag for it. It's actually an adaptation of a nice PHP-based script that I stumbled on a while back. :) It'd be a great idea for a tag though - go for it! :) Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 4:59 PM To: [EMAIL PROTECTED] Subject: Re: OS / Browser tag? Sorry, maybe that wasn't clear! I am basically looking for an IF tag which utilises the OS and/or the browser that the client is running on. eg IF Unix and Netscape THEN would be logic:IF_os_browser os=unix browser=Netscape //do something /logic:IF_os_browser and the tag would automatically check for current client os and browser. Hope that's clearer! Cheers, Dave David_Hay/Lex/Lexmark.LEXMARK@sweeper.lex.lexmark.com on 10/03/2001 04:17:59 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: OS / Browser tag? Hi everyone. Just wondering if anyone has written a tag to do something specific to OS or Browser? I'm probably going to write my own if no-one else has already done it! Cheers, Dave
RE: OS / Browser tag?
I have not looked at the Present Tag code or the design. However, I think if it is designed to be flexible, present tag can be used to check the browser and the os. One way is to expand the Scope values. One more scope value can be added as System where the present tag will search for values regarding system. My $0.02 Jay Patel [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 10:42 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: OS / Browser tag? Hi Jay, Yeah, coming down to having two tags. Would be great to add them to logic:present tag, but not sure it would work - seems to me there is a fundamental difference in that logic:present is checking for values in the request. What do others think? Dave PS Cross posting to dev list too. Jay Patel [EMAIL PROTECTED] on 10/04/2001 11:11:34 AM Please respond to [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: OS / Browser tag? I like the idea for the OS and Browser check. However I would suggest that the checks be made separately and not within one tag. How about if we can modify the logic:present to have two more parameters? ( that can also go for notPresent ). E.g. logic:present os=unix !-- the code -- /logic:present logic:present browser=Netscape version=4.0 !-- the code -- /logic:present Above approach will result in less of a learning curve and fewer tags. My $0.02 Jay Patel [EMAIL PROTECTED] -Original Message- From: Assenza, Chris [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 8:13 AM To: '[EMAIL PROTECTED]' Subject: RE: OS / Browser tag? I have something written that will do the server-side browser detection, etc. but not a tag for it. It's actually an adaptation of a nice PHP-based script that I stumbled on a while back. :) It'd be a great idea for a tag though - go for it! :) Chris Christopher Assenza Phone:412.201.6026 Fax: 412.201.6060 Email:[EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 4:59 PM To: [EMAIL PROTECTED] Subject: Re: OS / Browser tag? Sorry, maybe that wasn't clear! I am basically looking for an IF tag which utilises the OS and/or the browser that the client is running on. eg IF Unix and Netscape THEN would be logic:IF_os_browser os=unix browser=Netscape //do something /logic:IF_os_browser and the tag would automatically check for current client os and browser. Hope that's clearer! Cheers, Dave David_Hay/Lex/Lexmark.LEXMARK@sweeper.lex.lexmark.com on 10/03/2001 04:17:59 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: OS / Browser tag? Hi everyone. Just wondering if anyone has written a tag to do something specific to OS or Browser? I'm probably going to write my own if no-one else has already done it! Cheers, Dave
RE: Select tag
Another way is to have the FormBean populated with the desired value. So when the select tag is rendered, it will automatically select the value from the form bean. -Original Message- From: SUHAS G. KULKARNI [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 12:51 AM To: [EMAIL PROTECTED] Subject: RE: Select tag check this I think u have to change the select tag a bit - html:select property=grouptype value=theoneUwantTOSelect -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 11:14 AM To: [EMAIL PROTECTED] Subject: Select tag Hi all How do I disply a desired value, while populating the select tag? I'm using the tag like this... html:select property=grouptype html:options collection=allgroups property=key labelProperty=value/ /html:select It is showing me the dropdown box with the values in collection 'grouptype' but the requirement is to show the specific value while screen is displayed. Sandeep mahajan
RE: custom taglibs
Check out jakarta taglibs. Jay. -Original Message-From: Metehan Selvi [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 30, 2001 10:52 AMTo: [EMAIL PROTECTED]Subject: custom taglibs Are there any additional customtags, which might be useful in case of struts? cheers /mete
RE: sessionId and html:img
You may want to try using pageKey instead of srcKey. It should not make a difference but something to check on! Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: Debasish Ghosh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 10:25 PM To: [EMAIL PROTECTED] Subject: sessionId and html:img Hi - I am using Struts 1.0 and Tomcat 3.2.2. I am using the internationalization feature of Struts to render an image as follows : html:img srcKey=image.logotop/ The first time the page appears, the image is not rendered on screen and if I do a Refresh, then the image somes properly. If I do a view source the first time, the tag gets translated with a session id attached. The session id does not come in subsequent requests. I realize that this is due to URL rewriting, but can anyone help me out on the problem of image rendering the first time the screen is displayed ? However, the problem does not arise if I turn off the internationalization feature and include the gif file directly with the img tag. Please Help !!! Regards. - Debasish __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: Can't Find Message Resources
Title: Message Make sure that Application.properties file is accessible from your classpath. Best way to do this is to put it in /WEB-INF/classes/ directory. Jay Patel972.701.9773 972.849.0373 Mobile[EMAIL PROTECTED] -Original Message-From: Mark Bennett [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 11:04 PMTo: Struts-UserSubject: FW: Can't Find Message Resources I have just finished installing Struts 1.0 on my Linux box and am trying to use it in combination with Tomcat 4.0. I am having trouble running the sample applications (or any applications that use Struts for that matter). I don't want to include the complete body of the Servlet exception but you can see it for yourself by visiting http://24.64.133.82:8080/struts-example. I have tried editing the web.xml and server.xml files associated with this application/server but nothing seems to work. This is way beyond my head right now, but if there's any information that would help anyone provide any suggestions I would be more than happy to provide it. Thanks in advance. -Mark
RE: html:button and onclick - doesn't work
You need: onclick=javaScript:sub... Jay. -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 11:49 AM To: [EMAIL PROTECTED] Subject: html:button and onclick - doesn't work Does anyone know why this works: html:submit styleClass=inputButtonNormal onclick=submitForm('Reset') Click me /html:submit BUT this doesn't? html:button styleClass=inputButtonNormal onclick=submitForm('Reset') Click me /html:button __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: html:button and onclick - doesn't work
the property attribute is required; so, html:button property=foo onclick=javascrip:submitForm( 'reset' ) value= Click Me / should work. Jay. -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 1:17 PM To: [EMAIL PROTECTED] Subject: RE: html:button and onclick - doesn't work The problem I'm having is that I get a missing id/attribute error from my app server - I can't even get the page to render to test my javascript! Might be an iPlanet bug though... --- Jay Patel [EMAIL PROTECTED] wrote: You need: onclick=javaScript:sub... Jay. -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 11:49 AM To: [EMAIL PROTECTED] Subject: html:button and onclick - doesn't work Does anyone know why this works: html:submit styleClass=inputButtonNormal onclick=submitForm('Reset') Click me /html:submit BUT this doesn't? html:button styleClass=inputButtonNormal onclick=submitForm('Reset') Click me /html:button __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: Urgent : Any Example which will show htlm:select html:option tag
Title: Message Yogesh, This is straight from one of my JSPs: html:select property="templateId" html:options collection="designs" property="id" labelProperty="name"//html:select I have a loaderTag that loads the design objects from the database and puts them into ArrayList. This array list is then put into the session under name "designs". Each design object has id and name attribute that I am using for the options. Hope this helps. Jay Patel972.701.9773 972.849.0373 Mobile[EMAIL PROTECTED] -Original Message-From: yogesh b [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 24, 2001 1:30 PMTo: [EMAIL PROTECTED]Subject: Urgent : Any Example which will show htlm:select html:option tag Hi All, Any one can send the simple example which will eloborate me how to use struts htlm:select html:option with form and jsp.It's very urgent. Thanks in Advance. regards Yogesh Borse
RE: win98 struts-example problem/tomcat bug
Title: Message Last I checked, I had to mess with the tomcat.bat to make sure that the latest version of XML parser was being used. I am not sure if that is your problem, but it is a good place to look. Check the Struts installation instructions. I think it talks about how to resolve this issue. Basically, you need the latest version of JAXP and put it in your classpath. And change the tomcat.bat to leave the system classpath in front of the tomcat classpath. Look for the following line in tomcat.bat: set CP=%CP%;%CLASSPATH%; and change it to: set CP=%CLASSPATH%;%CP%;my $0.02 Jay Patel972.701.9773 972.849.0373 Mobile[EMAIL PROTECTED] -Original Message-From: John McClain [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 11:57 AMTo: [EMAIL PROTECTED]Subject: win98 struts-example problem/tomcat bug I have tomcat3.2.3, struts, xreces1.4.3 setup on win98. I have insured that I have all needed files in tomcat\lib, and that all struts jars are in WEB-INF\lib. I have copied the struts-example.war file into tomcat\webapps. When I startup tomcat, I get all kinds of class not found errors. THIS DOES NOT HAPPEN ON LINUX UNDER THE SAME CONDITIONS. So... I put WEB-INF/classes; WEB-INF/lib/*.jar into my tomcat classpath by modifying the tomcat.bat script - This solved the problem! HOWEVER, this implies to me that there is a bug when tomcat is run on win98. Can anyone else give me another explanation, and/or a solution so that I don't have to include context specific classes and jars into my classpath??? John and Michelle McClain7604 Muschetto Ct.Citrus Heights, Ca. 95621(916)728-5223
RE: Image display problem
Sandeep, When you specify an image src as images/foo.gif that image will be fetched from where the context of the servlet or jsp. i.e. if the if the jsp is /app/jsp/bar.jsp, then the image will be looked up as /app/jsp/images/foo.gif for that jsp. Same image src will render differently for jsp /baz.jsp; for baz.jsp, the image will show up correctly since baz is at a root level and so is the images directory. To fix this, use the struts html:img tag. And specify the locations of the images in application.properties file. Make sure the you have the leading / for each image specified in the properties file: Here is an example: Application.properties: Image.login=/images/login.gif Image.logout=/images/logout.gif HTML:IMG tag: html:img pageKey=image.login height=xxx width=yyy / The html image tag will prepend the proper context in front of the images. Hope this helps. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 25, 2001 9:18 AM To: [EMAIL PROTECTED] Subject: Image display problem Hi Friends, We are facing a problem with image display using JSP. When the page is being displayed for the first time then the images are being displayed correctly. However when the same page is being displayed again (after a validation failure) the images are not being displayed. The same is the problem when other pages are being displayed (e.g. checking logon and moving to the user page). Currently our folder structure is approot approot/jsp approot/jsp/images and the image is specified as img src=images/abc.gif. We tried moving the images folder to the root and specifying the path from the root as in /images/abc.gif. However the images are still not being displayed. What we have observed is that when the validation fails then the image is accessed from the path /approot/images whereas in the normal case the image is accessed from /jsp/images. Does anybody know why this happens ? Any help will be appreciated. TIA Sandeep
RE: Most Urgent - html:select tag
Short answer: html:select property=designId html:options collection=designs property=id labelProperty=name/ /html:select Long answer can be found at http://jakarta.apache.org Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep
RE: RE: Most Urgent - html:select tag
From the subscription.jsp of the struts-example: %-- In real life, these would be loaded from a database --% % java.util.ArrayList list = new java.util.ArrayList(); list.add(new org.apache.struts.webapp.example.LabelValueBean(IMAP Protocol, imap)); list.add(new org.apache.struts.webapp.example.LabelValueBean(POP3 Protocol, pop3)); pageContext.setAttribute(serverTypes, list); % html:select property=type html:options collection=serverTypes property=value labelProperty=label/ /html:select Iteration is done by the tag, so don't worry. Each element of the collection will be looked up, from each object in the collection, two properties will be looked up; namely value and label ( in above example ). You may have different properties that you may want to look-up. Previous example I sent you *was* a real code I am using. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:24 PM To: [EMAIL PROTECTED] Subject: Re: RE: Most Urgent - html:select tag Hi jay... Thank you for your urgent reply. i'm trying out , but confused. will u please, send one example? sandeep On Sat, 25 Aug 2001 Jay Patel wrote : Short answer: html:select property=designId html:options collection=designs property=id labelProperty=name/ /html:select Long answer can be found at http://jakarta.apache.org Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep
RE: Cannot retrieve mapping for action /j_security_check
You will need to add the Action mapping in your struts-config.xml file. You will also need the form-bean mapping that your form will use to pass the form data to the action class. Here is an example. form-beans !-- Loin form bean -- form-bean name=loginForm type=com.dextera.examples.forms.LoginForm/ /form-beans action-mappings !-- Process a user login -- actionpath=/login type=com.dextera.examples.actions.LoginAction name=loginForm scope=request input=/login.jsp forward name=success path=/home.jsp/ /action-mappings All in all you will need the following: 1. A form bean to carry the data 2. Action servlet to perform your action 3. Form bean declaration in struts-config 4. Action mapping in struts-config Good luck. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: Shriver, Ryan [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:26 PM To: '[EMAIL PROTECTED]' Subject: Cannot retrieve mapping for action /j_security_check Hello all, I looked in the archives but couldn't find an answer to my question. I'd like to convert my working form-based login page to use struts' html form taglib. I get the following Exception when trying to load login.jsp: javax.servlet.ServletException: Cannot retrieve mapping for action /j_security_check I was hoping someone could help out with the conversion. This works: form name=login action=j_security_check method=POST table border=3 cellpadding=2 cellspacing=2 align=center tr th align=rightUsername:/th tdinput type=text name=j_username size=20/td /tr tr th align=rightPassword:/th tdinput type=password name=j_password size=20/td /tr tr align=center td colspan=2input type=submit value=Login/td /tr /table /form This does not: html:form action=j_security_check focus=j_username table border=3 cellpadding=2 cellspacing=2 align=center tr th align=rightUsername:/th tdhtml:text property=j_username//td /tr tr th align=rightPassword:/th tdhtml:password property=j_password//td /tr tr align=center td colspan=2html:submitLogin/html:submit/td /tr /table /html:form I'm hoping all I need to do is add an entry in struts-config.xml, but I'm not sure what that entry should be. Any help would be appreciated. -ryan
RE: RE: RE: Most Urgent - html:select tag
You are seeing that behavior is because Hashtable returns a Collection of Values when values() is invoked. It would be easier if you just had a bean that contained key and value information and have that bean in a Collection. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:41 PM To: [EMAIL PROTECTED] Subject: Re: RE: RE: Most Urgent - html:select tag Hi Jay, this will add only text which will be displyed in drop down box. how do I set values for it? i ve hash table from which i want to keep keys as values and hashtable values as displyed text in drop down box. Sandeep On Sat, 25 Aug 2001 Jay Patel wrote : From the subscription.jsp of the struts-example: %-- In real life, these would be loaded from a database --% % java.util.ArrayList list = new java.util.ArrayList(); list.add(new org.apache.struts.webapp.example.LabelVal- ueBean(IMAP Protocol, imap)); list.add(new org.apache.struts.webapp.example.LabelVal- ueBean(POP3 Protocol, pop3)); pageContext.setAttribute(serverTypes, list); % html:select property=type html:options collection=serverTypes property=value labelProperty=label/ /html:select Iteration is done by the tag, so don't worry. Each element of the collection will be looked up, from each object in the collection, two properties will be looked up; namely value and label ( in above example ). You may have different properties that you may want to look-up. Previous example I sent you *was* a real code I am using. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:24 PM To: [EMAIL PROTECTED] Subject: Re: RE: Most Urgent - html:select tag Hi jay... Thank you for your urgent reply. i'm trying out , but confused. will u please, send one example? sandeep On Sat, 25 Aug 2001 Jay Patel wrote : Short answer: html:select property=designId html:options collection=designs property=id labelProperty=name/ /html:select Long answer can be found at http://jakarta.apache.org Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep