Extract XML submission from another Delphi server?
This may be a little off topic for struts. I want my JSP/struts page to accept XML data submission from another server written in Delphi/windows. I know only XML data has been sent, but I just can not get it from JSP. I tried: StringBuffer sb = new StringBuffer(); java.io.BufferedReader in = req.getReader(); if (in.ready()) { in.reset(); String line; char[] c = new char[req.getContentLength()]; int i = in.read(c); if (i0) sb.append(new String(c)); } in.close(); or java.net.URL url = new java.net.URL(req.getScheme(), req.getServerName(), req.getServerPort(), req.getContextPath()); String = (String)url.getContent(); They all failed to give the XML document. Could somebody help? Thanks, Deping
Re: JBuilder Enterprise
Lind Jrgen wrote: Hi, after the discussion on using JBuilder for Web Development, I decided to try the Enterprise Edition... While my stuff worked fine with the Foundation version (and an "external" Tomcat), I cannot get it running within the JBuilder Environment. After I managed to tell the internal Tomcat where to find the struts TLDs, Tomcat complains about some missing attribute: javax.servlet.ServletException: Missing resources attribute org.apache.struts.action.MESSAGE Discard JB4's internal Tomcat (older version). Download tomcat 3.2.1, and new struts nightly build. create a new library set (call it tomcat3.2.1 if you want), add all jar files in tomcat-3.2.1/lib directory. I do database apps with interclient, so I put my interclient.jar there. Also I used GenericDataSource class of struts, so I put jdbc2_0-stdext.jar there (download from Sun). I have been using these for one of my projects for a while. Debugging is ok in Linux even for struts calls. Debugging can be slow in windows unless you include a -class VM parameters. If you updrade to another version of JBuilder or struts, you should delete all the work files. Otherwise, it is very likely to have problems. Deping at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:386) at www.p_00025blic_0005fhtml.webapps.odin_0002dtracer.jsp._0002fwww_0002fpublic _0005fhtml_0002fwebapps_0002fodin_0002dtracer_0002fjsp_0002flogon_0002ejsplo gon_jsp_0._jspService(_0002fwww_0002fpublic_0005fhtml_0002fwebapps_0002fodin _0002dtracer_0002fjsp_0002flogon_0002ejsplogon_jsp_0.java:305) Any ideas what this means and how to fix it? Regards, Jrgen
Re: which development tool to use?
The debugging with JBuilder 4 pro (+ struts + Tomcat) has been very good for me in Redhat Linux 6.2, very fast (but stability is another question). Previously I had used JBuilder 4 in Windows NT: debugging was super slow as Greg had said. BUT, I found a tip in JBuilder's Linux version saying that you could significantly speed up debugging in Windows by including a -classic (forgot the details here) in front of your VM settings for every project. I am yet to try this out later. Deping Chian Greg Reddin wrote: actually, we've had great success with JBuilder Foundation. Debugging can be painful, and, if you're used to developing in GUI environments, the interface can be kludgey(?) at times, but it works good enough to get work done. You also have to be careful of how it compiles things. It compiles packages, not classes. -Original Message- From: [EMAIL PROTECTED] Sent: Monday, February 05, 2001 3:29 PM To: [EMAIL PROTECTED] Subject: Re: which development tool to use? Emacs and Jakarta-Ant. What bugs? ;-) Original Message On 2/5/01, 2:11:34 PM, [EMAIL PROTECTED] wrote regarding which development tool to use?: Hello, I hope my question is not too off topic for this mailing list: In the last weeks I struggled around with JDeveloper as an IDE for creating web applications with Struts, but it seems that it has some problems with the message resource files for the action servlet (see my question earlier in this mailing list). So I would like to find out which tools you use to develop your web applications, especially how they are debugged. Did anybody use JBuilder and has good experiences integrating with Struts? I would like to read your suggestions, thank you. Regards Michael
GenericDataSource usage in non-servlet classes
Could somebody tell me how to use GenericDataSource in non-servlet classes? I could access the pool in action servlets using GenericDataSource ds = (GenericDataSource) servlet.findDataSource(null). But my my non-struts-related classes cannot access the pool. Thanks, Deping
Action Path Problem (Again) when Doc Base used
All my Struts actions work OK until I inserted base href='http://java' in my HTML document. After Craig fixed this for form:link page="/logoff.do" it works ok for NOT linking to http://java/logoff.do. I am very happy to use this tag now. But when I used: form:form action="listfaq.do" This action still submits to: http://java/listfaqs.do which can not be found by the action servlet. Could someone also fixes this for me please? Thanks a lot, Deping
Action Path Problem when Doc Base used
All my Struts actions work OK until I inserted base href='http://java' in my HTML document. This doc base caused form:link page="/logoff.do"bean:message key="mainMenu.logoff"//form:link to link to http://java/logoff.do and of course Struts action servlet does not know how to handle this. Any tricks? Deping
Re: Action Path Problem when Doc Base used
Craig, Thanks for your suggestion. But I HAVE to use doc base for all my HTML pages under a certain template. This template has numourous pictures links, company logos, JavaScript libraries, et al, which are already written by someone else, stored in an organized directory structure in another server (i.e. http://java). In this template I inserted a few special tags (e.g. #FAQS/) for my JSP pages to replace with relevant HTMLs. I could setup a String servAddr for the real server address and use a href="%=servAddr%/logoff.do"bean:message key="mainMenu.logoff"//a to replace form:link page="/logoff.do"bean:message key="mainMenu.logoff"//form:link and it now correctly links to http://localhost:8080/logoff.do. But form:link page="%=servAddr%/logoff.do"bean:message key="mainMenu.logoff"//form:link links to http://java/%=servAddr%/logoff.do which is wierd. In other words, it seems that my Tomcat does not translate %=xxx% tag before taglib calls. Anyway, it's mostly solved for myself. Deping - Original Message - From: "Craig R. McClanahan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 05, 2001 6:42 PM Subject: Re: Action Path Problem when Doc Base used Deping Chian wrote: All my Struts actions work OK until I inserted base href='http://java' in my HTML document. This doc base caused form:link page="/logoff.do"bean:message key="mainMenu.logoff"//form:link to link to http://java/logoff.do and of course Struts action servlet does not know how to handle this. Well, the smart ass answer would be "so don't do that" :-) What the base tag does is tells your browser to resolve relative references in this page against the specified URL, instead of the URL it submitted to (which will typically be an x.do URI in a Struts application). What are you trying to accomplish with this base setting? Note also that there is a form:base/ tag you can use that generates an HREF of the JSP page itself, so that relative references in JSP pages work the way you think they would (relative to the page itself), even when invoked via a forward. Any tricks? Deping Craig
Re: Example for Internationalization
Aditya Kapur, Please do post your example, as least to my email account if you prefer. I have tried this i18n issue and was stuck somewhere, and regreted that I don't see an adequate example to start with. Thanks, Deping - Original Message - From: "Aditya Kapur" [EMAIL PROTECTED] To: "Struts-User (E-mail)" [EMAIL PROTECTED] Sent: Wednesday, December 06, 2000 3:21 PM Subject: Example for Internationalization Hi All, I was building some prototype for my company and I have modified the Struts out-of-box example to add a language drop down on the Login page (which just displays English and German) and if the user logs in after selecting the language as German all the screens are in German. If anybody is interested I can post the modified example and the code. Aditya Kapur Office (248) 699 3275