setting docBase in JBuilder to run/debug
Hello, it's only slightly related to Struts, but I hope to find a JBuilder user who can help me with the following problem: I use JBuilder 4 Enterprise Trial with Tomcat 3.2 and Struts. If I want to run the application, the Tomcat docBase is always set to D:\ instead of D:\TOMCAT. The same problem occured with the tomcat.home / install setting but could be solved by setting the correct path to the JVM via the -D.. parameter. The project properties for docBase etc. are set correctly. Here's the related output from JBuilder: Setting home to D:\ Starting tomcat. Check logs/tomcat.log for error messages Context log: path="" Adding context path="" docBase="D:\" Context log: path="/vip-gallery" Adding context path="/vip-gallery" docBase="D:\" Starting tomcat install="d:\tomcat\" home="D:\" classPath="C:\Programme\JBuilder4\tomcat\lib\webserver.jar;C:\Programme\JBuilder4\tomcat\lib\jasper.jar;C:\Programme\JBuilder4\tomcat\lib\xml.jar;C:\Programme\JBuilder4\lib\servlet.jar;D:\tomcat\vipshop\classes;C:\Programme\Oracle\JDeveloper 3.2\myclasses\struts.jar;C:\Programme\JBuilder4\lib\webserverglue.jar;D:\tomcat\webapps\vip-gallery\WEB-INF\classes;C:\Programme\Oracle\JDeveloper 3.2\myclasses\struts.jar;C:\Programme\JBuilder4\lib\servlet.jar;D:\tomcat\vipshop\classes;C:\Programme\JBuilder4\lib\jbuilder.jar;C:\Programme\JBuilder4\lib\help.jar;C:\Programme\JBuilder4\lib\gnuregexp.jar;C:\Programme\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\i18n.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\jaws.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\rt.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;C:\Programme\JBuilder4\jdk1.3\lib\dt.jar;C:\Programme\JBuilder4\jdk1.3\lib\tools.jar;C:\Programme\Oracle\JDeveloper 3.2\java1.2; C:\Programme\Oracle\JDeveloper 3.2\java1.2\jre;C:\Programme\Oracle\JDeveloper 3.2\java1.2\lib" JSP Servlet Started ... Do you have a suggestion how to set the docBase correctly? Regards Michael
file upload, use of DiskFile class?
I am working on upload file via HTTP. I found a class called DiskFile in the Javadoc. However, I am unable to find out how does it work. Any clue? -- Kan LEUNG, M K email: [EMAIL PROTECTED] Digital Empires Company Limited
Re: setting docBase in JBuilder to run/debug
Yes I have the same problem as you, I posted a message in the newsgroup, but I didn't get a correct answer for the moment. I'll let you know, as soon I'll receive a working answer. 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: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 23, 2001 9:34 AM Subject: setting docBase in JBuilder to run/debug Hello,it's only slightly related to Struts, but I hope to find a JBuilder user who canhelp mewith the following problem:I use JBuilder 4 Enterprise Trial with Tomcat 3.2 and Struts. If I want to runthe application,the Tomcat docBase is always set to D:\ instead of D:\TOMCAT.The same problem occured with the tomcat.home / install setting but could besolvedby setting the correct path to the JVM via the -D.. parameter.The project properties for docBase etc. are set correctly.Here's the related output from JBuilder:Setting home to D:\Starting tomcat. Check logs/tomcat.log for error messagesContext log: path="" Adding context path="" docBase="D:\"Context log: path="/vip-gallery" Adding context path="/vip-gallery"docBase="D:\"Starting tomcat install="d:\tomcat\" home="D:\"classPath="C:\Programme\JBuilder4\tomcat\lib\webserver.jar;C:\Programme\JBuilder4\tomcat\lib\jasper.jar;C:\Programme\JBuilder4\tomcat\lib\xml.jar;C:\Programme\JBuilder4\lib\servlet.jar;D:\tomcat\vipshop\classes;C:\Programme\Oracle\JDeveloper3.2\myclasses\struts.jar;C:\Programme\JBuilder4\lib\webserverglue.jar;D:\tomcat\webapps\vip-gallery\WEB-INF\classes;C:\Programme\Oracle\JDeveloper3.2\myclasses\struts.jar;C:\Programme\JBuilder4\lib\servlet.jar;D:\tomcat\vipshop\classes;C:\Programme\JBuilder4\lib\jbuilder.jar;C:\Programme\JBuilder4\lib\help.jar;C:\Programme\JBuilder4\lib\gnuregexp.jar;C:\Programme\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\i18n.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\jaws.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\rt.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;C:\Programme\JBuilder4\jdk1.3\lib\dt.jar;C:\Programme\JBuilder4\jdk1.3\lib\tools.jar;C:\Programme\Oracle\JDeveloper3.2\java1.2;C:\Programme\Oracle\JDeveloper 3.2\java1.2\jre;C:\Programme\Oracle\JDeveloper3.2\java1.2\lib"JSP Servlet Started...Do you have a suggestion how to set the docBase correctly?RegardsMichael
Re: file upload, use of DiskFile class?
"Kan Leung, MK" schrieb: I am working on upload file via HTTP. I found a class called DiskFile in the Javadoc. However, I am unable to find out how does it work. Any clue? In the nightly build there is an example webapp called struts-upload. You should find enough examples there. jakarta-struts/webapps/struts-upload By the way, mailing archives covers this topic: "upload" You should look there first: for example here http://marc.theaimsgroup.com/?l=struts-user simon
more than one formclass for a one jsp ?
Title: more than one formclass for a one jsp ? Hi, I wanted to have more than one form class for a one jsp file. Because in my one jsp file, i have a information of 4 tables. So i want to transfer the information to 4 formclasses? Is it possible? Please help me. Regards Mallari
RE: Select/Options Tag
Thanks for that. Got it passing a string array now. Managed to pass all options by calling a script function to select them all before posting. "Chalmers, Douglas" wrote: A tag reference can maintain a String from a SELECT statement within a form bean, but only the ONE actually selected.. How can I maintain ALL the OPTIONS within a SELECT box within a form bean?? This bug was just fixed, so you will need the most current nightly release. You can now have a property that returns a String array, and use it to back a SELECT statement that allows multiple options: html:select property="foo" multiple="true" ... Use html:option and/or html:options here ... /html:select and Struts will correctly remember all of the selected values, based on the contents of your array. There is a test page (html-select.jsp) in the Struts test application (struts-test.war) that illustrates how this works. Doug Chalmers Software Development Petrotechnics Ltd Exploration House Exploration Drive Aberdeen 707303 (Ext 14) Craig
ActionError Substitution Problem
All my substitutions are showing up like this: Sorry, the username [Ljava.lang.Object;@7268de is already in use. My code is like this: String user_username="test"; errors.add("username", new ActionError("error.user_username.unique",user_username)); I've also tried: new ActionError("error.user_username.unique",new String(user_username))); And my properties file has: error.user_username.unique = Sorry, the username {0} is already in use. I am using Orion and Struts build from 2 nights ago. What am I doing wrong? Thanks, Neal winmail.dat
RE: more than one formclass for a one jsp ?
You can have any number of html:form's and form beans on a JSP page, as long as they all go to different actions/URLs. When you do a POST, HTML/HTTP limit you to one form per request, so you can have only one form at this point. You may consider using indexed parameter names like !-- table 1 --html:text property="field_A_1" ...html:text property="field_B_1" ... !-- table 2 --html:text property="field_A_2" ...html:text property="field_B_2" ... -Original Message- From: Mallari Kulkarni [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 7:38 AM To: '[EMAIL PROTECTED]' Subject: more than one formclass for a one jsp ? Hi, I wanted to have more than one form class for a one jsp file. Because in my one jsp file, i have a information of 4 tables. So i want to transfer the information to 4 formclasses? Is it possible? Please help me. Regards Mallari
RE: ActionError Substitution Problem
This is the third post on this error for the last two days - is it possible there is a bug in the most recent builds? We haven't updated our struts.jar for a couple of weeks waiting for the final release. YS -Original Message- From: Neal Kaiser [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 9:07 AM To: [EMAIL PROTECTED] Subject: ActionError Substitution Problem All my substitutions are showing up like this: Sorry, the username [Ljava.lang.Object;@7268de is already in use. My code is like this: String user_username="test"; errors.add("username", new ActionError("error.user_username.unique",user_username)); I've also tried: new ActionError("error.user_username.unique",new String(user_username))); And my properties file has: error.user_username.unique = Sorry, the username {0} is already in use. I am using Orion and Struts build from 2 nights ago. What am I doing wrong? Thanks, Neal
RE: ActionError Substitution Problem
I reported it earlier today. http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=685 It is currently all alone. Mark -Original Message- From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]] Sent: 23 February 2001 14:25 To: '[EMAIL PROTECTED]' Subject: RE: ActionError Substitution Problem This is the third post on this error for the last two days - is it possible there is a bug in the most recent builds? We haven't updated our struts.jar for a couple of weeks waiting for the final release. YS -Original Message- From: Neal Kaiser [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 9:07 AM To: [EMAIL PROTECTED] Subject: ActionError Substitution Problem All my substitutions are showing up like this: Sorry, the username [Ljava.lang.Object;@7268de is already in use. My code is like this: String user_username="test"; errors.add("username", new ActionError("error.user_username.unique",user_username)); I've also tried: new ActionError("error.user_username.unique",new String(user_username))); And my properties file has: error.user_username.unique = Sorry, the username {0} is already in use. I am using Orion and Struts build from 2 nights ago. What am I doing wrong? Thanks, Neal *** This email message contains confidential information for the above addressee only. If you are not the intended addressee you must not disclose or use the information in any manner whatsoever. Any opinion or views contained in this email message are those of the sender, do not represent those of the Company in any way and reliance should not be placed upon its contents. Unless otherwise stated this email message is not intended to be contractually binding. Where an Agreement exists between our respective companies and there is conflict between the contents of this email message and the Agreement then the terms of that Agreement shall prevail. Abbey National Treasury Services plc. Registered in England. Registered Office: Abbey House, Baker Street, London NW1 6XL. Company Registration No: 2338548. Regulated by the SFA ***
My weblogic 5.1 sp8 isn't able to find web-app_2_2.dtd
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. I already have read the Vincent Massol reply to this problem, telling we have to change !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" to !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" and this doesn't works for my. With the 02/05 version doesn't happen, but fails the redisplay of a password field which I need it. I've tryed with the earlier nightly version (02/16) and also fails. Do you any suggestions? Thanx a lot! PD: This this the exception: resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http:// java.sun.com/j2ee/dtds/web-app_2_2.dtd') Not registered, use system identifier vie feb 23 15:48:27 CET 2001:E WebAppServletContext-uni2 action: null java.net.NoRouteToHostException: Host unreachable: no further information at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112) at java.net.Socket.init(Socket.java:273) at java.net.Socket.init(Socket.java:100) at sun.net.NetworkClient.doConnect(NetworkClient.java:50) at sun.net.www.http.HttpClient.openServer(HttpClient.java:331) at sun.net.www.http.HttpClient.openServer(HttpClient.java:517) at sun.net.www.http.HttpClient.init(HttpClient.java:267) at sun.net.www.http.HttpClient.init(HttpClient.java:277) at sun.net.www.http.HttpClient.New(HttpClient.java:289) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection .java:379) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:472) at java.net.URL.openStream(URL.java:798) at org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultRe aderFactory.java:149) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExtern alEntity(DefaultEntityHandler.java:767) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExtern alSubset(DefaultEntityHandler.java:566) at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScann er.java:1139) at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDoc umentScanner.java:2192) at org.apache.xerces.framework.XMLDocumentScanner.access$000(XMLDocument Scanner.java:86) at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispa tch(XMLDocumentScanner.java:883) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS canner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at javax.xml.parsers.SAXParser.parse(SAXParser.java:143) at org.apache.struts.digester.Digester.parse(Digester.java:716) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java :1390) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:469) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm pl.java:457) at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub Impl.java:415) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI mpl.java:404) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI mpl.java:325) at weblogic.servlet.internal.ServletContextImpl.preloadServlet(ServletCo ntextImpl.java:736) at weblogic.servlet.internal.ServletContextImpl.preloadServlets(ServletC ontextImpl.java:710) at weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java:607) at weblogic.t3.srvr.HttpServer.start(HttpServer.java:418) at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1312) at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827) at java.lang.reflect.Method.invoke(Native Method) at weblogic.Server.startServerDynamically(Server.java:99) at weblogic.Server.main(Server.java:65) at weblogic.Server.main(Server.java:55) ___ Do You Yahoo!? Enva mensajes instantneos y recibe alertas de correo con Yahoo! Messenger - http://messenger.yahoo.es
Re: ActionError - java.lang.NummPointer Exception HELP!!!
"Jason H. Kim" wrote: Seems like I use this mail group without giving enough thoughts to problems.. I do that too ! I will make sure that my future posts are the ones that I have given enough thoughts to. That is a good goal ! I will also do the same. Thanks for letting us know !!! -Rob
Re: setting docBase in JBuilder to run/debug
I answered that On Feb 14th and Feb 6th. Take a look at : http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02759.html I always search through the mailing archive first when I have a problem. It is a good bookmark to save !! -Rob
Re: My weblogic 5.1 sp8 isn't able to find web-app_2_2.dtd
No, this doesn't work in Tomcat 3.2.1 either (at least, not in all cases). Here's my situation: Normally, I am behind a firewall that prevents direct connection to the Internet. I can't even resolve external domain names. Now when I start up Tomcat with the struts-example deployed (using the Feb 22 nightly build), I get the following exception in my servlet.log: 2001-02-23 09:46:44 - path="/struts-example" :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-02-23 09:46:47 - path="/struts-example" :action: null - org.xml.sax.SAXPars eException: External entity not found: "http://java.sun.com/j2ee/dtds/web-app_2_ 2.dtd". at com.sun.xml.parser.Parser.fatal(Parser.java:2817) at com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2506) at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137) at com.sun.xml.parser.Parser.parseInternal(Parser.java:481) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:716) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java :1390) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:469) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn StartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java :491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) 2001-02-23 09:46:47 - path="/struts-example" :action: Mapping for servlet 'actio n' = 'null' 2001-02-23 09:46:48 - path="/test" :jsp: init 2001-02-23 09:47:46 - path="/struts-example" :jsp: init 2001-02-23 09:48:08 - path="/struts-example" :jsp: init When I am connected to the Internet, here is what I get instead: 2001-02-23 09:54:17 - path="/struts-example" :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-02-23 09:54:24 - path="/struts-example" :action: Process servletName=action , urlPattern=*.do 2001-02-23 09:54:24 - path="/struts-example" :action: Mapping for servlet 'actio n' = '*.do' 2001-02-23 09:54:24 - path="/test" :jsp: init 2001-02-23 09:54:43 - path="/struts-example" :jsp: init 2001-02-23 09:55:12 - path="/struts-example" :jsp: init So for some reason, Tomcat isn't looking at the local web.dtd file in the tomcat\conf directory. Do I have something configured incorrectly? Mike At 09:19 AM 2/23/2001, you wrote: Please, excuse me if I am not correct. Your application try to get a file web-app_2_2.dtd from java.sun.com/j2ee/dtds site. And for some reason this site was unreachable (http://java.sun.com/j2ee/dtds/web-app_2_2.dtdhttp://java.sun.com/j2ee/dtds/web-app_2_2.dtd) - see below highlighted with blue color. As Craig M. explained, in this case Weblogic has to read its own local file. But it did not!??? Maybe this works only on Tomcat. Maya 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://http:// java.sun.com/j2ee/dtds/web-app_2_2.dtd. I already have read the Vincent Massol reply to this problem, telling we have to change !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtdhttp://java.sun.com/j2ee/dtds/web-app_2_2.dtd" to !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtdhttp://java.sun.com/j2ee/dtds/web-app_2_2.dtd" and this doesn't works for my. With the 02/05 version doesn't happen, but fails the redisplay of a password field which I need it. I've tryed with the earlier nightly version (02/16) and also fails. Do you any suggestions? Thanx a lot! PD: This this the exception: resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http://http:// java.sun.com/j2ee/dtds/web-app_2_2.dtd') Not registered, use system identifier vie feb 23 15:48:27 CET 2001:E WebAppServletContext-uni2 action: null java.net.NoRouteToHostException: Host unreachable: no further information at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
Re: My weblogic 5.1 sp8 isn't able to find web-app_2_2.dtd
Michael and Pablo, I am not using (yet) Tomcat 3.2.1, I am using 3.1. And Tomcat can find a local file (I have forced it) when I replaced the reference "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" with "http://localhost:8080/WEB-INF/dtds/web.dtd". Try this replacement. WEB-INF (in my case) is a directory under my application. Maya Michael McCallister wrote: No, this doesn't work in Tomcat 3.2.1 either (at least, not in all cases). Here's my situation: Normally, I am behind a firewall that prevents direct connection to the Internet. I can't even resolve external domain names. Now when I start up Tomcat with the struts-example deployed (using the Feb 22 nightly build), I get the following exception in my servlet.log: >2001-02-23 09:46:44 - path="/struts-example" :action: Initializing >configuration > from resource path /WEB-INF/struts-config.xml >2001-02-23 09:46:47 - path="/struts-example" :action: null - >org.xml.sax.SAXPars >eException: External entity not found: >"http://java.sun.com/j2ee/dtds/web-app_2_ >2.dtd". > at com.sun.xml.parser.Parser.fatal(Parser.java:2817) > at > com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2506) > at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137) > at com.sun.xml.parser.Parser.parseInternal(Parser.java:481) > at com.sun.xml.parser.Parser.parse(Parser.java:284) > at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) > at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) > at org.apache.struts.digester.Digester.parse(Digester.java:716) > at > org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java >:1390) > at > org.apache.struts.action.ActionServlet.init(ActionServlet.java:469) > at javax.servlet.GenericServlet.init(GenericServlet.java:258) > at > org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) > at org.apache.tomcat.core.Handler.init(Handler.java:215) > at > org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) > at > org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn >StartupInterceptor.java:130) > at > org.apache.tomcat.core.ContextManager.initContext(ContextManager.java >:491) > at > org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) > at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) > at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) > >2001-02-23 09:46:47 - path="/struts-example" :action: Mapping for servlet >'actio >n' = 'null' >2001-02-23 09:46:48 - path="/test" :jsp: init >2001-02-23 09:47:46 - path="/struts-example" :jsp: init >2001-02-23 09:48:08 - path="/struts-example" :jsp: init When I am connected to the Internet, here is what I get instead: >2001-02-23 09:54:17 - path="/struts-example" :action: Initializing >configuration > from resource path /WEB-INF/struts-config.xml >2001-02-23 09:54:24 - path="/struts-example" :action: Process >servletName=action >, urlPattern=*.do >2001-02-23 09:54:24 - path="/struts-example" :action: Mapping for servlet >'actio >n' = '*.do' >2001-02-23 09:54:24 - path="/test" :jsp: init >2001-02-23 09:54:43 - path="/struts-example" :jsp: init >2001-02-23 09:55:12 - path="/struts-example" :jsp: init So for some reason, Tomcat isn't looking at the local web.dtd file in the tomcat\conf directory. Do I have something configured incorrectly? Mike At 09:19 AM 2/23/2001, you wrote: >Please, excuse me if I am not correct. Your application try to get a file >web-app_2_2.dtd from java.sun.com/j2ee/dtds site. And for some reason this >site was unreachable >(http://java.sun.com/j2ee/dtds/web-app_2_2.dtd>http://java.sun.com/j2ee/dtds/web-app_2_2.dtd) >- see below highlighted with blue color. As Craig M. explained, in this >case Weblogic has to read its own local file. But it did not!??? Maybe >this works only on Tomcat. > >Maya > >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://>http:// >>java.sun.com/j2ee/dtds/web-app_2_2.dtd. >> >>I already have read the Vincent Massol reply to this >>problem, telling we have to change >> >>!DOCTYPE web-app PUBLIC "-//Sun Microsystems, >>Inc.//DTD Web Application >>2.2//EN" >>"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd>http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> >> >> >>to >> >>!DOCTYPE web-app PUBLIC "-//Sun Microsystems, >>Inc.//DTD Web Application >>1.2//EN" >>"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd>http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> >> >> >>and this doesn't works for my. >> >>With the 02/05 version doesn't happen, but fails the >>redisplay of a password field which I need it. >> >>I've tryed with the earlier nightly version (02/16) >>and also fails. >> >>Do you any suggestions? >> >>Thanx a lot! >> >>PD: This this the exception: >> >>resolveEntity('-//Sun Microsystems, Inc.//DTD Web >>Application 2.2//EN', 'http://>http:// >>java.sun.com/j2ee/dtds/web-app_2_2.dtd')
RE: file upload, use of DiskFile class?
Kan Leung, DiskFile is used in the DiskMultipartRequestHandler implementation of MultipartRequestHandler. The DiskMultipartRequestHandler uses instances of DiskFile, which is an implementation of FormFile. All these classes reside in the org.apache.struts.upload package. You shouldn't have to use DiskFile directly, you'll probably only use in as a FormFile, which is how the upload example works. -Original Message- From: Kan Leung, MK [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 4:27 AM To: [EMAIL PROTECTED] Subject: file upload, use of DiskFile class? I am working on upload file via HTTP. I found a class called DiskFile in the Javadoc. However, I am unable to find out how does it work. Any clue? -- Kan LEUNG, M K email: [EMAIL PROTECTED] Digital Empires Company Limited
Re: file upload, use of DiskFile class?
I finally followed the example and got it works. Wonderful. --lmk - Original Message - From: "Schachter, Michael" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 24, 2001 12:57 AM Subject: RE: file upload, use of DiskFile class? Kan Leung, DiskFile is used in the DiskMultipartRequestHandler implementation of MultipartRequestHandler. The DiskMultipartRequestHandler uses instances of DiskFile, which is an implementation of FormFile. All these classes reside in the org.apache.struts.upload package. You shouldn't have to use DiskFile directly, you'll probably only use in as a FormFile, which is how the upload example works. -Original Message- From: Kan Leung, MK [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 4:27 AM To: [EMAIL PROTECTED] Subject: file upload, use of DiskFile class? I am working on upload file via HTTP. I found a class called DiskFile in the Javadoc. However, I am unable to find out how does it work. Any clue? -- Kan LEUNG, M K email: [EMAIL PROTECTED] Digital Empires Company Limited
logic:iterate with object retrieved from session???
Hi all, I'd really like to iterate through a List using the logic:iterate and bean:write tags as per the struts-example app. My problem is that my List is on an object that I retrieve from the User's HttpSession within my JSP, and because of this, I can't figure out what attributes I require in the tags. Are the tags not designed to be used in this way, or am I overlooking the obvious? Can anyone help? Thanks in advance Regards David The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Capital Markets Company. http://www.capco.com ***
RE: logic:iterate with object retrieved from session???
My page is doing something similar. logic:iterate id="activity" name="%=ants.infrastructure.cc.web.Constants.ACTIVITIES_KEY%" td nowrapbean:write name="activity" property="ccRef"//td td nowrapbean:write name="activity" property="reason"//td td nowrapbean:write name="activity" property="contact"//td td nowrapbean:write name="activity" property="status"//td Hope this helps. Mark -Original Message- From: Firmin David [mailto:[EMAIL PROTECTED]] Sent: 23 February 2001 17:29 To: '[EMAIL PROTECTED]' Subject: logic:iterate with object retrieved from session??? Hi all, I'd really like to iterate through a List using the logic:iterate and bean:write tags as per the struts-example app. My problem is that my List is on an object that I retrieve from the User's HttpSession within my JSP, and because of this, I can't figure out what attributes I require in the tags. Are the tags not designed to be used in this way, or am I overlooking the obvious? Can anyone help? Thanks in advance Regards David The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Capital Markets Company. http://www.capco.com *** *** This email message contains confidential information for the above addressee only. If you are not the intended addressee you must not disclose or use the information in any manner whatsoever. Any opinion or views contained in this email message are those of the sender, do not represent those of the Company in any way and reliance should not be placed upon its contents. Unless otherwise stated this email message is not intended to be contractually binding. Where an Agreement exists between our respective companies and there is conflict between the contents of this email message and the Agreement then the terms of that Agreement shall prevail. Abbey National Treasury Services plc. Registered in England. Registered Office: Abbey House, Baker Street, London NW1 6XL. Company Registration No: 2338548. Regulated by the SFA ***
Re: My weblogic 5.1 sp8 isn't able to find web-app_2_2.dtd
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
Re: ActionError Substitution Problem
"Geddes, Mark (ANTS)" wrote: I reported it earlier today. http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=685 It is currently all alone. Yep ... all the rest got fixed already, and this one will too before the beta is released. Mark Craig
ddata encryption
i have to add an encryption fields for every record so changes can be tracked with respect to user's id and his private key any ideas .. __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
Re: Missing struts-config_1_0.dtd when not logged on
Craig, I don't know if this is applicable or not, but if I set the new "validating" servlet parm to "false", I'll still get parse errors if the !DOCTYPE ... tag is in the .xml file. I get around this by deleting that tag from the .xml file. With both of these elements in place, I don't get any errors during parsing. FWIW... Donnie [EMAIL PROTECTED] 02/23/01 01:07PM Michael McCallister wrote: Struts may include a local copy of the web.xml DTD file, in the case of the non-validating parse of web.xml, nothing causes it to be used instead of the external system identifier. ActionServlet.initServlet() creates a new Digester, never calls register(), and then calls parse(). We probably need some code like this snippet, found in ActionServlet.initDigester(): // Register our local copy of the DTDs that we can find for (int i = 0; i registrations.length; i += 2) { URL url = this.getClass().getResource(registrations[i+1]); if (url != null) digester.register(registrations[i], url.toString()); } It doesn't make intuitive sense (to me), it looks like SAXParser.parse() insists on being able to access the DTDs even when it is in non-validating mode. To confirm this, I bumped up the detail level of ActionServlet and now, right before the Parse Fatal Error exception, I get the following logged to System.out: resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http:// java.sun.com/j2ee/dtds/web-app_2_2.dtd') Not registered, use system identifier This seems to be the root cause of the bug I filed last night: PR 683. Of course, the bug report only described the symptoms (and poorly at that). Should I file a new bug report with this analysis? Thanks Mike, but it nailed me to (as soon as I tried to run a Struts app on my disconnected laptop :-), so I know the details now. I am going to fix this by including local copies of the relevant web.xml DTDs (for both 2.2 and 2.3) in the struts.jar file. Mike Craig
hidden submit button
Hi, This is probably something very straight forward but ... I am trying to create a hidden submit button with the struts form tags. The following doesnt seem to work. Does anyone know how to get this to work? html:form action="updateDisplay.do" Start at row #: html:text property="goto" size="3" maxlength="16" onchange="submit()"/ /html:form Ive also tried using a hidden field with property as submit a hidden field with property as action Thanks Pratima
perform() called twice
Hi, I am trying to understand the sequence of events that take place using a simple test html:form. When the form's action is submitted, it causes the Action.perform() method to be called twice in the same request. I thought it might have something to do with the forward that is returned from perform() so I returned null, and it still does it. Is this the expected behavior? I don't think this is happening in the example application, so it must be something I am doing, but I can't figure out what. Any ideas would be appreciated. Thanks, Vic
database connection getting garbage collected
Hi, After several hours with no activity my connection pool seems to get garbage collected (or die). It works fine, but then I come in the next day and get the following error: java.sql.SQLException: Communication link failure: java.net.SocketException The full stack trace is at the bottom of the page. If I reload the page in question a couple of times the connection comes back and everything is o.k. I am working on my own so I need some help. I've included the data-sources section of the struts-config.xml file and the database related part of my perform method below. Any insight would be greatly appreciated. Thanks, Ellen //-- //-- in the struts-config.xml //-- data-sources data-source autoCommit="true" description="test-jdbc" driverClass="org.gjt.mm.mysql.Driver" maxCount="4" minCount="2" password="blahblah" user="blahblah" url="jdbc:mysql://localhost/mydb" / /data-sources //-- //-- in my Action class //-- public ActionForward perform(...) throws ... GenericConnection connection = null; try { DataSource ds = servlet.findDataSource(null); connection = (GenericConnection) ds.getConnection(); String sql = "select * from mytable"; Statement statement = connection.createStatement(); ResultSet results = statement.executeQuery(sql); while (results.next()) { // stuff goes here } connection.close(); results = null; statement = null; connection = null; } catch (SQLException se) { request.setAttribute("exception", se); return (mapping.findForward("failure")); } finally { // Return connection to pool if (connection != null) { try { connection.close(); } connection = null; } } } //-- // exception.printStackTrace() //-- java.sql.SQLException: Communication link failure: java.net.SocketException at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.init(Compiled Code) at java.lang.Exception.init(Compiled Code) at java.sql.SQLException.init(SQLException.java:43) at org.gjt.mm.mysql.MysqlIO.sendCommand(Compiled Code) at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Compiled Code) at org.gjt.mm.mysql.MysqlIO.sqlQuery(Compiled Code) at org.gjt.mm.mysql.Connection.execSQL(Compiled Code) at org.gjt.mm.mysql.Connection.execSQL(Compiled Code) at org.gjt.mm.mysql.Statement.executeQuery(Compiled Code) at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Compiled Code) at planner.ShowReleasesAction.perform(Compiled Code) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1634) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1444) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:472) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Compiled Code) __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
Re: ddata encryption
Take a look at the Token key implementation. org.apache.struts.action.Action.saveToken, org.apache.struts.action.Action.resetToken org.apache.struts.action.Action.isTokenValid() this may be close to what you want. Also search the struts-user and struts-dev mailing-archives for further discussion on this topic. -Rob soh syed wrote: i have to add an encryption fields for every record so changes can be tracked with respect to user's id and his private key any ideas .. __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
Re: exception while using form tags
Go to http://www.mail-archive.com/struts-user@jakarta.apache.org/ and search for installation, struts.jar and so on. I think, you have a wrong location struts.jar file and / or CLASSPATH. Install struts-example.war and try it. Compare with your application. "Dorai, Harish (c)" wrote: I was coding a small logon application using the ActionServlet and the form tags. I am getting the following exception, when I try to access my web application. Can anyone help me locate the problem? I am new to Struts. javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans co llection at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:686) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441) at jsp_servlet._logon._jspService(_logon.java:91) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:208) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:244) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe rvletContext.java:1127) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm pl.java:1529) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Still need help with VAJ Struts
Struts Amigos I am still trying to work out a way to develop Struts applications within Visual Age for Java. (Feb. 19 Struts build, Tomcat 3.2.1, VAJ 3.5.2, see 'Problem w/ Struts and VA for Java' last Tuesday). I got some suggestions but have been unable to reproduce the results. I believe the problem has to do with the custom class loader mechanism of Tomcat which is used for individual web apps. Craig explained in "Classpaths and the "struts.jar" file (Feb. 13th (#4566)) why it is that struts.jar must be in WEB-INF/lib and NOT on the classpath at execution time. Classes visible on the CLASSPATH are loaded on by the system loader, and cannot find class for classes which are loaded earlier by the custom class loaders of the web apps. In trying to use VAJ, one would want all code (at least all Struts code (contents of struts.jar plus your application code)) in the IDE instead of in WEB-INF/lib. But that seems to put it effectively on the CLASSPATH, and thus loaded by the system loader (the IDE environment). It is not that hard to get Tomcat running from within VAJ, but when one trys to access a Struts web app, say the struts-example, the first bean:message tag throws a JSP exception, presumeably because it is looking for WEB-INF/lib/struts.jar, instead of the Struts code within the IDE. I'm not sure, but I have a feeling that the custom class loaders for web apps may pose a significant challenge to developing with Struts inside VAJ. I know my understanding and/or my VAJ setup are hosed somehow or other, and that is why I'm asking for help. -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX
Re: My weblogic 5.1 sp8 isn't able to find web-app_2_2.dtd
This is a very BAD advice. The URI of the DTD is craved in stone and should not be changed at all. This is my suggestion: 1) look on the local disk for the directory where the DTD is and 2) add that directory to the CLASSPATH. --- Maya Muchnik [EMAIL PROTECTED] wrote: Michael and Pablo, I am not using (yet) Tomcat 3.2.1, I am using 3.1. And Tomcat can find a local file (I have forced it) when I replaced the reference "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" with "http://localhost:8080/WEB-INF/dtds/web.dtd". Try this replacement. WEB-INF (in my case) is a directory under my application. Maya __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
Error invoking servlet
Hi, I'm getting an error in the browser like this.I'm using bluestone application server 7.2.2(eval). I cann't figure it out where its happening. Compiler Error: XML translator error: The tag library at '/WEB-INF/struts-bean.tld' could not be opened: The URI '/WEB-INF/struts-bean.tld' is malformed: no protocol: /WEB-INF/struts-bean.tld Thanks in advance
Missing http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd
Hello, struts-config.xml references to http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd dtd, but I just don't even see it through my browser. Since I am behind the firewall, I normally keep the dtds locally.So, when I tried to copy my browser returns Cannot have a DTD declaration outside of a DTD. Line 26, Position 12 !ENTITY % BeanName "CDATA" ---^ Am I missing something or I can just go ahead, copy the source and deploy my servlet Sundar
Re: Missing http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd
After your mail, I checked out the URL again it still comes back with the same error. Is following the right URL? http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd Sundar - Original Message - From: "Martin Cooper" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 23, 2001 11:10 PM Subject: Re: Missing http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd I'm fairly certain that this is a problem that was fixed today (or perhaps yesterday). You should try getting the latest (Beta 1) version of Struts to see if it fixes your problem. -- Martin Cooper Tumbleweed Communications - Original Message - From: "Sundar @eSaravana" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 23, 2001 9:44 PM Subject: Missing http: file://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd Hello, struts-config.xml references to http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd dtd, but I just don't even see it through my browser. Since I am behind the firewall, I normally keep the dtds locally.So, when I tried to copy my browser returns Cannot have a DTD declaration outside of a DTD. Line 26, Position 12 !ENTITY % BeanName "CDATA" ---^ Am I missing something or I can just go ahead, copy the source and deploy my servlet Sundar
Problem in Beta release source download
I downloaded beta release of struts jakarta-struts-1.0-b1-src.tar.gz , but it just doesn't untar properly. I even downloaded second time, but had same check some error and there is no build.sh in untared folder. Did anyone manage to successfully untared and built the beta release. Sundar
Re: Missing http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd
As I mentioned before, the latest version of Struts (v1.0-b1) should fix this problem. It includes local copies of the required DTDs so that it will continue to work if you are not connected to the Internet. You have the correct URL for the DTD. However, trying to view a DTD through a browser doesn't work very well. IE usually displays "The XML page cannot be displayed" and Netscape usually displays nothing at all. On the other hand, at that point, you can usually "View Source", or its equivalent, to see the real source. Alternatively, you might want to try "Save Target As...". Hope this helps. -- Martin Cooper Tumbleweed Communications - Original Message - From: "Sundar @eSaravana" [EMAIL PROTECTED] To: "Martin Cooper" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, February 23, 2001 10:15 PM Subject: Re: Missing http: //jakarta.apache.org/struts/dtds/struts-config_1_0.dtd After your mail, I checked out the URL again it still comes back with the same error. Is following the right URL? http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd Sundar - Original Message - From: "Martin Cooper" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 23, 2001 11:10 PM Subject: Re: Missing http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd I'm fairly certain that this is a problem that was fixed today (or perhaps yesterday). You should try getting the latest (Beta 1) version of Struts to see if it fixes your problem. -- Martin Cooper Tumbleweed Communications - Original Message - From: "Sundar @eSaravana" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 23, 2001 9:44 PM Subject: Missing http: file://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd Hello, struts-config.xml references to http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd dtd, but I just don't even see it through my browser. Since I am behind the firewall, I normally keep the dtds locally.So, when I tried to copy my browser returns Cannot have a DTD declaration outside of a DTD. Line 26, Position 12 !ENTITY % BeanName "CDATA" ---^ Am I missing something or I can just go ahead, copy the source and deploy my servlet Sundar