comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * J2ME local files - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2be2c515ec11905b * Dialog Boxes? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6585a8cddb4b2864 * SOLD GOOG bought BE - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/662b70234da635f3 * 2 interface with 2 same function prototype but different return type - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5277abed8de68298 * How 'java' (command) handles the classname passed - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/908d4e10411ee318 * Tomcat startup problem - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb62e38707d64ca1 * HTTP authentication - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/95eb9daef024f88c * HttpUrlConnection => reading all packets - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5cae854ec3a36001 * I managed to pass SCJP with a 95% grade - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f54134155d6828e * Showing a new frame - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4617f0d7eec8e506 * Environment variable - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e10a85f420f52962 * Javabeans step to step tutorial - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4a72804ffe3ce8d7 * How can I "force" an upcast? Convert subclass into superclass? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ad4bc9f7ae03de71 * limitations of Java VM under Windows/Linux? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cc3538556e5ad6cd * How to do authentication and include the web page in the mail? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa76bc88ec2794c3 * tomcal/xsl - problems with xsl:include - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6f60a33ddc7feb9b * Compiling with no present classes - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa21c58345af6de9 * HTTPUnit not working against an https (SSL) site - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d793f5e72fb7839 ========================================================================== TOPIC: J2ME local files http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2be2c515ec11905b ========================================================================== == 1 of 2 == Date: Sun, Nov 21 2004 11:00 am From: Freeman <[EMAIL PROTECTED]> Due to security, a java program cannot access any files in phone outside the jar. The only exception is files in the "Media center" (ie. wallpaper, ringtone, etc). Of course, it depends on the phone model. Most of them do not support this feature. Freeman Mobilefunland Darryl L. Pierce wrote: > Freeman wrote: > >> You may simply use InputStream to read a text file inside a jar. >> e.g. InputStream in = >> this.getClass().getResourcesAsStream("TextFileName"); >> I use this method to develop my j2me game. > > > The OP indicated that he wanted access files on the phone, not files in > the JAR. > == 2 of 2 == Date: Mon, Nov 22 2004 3:01 am From: [EMAIL PROTECTED] (johnlittlepeap) "Darryl L. Pierce" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Freeman wrote: > > > You may simply use InputStream to read a text file inside a jar. > > e.g. InputStream in = this.getClass().getResourcesAsStream("TextFileName"); > > I use this method to develop my j2me game. > > The OP indicated that he wanted access files on the phone, not files in > the JAR. Bugger, I suspected as much, cheers guys. ========================================================================== TOPIC: Dialog Boxes? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6585a8cddb4b2864 ========================================================================== == 1 of 1 == Date: Sun, Nov 21 2004 10:31 pm From: "Ken Adams" <[EMAIL PROTECTED]> Is it a bad idea to create and display a Dialog box from your main executing thread or should you get the event-dispatch thread to do that? Thanks ========================================================================== TOPIC: SOLD GOOG bought BE http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/662b70234da635f3 ========================================================================== == 1 of 1 == Date: Sun, Nov 21 2004 10:55 pm From: [EMAIL PROTECTED] (joeturn) [EMAIL PROTECTED] (Cindi Jenkins) wrote in message news:<[EMAIL PROTECTED]>... > Once Sergey and company sell all their stock in the name of > diversification, google's (GOOG) stock price will go down. Likewise, > IT consulting services in the wake of the deadline for Sarbanes Oxley > compliance will go up. Bearingpoint (BE) is a good stock play. > Currently trading at $9 and should shoot to $12 by end of year. Yo Martha Stewart is that you doing your daily curriculum? ========================================================================== TOPIC: 2 interface with 2 same function prototype but different return type http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5277abed8de68298 ========================================================================== == 1 of 1 == Date: Sun, Nov 21 2004 11:41 pm From: Lāʻie Techie <[EMAIL PROTECTED]> On Sat, 20 Nov 2004 08:30:18 -0800, cai junfu wrote: > interface a{ > int g(); > } > } > interface b{ > double g(); > } > } > class c implements a, b{ > } > } > > how should class c's implementation of the two interface be written? is it > possible at all? In Java, you cannot specify multiple methods which vary only by return type. If the semantics of a.g() is different from b.g(), I would not recommend implementing both interfaces. If a.g() and b.g() have the same semantics, consider moving g() to a new interface extended by a and b if their return types are compatible (in this case, Number would be reasonable). HTH, La'ie Techie ========================================================================== TOPIC: How 'java' (command) handles the classname passed http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/908d4e10411ee318 ========================================================================== == 1 of 1 == Date: Sun, Nov 21 2004 11:53 pm From: Tor Iver Wilhelmsen <[EMAIL PROTECTED]> Chris Smith <[EMAIL PROTECTED]> writes: > I'm in picky mode today. It would look for "classname/class.class", > actually, where '/' is actually the platform-dependent file separator. Now you are assuming things about the ClassLoader. A VM can perfectly well default to a ClassLoader that reads classes from a database or something, e.g. SELECT CLASS_DATA FROM CLASSES WHERE PACKAGE_NAME = 'classname' AND CLASS_NAME = 'class' ========================================================================== TOPIC: Tomcat startup problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb62e38707d64ca1 ========================================================================== == 1 of 1 == Date: Sun, Nov 21 2004 11:54 pm From: [EMAIL PROTECTED] (moongateclimber) > You probably verified this, but does Tomcat start up fine without the > opennms Context tag in server.xml? Yes it does. > Is there a $TOMCAT_HOME/webapps/opennms directory (e.g. > /usr/local/tomcat/webapps/opennms)? Yes. > If both of those are true, have you tried making a bare-bones WEB-INF > directory for opennms (e.g. temporarily removing opennms's web.xml file > from WEB-INF, .jar files from WEB-INF/lib, etc.)? I am trying this. Even with an empty WEB-INF, Tomcat crashes. I will try to add WEB-INF elements one by one... Thanks for helping, MC ========================================================================== TOPIC: HTTP authentication http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/95eb9daef024f88c ========================================================================== == 1 of 1 == Date: Sun, Nov 21 2004 11:58 pm From: [EMAIL PROTECTED] (Randy) Help! I can't seem to get this code to work. I have found numerous sites that show the same code that I am using. I am using jdk 1.5 and trying to generate the "Authorization: Basic erwerwqerwerwer" line in the http get header. I have tried the "Authenticator.setDefault (new MyAuthenticator ());" route and it did not work. I have found a lot of web sites with the code snippets // Build the string to be used for Basic Authentication <username>:<password> String userPassword = "username:password"; // Base64 encode the authentication string String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes()); URL url = new URL ("http://www.server.com"); HttpURLConnection connection = HttpURLConnection)url.openConnection(); connection.setDoInput(true); connection.setUseCaches(false); connection.setRequestProperty("Authorization", "Basic " + encoding); connection.connect(); BufferedReader in = new BufferedReader (new InputStreamReader ((InputStream)url.getContent())); String line; while ((line = in.readLine()) != null) { pw.println (line); } but none of this works. All I get is: GET / HTTP/1.1 User-Agent: Java/1.4.2 Host: www.server.com Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Either the JDK does not work or I am doing something stupid. Help! Please? I am about to just say screw it and use a raw socket and write the get request manually. Thanks! ========================================================================== TOPIC: HttpUrlConnection => reading all packets http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5cae854ec3a36001 ========================================================================== == 1 of 3 == Date: Mon, Nov 22 2004 12:11 am From: [EMAIL PROTECTED] (Terrie) Hi shakah, thanks for the response but my program still doesn't get the whole content. I'll post my code: HttpURLConnection httpcon = (HttpURLConnection)url.openConnection(); String requestText = request.getRequest(); httpcon.setDoOutput(true); httpcon.setDoInput(true); httpcon.setUseCaches(false) ; httpcon.setRequestProperty("Content-Type", "text/xml") ; httpcon.setRequestProperty("Content-Length", ""+requestText.length()) ; httpcon.setRequestProperty("Connection", "close") ; httpcon.setRequestMethod("POST"); // HEAD OutputStream os = httpcon.getOutputStream(); PrintWriter bw = new PrintWriter(httpcon.getOutputStream(),true); bw.write(requestText); bw.flush(); if(httpcon.getResponseCode() != HttpURLConnection.HTTP_OK) { System.out.println(httpcon.getResponseMessage()); } else { InputStream is = httpcon.getInputStream(); int len = httpcon.getContentLength(); new EvalData(is, len); // here I print out the is } Thx == 2 of 3 == Date: Mon, Nov 22 2004 12:19 am From: [EMAIL PROTECTED] (Terrie) forget the last post... it works fine now. Thanks!!! == 3 of 3 == Date: Mon, Nov 22 2004 12:26 am From: JScoobyCed <[EMAIL PROTECTED]> Terrie wrote: > Hi shakah, > > thanks for the response but my program still doesn't get the whole > content. I'll post my code: > > HttpURLConnection httpcon = > (HttpURLConnection)url.openConnection(); > String requestText = request.getRequest(); > httpcon.setDoOutput(true); > httpcon.setDoInput(true); > httpcon.setUseCaches(false) ; > httpcon.setRequestProperty("Content-Type", "text/xml") ; > httpcon.setRequestProperty("Content-Length", > ""+requestText.length()) ; > httpcon.setRequestProperty("Connection", "close") ; > httpcon.setRequestMethod("POST"); // HEAD > OutputStream os = httpcon.getOutputStream(); > PrintWriter bw = new PrintWriter(httpcon.getOutputStream(),true); > bw.write(requestText); > bw.flush(); > > if(httpcon.getResponseCode() != HttpURLConnection.HTTP_OK) { > System.out.println(httpcon.getResponseMessage()); > } > else { > InputStream is = httpcon.getInputStream(); > int len = httpcon.getContentLength(); > new EvalData(is, len); > // here I print out the is > } > > Thx Did u try to count how many CR+LF is there in your response ? I remember such problem while reading an http response: the Content-Lenght was , say, 1000. I read 1000 ans I was missing a part of the content, let's say 100. Then I read the InputStream without limit (and stopped the program by forced shutdown), and counted the number of CR+LF: it was 100 ! Then I changed my code to detect CR+LF and only increment by one for the set of two bytes, instead of one per byte. And I got it working. Now that was several years ago, and the servers where not the same (Apache 1.3.1x ... not sure, under Solaris, and a windows 98 plateform to run the Java program). JScoobyCed ========================================================================== TOPIC: I managed to pass SCJP with a 95% grade http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f54134155d6828e ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 12:49 am From: [EMAIL PROTECTED] (Razvan) Hey ! Nobody has time ? Regards, Razvan ========================================================================== TOPIC: Showing a new frame http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4617f0d7eec8e506 ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 1:17 am From: [EMAIL PROTECTED] (Franco Fellico') Thank you Andrew. I know that first of all I must learn Java language, but I am doing it "in parallel" with a lot of test so, to go quickly, I prefer to learn it using the IDE that I have selected to be my future platform. I write programs and components from more then 40 years and I know many languages: different assemblers, Cobol, Visual basic and Pascal (that I use with Delphi IDE that I know very well) so I am sure that I can learn also Java not only teorically, but reading tutorial and in the same time testing each method immediately using a simple IDE. So, I thank you for your suggestions about what I must read; I am yet reading many and many tutorials but I was unable to find a answer to my need. Ann, as you can read here, said me that I must use "new JFrame" but in may case yet I have a object Frame (named MyFrame2) created using the IDE, so I need only to show it (in Delphi when I have a frame created, to see it I need only to show it using the show method). I will read sure also what you suggest me, but if you can write here a statement that can show the frame MyFrame2 that jBuider yet have created for me, that will be a good help to continue my study. My experience in programming will help me in understanding through examples, in fact when I see a example I don't copy it, but I understand why it work. Thank again Andrew and good luck. Franco in Italy Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On 21 Nov 2004 00:22:30 -0800, Franco Fellico' wrote: > > > I am creating my first Java program > > Java learners are best helped on a different group.. > <http://www.physci.org/codes/javafaq.jsp#cljh> > > >..(with Jbuilder 7) .. > > Stop it. You won't learn much that way. > <http://www.xdweb.net/~dibblego/java/faq/answers.html#Q34> > Especially not.. > > >..and clicking a PushButton > > ..when it introduces proprietary classes such as PushButton, or.. > > >..I would like to open a new Form > > ..Form. > > >..(modal or modeless) and > > then close it. What is the code to do that? > > You have two choices, as I see it. > > - Stop programming 'borland' and learn Java first*, or > - Ask Borland how to use their classes. > > For the former, go to c.l.j.help. > But consider this advice about GUI application's first.. > <http://www.physci.org/codes/javafaq.jsp#appfirst> ========================================================================== TOPIC: Environment variable http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e10a85f420f52962 ========================================================================== == 1 of 2 == Date: Mon, Nov 22 2004 1:28 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Michael Borgwardt wrote: > Because they cannot be emulated by something more portable. There's nothing > you can do with environment variables that can't be done with system > properties, > with less potential for incompatibilities or other problems. They can be emulated up to the level that the API documentation of getenv() is satisfied. That documentation allows to return null for non-existing environment variables. So, if a System has no such variables at all, it could simply always return null. Finally, even Sun recognized this, and getenv() is no longer deprecated in 1.5. > Which causes problems all the time and is deprecated. The very fact that > every single Java introduction book needed to contain a chapter on "how to > set up your CLASSPATH" (which is the reason why the damn thing isn't gone > and forgotten) proves that it was a bad idea. > Which is not so much a problem with the environment variable, but with understanding the mapping from package names to directories, class (file) naming, and class search mechanism (in directories and in jars). You can observe exactly the same confusion when you see people messing with the classpath on the command line. Somehow, the concept of a search path seems totally alien to beginners. The fact, that most books then make a mess out of explaining the classpath adds to the confusion. /Thomas == 2 of 2 == Date: Mon, Nov 22 2004 2:10 am From: Michael Borgwardt <[EMAIL PROTECTED]> Glynne wrote: > Yes, but if I NEED to interrogate the environment variables, I should not > find the language standing in my way. > If 90% of Java programmers don't need env vars, that's great, but don't deny > the other 10% of us access to them. I agree with this mostly, but OTOH it encourages stupid practices like putting program configuration into environment variables. ========================================================================== TOPIC: Javabeans step to step tutorial http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4a72804ffe3ce8d7 ========================================================================== == 1 of 3 == Date: Mon, Nov 22 2004 1:35 am From: [EMAIL PROTECTED] (Franco Fellico') Hi Andrew. BEFORE READ HERE PLEASE READ FIRST WHAT I WROTE YOU IN THE POST OF MY OTHER QUESTION. As I said you in the other message, I am able to create components in Delphi (I yet have created many components in that platform) so my objective is to know how do the same in Java. I have seen as I can add a property, a method and a event, but I have not yet understand how, after a event has been created, it can be fired in the code of the javabean. Looking at the code of a simple Javabeen that have some property, some method exposed and some event fired, I will immediately understand how all work. So I need to read only a step by step to build a simple javabean or I need only to read the sorce code of a simple javabean which have some property, some methods and some event to fire (I am particularly interested to custom event). Can you suggest me a place where I can find it? Many greetings. Franco in Italy Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On 21 Nov 2004 00:16:05 -0800, Franco Fellico' wrote: > > > ..(using JBuilder7).. > > Pretty much ditto the previous response. > > Learn Java before you use an IDE, then it will become trivial. == 2 of 3 == Date: Mon, Nov 22 2004 2:01 am From: [EMAIL PROTECTED] (Franco Fellico') Hi Andrew. BEFORE READ HERE PLEASE READ FIRST WHAT I WROTE YOU IN THE POST OF MY OTHER QUESTION. As I said you in the other message, I am able to create components in Delphi (I yet have created many components in that platform) so my objective is to know how do the same in Java. I have seen as I can add a property, a method and a event, but I have not yet understand how, after a event has been created, it can be fired in the code of the javabean. Looking at the code of a simple Javabeen that have some property, some method exposed and some event fired, I will immediately understand how all work. So I need to read only a step by step to build a simple javabean or I need only to read the sorce code of a simple javabean which have some property, some methods and some event to fire (I am particularly interested to custom event). Can you suggest me a place where I can find it? Many greetings. Franco in Italy Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On 21 Nov 2004 00:16:05 -0800, Franco Fellico' wrote: > > > ..(using JBuilder7).. > > Pretty much ditto the previous response. > > Learn Java before you use an IDE, then it will become trivial. == 3 of 3 == Date: Mon, Nov 22 2004 2:07 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Franco Fellico' wrote: > BEFORE READ HERE PLEASE READ FIRST WHAT I WROTE YOU IN THE POST OF MY > OTHER QUESTION. Please stop shouting, and stop posting the same again and again. /Thomas -- ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq ========================================================================== TOPIC: How can I "force" an upcast? Convert subclass into superclass? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ad4bc9f7ae03de71 ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 1:39 am From: Andrea Desole <[EMAIL PROTECTED]> > In general, I'd say no. In fact, it's exactly this mechanical and > habitual implementation of equals that I think Java developers need to > be broken of. > > The vast majority of the time -- for example, any time the class is > mutable -- the right thing to do is not to override the equals method at > all. In those few remaining cases where it is reasonable to override > equals, some thought needs to go into the question of what it means for > two classes to be equal. If the class is non-final (another thing that > should be more rare than it is), then the thought needs to consider the > existence of subclasses. The ideal solution is that equality is defined > at only one extra place besides java.lang.Object, and that definition > should be broader than the one in java.lang.Object. If a further > subclass overrides equals again, then it needs to be yet broader than > the next higher implementation. > > Anything else exhibits some very counterintuitive behavior. > Would you find a more specialized class with a less specialized equals intutive? Personally, I'm starting to think that the equals implemented in Object is not really correct. Actually, it probably doesn't make much sense at all to consider comparing two objects, since we are comparing two empty entities we know nothing about. I would agree on the fact that the equality has to be defined depending on the case, which might make the entire discussion just quite academic, since everything or almost everything makes sense. I would still say that I disagree on the general case, and we might maybe discuss some examples, but there is something that, for me, plays an important role here. The JDK specifies the following about equals (this is the documentation for Object.equals in the JDK 1.4.2): # It is reflexive: for any non-null reference value x, x.equals(x) should return true. # It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true. # It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true. # It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified. # For any non-null reference value x, x.equals(null) should return false. The documentation also says that "equal objects must have equal hash codes" So, before finding an equals that actually expresses equality according to our rules, we should find an equals that expresses equality according to these rules, because they define the semantics of the method. This is also, by the way, why I might argue that using getClass instead of instanceof actually respects Liskov, as discussed in another thread ========================================================================== TOPIC: limitations of Java VM under Windows/Linux? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cc3538556e5ad6cd ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 1:42 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Angus Parvis wrote: > I agree, but as a university student I don't have experience enough .. So why do you want to tell others about Java, if you don't know it? And why should we do your research if you are apparently supposed to research these things? /Thomas ========================================================================== TOPIC: How to do authentication and include the web page in the mail? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa76bc88ec2794c3 ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 1:35 am From: "BB" <[EMAIL PROTECTED]> Below is my sendmail jsp (I copied it from somewhere else and it works for me). It fetches the message from another page and sends it to a email. The problem is that the smtp needs authentication. How do I add the authentication detail in this jsp? And, how do I include the web page instead of plain text in the email to be sent just like how it appears in the email text area when I hit "Send page by email". Thanks. <%@ page import="sun.net.smtp.SmtpClient, java.io.*" %> <% String strParm = request.getParameter("Message"); String from="[EMAIL PROTECTED]"; String to="[EMAIL PROTECTED]"; try{ SmtpClient client = new SmtpClient("smtp.2.com"); client.from(from); client.to(to); PrintStream message = client.startMessage(); message.println("To: " + to); message.println("Subject: New Mail"); message.println(strParm); client.closeServer(); } catch (IOException e){ System.out.println("ERROR SENDING EMAIL:"+e); } %> _________________________________________________________________ ¡¹ ª±®a¶K¤h´ú¸Õª©¥¿¦¡µn³õ! http://www.bet.com.hk ¡¹ ¦øªA¾¹¦«ºÞ¤Î¯²¥ÎªA°È¡A¥Ñ Newsgroup.com.hk Limited ±M·~ºÞ²z¡C ¤ë¶O§C¦Ü $300 ¡A¸Ô±¡½ÐP¹q 3078 6888 ========================================================================== TOPIC: tomcal/xsl - problems with xsl:include http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6f60a33ddc7feb9b ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 2:17 am From: Klaus Friese <kfriese at dataplan punkt de> Hi, i have a servlet and i'm creating my HTML output with XSLT and XML. It's working fine with tomcat 3.3 and at the moment i am trying to transfer my servlet to tomcat 4 and 5. Now i have a problem with <xsl:include>. When i'm using include (or import), tomcat is throwing an exception: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: org.apache.xml.utils.URI$MalformedURIException: No scheme found in URI org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Line 767) in TransformerFactoryImpl.java I can insert the file in my main XSL file an it works fine, so the problem must be the <xsl:include>. This is my XSL-Code: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:include href="produktfarben.xsl"/> thanks for any help Klaus ========================================================================== TOPIC: Compiling with no present classes http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa21c58345af6de9 ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 2:32 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Andrew Thompson wrote: > On Sat, 20 Nov 2004 16:13:43 -0700, Chris Smith wrote: >>..There is no list of valid groups for alt.*, > > > Therefore I consider the entire hierarchy invalid. > > While alt.crackpot.conspiracy.theory might have some > good reason for existing, I have no intention of > encouraging them for any technically related matter. If the creation went through alt.config, they are as "official" as an alt.* group can get. But since the point of the alt.* hierarchy was to have not central control and not be subject to the big seven (now big eight) regulations, any alt group is as valid as any other. /Thomas -- ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq ========================================================================== TOPIC: HTTPUnit not working against an https (SSL) site http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d793f5e72fb7839 ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 2:55 am From: Bruno Grieder <[EMAIL PROTECTED]> samotto wrote: > Bruno, > > I am using HTTPUnit. Below is the code to get a connection: > > wc = new WebConversation(); > > WebRequest request = new GetMethodWebRequest( > "http://www.development.com" ); > //WebRequest request = new GetMethodWebRequest( > "https://www.production.com" ); > > The commented out line above will not work. > > Also, on your suggestion, it appears that the constructors for > HttpsURLConnection and HttpURLConnection are protected so there must > be some other way the are created. I have not worked much with the > java.net package. > > It has to be something in HTTPUnit I am not doing right. > > Thanks again > > Sam Sam, I do not use HttpUnit, only the Sun default implementation and Apache HHTPClient. I am afraid I cannot help you with this one; Constructors protected: yes, these classes should not be instantiated directly; that is why I said you should use: HttpsUrlConnection conx = (HttpsUrlConnection) (new URL("https://...)).openConnection(); bruno ======================================================================= You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer". comp.lang.java.programmer [EMAIL PROTECTED] Change your subscription type & other preferences: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe Report abuse: * send email explaining the problem to [EMAIL PROTECTED] Unsubscribe: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe ======================================================================= Google Groups: http://groups-beta.google.com
