comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Creating a custom JSF component? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/16e5d73e4fcf7e55 * Where to find api of XPath?@@. - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc5ec4ab4aef4964 * java socket vs tcp stack parameters in XP - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/0a9d0e05981fa88a * Casting from Map to String - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/307cc698012a7034 * File copy through RMI - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bd23301f7b38b8df * java.lang.OutOfMemoryError - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7dfb5d2d1250de90 * Help ....API's - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/43884fd5c0b83a71 * JSP: request parameters and XML using EL tags - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/839cd0b847304b06 * how to open a file from on a remote machine in java - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9f0a5ec7dd25e41a * Problem in IE while loading Java Applets on Macintosh OS X - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/0ed6485b84bbb5c1 * Struts workflow - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5a8184e8f76705c9 * dynamically change struts' form's action - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc28d63a3a8fb854 * How to underline a string in Java? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61b7646810bb7470 * Install JavaWebStart app under "All Users" in Windows - 3 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e566cba6d3bd8f74 * AXIS to emit SOAPHeader in wsdl - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2c45ef5524d60a3e * AXIS to emit SOAPHeader in WSDL - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ce9c8cb067f871bd * How to find file descriptor leak - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c324f3cfb9bae16b * Custom JSTL that accepts JSTL expression - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6f46cbfc3bcd29e0 * NTLM authentication problem - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/925698c4569f7ef2 ============================================================================== TOPIC: Creating a custom JSF component? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/16e5d73e4fcf7e55 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 3:30 pm From: "stefoid" Hi, Im wondering what would be the best approach to solve this problem: In my web app (game) I need a scrollable map made of at least 100x100 hexagons. The user can click on a hexagon to get more information about it (need a trip to the server), and they can also move units from one hexagon to another). Pretty standard stuff, but I want to implement it thin_as_I_can client, and I want to use JSF. I suppose this would be a custom component. Probably an applet would be the easiest way to implement the map, but is there anyway to nicely integrate an applet into the JSF framework, perhaps as a JSF component? ============================================================================== TOPIC: Where to find api of XPath?@@. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc5ec4ab4aef4964 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 9:47 pm From: [EMAIL PROTECTED] (mikeotp) regards: Where to find api of XPath?@@. thank you May god be with you ============================================================================== TOPIC: java socket vs tcp stack parameters in XP http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/0a9d0e05981fa88a ============================================================================== == 1 of 2 == Date: Tues, Dec 14 2004 10:01 pm From: "antoine" Hello, I'm running a java application on my XP Pro box that should send messages to a server. I use a regular java socket, and all is fine on this side. all messages are sent and received with no problem. however, when I analyze the traffic with a sniffer, I can see that, for example, when sending 3 messages in a row (writing 3 the 3 messages on the socket, but with very little interval time < 1ms), then: - the FIRST message is sent immediatly on the wire - the SECOND and THIRD messages are sent TOGETHER, but roughly 100ms AFTER the first one. it looks like the box is waiting for some kind of TCP ACK or heartbeat before sending the second and third messages. I've looked into ways of improving this, and read a few things about TCP/IP stack tuning on solaris (tcp_naglim_def), but have found very little info about XP tcp stack tuning apart from modifying the window size. would anybody know of a good reference to find a solution to this problem ? would you know which tcp parameters are tunable on XP, and how ? what are tcp_deferred_ack_interval ? tcp_nodelay ? any help would be greatly appreciated... thanks ! Antoine. == 2 of 2 == Date: Tues, Dec 14 2004 10:04 pm From: "antoine" Hello, I'm running a java application on my XP Pro box that should send messages to a server. I use a regular java socket, and all is fine on this side. all messages are sent and received with no problem. however, when I analyze the traffic with a sniffer, I can see that, for example, when sending 3 messages in a row (writing 3 the 3 messages on the socket, but with very little interval time < 1ms), then: - the FIRST message is sent immediatly on the wire - the SECOND and THIRD messages are sent TOGETHER, but roughly 100ms AFTER the first one. it looks like the box is waiting for some kind of TCP ACK or heartbeat before sending the second and third messages. I've looked into ways of improving this, and read a few things about TCP/IP stack tuning on solaris (tcp_naglim_def), but have found very little info about XP tcp stack tuning apart from modifying the window size. would anybody know of a good reference to find a solution to this problem ? would you know which tcp parameters are tunable on XP, and how ? what are tcp_deferred_ack_interval ? tcp_nodelay ? any help would be greatly appreciated... thanks ! Antoine. ============================================================================== TOPIC: Casting from Map to String http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/307cc698012a7034 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 7:47 pm From: "dolobran" I am trying to get the key value from a Map and cast to a String. I am getting a class cast exception. Map queryArgs = request.getParameterMap(); urlSurveyIdInt = ((Integer) session.getAttribute("surveyid") ).intValue(); The intended behavior is to capture the URL parameter surveyid value from a URL such as this: http://myDomain.com/survey.jsp?surveyid=1 Can someone help? Thanks in advance ============================================================================== TOPIC: File copy through RMI http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bd23301f7b38b8df ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 6:07 pm From: [EMAIL PROTECTED] Sri Ramaswamy wrote: > I need to perform a remote file copy on large files (15-20MB). > I have a handle to a remote object which has access to > inputStreams corresponding to these files. The code that > exposes the the getInputStream() method is part of a 3rd > party library and actually returns a ByteArrayInputStream. > Since I cannot pass back the input stream through RMI, > I am reading the input stream, creating an array of bytes, > returning this byte array through RMI and writing these > bytes to a file, on the other side. > > Here are the problems with this approach - > > 1) I am not sure how this library implements the getInputStream() > method but the jvm crashes with a java.lang.OutOfMemoryError > if the heap size is less than 64MB. > > 2) This process is very slow. > > If you have any thoughts/suggestions on a better approach that > reduces the memory requirement and can speed up this operation, > I would really appreciate it. > > Thank you, > Sri Ramaswamy If you use a single RMI call passing a byte array that's not ideal because it will require your entire file to be in memory in both processes. I'd use multiple RMI calls instead of just one, each one with a maximum buffer size of, say, 8Kb. --Joe ============================================================================== TOPIC: java.lang.OutOfMemoryError http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7dfb5d2d1250de90 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 6:04 pm From: [EMAIL PROTECTED] Rizwan wrote: > I have written a java program (an EJB) to read a file and write it to > database w.r.t. some rules. The program works ok but when the file has > around 6000 rows it fails and give an error message : > > 2004-12-13 14:08:47,467 ERROR [org.jboss.ejb.plugins.LogInterceptor] > Unexpected Error: > java.lang.OutOfMemoryError > > My environment is Java 1.4.2, Eclipse, Jboss 3.2.3 and MS SqlSever 2000 on > Windows 2000/XP > > > Any reason? Thanks If there's a leak, that's tricker. But I'm betting in this case you might just need a bigger heap. Try java -Xmx200m (or something to that effect.) --Joe ============================================================================== TOPIC: Help ....API's http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/43884fd5c0b83a71 ============================================================================== == 1 of 2 == Date: Tues, Dec 14 2004 5:03 pm From: "rwarai" add %TOMCAT_HOME%\common\lib\servlet-api.jar in your classpath if you are using j2se == 2 of 2 == Date: Tues, Dec 14 2004 4:29 pm From: "rwarai" add %TOMCAT_HOME%\common\lib\servlet-api.jar to your classpath if you are using j2se ============================================================================== TOPIC: JSP: request parameters and XML using EL tags http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/839cd0b847304b06 ============================================================================== == 1 of 2 == Date: Tues, Dec 14 2004 4:28 pm From: "Jim" Works great! Thanks. Can you show a JSP 2.0 example -or- direct me to a document about migrating to JSP 2.0 ... please? Jim == 2 of 2 == Date: Tues, Dec 14 2004 4:17 pm From: "Jim" Works great! Can you give a JSP 2.0 example of the code provided -or- direct me to where I can find the answer myself ... please. Thanks again, Jim ============================================================================== TOPIC: how to open a file from on a remote machine in java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9f0a5ec7dd25e41a ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 4:32 pm From: [EMAIL PROTECTED] This package may help. www.fishcroft.ca, Java Remote File Access Robert bharath wrote: > I would like to know if there are provisions in java to open a file > uploaded to a remote machine and how a file can opened for reading > from a remote machine > It would be higly useful for me ============================================================================== TOPIC: Problem in IE while loading Java Applets on Macintosh OS X http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/0ed6485b84bbb5c1 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 11:34 pm From: "Vinu" Hi All, I am Vinodh from India. I am facing a problem in Macintosh. Currently we are testing Oracle based Forms Application using Oracle 9i which is entirely based on Applets. For invoking that application, we will be given an URL, which invokes the instance for starting the oracle, basically being an Oracle 9i Web Services Application, initally the IE loads the Applet screen followed by the application. We need to test it in Safari, Netscape and IE. For Safari and Netscape, we downloaded the MRJ 2.2.5 and installed the Applet Run Time Java (MRJ). The applicaiton is running smoothly in Netscape and Safari. Where as in case of IE, the applet is not recognized while loading the application. I dont know the exact reason. I think it may be the problem of IE, bcoz in preferences settings there is no inclusion of MRJ in Java tab. But we enabled all the predefined settings like "Alert" and so on... Till we are yet into the problem, so thats why i need your suggestion in order to solve the problem. In case of MAc 9.2 we are testing the application using IE 5.1, in that whenever we type the URL in the browser, the status bar says that "Applet-Instance Started".... "Contacting the Server..." and finally it says..."Applet - Error - Closing...". Also the application is not viewing in the browser. Awaiting for your solution... Vinodh ============================================================================== TOPIC: Struts workflow http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5a8184e8f76705c9 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 6:18 pm From: [EMAIL PROTECTED] (Daniel) Hi, I'm trying to understand the workflow in struts, and have some difficulties. I want to load a form and submit it. Then I want to go to one of several pages (which are also part of the form). In the form I have some data that needs to be loaded in selects and multiple checkboxes. To do this, it seems I should use beans. First question, how do I define this in the struts-config.xml? I'm using tiles, so in the tiles-config it looks like this: <definition name=".testForm" extends=".main.layout"> <put name="left" value="/pages/left.jsp" /> <put name="body" value="/pages/test.jsp" /> </definition> In the struts-config.xml: <forward name="testForm" path="/testForm.do"/> ... <action path="/testForm" forward=".testForm"/> Where do I add the beans I need. And where do I load the data into them? If I add an action type, how do I forward it? <action path="/testForm" type="test.TestAction" forward=".testForm"/> In the test action class I can load the data into beans, I suppose; public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { HashMap items = getItems(); //request.setAttribute("items", items); //servlet.getServletContext().setAttribute("items", items); HttpSession session = request.getSession(); session.setAttribute("items", items); return mapping.findForward("testForm"); } I could connect to the database and populate a HashMap in the getItems method. But what about the findForward? Doesn't that lead back to the very same action - like an iternal loop? If so, do I need to create a new action, that forwards to this one? <action path="/testForm" type="test.TestAction" forward=".testForm"/> .. <action path="/testForm2" forward=".testForm2"/> .. return mapping.findForward("testForm2"); I guess there is no use to continue before I got these things sorted out. Thanks in advance for your help! ============================================================================== TOPIC: dynamically change struts' form's action http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc28d63a3a8fb854 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 4:20 pm From: "ctyberg" I want to have two separate actions because the validtions are different. I ended up setting a variable using c:set and then using html-el:form. <c:if test="${param.isNew=='true'}"><c:set var="formAction" value="/saveNew.do"/></c:if> <c:if test="${param.isNew=='false'}"><c:set var="formAction" value="/saveExisting.do"/></c:if> <html-el:form action="${formAction}" > ============================================================================== TOPIC: How to underline a string in Java? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61b7646810bb7470 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 7:08 pm From: "Bruce Sam" I thinked direct draw a line is not a good way.Also,I don't need the method of using HTML to implement this.Are there a good method to underline a string in java? ============================================================================== TOPIC: Install JavaWebStart app under "All Users" in Windows http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e566cba6d3bd8f74 ============================================================================== == 1 of 3 == Date: Tues, Dec 14 2004 4:38 pm From: "gc" I want to install a JavaWebStart app under "All Users" on a Windows 2000 Pro PC. I want the ability for any user to login to the PC and be able to start the app. Currently, only users who have previously logged in as themselves and loaded the app, can use the app only after they login as themselves. I am thinking that first I must install the JavaWebStart Manager under "All Users". How? And as who? Next, I would need to install the app under "All Users". How? and As who? I thought about copying all of a user's (a user who previously installed app) related paths and directories (starting at C:\Documents and Settings\username\.javaws\cache\) to "C:\Documents and Settings\All Users". After reviewing all the related files that need to be modified, I realize this would be a nightmare. And even if I did, it still may not work. I also thought if I could login as "All Users" I could do the install just like any other user. But that does seems neither possible nor reasonable. Please help. I am open to all suggestions. Thanks, gc == 2 of 3 == Date: Tues, Dec 14 2004 5:05 pm From: "gc" I want to install a JavaWebStart app under "All Users" on a Windows 2000 Pro PC. I want the ability for any user to login to the PC and be able to start the app. Currently, only users who have previously logged in as themselves and loaded the app, can use the app only after they login as themselves. I am thinking that first I must install the JavaWebStart Manager under "All Users". How? And as who? Next, I would need to install the app under "All Users". How? and As who? I thought about copying all of a user's (a user who previously installed app) related paths and directories (starting at C:\Documents and Settings\username\.javaws\cache\) to "C:\Documents and Settings\All Users". After reviewing all the related files that need to be modified, I realize this would be a nightmare. And even if I did, it still may not work. I also thought if I could login as "All Users" I could do the install just like any other user. But that does seems neither possible nor reasonable. Please help. I am open to all suggestions. Thanks, gc == 3 of 3 == Date: Wed, Dec 15 2004 5:33 am From: "gc" Install JavaWebStart app under "All Users" in Windows I want to install a JavaWebStart app under "All Users" on a Windows 2000 Pro PC. I want the ability for any user to login to the PC and be able to start the app. Currently, only users who have previously logged in as themselves and loaded the app, can use the app only after they login as themselves. I am thinking that first I must install the JavaWebStart Manager under "All Users". How? And as who? Next, I would need to install the app under "All Users". How? and As who? I thought about copying all of a user's (a user who previously installed app) related paths and directories (starting at C:\Documents and Settings\username\.javaws\cache\) to "C:\Documents and Settings\All Users". After reviewing all the related files that need to be modified, I realize this would be a nightmare. And even if I did, it still may not work. I also thought if I could login as "All Users" I could do the install just like any other user. But that does seems neither possible nor reasonable. Please help. I am open to all suggestions. Thanks, gc ============================================================================== TOPIC: AXIS to emit SOAPHeader in wsdl http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2c45ef5524d60a3e ============================================================================== == 1 of 2 == Date: Tues, Dec 14 2004 4:50 pm From: [EMAIL PROTECTED] Tribe, Using AXIS and C# winforms to build an app. I'm building my services in java and exposing them through AXIS and consuming them just fine with C#. I want now to add some soapheader data for session mgmt and authorization. I'm building my own WSDD for the service deployment in AXIS and so I'm allowing AXIS to emit the WSDL which describes the services. I want to add something somewhere to direct axis now to emit a SoapHeader in the WSDL which Visual Studio will then swallow and build into my reference.cs class. I've looked and looked. No luck. Any ideas? Dave Cline ~bangeye~ == 2 of 2 == Date: Tues, Dec 14 2004 4:20 pm From: "bangeye" Tribe, Using AXIS and C# winforms to build an app. I'm building my services in java and exposing them through AXIS and consuming them just fine with C#. I want now to add some soapheader data for session mgmt and authorization. I'm building my own WSDD for the service deployment in AXIS and so I'm allowing AXIS to emit the WSDL which describes the services. I want to add something somewhere to direct axis now to emit a SoapHeader in the WSDL which Visual Studio will then swallow and build into my reference.cs class. I've looked and looked. No luck. Any ideas? Dave Cline ~bangeye~ ============================================================================== TOPIC: AXIS to emit SOAPHeader in WSDL http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ce9c8cb067f871bd ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 4:14 pm From: [EMAIL PROTECTED] Tribe, Using AXIS and C# winforms to build an app. I'm building my services in java and exposing them through AXIS and consuming them just fine with C#. I want now to add some soapheader data for session mgmt and authorization. I'm building my own WSDD for the service deployment in AXIS and so I'm allowing AXIS to emit the WSDL which describes the services. I want to add something somewhere to direct axis now to emit a SoapHeader in the WSDL which Visual Studio will then swallow and build into my reference.cs class. I've looked and looked. No luck. Any ideas? Dave Cline ~bangeye~ ============================================================================== TOPIC: How to find file descriptor leak http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c324f3cfb9bae16b ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 6:40 pm From: [EMAIL PROTECTED] albright wrote: > I have a rather large program that talks over the network with another > program. Changes in the behavior of the other program have revealed a file > descriptor leak in my program. What are some ideas and/or techniques I can > use to track down the leak? I'd make sure all InputStream and OutputStream are used within try ... finally blocks, with close() in the finally block. --Joe ============================================================================== TOPIC: Custom JSTL that accepts JSTL expression http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6f46cbfc3bcd29e0 ============================================================================== == 1 of 1 == Date: Tues, Dec 14 2004 4:26 pm From: "Robert Mark Bram" Hi All! In a jsp, I have used some code like this: <c:out value="${myForm.myValue}"/> But now I want a custom tag that accepts the same JSTL EL value and manipulates the string in some way.. I know how to write a custom tag, but how can I write a custom tag so that it accepts the result of a JSTL expression? For example: <myLib:changeString value="${myForm.myValue}"/> Any advice would be most appreciated! Rob :) ============================================================================== TOPIC: NTLM authentication problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/925698c4569f7ef2 ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 8:35 am From: [EMAIL PROTECTED] (Jitesh Gangwani) Hi, I am trying to a get a webpage which is on IIS server in different domain secured by NTLM authentication. I am using commons-httpclient-3.0-beta1 api to connect. I am not able to get index.html page. The NLTM api is giving following information messages 15-Dec-2004 16:01:46 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: ntlm authentication scheme selected 15-Dec-2004 16:01:46 org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge INFO: No credentials available for NTLM <any realm>@www.maintenance.cws.pse1.rbsgrp.net:80 Following is the java code NTCredentials creds = new NTCredentials("USERNAME","PASSWORD","SERVER_IP_ADDRESS","CWSPSEHOLI"); HttpClient client = new HttpClient(); HttpMethod method = new GetMethod("http://servername/index.html"); AuthScope authscope = new AuthScope("http://servername/index.html",80); client.getState().setCredentials(authscope,creds); int statusCode = client.executeMethod(method); System.out.println("Status Code 1: " + statusCode); String responseBody = method.getResponseBodyAsString(); System.out.println("******" + responseBody); method.releaseConnection(); Can anyone please tell me what I am doing wrong. Thanks Jitesh ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.java.programmer To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
