getProperty using isProperty methods
Hmmm... I'm sending this one more time as it hasn't appeared in the list as of yet. Apologies if two copies suddenly show up! -Original Message- From: Arun Thomas [mailto:[EMAIL PROTECTED]] Sent: Friday, January 07, 2000 10:04 AM To: JSP Mail List Subject: jsp:getProperty using isProperty methods Hello all, I was reading through the excerpts from the book Drew mentions in his email on the thread "web app programming specifications query" (found at the site listed below) when I came across a section which caught my eye I've excerpted it below. Where would this kind of thing come in useful? Besides printing out either "true" or "false", is there any way to take advantage of the boolean nature of: jsp:getProperty name="blah" property="aBoolean" / assuming that this translates into a call to blah.isABoolean()? As far as I know, the jsp:getProperty tag isn't allowed to have a body, which means there's no way to do something conditionaly based on the result of the getProperty. Thanks very much! -AMT - Boolean properties For boolean properties, that hold only true or false values, you can elect to use another Bean convention for getter methods. This convention is to prefix the property name with is, and return a boolean result. For example, consider these method signatures: public boolean isProperty(); public boolean isEnabled(); public boolean isAuthorized(); The container will automatically look for this form of method if it cannot find a property access method matching the getter syntax discussed earlier. Setting the value of a boolean property is no different then the setter methods for other properties. public void setProperty(boolean b); public void setEnabled(boolean b); public void setAuthorized(boolean b); - Finally, I have recently reviewed an upcoming book from Manning Publishing called "Web Development with Java Server Pages" by Duane Fields and Mark Kolb. This goes into some detail about web app architectures and includes a fairly thorough example of the using the command pattern with a single controlling servlet. The book will be out in the next few months, but I think you can get a sneak peak at: http://www.manning.com Regards Drew Cox Barrack Consulting === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
JSP Model 2 question
Okay, I have a servlet, a bean, and a jsp page. Call the servlet by this url: /servlets/TestServlet?val=1 The servlet is set up like this: ... int val = new Integer( req.getParameter("val") ).intValue(); ValueBean vBean = new ValueBean(); vBean.setValue( v ); response.sendRedirect("finished.jsp"); ... The bean has the following methods: ... public int getValue(){ return val; } public void setValue( int v ){ val = v; } ... The finished.jsp page has the following: ... jsp:useBean id="valBean" scope="request" class="test.ValueBean" / jsp:getProperty name="valBean" property="value" / ... The page returns: 0 So, I'm trying to figure out if there's a scope issue or something because I should get a 1 displayed on the page instead of a 0. When you do a call redirect page from a servlet, I'm assuming it loses the bean that it was working on so when the jsp tries to use it, it's getting a new instance. Is there any way besides a session object to carry that bean over from the servlet that created it to the jsp that needs to display it? I mean, this is the whole deal about model 2. Hopefully this makes sense. Thanks, Jason === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Check this - annoying
Wes: Thanks for the contrary opinion. It is also contrary to the policies of this group. As I understand it, Sun's policy for this group is: NO ATTACHMENTS. The problem is, in this popular group, some newer members have not read the fine print. The policy is often overlooked. This discussion goes on every month. (Then there is the problem of viruses that post themselves to the group and those that hide in doc files.) Here is another contrary opinion: Un-enforced policies are not policies. Enforcing this policy will not frustrate anyone's ability to express their excellent ideas -- there are better options even for complex presentation needs. Sun could easily filter attachments at the server, enforce their policy, and put an end to this ongoing need to discuss, ad nauseam, what anyone that reads the group policies would know. May we politely ask Sun to enforce their "no attachments" policy by filtering attachments? Phil p.s. Do you really think your virus detection software is so good as to anticipate viruses yet developed? -Original Message- From: Williams, Wes [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Friday, January 07, 2000 7:26 PM Subject: Re: Check this - annoying To offer a contrary opinion, I greatly appreciate the architecture diagram that was posted. Please continue posting such attachments. Those who are unsure or do not have virus detection -- just don't open them. Thank you, Wes Williams -Original Message- From: greg [SMTP:[EMAIL PROTECTED]] Sent: Friday, January 07, 2000 9:01 AM To: [EMAIL PROTECTED] Subject: Re: Check this - annoying I am not normally inclined to post anything to a list server, but I will say that the sending of attachments and then the numerous warnings about the attachments is more then annoying. Since there are people who either have systems which are prone to automatically open attachments or they have no self control about not opening attachments, I suggest very strongly that no attachments be allowed on this list server. Though I am not a postmaster I do believe a simple scanning and removal of all mail containing attachments is very possible. Thank you for you time. Greg Boswell "If Bill Gates had a nickel for every time Windows crashes... Oh, wait! He does!" === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Can not find the file.
- Original Message - From: ZhangQi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 08, 2000 2:24 PM Subject: Can not find the file. hi all, I am a newer at Class - InputSource . I have some code as below, /* InputSource input; input = new InputSource( myclass.class.getResourceAsStream( "text.htm" ) ); input.setSystemId( myclass.class.getResource( "text.htm" ).toString() ); */ but I do not know where to put the text.htm in I have exception in the 2nd line and 3rd line. What can I do? AidyZhang === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
What components are necessary to start programning in servlet, JSP and JDBC?
Hi ! I'm want to start to program with servlet and JSP, and I'm planning to build them on Intel Pentium based NT and RedHat boxes, using Apache 1.3.9. and Oracle 8. I know NT, Oracle, SQL Server, and ASP, but a total newbie in servlet and JSP. I've downloaded the Apache 1.3.9 (it runs fine on both NT and RedHat), but I'm not sure which one to use next: JServ or Tomcat or both? After then, should I download the JDK? Which version of JDK should be downloaded? And since there is no JDK for Linux box from Sun, should I download it from blackdown.org site? Which version to use? I'm confused with the current state of multiple places and versions for JDK for Win Linux, Apache, JServ, Tomcat, JDBC, etc. Maybe somebody is willing to build a html pages that explain how to integrates all of those components, alongside with complete direct download links to them, so newbies like me don't get lost in the forest. Thank you all in advance. Warmest Regards, Januar Rahadi. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Check this - annoying
-Original Message- From: A mailing list about Java Server Pages specification and reference To offer a contrary opinion, I greatly appreciate the architecture diagram that was posted. Please continue posting such attachments. Those who are unsure or do not have virus detection -- just don't open them. Even if documents such as this are useful to some people, I don't think (large) attachments should be posted here - there is no real excuse. I think documents such as this should be placed on a (web) server and merely a link to it posted here. That way 1) anyone who is interested can look at them 2) they don't clog up the list and 3) the resource can be book-marked for future reference (for updates). In any case Word documents are hardly appropriate for a list about something as cross platform as JSP/Java :-) Steve S === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Win98+apache+Tomcat
I' ve tried to connect tomcat but I have an error that says apache has caused an error, I really need some help,I did everything in the HOWTO file and it doesn't run , I need to know if apache+tomcat run on Win98 or is only for WinNT. I need to know too if I have to intall Jsevr and Apache JServ 1.1b3 in order to run JSP files with apache. Omar Vera. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Unsubscribe
Unsubcribe jsp-interest Karanam Sekhar. __ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Can I send a response to specific frame?
I have to avoid of using JavaScrpit,so I can't use the ' "target" attribute of an A or FORM '. The question now is, how can I recognize that this is not a standard HTTP header? Thanks, Nir -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 07, 2000 11:55 PM To: [EMAIL PROTECTED] Subject: Re: Can I send a response to specific frame? Loomis Mascha wrote: It depends on how you're sending the request. If you might try the TARGET attribute in the anchor tag (i.e. A HREF="my.html" TARGET="leftframe"/A) or even in the form tag (i.e. FORM ACTION="my.html" TARGET="leftframe"/FORM This might also work from within the JSP (or servlet code): response.setHeader("Window-target","_top"); This works much like a meta tag in the header of an HTML file. Replace "_top" with whatever named window you want to send the page to. I got the idea from an HTML META tag primer (http://www.webdeveloper.com/html/html_metatags.html) It seems to work nicely. Before using the "Window-target" technique, you need to recognize that this is not a standard HTTP header, and you are totally at the mercy of browser implementors on whether they support it or not. IMHO, using the "target" attribute of an A or FORM element is better, because it is part of the HTML/4.0 spec. --mascha Craig McClanahan === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html