Re: My weblogic 5.1 sp8 isn't able to find web-app_2_2.dtd
Thanks everybody, If this helps you, I can tell you this weekend a was trying to run the 22/02 version on Tomcat and I got the same error... This is becouse I hadn't the xercers 1.2.3 on my classpath. Of course I revised my weblogic classpath and it was there :( Another thing, Is this error important? Becouse every thing seems to work fine on my app, even with this error. Pablo. --- "Craig R. McClanahan" [EMAIL PROTECTED] escribi: Pablo Estades Fernndez wrote: Hi all, I'm using this great framework for a few weeks and it seems fantastic, but I have experimented a problem with the last nightly versions; Weblogic doesn't find the http:// java.sun.com/j2ee/dtds/web-app_2_2.dtd. This is a problem (in Struts) that was introduced by recent changes. Apparently, the XML parser tries to resolve the external entity even if you tell it not to validate against the DTD. Among other times, this will fail if you are not connected to the Internet, or are behind a firewall that prevents external access. I am going to modify the build process to include local copies of the relevant DTDs so that this will work again. Craig = Pablo Estades Fernndez ([EMAIL PROTECTED]). OCTO Technology (www.octo.fr/es) C/ Albacete, 5 - 7a Pl. 28027 Madrid Tel : + 34 - 91 405 93 80 ___ Do You Yahoo!? Enva mensajes instantneos y recibe alertas de correo con Yahoo! Messenger - http://messenger.yahoo.es
Re: :80 in URL of Links generated in example app
I don't really understand you question, are trying to use struts with apache ? You have to know that struts will not work on the Apache server, you'll have to use Tomcat instead. The default port for Tomcat is 8080, so that you will have to type e.g. : http://localhost:8080/struts-example if you want to make it work on the 80 port you will have to change the server.xml file and change the value of the "port" parameter. Hope it helps. Thierry Thierry CoolsSenior Java Developer S1 Brussels Kleine Kloosterstraat, 23 1932 st. Stevens-Woluwe Belgium Tel : +32 2 200 43 82 Email : [EMAIL PROTECTED] - Original Message - From: Rick Smith To: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 5:00 AM Subject: :80 in URL of Links generated in example app I've been going over the example application and can't for the life ofme find where the :80 is appended to the URL when going through Apache.When the starting URL is http://localhost/struts-example the page comesup with :80 added after localhost. When I click on a link with :80 in itI end up back at the logon page. If I remove the :80 the link takes meto the correct page. I've spent some time looking through the code andconfig files and haven't found anything to explain either how to get ridof the :80 or how to make the app work with :80. If someone could pointme in the direction of the doc or code that is related to this orenlighten me in some way I would appreciate it. Thanks. Rick
RE: :80 in URL of Links generated in example app
Hmmm. I'm using Struts with ServletExec3.1 and Apache on Win98 without any problems so far. -Original Message-From: Thierry Cools [mailto:[EMAIL PROTECTED]]Sent: Monday, February 26, 2001 5:54 AMTo: [EMAIL PROTECTED]Subject: Re: :80 in URL of Links generated in example app I don't really understand you question, are trying to use struts with apache ? You have to know that struts will not work on the Apache server, you'll have to use Tomcat instead. The default port for Tomcat is 8080, so that you will have to type e.g. : http://localhost:8080/struts-example if you want to make it work on the 80 port you will have to change the server.xml file and change the value of the "port" parameter. Hope it helps. Thierry Thierry CoolsSenior Java Developer S1 Brussels Kleine Kloosterstraat, 23 1932 st. Stevens-Woluwe Belgium Tel : +32 2 200 43 82 Email : [EMAIL PROTECTED] - Original Message - From: Rick Smith To: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 5:00 AM Subject: :80 in URL of Links generated in example app I've been going over the example application and can't for the life ofme find where the :80 is appended to the URL when going through Apache.When the starting URL is http://localhost/struts-example the page comesup with :80 added after localhost. When I click on a link with :80 in itI end up back at the logon page. If I remove the :80 the link takes meto the correct page. I've spent some time looking through the code andconfig files and haven't found anything to explain either how to get ridof the :80 or how to make the app work with :80. If someone could pointme in the direction of the doc or code that is related to this orenlighten me in some way I would appreciate it. Thanks. Rick
Re: :80 in URL of Links generated in example app
I'm running with Tomcat 3.2.1 and using mod_jk to work with Apache. Sorry for not making that clear before. I added .do to the JkMount for struts-example so the .do files are working but I'm finding I get thrown back to the logon screen whenever the link has the :80 appended to the base url. I'm using the just released beta binary version. I took a look at the source for BaseTag from the binary release and the source release and they are different. The source release doesn't append the :80 to the base URL but the binary source does. So, it looks like the two aren't in sync with each other. In a situation like this who would be contacted to get the newer version of BaseTag into the binary version? I've been meaning to compile from source so this will be my incentive to do that but I would think the source code should match. Agree? Rick Robert Leland wrote: Which version of struts are you using ? Back on Feb 02 a change was made to BaseTag dealing with port 80. -Rob Rick Smith wrote: I've been going over the example application and can't for the life of me find where the :80 is appended to the URL when going through Apache. When the starting URL is http://localhost/struts-example the page comes up with :80 added after localhost. When I click on a link with :80 in it I end up back at the logon page. If I remove the :80 the link takes me to the correct page. I've spent some time looking through the code and config files and haven't found anything to explain either how to get rid of the :80 or how to make the app work with :80. If someone could point me in the direction of the doc or code that is related to this or enlighten me in some way I would appreciate it. Thanks. Rick
servlet.log question
In the Struts example code wherever debug/log information is being printed to the log, the code appears: if (servlet.getDebug() = 1) servlet.log("debug/log message"); I was wondering if that was advantageous over: servlet.log("debug/log message", 1); I am under the impression that the two samples work the same, and would prefer to use the second, however I was wondering if there was some sort of performance issue, etc . . . Thanks, Josh __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: auto reload of message resource and URL-rewrite
Hi, I am sorry for my "stupidity". Need to read more careful email, and what people ask. I have tried myself the following link: "http://localhost:8080/struts-example/admin/reload.do" and it works. I can see messages about updating of ActionFormBean, ActionForward,... properties on a command line (where I have started Tomcat) and in browser window the message - "OK". Maya Maya Muchnik wrote: Kan is correct. I did have admin subdir under struts-example either. "Kan Leung, MK" wrote: - Original Message - From: "Craig R. McClanahan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 22, 2001 2:06 AM Subject: Re: auto reload of message resource and URL-rewrite At the bottom of the struts-config.xml file for the example application, you will see an action definition: action path="/admin/reload" type="org.apache.struts.actions.ReloadAction"/ which means you can send a request to the following URL (assuming the normal *.do mapping): http://localhost:8080/struts-example/admin/reload.do and the Struts controller servlet will reload all of the configuration files and message resources (but not the Java classes -- you have to ask your servlet container to reload the app in order to accomplish that). You can use any of these standard actions in your own applications as well. Apache "page not found" error is experienced. I did include a handler for *.do in tomcat-apache.conf file! I'm still unable to reload resource file in runtime. ===CUT=== Not Found The requested URL /struts-example/admin/reload.do was not found on this server. Apache/1.3.12 Server at localhost Port 80 ===CUT=== -- Kan LEUNG, M K email: [EMAIL PROTECTED] Digital Empires Company Limited
Re: auto reload of message resource and URL-rewrite
I got the URL loaded finally. I need to create the directory 'admin' myself before calling .../admin/reload.do . Oops! Thanks Maya. -- Kan LEUNG, M K email: [EMAIL PROTECTED] Digital Empires Company Limited - Original Message - From: "Maya Muchnik" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 9:44 PM Subject: Re: auto reload of message resource and URL-rewrite Hi, I am sorry for my "stupidity". Need to read more careful email, and what people ask. I have tried myself the following link: "http://localhost:8080/struts-example/admin/reload.do" and it works. I can see messages about updating of ActionFormBean, ActionForward,... properties on a command line (where I have started Tomcat) and in browser window the message - "OK". Maya Maya Muchnik wrote: Kan is correct. I did have admin subdir under struts-example either. "Kan Leung, MK" wrote: - Original Message - From: "Craig R. McClanahan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 22, 2001 2:06 AM Subject: Re: auto reload of message resource and URL-rewrite At the bottom of the struts-config.xml file for the example application, you will see an action definition: action path="/admin/reload" type="org.apache.struts.actions.ReloadAction"/ which means you can send a request to the following URL (assuming the normal *.do mapping): http://localhost:8080/struts-example/admin/reload.do and the Struts controller servlet will reload all of the configuration files and message resources (but not the Java classes -- you have to ask your servlet container to reload the app in order to accomplish that). You can use any of these standard actions in your own applications as well. Apache "page not found" error is experienced. I did include a handler for *.do in tomcat-apache.conf file! I'm still unable to reload resource file in runtime. ===CUT=== Not Found The requested URL /struts-example/admin/reload.do was not found on this server. Apache/1.3.12 Server at localhost Port 80 ===CUT=== -- Kan LEUNG, M K email: [EMAIL PROTECTED] Digital Empires Company Limited
Re: [ANNOUNCEMENT] Struts 1.0 Beta 1 Released
Congratulation to all developers for a great effort. The good product. And good help. "Craig R. McClanahan" wrote: I am please to announce the release of Version 1.0-beta-1 of the Struts Framework. Struts is an open source project, under the sponsorship of the Apache Software Foundation, to produce framework useful in building web applications with Java Servlet and JavaServer Pages (JSP) technology. Struts encourages application architectures based on the Model-View-Controller (MVC) design paradigm. For more information, or to download the new release of Struts, please visit the Struts Framework home page at: http://jakarta.apache.org/struts/ Craig McClanahan
Re: Why is source code in the struts binary
Also, the type ahead features and code wizards of some IDEs (like JBuilder and JDeveloper) benefit greatly from having the source code. JDev is able to popup parameter lists with actual parameter names as opposed to p0, p1, ... pn. Also, when using the Override methods wizard, it can copy the superclass method's javadoc statement into place for the new method. m Mark R Mascolino The Procter Gamble Co. [EMAIL PROTECTED] Internet Mail Message Received from host: "Craig R. McClanahan" [EMAIL PROTECTED]To: [EMAIL PROTECTED] cc: (bcc: Mark Mascolino-MR/PGI) 02/25/01 10:49 PMSubject: Re: Why is source code in the struts binary Please respond to struts-user Robert Leland wrote: Hi, I have always wondered why struts source code is in the binary release ? Is this used as documentation ? -Rob Three primary reasons: * As a reminder that this is open source -- you don't have to rely on just the JAR files and documentation. * In case you have a question about how a particular tag or other function is implemented, you can look and see without having to download the source distribution. * In many cases, classes in struts.jar are designed to be subclassed so you can customize their behavior. This is much easier if you can see the actual source, not just the Javadocs. Craig
hide a link or JSP's URL
Hi, How make a link or JSP URL "invisible" to a browser? I have read some chapter in a book, I know that this is possible. Is it possible with Struts? Is it some property "visible=true / false"? The second question is about "input" parameter in "Action Mapping" section of struts-config.xml. For example, struts-example has no "input" for "Edit user registration", but has "forward" for "success". On the other hand, "A walking tour of the example application" (http://localhost:8080/struts-example/tour.htm) has both (paragraph "CheckLoginTag.java": --- !-- Edit user registration -- action path="/editRegistration" type="org.apache.struts.example.EditRegistrationAction" name="registrationForm" scope="request" validate="false" input="/registration.jsp" forward name="success" path="/registration.jsp"/ /action -- What is right? Maya
struts-upload, Tomcat and performance
Title: Ubu1 Stationery Hi, My environment: WinNT4, JDK1.2.2, Tomcat 3.2.1, Struts (Feb 14 build). For our application, we need file upload capabilities. Before using the multipart-request handler of Struts, I must be sure it performs well for middle-sized files (maximum 10 MB). So I tested the struts-upload example and I get the bad following result: 110 seconds to upload a 3.6 MB file! And the test was purely local (client browserand server on the same PC). Can someone tell me if it is a problem with the implementation or with my environment (Tomcat?). Thanks in advance, -alain // Alain Hubert //Software Engineer @ IconMedialab Belgium // Tel +32 2 506 23 26 // Fax +32 2 506 23 00
Re: sub classing template tags
Ok thanx
struts-upload - can be used as example to do download?
Hi, I had not tested or read the struts-upload example source code, that used to upload files. I am carious, is it possible to use similar code to download files? Thanks, Maya
Re: job scheduler with struts
Yes ! I am looking for a generic code which can be packaged as part of servlet/jsp application. Mihir malcolm davis wrote: I think Mihir was looking for generic code that would run on any platform and be incorporated into the struts framework. The NT scheduler (at) or Unix cron are both os specific solutions. Second, if wanted to call urls, you don't need perl, just use the URL connection in Java. -Original Message- From: Jim Richards [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 25, 2001 3:44 PM To: [EMAIL PROTECTED] Subject: Re: job scheduler with struts Depending on what you want to do, you could put your code into an action, fix it with a URL like http://localhost/thingy.do and then run a job that calls the page. If you're on UNIX get the Perl module LWP, which installs command line scripts, one called GET which will call a URL for you, so then your script line in cron would be GET http://localhost/thingy.do /tmp/thingy.log If you're on NT, although it should work I'm not sure. There is an implementation of "at" for NT in the NT resource kit. Otherwise you might have to look at other options. Just be aware if you do't secure the page, then anyone will be able to call it. Mihir Parekh wrote: We need to implement a job scheduler (similar to unix cron job). Is there a open source schedule which can be used with struts? Any pointers on implementing servlet based scheduler? Thanks, Mihir
Re: servlet.log question
The first one should be faster because in the second one there is a String object created. What be faster yet is if you could do something like this: if(servlet.debug = 1) servlet.log("debug/log message"); Then you wouldn't have that method call slowing you down. Alan Yackel Josh wrote: In the Struts example code wherever debug/log information is being printed to the log, the code appears: if (servlet.getDebug() = 1) servlet.log("debug/log message"); I was wondering if that was advantageous over: servlet.log("debug/log message", 1); I am under the impression that the two samples work the same, and would prefer to use the second, however I was wondering if there was some sort of performance issue, etc . . . Thanks, Josh __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Base tag question
Is there some reason why the base tag defined in the HTML tag library doesn't let you specify the optional target attribute? I'm working with a frames based web application and I need to use both the href and target attributes. I know I could subclass the custom base tag, but before I do, I was wondering if there was any particular reason why the standard Struts base tag does let the user specify the target. Thanks.
RE: struts-upload, Tomcat and performance
Title: Ubu1 Stationery Alain, Keep in mind that the struts-upload app re-reads the file and prints it out to the jsp page. However, I'm testing the performance myself over here to make sure, if there are any pressing issues they will be fixed before a 1.0 release. Thank you. -Original Message-From: Alain Hubert [mailto:[EMAIL PROTECTED]]Sent: Monday, February 26, 2001 11:50 AMTo: '[EMAIL PROTECTED]'Subject: struts-upload, Tomcat and performance Hi, My environment: WinNT4, JDK1.2.2, Tomcat 3.2.1, Struts (Feb 14 build). For our application, we need file upload capabilities. Before using the multipart-request handler of Struts, I must be sure it performs well for middle-sized files (maximum 10 MB). So I tested the struts-upload example and I get the bad following result: 110 seconds to upload a 3.6 MB file! And the test was purely local (client browserand server on the same PC). Can someone tell me if it is a problem with the implementation or with my environment (Tomcat?). Thanks in advance, -alain // Alain Hubert //Software Engineer @ IconMedialab Belgium // Tel +32 2 506 23 26 // Fax +32 2 506 23 00
Re: struts-upload, Tomcat and performance
Hi, Michael, Why need to print file out to a jsp page, and not use "ftp" or similar command for transmission? So, I am asking "stupid" question. Maya "Schachter, Michael" wrote: Alain,Keep in mind that the struts-upload app re-reads the file and prints it out to the jsp page.However, I'm testing the performance myself over here to make sure, if there are any pressing issues they will be fixed before a 1.0 release. Thank you. -Original Message- From: Alain Hubert [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 11:50 AM To: '[EMAIL PROTECTED]' Subject: struts-upload, Tomcat and performance Hi,My environment: WinNT4, JDK1.2.2, Tomcat 3.2.1, Struts (Feb 14 build).For our application, we need file upload capabilities. Before using themultipart-request handler of Struts, I must be sure it performs well formiddle-sized files (maximum 10 MB). So I tested the struts-upload exampleand I get the bad following result: 110 seconds to upload a 3.6 MB file!And the test was purely local (client browser and server on the same PC).Can someone tell me if it is a problem with the implementation or withmy environment (Tomcat?).Thanks in advance,-alain// Alain Hubert// Software Engineer @ IconMedialab Belgium// Tel +32 2 506 23 26 // Fax +32 2 506 23 00
Re: hide a link or JSP's URL
You have to add some javascript to your link that gets fired when the "onmouseover" event happens... a href="javascript:void(0)" onMouseOver="(window.status=''); return true" Craig T. Maya Muchnik wrote: Hi, How make a link or JSP URL "invisible" to a browser? I have read some chapter in a book, I know that this is possible. Is it possible with Struts? Is it some property "visible=true / false"? The second question is about "input" parameter in "Action Mapping" section of struts-config.xml. For example, struts-example has no "input" for "Edit user registration", but has "forward" for "success". On the other hand, "A walking tour of the example application" (http://localhost:8080/struts-example/tour.htm) has both (paragraph "CheckLoginTag.java": --- !-- Edit user registration -- action path="/editRegistration" type="org.apache.struts.example.EditRegistrationAction" name="registrationForm" scope="request" validate="false" input="/registration.jsp" forward name="success" path="/registration.jsp"/ /action -- What is right? Maya -- I've been trying to change the world for years, but they just won't give me the source code begin:vcard n:Tataryn;Craig tel;home:952-884-6752 tel;work:952-842-5576 x-mozilla-html:TRUE url:http://www.computer-programmer.org org:Compuware;Professional Division adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America version:2.1 email;internet:[EMAIL PROTECTED] title:Senior Staff Analyst fn:Craig Tataryn end:vcard
RE: Beta 1 image tag bug
In the HTML spec, there are many tags which don't require an ending tag. The input tag is one such element. The XML-like self-closing tag is not part of the HTML spec. I've seen a lot of this with struts and other tools which use XML. Another example is the br tag which is often improperly specified as br/. Since it doesn't have an associated end tag, page authors often mistakingly specify this tag as br/. There are many more examples. So, the way Struts does this via html:image/ is correct. -Tom Tom Maccariella Sengen -Original Message- From: Denis Hanson [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 11:27 AM To: Struts-User Subject: Beta 1 image tag bug I just converted my project to the Beta 1 version of struts and encountered a problem with the html:image/ tag. The image tag appears to be eating the closing quote on the property (name) attribute. The html:image/ code worked fine with struts.jar from 2/21. Here's some test jsp code: td colspan=4 align=center html:image property="Logon" src='%=ip+"images/btnLogon.gif"%'/ input type="image" name="Logon" src='%=ip+"images/btnLogon.gif"%' border="0" /td And here's the output html: td colspan=4 align=center input type="image" name="Logon src="en/images/btnLogon.gif" --- no closing quote input type="image" name="Logon" src='en/images/btnLogon.gif' border="0" /td Thanks, Denis Hanson
RE: struts-upload, Tomcat and performance
This is just for the struts-upload example you're currently using. The UploadAction included with that example is responsible for printing it out to the jsp (actually, it prints it out into memory, then saves it as a request attribute really bad thing to do in a real application environment) As for the performance issues, yes, I've just witnessed the same problem. There was a similar problem like this before, and a fix. I'll try to put in a fix within the next day or two, I'm fairly bogged down with other stuff to do. -Original Message-From: Maya Muchnik [mailto:[EMAIL PROTECTED]]Sent: Monday, February 26, 2001 2:16 PMTo: [EMAIL PROTECTED]Subject: Re: struts-upload, Tomcat and performance Hi, Michael, Why need to print file out to a jsp page, and not use "ftp" or similar command for transmission? So, I am asking "stupid" question. Maya "Schachter, Michael" wrote: Alain,Keep in mind that the struts-upload app re-reads the file and prints it out to the jsp page.However, I'm testing the performance myself over here to make sure, if there are any pressing issues they will be fixed before a 1.0 release. Thank you. -Original Message- From: Alain Hubert [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 11:50 AM To: '[EMAIL PROTECTED]' Subject: struts-upload, Tomcat and performance Hi,My environment: WinNT4, JDK1.2.2, Tomcat 3.2.1, Struts (Feb 14 build).For our application, we need file upload capabilities. Before using themultipart-request handler of Struts, I must be sure it performs well formiddle-sized files (maximum 10 MB). So I tested the struts-upload exampleand I get the bad following result: 110 seconds to upload a 3.6 MB file!And the test was purely local (client browser and server on the same PC).Can someone tell me if it is a problem with the implementation or withmy environment (Tomcat?).Thanks in advance,-alain// Alain Hubert// Software Engineer @ IconMedialab Belgium// Tel +32 2 506 23 26 // Fax +32 2 506 23 00
Re: struts-upload, Tomcat and performance
What file type can be "uploaded": html, text, ... I have tried a jsp file. It's load "understandable". But "The File content type: null". Is it OK? "Schachter, Michael" wrote: This is just for the struts-upload example you're currently using. The UploadAction included with that example is responsible for printing it out to the jsp (actually, it prints it out into memory, then saves it as a request attribute really bad thing to do in a real application environment)As for the performance issues, yes, I've just witnessed the same problem. There was a similar problem like this before, and a fix. I'll try to put in a fix within the next day or two, I'm fairly bogged down with other stuff to do. -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 2:16 PM To: [EMAIL PROTECTED] Subject: Re: struts-upload, Tomcat and performance Hi, Michael, Why need to print file out to a jsp page, and not use "ftp" or similar command for transmission? So, I am asking "stupid" question. Maya
Re: hide a link or JSP's URL
Thank you very much. What about the 2nd Q? Craig Tataryn wrote: You have to add some javascript to your link that gets fired when the "onmouseover" event happens... a href="javascript:void(0)" onMouseOver="(window.status=''); return true" Craig T. Maya Muchnik wrote: Hi, How make a link or JSP URL "invisible" to a browser? I have read some chapter in a book, I know that this is possible. Is it possible with Struts? Is it some property "visible=true / false"? The second question is about "input" parameter in "Action Mapping" section of struts-config.xml. For example, struts-example has no "input" for "Edit user registration", but has "forward" for "success". On the other hand, "A walking tour of the example application" (http://localhost:8080/struts-example/tour.htm) has both (paragraph "CheckLoginTag.java": --- !-- Edit user registration -- action path="/editRegistration" type="org.apache.struts.example.EditRegistrationAction" name="registrationForm" scope="request" validate="false" input="/registration.jsp" forward name="success" path="/registration.jsp"/ /action -- What is right? Maya -- I've been trying to change the world for years, but they just won't give me the source code
RE: struts-upload, Tomcat and performance
A null content type is allowed, it usually means your browser doesn't havea mime type mapping for the file's extension. -Original Message-From: Maya Muchnik [mailto:[EMAIL PROTECTED]]Sent: Monday, February 26, 2001 2:54 PMTo: [EMAIL PROTECTED]Subject: Re: struts-upload, Tomcat and performanceWhat file type can be "uploaded": html, text, ... I have tried a jsp file. It's load "understandable". But "The File content type: null". Is it OK? "Schachter, Michael" wrote: This is just for the struts-upload example you're currently using. The UploadAction included with that example is responsible for printing it out to the jsp (actually, it prints it out into memory, then saves it as a request attribute really bad thing to do in a real application environment)As for the performance issues, yes, I've just witnessed the same problem. There was a similar problem like this before, and a fix. I'll try to put in a fix within the next day or two, I'm fairly bogged down with other stuff to do. -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 2:16 PM To: [EMAIL PROTECTED] Subject: Re: struts-upload, Tomcat and performance Hi, Michael, Why need to print file out to a jsp page, and not use "ftp" or similar command for transmission? So, I am asking "stupid" question. Maya
Re: hide a link or JSP's URL
Honestly, I think it's just a matter of personal preference. I've never used "input", I always use forwards. Craig T. Maya Muchnik wrote: Thank you very much. What about the 2nd Q? Craig Tataryn wrote: You have to add some javascript to your link that gets fired when the "onmouseover" event happens... a href="javascript:void(0)" onMouseOver="(window.status=''); return true" Craig T. Maya Muchnik wrote: Hi, How make a link or JSP URL "invisible" to a browser? I have read some chapter in a book, I know that this is possible. Is it possible with Struts? Is it some property "visible=true / false"? The second question is about "input" parameter in "Action Mapping" section of struts-config.xml. For example, struts-example has no "input" for "Edit user registration", but has "forward" for "success". On the other hand, "A walking tour of the example application" (http://localhost:8080/struts-example/tour.htm) has both (paragraph "CheckLoginTag.java": --- !-- Edit user registration -- action path="/editRegistration" type="org.apache.struts.example.EditRegistrationAction" name="registrationForm" scope="request" validate="false" input="/registration.jsp" forward name="success" path="/registration.jsp"/ /action -- What is right? Maya -- I've been trying to change the world for years, but they just won't give me the source code -- I've been trying to change the world for years, but they just won't give me the source code begin:vcard n:Tataryn;Craig tel;home:952-884-6752 tel;work:952-842-5576 x-mozilla-html:TRUE url:http://www.computer-programmer.org org:Compuware;Professional Division adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America version:2.1 email;internet:[EMAIL PROTECTED] title:Senior Staff Analyst fn:Craig Tataryn end:vcard
Re: What a jar file is needed?
Are you sure you have installed an XML parser? Make sure you download it first (http://java.sun.com/xml), and install the jar files (jaxp.jar, crimson.jar, xlan.jar) in C:\jdk1.3\jre\lib\ext (for JDK v1.3, for example). This will eliminate the need to modify CLASSPATH. Maya Muchnik wrote: Hi, I have tried to compile struts-example. DatabaseServlet.java is looking for HandlerBase.class and InputSource.class from org.xml.sax. The error messages are: DatabaseServlet.java:273: cannot access org.xml.sax.HandlerBase file org/xml/sax/HandlerBase.class not found Digester digester = new Digester(); ^ DatabaseServlet.java:287: cannot access org.xml.sax.InputSource file org/xml/sax/InputSource.class not found digester.parse(bis); ^ Maybe I have missed this question from others. Maya P.S. Maybe I have the old struts.jar?
RE: html:text with value
I found the problem which was causing this. I was making a call to servlet.log in the getter method for that tag (and only that tag). I just wanted to verify when the getters were called in the overall sequence. I also discovered that putting a call to servlet.log in the getter methods for other tags, also causes this error. Wierd. Vic -Original Message- From: Fickes, Vic Sent: Sunday, February 25, 2001 3:04 PM To: [EMAIL PROTECTED] Subject: html:text with value Hi, I am experiencing a problem with the html:text tag. If I don't specify a value attribute for the text tag, I get an exception saying, "runtime failure in custom tag form" with no other useful information. This goes away if I specify a value attribute. But then I can't set the contents of the text in my Action.perform() processing, ie. the contents of the text tag are always set to the contents of the value attribute. I have a textarea tag right next to this with no value specified (so I can set the contents), but I don't get this error. My environment is WLS5.1SP8 with Struts v1b1 (but I have seen this in earlier versions of Struts, too.). Has anyone else ever seen this behavior, particularly those who are also using WebLogic? Thanks, Vic
Error: 500Internal Servlet Error:Unable to load class org.apache.struts.taglib.html.HtmlTag
This is the code that is being excuted un jsp %@ page language="java" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % html:html HEAD META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win" TITLEUntitled Document/TITLE This is the error I am getting Error: 500 Location: /custmaint/accountProfile.jsp Internal Servlet Error: org.apache.jasper.compiler.CompileException: /prj/iTalk/custMaint/custmaint/accountProfile.jsp(5,0) Unable to load class org.apache.struts.taglib.html.HtmlTag at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129 ) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa rseEventListener.java:761) at org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventL istener.java:138) at org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEven tListener.java:911) at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe ner.java:194) at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:825) What am I doing wrong? Any help is appreciated. Sundar
Re: servlet.log question
Josh wrote: In the Struts example code wherever debug/log information is being printed to the log, the code appears: if (servlet.getDebug() = 1) servlet.log("debug/log message"); This is also my typical pattern throughout the Struts code itself. I was wondering if that was advantageous over: servlet.log("debug/log message", 1); I am under the impression that the two samples work the same, and would prefer to use the second, however I was wondering if there was some sort of performance issue, etc . . . If you do this as a method call, any expression required to calculate the debugging message will be performed, whether or not you ever really write the log message out. This can be pretty expensive if you are doing something like this: servlet.log("Name=" + name + " and value=" + value, 1); which does a bunch of string concatenations. You don't mind paying the price if you are really doing the debugging output (because it's just for testing anyway), but you really do *not* want to spend the time doing the string concatenations in production. Using the "if" approach avoids that. Thanks, Josh Craig McClanahan
Re: hide a link or JSP's URL
Maya Muchnik wrote: Hi, How make a link or JSP URL "invisible" to a browser? I have read some chapter in a book, I know that this is possible. Is it possible with Struts? Is it some property "visible=true / false"? Another Craig knew the JavaScript trick for this one :-). The second question is about "input" parameter in "Action Mapping" section of struts-config.xml. For example, struts-example has no "input" for "Edit user registration", but has "forward" for "success". On the other hand, "A walking tour of the example application" (http://localhost:8080/struts-example/tour.htm) has both (paragraph "CheckLoginTag.java": I suspect this part of the walking tour was based on an older version of the example code. --- !-- Edit user registration -- action path="/editRegistration" type="org.apache.struts.example.EditRegistrationAction" name="registrationForm" scope="request" validate="false" input="/registration.jsp" forward name="success" path="/registration.jsp"/ /action -- What is right? The "official" version of the example (that is, the code that is actually executed when you run the example), does not have an "input" attribute on the "/editRegistration" action. The reasoning is this: the "/editRegistration" action is never used as the target of a form submit, so there is no concept of returning to an input form after a validation error. This action is invoked to "set up" a new form bean before transferring to "registration.jsp" for entry, so there is no need for input processing before it is invoked. One of the places that "/editRegistration.do" is referenced is on the main menu page -- it is the destination of the hyperlink for the "Edit your user registration profile". So, if we follow through on what happens when you run the app: (1) Log on and go to the main menu. (2) Click the hyperlink for "/editRegistration.do" (3) This action sets up a form bean, populated from your current user information. (4) This action returns a forward to the "success" page, registration.jsp (5) The registration page displays, accepts your input, and submits to the "/saveRegistration" action (6) This action has an input form declared, so the validation occurs. If there are any errors, returns to (5) with the error messages object created (7) If there are no errors, the save registration action is called. So, you should use an "input" attribute only on actions that actually accept an input form (and therefore might detect validation errors and need to return). Actions that don't do this do not need an "input" attribute. Maya Craig
Re: Beta 1 image tag bug
Tom Maccariella wrote: In the HTML spec, there are many tags which don't require an ending tag. The input tag is one such element. The XML-like self-closing tag is not part of the HTML spec. I've seen a lot of this with struts and other tools which use XML. Another example is the br tag which is often improperly specified as br/. Since it doesn't have an associated end tag, page authors often mistakingly specify this tag as br/. There are many more examples. So, the way Struts does this via html:image/ is correct. It doesn't need the closing "/", but it definitely needs a closing double quote on one of the attribute values. This will be fixed soon. -Tom Tom Maccariella Sengen Craig
Re: Base tag question
James Howe wrote: Is there some reason why the base tag defined in the HTML tag library doesn't let you specify the optional target attribute? I'm working with a frames based web application and I need to use both the href and target attributes. I know I could subclass the custom base tag, but before I do, I was wondering if there was any particular reason why the standard Struts base tag does let the user specify the target. I prefer not to support attributes that aren't in the official HTML 4.01 specs, and this is one of those. You're welcome to support it yourself in a subclass, however. Thanks. Craig
Re: Beta 1 image tag bug
Jason Haase wrote: I don't think you're mistaken Dallas. I just updated to last night's build and now none of my html:image/ tags create valid html. They all look like this: input type="image" name="next src="next.gif" Looking back in the CVS log, Craig did some work on this code on 2/19 to look up alternate text in a message resources bundle. I think he may have missed a line (even our heroes aren't perfect). Perfection would be *so* boring :-). More seriously, that's why a lot of attention on the STRUTS-DEV list is being paid to building a unit test infrastructure for Struts 1.0. That way, we can catch the occasional slipup fairly quickly, and then (because tests are usually added to cover bugs that have been fixed) you can usually avoid regressions later on. Struts is pretty high quality (if I do say so myself :-), but not yet high enough. Jason Haase Craig PS: Just committed the one-line fix for this bug. It will be in tonight's nightly build.
Re: :80 in URL of Links generated in example app
On Mon, Feb 26, 2001 at 05:34:46PM -0800, Craig R. McClanahan wrote: Rick Smith wrote: Well, I take that back, too. They are just coded differently but both append the :80. Maybe I have a problem with mod_jk. That seems much more likely. A way to prove it (one way or the other) would be to try Tomcat 3.2.1 stand alone in an environment where you can open port 80 (either on a Windows 98 box, or temporarily on a Unix box running as root). I would bet you that mod_jk is the culprit here -- in which case, you should report an error to http://nagoya.apache.org/bugzilla/ under product category "Tomcat 3". Craig The Tomcat 3.2.3 beta is out now. If memory serves some similar error was corrected, give it a try. (3.2.2 is a bugfix release, so it seems to be reasonably safe to change to it even if it is "beta".) incze
Re: netscape 4.7x, session ids and struts
This is same problem I so awkwardly brought up this morning. The examples work on Netscape 6, Mozilla 0.7, Lynx and even IE5 but not on Netscape 4.72. Rick Gordon Maclean wrote: Using netscape 4.7x on either solaris, linux or windows, the struts-example fails, because I am bounced between two different sessions. The symptom indicates to me that netscape keeps separate lists of cookies for the following URLs: http://myhost http://myhost:80 As one goes through the struts example, the URL is sometimes displayed as myhost, and sometimes as myhost:80, and I am never allowed past the login because the user information is kept in a session associated with myhost, and can't be found in a session associated with myhost:80. Environment: struts nightly download as of Feb 12, 2001. Tomcat 3.2.1, mod_jk, apache 1.3.12 on RH7. I have all cookies enabled in netscape preferences, with "Warn before accepting a cookie" also turned on for debugging. 1. When I try the struts-example with the following URL: http://myhost/struts-example Netscape asks if I want to send the cookie JSESSIONID=f78s0eymd1, and I click OK. 2. I select the "Log on ..." link. Then the logon form is displayed at a URL of http://myhost:80/struts-example/logon.jsp;jsessionid=f78s0eymd1 Note the cookie in the URL because struts doesn't yet know if my browser accepts cookies. Also note the port number 80 in the URL. 3. I enter user:pass and Submit. LogonAction logs the following message: 2001-02-15 01:59:47 - path="/struts-example" :action: LogonAction: User 'user' logged on in session f78s0eymd1 The mainMenu.jsp page is displayed, with a URL: http://myhost/struts-example/logon.do;jsessionid=f78s0eymd1 (note no port number is in the URL) 4. Then, when I select "Edit your" the netscape question box pops up asking if I want to send a cookie JSESSIONID=ynsmafyqr1. The URL is shown as http://myhost:80/struts-example/editRegistration.do?action=Edit This shouldn't happen, it should use the first session id! 5. When I click on OK, then, EditRegistrationAction logs the following error: 2001-02-15 02:00:55 - path="/struts-example" :action: User is not logged on in session ynsmafyqr1 The logon.jsp form is again displayed. If I enter user:pass, then LogonAction reports a successfull login in session f78s0eymd1 (the first session id again!) When I select "Edit ..." I get the same error from EditRegistrationAction about "User is not logged on in session ynsmafyqr1". And so on, ad-infinitum. If I disable cookies in netscape preferences, then things work with URL rewriting, and EditRegistrationAction forwards me to registration.jsp. The problem also does not show up with IE 5. Also, at step 4, if I manually enter a URL of: http://myhost/struts-example/editRegistration.do?action=Edit then EditRegistrationAction succeeds and forwards to registration.jsp. If I am right about netscape keeping separate cookie lists, then perhaps a workaround is for struts (specifically the html taglib) not to add the port number when generating URLs? I haven't tested this solution. Someone must have run into it also? Gordon Maclean -- * Gordon Maclean, Software Engineer, 303 497-8794 Nat'l Center for Atmospheric Research, Boulder CO USA *
Re: :80 in URL of Links generated in example app
As stated in another thread, the culprit seems to be Netscape 4.7x. I've tried several browsers including Lynx and IE5 and all work but not Netscape 4.72. Rick Incze Lajos wrote: On Mon, Feb 26, 2001 at 05:34:46PM -0800, Craig R. McClanahan wrote: Rick Smith wrote: Well, I take that back, too. They are just coded differently but both append the :80. Maybe I have a problem with mod_jk. That seems much more likely. A way to prove it (one way or the other) would be to try Tomcat 3.2.1 stand alone in an environment where you can open port 80 (either on a Windows 98 box, or temporarily on a Unix box running as root). I would bet you that mod_jk is the culprit here -- in which case, you should report an error to http://nagoya.apache.org/bugzilla/ under product category "Tomcat 3". Craig The Tomcat 3.2.3 beta is out now. If memory serves some similar error was corrected, give it a try. (3.2.2 is a bugfix release, so it seems to be reasonably safe to change to it even if it is "beta".) incze
faq
Hi struts-user, :=) Best regards, JeanX pacificnet.com(GZ)
Re: Newbie to Struts
Standard JSP tags behave the same way in a Struts application as they do in any other web application. You might want to check a general JSP resource, such as the JSP-INTEREST archives at: http://archives.java.sun.com/archives/jsp-interest.html Hope this helps. -- Martin Cooper Tumbleweed Communications - Original Message - From: "JeanX" [EMAIL PROTECTED] To: "struts-user" [EMAIL PROTECTED] Sent: Monday, February 26, 2001 10:13 PM Subject: Newbie to Struts Hi struts-user, Can anybody tell me how to use jsp:include tag in a application under struts framework. I was puzzled this problem for a dog's age. Thx a lot. :=) Best regards, JeanX pacificnet.com(GZ)