Asking a better question - Taglibs and XML

Having been duely, and appropriately, re-directed by Msr. Eric Raymond and Rick Moen @ http://www.catb.org/~esr/faqs/smart-questions.html#before, let me rephrase my question:
I am setting up a new Tomcat (5.0.27) server and trying to get some jsp pages to run which call a number of taglib routines. Fishing through the www, I found a jakarta article for newbies like me at http://jakarta.apache.org/taglibs/binarydist.html which said there should be <taglib...> entries in the WEB-INF/web.xml file for the .tld's I'd am using. I did not find any such entries in the new server web.xml, or the web.xml of a number of our other web servers that are working with the same jsp code fine. I also checked the .jar files in the CATALINA_HOME/usr/share/jakarta-tomcat-5.0.27/webapps/ROOT/WEB-INF/lib and they mirror the same folder on the working server.
The error I get is
�javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.IllegalStateException: can't declare any more prefixes in this context�
What should I try next, where should I look, am I even on the right track with this error?
Thank you,

strange that you do that and it should work.
the /common/endorsed directory has jar files in it that are common to all applications. They should be available in your classpath without copying them elsewhere.
The only thing I can think of is that you had some other implementation of an xml parser in your web-inf/lib directory that was overriding those standard ones. Putting the xml jar files in your web-inf/lib just gave them a higher priority again, so it works.
I would take a look at what else is in the web-inf/lib, /shared/lib and /common/lib directories, to see if the jar files have any of those components.
Maybe try a small test web application, starting from scratch with only the minimum of jar files in it?
Hope this helps some,
evnafets

Similar Messages

  • How is html page outputed when using taglib and xml ?

    Dear all,
              I am a newbie for taglib and xml. Today, when I read some source code of a
              website, I found that there is a entry like
              "%@ taglib uri="/tlds/taglib.tld" prefix="myprefix" %>",
              and some other entries like
              "<myprefix:Content area="<%=contentArea%>" />"
              I opened the specifized file taglib.tld and saw a tag entry named "Content",
              its tagclass is com.mycom.presentation.taglib.ContentTag. Again I opend a
              java class file "ContentTag.java" and saw some setXXX methods and doXXX
              methods. I donot know how is the webpage outputed. Can someone give me a
              detailed description about that? I will greatly appreciate your help.
              Some source code segments are listed as follows:
              test.jsp:
              <%@ taglib uri="/tlds/taglib.tld" prefix="myprefix" %>
              <td>
              <myprefix:Content body="<%=body%>" area="<%=contentArea%>"
              pageName="<%=pageName%>" />
              </td>
              taglib.tld:
              <?xml version="1.0" encoding="ISO-8859-1" ?>
              <!DOCTYPE taglib
              PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
              "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
              <tag>
              <name>Content</name>
              <tagclass>com.myprefix.presentation.taglib.ContentTag</tagclass>
              <bodycontent>JSP</bodycontent>
              <info>An tag which given the screen and element does the right content
              thing!</info>
              <attribute>
              <name>id</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              <!--type>String</type-->
              </attribute>
              <attribute>
              <name>pageName</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              <!--type>String</type-->
              </attribute>
              <attribute>
              <name>area</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              <!--type>String</type-->
              </attribute>
              <attribute>
              <name>body</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              <!--type>long</type-->
              </attribute>
              </tag>
              ContentTag.java
              package com.mycom.presentation.taglib;
              import javax.servlet.*;
              import javax.servlet.http.*;
              import javax.servlet.jsp.JspTagException;
              import javax.servlet.jsp.tagext.BodyTagSupport;
              public class ContentTag extends BodyTagSupport {
              private String ......;
              public String ......;
              public ContentTag() {
              super();
              public void setPageName(String pageName) {
              this.pageName = pageName;
              public void setArea(String area) {
              this.area = area;
              public void setSegment(String segment) {
              this.segment = segment;
              if (segment!=null) // && !segment.equals("null")
              this.segment_set = true;
              public void setAdmin(String admin) {
              try{
              this.admin = Boolean.getBoolean(admin);
              } catch (Exception _) {
              debugCategory.debug("Setting admin err " + admin);
              public void setBody(String body)
              try {
              this.body = Long.parseLong(body);
              } catch (NumberFormatException ne) {
              debugCategory.debug("Setting body format err");
              public int doStartTag() {
              if (contentMap == null)
              HttpSession session = pageContext.getSession();
              if (segment==null)
              segment =
              (String)session.getAttribute(Parameters.segment_id);
              if (currentScreen==null)
              currentScreen =
              (String)session.getAttribute(Parameters.currentScreen);
              try{
              StateEngineProxy sep =
              (StateEngineProxy)session.getAttribute("stateMachine");
              ModelManager mm =
              (ModelManager)session.getAttribute("modelManager");
              if (sep == null||mm==null)
              sep = new StateEngineProxy();
              session.setAttribute("stateMachine", sep);
              mm = new ModelManager();
              mm.init(session, sep);
              session.setAttribute("modelManager", mm);
              if (body !=0)
              //content = (ContentAI)
              contentMap.get(Parameters.content_id+Long.toString(body));
              if (content==null)
              debugCategory.debug("Get by Body");
              mm.getContent(body);
              content =
              (ContentAI)session.getAttribute(Parameters.content);
              //contentMap.put(Parameters.content_id +
              Long.toString(body), content);
              file:// pageContext.setAttribute(CONTENT_MAP,
              contentMap, myScope);
              if (pageName!=null&&area!=null &&
              segment!=null&&segment!=""&&area!=""&&pageName!="")
              contentList = (Collection)
              mm.getContentBySegmentPageNameAndArea(segment,
              pageName, area);
              if(contentList!=null){
              Iterator it = contentList.iterator();
              if (it.hasNext()) {
              content = (ContentAI)it.next();
              session.setAttribute(Parameters.content,
              content);
              return EVAL_BODY_TAG;
              return EVAL_BODY_TAG;
              public int doEndTag() throws JspTagException {
              current = SUPPLIERSINFORMATION;
              pageContext.getOut().flush();
              if ( content != null
              && !currentScreen.equals(ScreenNames.CONTENT_LIST_URL)
              && !currentScreen.equals(ScreenNames.CONTENT_EDIT_URL))
              if ( !admin ){
              // include body?
              if
              rentScreen.equals(ScreenNames.CONTENT_NEWS_URL)){ 
              pageContext.getOut().println("<h3>" + content.getSubject() + "<br></h3>");
              pageContext.getOut().println("<!-- Subject[" + content.getSubject() + "]");
              pageContext.getOut().println("OrgID[" + content.getOrgId() + "]");
              pageContext.getOut().println("LogoPath[" + content.getLogoPath() + "]");
              pageContext.getOut().println("PageName[" + content.getPageName() + "]");
              pageContext.getOut().println("Area[" + content.getArea() + "]");
              pageContext.getOut().println("Segment[" + content.getSegment() + "]");
              pageContext.getOut().println("<!--Body[-->" + "<br>" + content.getBody() + "<!--]-->");
              return EVAL_PAGE;
              public int doAfterBody() throws JspTagException {
              return SKIP_BODY;
              public static String shortenLink(String link)
              

    Hi Andy,
              The sequence of operations that happen when a JSP page encounters a Custome Tag are
              1. Find the class associated with the custom tag from the tld.
              2. The set and get methods that u find are for passing  the values for the tag attributes that u may need
              to pass.
              3. The Tag Lib class performs the operation specified and flushes the output to the jsp.
              For further understanding ..u can refer to these sites !!!
              http://java.sun.com/products/jsp/tutorial/TagLibrariesTOC.html
              http://www.weblogic.com/docs51/classdocs/API_taglib.html#intro
              Regards,
              Sundhar Subramanian
              Andy Ping wrote:
              > Dear all,
              >
              > I am a newbie for taglib and xml.  Today, when I read some source code of a
              > website, I found that there is a entry like
              >     "%@ taglib uri="/tlds/taglib.tld" prefix="myprefix" %>",
              > and some other entries like
              >     "<myprefix:Content  area="<%=contentArea%>"  />"
              > I opened the specifized file taglib.tld and saw a tag entry named "Content",
              > its tagclass is com.mycom.presentation.taglib.ContentTag.  Again I opend a
              > java class file "ContentTag.java" and saw some setXXX methods and doXXX
              > methods.  I donot know how is the webpage outputed.  Can someone give me a
              > detailed description about that?   I will greatly appreciate your help.
              > Some source code segments are listed as follows:
              >
              > ----------------
              > test.jsp:
              > ----------------
              > ...
              > <%@ taglib uri="/tlds/taglib.tld" prefix="myprefix" %>
              > ...
              > <td>
              >     <myprefix:Content body="<%=body%>" area="<%=contentArea%>"
              > pageName="<%=pageName%>" />
              > </td>
              > ...
              >
              > ----------------
              > taglib.tld:
              > ----------------
              > <?xml version="1.0" encoding="ISO-8859-1" ?>
              > <!DOCTYPE taglib
              >         PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
              >  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
              > ......
              >   <tag>
              >     <name>Content</name>
              >     <tagclass>com.myprefix.presentation.taglib.ContentTag</tagclass>
              >     <bodycontent>JSP</bodycontent>
              >     <info>An tag which given the screen and element does the right content
              > thing!</info>
              >     <attribute>
              >       <name>id</name>
              >       <required>false</required>
              >       <rtexprvalue>true</rtexprvalue>
              >       <!--type>String</type-->
              >     </attribute>
              >     <attribute>
              >       <name>pageName</name>
              >       <required>false</required>
              >       <rtexprvalue>true</rtexprvalue>
              >       <!--type>String</type-->
              >     </attribute>
              >     <attribute>
              >       <name>area</name>
              >       <required>false</required>
              >       <rtexprvalue>true</rtexprvalue>
              >       <!--type>String</type-->
              >     </attribute>
              >     <attribute>
              >       <name>body</name>
              >    <required>false</required>
              >    <rtexprvalue>true</rtexprvalue>
              >       <!--type>long</type-->
              >     </attribute>
              >   </tag>
              > ......
              >
              > ----------------
              > ContentTag.java
              > ----------------
              > package com.mycom.presentation.taglib;
              >
              > import javax.servlet.*;
              > import javax.servlet.http.*;
              > import javax.servlet.jsp.JspTagException;
              > import javax.servlet.jsp.tagext.BodyTagSupport;
              > ...
              >
              > public class ContentTag extends  BodyTagSupport {
              >     private String ......;
              >     public String ......;
              >     ......
              >
              >     public ContentTag() {
              >         super();
              >     }
              >
              >     public void setPageName(String pageName) {
              >         this.pageName = pageName;
              >     }
              >
              >     public void setArea(String area) {
              >         this.area = area;
              >     }
              >
              >     public void setSegment(String segment) {
              >         this.segment = segment;
              >         if (segment!=null) // && !segment.equals("null")
              >         {
              >             this.segment_set = true;
              >         }
              >     }
              >
              >     public void setAdmin(String admin) {
              >         try{
              >             this.admin = Boolean.getBoolean(admin);
              >         } catch (Exception _) {
              >             debugCategory.debug("Setting admin err " + admin);
              >         }
              >
              >     }
              >     public void setBody(String body)
              >     {
              >         try {
              >          this.body = Long.parseLong(body);
              >         } catch (NumberFormatException ne) {
              >             debugCategory.debug("Setting body format err");
              >         }
              >     }
              >
              >     public int doStartTag() {
              >             if (contentMap == null)
              >             {
              >             }
              >    HttpSession session = pageContext.getSession();
              >             if (segment==null)
              >             {
              >                 segment =
              > (String)session.getAttribute(Parameters.segment_id);
              >             }
              >             if (currentScreen==null)
              >             {
              >                 currentScreen =
              > (String)session.getAttribute(Parameters.currentScreen);
              >             }
              >             try{
              >                 StateEngineProxy sep =
              >                     (StateEngineProxy)session.getAttribute("stateMachine");
              >                 ModelManager mm =
              > (ModelManager)session.getAttribute("modelManager");
              >                 if (sep == null||mm==null)
              >                 {
              >                     sep = new StateEngineProxy();
              >                     session.setAttribute("stateMachine", sep);
              >                     mm = new ModelManager();
              >                     mm.init(session, sep);
              >
              >                     session.setAttribute("modelManager", mm);
              >                 }
              >                 if (body !=0)
              >                 {
              >                     //content = (ContentAI)
              >                     //
              > contentMap.get(Parameters.content_id+Long.toString(body));
              >                     if (content==null)
              >                     {
              >                     debugCategory.debug("Get by Body");
              >                     mm.getContent(body);
              >                     content =
              > (ContentAI)session.getAttribute(Parameters.content);
              >
              >                     //contentMap.put(Parameters.content_id +
              > Long.toString(body), content);
              >                     file:// pageContext.setAttribute(CONTENT_MAP,
              > contentMap, myScope);
              >                     }
              >                 }
              >                 if (pageName!=null&&area!=null &&
              >                     segment!=null&&segment!=""&&area!=""&&pageName!="")
              >                 {
              >                      contentList = (Collection)
              >                          mm.getContentBySegmentPageNameAndArea(segment,
              > pageName, area);
              >                      if(contentList!=null){
              >                         Iterator it = contentList.iterator();
              >                         if (it.hasNext()) {
              >                             content = (ContentAI)it.next();
              >                             session.setAttribute(Parameters.content,
              > content);
              >                             return EVAL_BODY_TAG;
              >                         }
              >                      }
              >                 }
              >                 ...
              >            }
              >   return EVAL_BODY_TAG;
              >     }
              >
              >     public int doEndTag() throws JspTagException {
              >         current = SUPPLIERSINFORMATION;
              >         pageContext.getOut().flush();
              >         if ( content != null
              >             && !currentScreen.equals(ScreenNames.CONTENT_LIST_URL)
              >             && !currentScreen.equals(ScreenNames.CONTENT_EDIT_URL))
              >         {
              >             if ( !admin  ){
              >             // include body?
              >                 if
              > rentScreen.equals(ScreenNames.CONTENT_NEWS_URL)){
              >                     pageContext.getOut().println("<h3>" + content.getSubject() + "<br></h3>");
              >                 }
              >                 pageContext.getOut().println("<!-- Subject[" + content.getSubject() + "]");
              >                 pageContext.getOut().println("OrgID[" + content.getOrgId() + "]");
              >                 pageContext.getOut().println("LogoPath[" + content.getLogoPath() + "]");
              >                 pageContext.getOut().println("PageName[" + content.getPageName() + "]");
              >                 pageContext.getOut().println("Area[" + content.getArea() + "]");
              >                 pageContext.getOut().println("Segment[" + content.getSegment() + "]");
              >                 pageContext.getOut().println("<!--Body[-->" + "<br>" + content.getBody() + "<!--]-->");
              >             }
              >         }
              >  return EVAL_PAGE;
              >     }
              >
              >     public int doAfterBody() throws JspTagException {
              >         return SKIP_BODY;
              >     }
              >
              >     public static String shortenLink(String link)
              >     {
              >        ...
              >     }
              > }
              

  • I asked a similar question earlier, and cannot find my thread. I had to chat with someone regarding an order and when I was done I discovered that I could log into my hotmail account, but could not to open messages.

    I did all that was recommended by everyone that responded, as well as uninstalling firefox, running updates, then reinstalling firefox. My husband discovered that hotmail and IM are linked, and that IM never finishes loading in firefox. In IE8 hotmail and messenger work fine. I have found where these are linked in my hotmail account, but not how to unlink them. Any Ideas?

    Your other (older) message that you can't find is at
    :https://support.mozilla.com/en-US/questions/861852?s=&as=s
    How to find your postings ("my-contributions") -- you must be logged in. see
    * https://support.mozilla.com/en-US/questions/860990#answer-229760
    I don't know how to break link between hotmail and chat.

  • How do you get Firefox to remember the response sent to remember password for a site and then not ask the same question over and over?

    How do you get Firefox to remember the response sent to remember password for a web site and not ask over and over? The desktop version has a dialog box that you can check that says "Don't ask me this again". The mobile version doesn't. A real pain!
    Thankx

    You can switch off or uncheck the remember password in your settings :-)

  • My Vostro is trashed. I salvaged the hard drive and have it in a cage. I was able to save my bookmarks as an HTML file. How can I import them into a new computer? I asked a similar question yesterday and the solution did not work.

    I have the original hard drive in a cage (i.e., I can not boot to it or load applications from it). I can access any file on the old drive from the new computer. I have also saved the bookmark file as an html file. I was given a solution to import from the html file that does not work.
    How can I get my old bookmarks moved to my nes hard drive?

    I plugged my old drive into an identical Vostro and saved my bookmarks per the instructions. Later, when I check the file, it was in html format. While waiting for the replacement laptop to arrive, I put my old (Vostro) hard drive into a case so I could access the files. I have been able to launch web pages from the file bt accessing them through My Documents so I know the file is good. The problem is, I apparently need to convert them into a JSON file in order to use them. There is a set of instructions on the Mozilla/Firefox website but that method does not work.

  • I have a 32GB thumb dr and I wanted to encrypt it. I used disk utility, Partition, apply. Then went back and tried to encrypt it and it still ask that GUID be setup  on it. What must I do now, or how is the better question?

    I have a 32GB thumb dr and I wanted to encrypt it. I used disk utility, Partition, apply. Then went back and tried to encrypt it and it still ask that GUID be setup  on it. What must I do now, or how is the better question?

    I have a 32GB thumb dr and I wanted to encrypt it. I used disk utility, Partition, apply. Then went back and tried to encrypt it and it still ask that GUID be setup  on it. What must I do now, or how is the better question?

  • A rather long post of me talking gibberish and asking LOTS of questions.

    ================================================== ================================================== ===
    Before reading this MASSIVE post, please read the bottom at the stupid amount of P.P.S.'s as they probably have a lot of information that I forgot to put in the middle or something.
    ================================================== ================================================== ===
    Hi, I'm some guy on the internet and I am 15 years old. For the sake of this post and the answers I hope to have, please ignore my age and understand my maturity and I hope that you can understand why I would like to learn this language so much. I seem to have major issues with learning this language and online tutorials and stacks of books do not seem to do the trick. Please do not reply saying "this is not for you, try something else" because although I do not know much in Java in terms of making good applications, I have learned quite a few things and I am able to make simple things with the console such as making a calculator where the user has to type in what operator they want to use and then they are asked to enter two numbers in which they are timed/added/divided etc. together and it gives the answer. Considering this I really want to continue learning this language because I find it fun to learn and fun to program in, yet I am having serious stress issues because I can't understand simple things and I just forget some of them and I then find it difficult to make simple applications. For example, I am trying to make a simple snake game where you have to find all the apples and eat them and then your body grows larger etc. but I just can't think of how I would do it. I know a few simple application type things and maybe how to put them to use, but I just don't know how to use them in this situation and how to start off making games like these.
    Just to tell you a little bit about my background of programming, I have known about programming since I was about 11, I made a virus in Visual Basic believe it or not. It would disguise itself as Mozilla Firefox and would slowly delete random files that were opened or edited in the last month starting from the last used files in said month. It would delete a set amount of files every time you booted up and it was pretty nasty. It was obviously quite easy to get rid of it and it probably had many bugs, but it was a nasty virus nonetheless. Anyway, that lasted around 2 months and I never really picked up on programming until around 13 at which point I learned a bit of Java up until the System.out.println part, so not very far at all and I barely understood anything. Then I kinda picked it up at 14 last summer (2012) and learned almost as much I know now over the summer holidays and then kind of left it until after Christmas because I couldn't really get past a certain 'barrier' so I got bored and gave up. Until now. After Christmas I got back into it and starting learning a few more things, understood functions a little more and downloaded a bunch of source code from lots of different websites. I've now been extremely stressed out for the past 2 weeks going crazy because I can't fit anything else into my head because I just forget it or just don't understand it. So I am now in a complete frenzy not doing homework, being a douche to my friends and just not being very social or doing stupid things.
    Unfortunately this is going to be a rather long post as you can probably already tell and there will be a 20 Q's kind of 'game' below where I ask things that I desperately need to know and maybe things that I want to know but don't necessarily need to know.
    If you can, I would greatly appreciate it if you could answer all of the first 14 questions in one post instead of 1 or 2. Also, please do not post anything unnecessary or nasty as I am a new poster here and I just want to get started in Java and I have my own reasons for starting at such a young age and my intentions are rather personal. So please treat this matter with maturity and I hope someone can really help me.
    I am sorry for any misspellings or grammatical errors, I am fully English, I am just rubbish at spelling.
    THE QUESTIONS!!!
    1) What is SUPER used for, when should I use it and why should I use it?
    2) When making a new class and you type PUBLIC [insert class name here](){} what does this do and why does it need to be the same name as the class it is in?
    3) Why do you need to make new classes inside already made classes sometimes?
    4) What is the use of NEW and why do you need to use it when you are creating something like a JFrame, where for example you would use it in your main function and have NEW [insert name of function with JFrame inside]();, why can't you just do [insert name of function with JFrame inside]();?
    5) What is actionPerformed, where is it used and why should I use it?
    6) When using a function, what is achieved when you call another class and make another variable inside said function? Eg, public [insert class name here]([insert other class name here][insert new variable name here]){}
    7) What 'type' is an ENUM? Is it an int? String? Double? So if I were to make ENUM [insert name of enum here] {A, B, C, D, E, F, G}; So what would happen if I were to say PUBLIC [insert name of enum here] B = 5; what would that mean? Would that assign it as an integer?
    8) When should I use enums, what is the point in them?
    9) What does [inset object here].ORDINAL mean? What is it used for and when should I use it?
    10) Although I understand that the RETURN statement is used to end a function and return it with a value if there is one specified, but when it returns it with that value that you may have specified, what happens to that value, how do I retrieve it and how do I use it? When will I know when to use RETURN?
    11) Briefly explain how to use KeyEvent, getKeyCode and just anything else to do with accepting user input and how I would use it.
    12) When using the KeyAdapter, why do you need to make a new class inside an already made class? What does this achieve? Why can you not extend it on the current class you are using instead of making a new class? This links back to the 3rd question.
    13) What is the difference between ++object and object++? Does it really matter which way I use them? Why should I use them differently and how will it affect my code if I use them differently?
    14) What's the difference between an IF statement and a BOOLEAN statement? They are both booleans and if used correctly can be used to do the exact same thing with just one or two lines of codes difference. Which one should I pick over the other and why? Which one is better to use for what kind of things?
    ================================================== ================================================== ===
    POINTLESS QUESTIONS THAT I JUST FEEL LIKE ASKING THAT DON'T NEED TO BE ANSWERED AND DON'T HAVE MUCH TO DO WITH THE CODE ITSELF
    ================================================== ================================================== ===
    15) What is the best way to get into the mindset of 'a programmer'? What is the best way to understand the ways in which you would build an application and learning the step by step processes so you know what you have to do next and how to do it.
    16) I seem to always be worried that it takes programmers 5 minutes to program a very simple game, like Tetris because I've seen videos and just other places where it makes it look like it takes them a very small amount of time to make something that might take me months to learn. Is this how it works? Or can it take hours to program 5 classes for a very simple game? If so, why does it, if said programmer hypothetically understands the language well enough to make said program? Surely they would know what to do and how to make it so it would not take long at all?
    17) How often are IF and ELSE statements used in common programs? I feel when I am making a program I am always using them too much and I just stop programming from there because I feel that I am using too much of something so maybe it isn't the right way to do it or maybe there is a better way to do it.
    18) What would be the best way to learn programming for someone who finds it difficult to teach himself said topic yet has no efficient way to have someone teach him? I feel I am somewhat intelligent enough to learn a programming language, I have gotten this far, so I feel I should just keep going. Besides, despite the difficulties I have and the ridiculous amount of stress I get from not being able to learn on my own, I find it very entertaining to program things, read over other peoples code and slowly learn the world of programming. I feel that I see myself as a programmer in the future and I just really hope that I can learn this language quickly before I am too old to have time to learn this as a hobbie as I do now.
    19) I am someone who hopes to become a games developer as I thoroughly enjoy playing games as much as I do finding out how they work. What would be the right way about learning how to make games? Should I stick with Java or should I go to C++? I've only stuck with Java because I have more experience with it and I feel that I should learn an easy language and get used to OOP and other things before I go off making complex programs with a difficult language. I know how to print something to the console in C++ and that's about it.
    20) I have no way of having an education on programming in my school at the moment and all courses that have programming in them aren't very good - you make a simple application for coursework and you do a computer physics exam at the end of the year, not too helpful for me. Also, I don't have many friends that are diversed in any language of programming and the ones I do have, coincidentally, absolutely none of them are any good at making games or painting anything in graphics or anything to do with frames and windows. They're all about the console and making mods for games instead of making full on programs with a window and what not so it's difficult to get any of them to teach me anything. I've looked at college courses and none of them are for my age and what I am wanting, or they are just too damn expensive. I have also looked at online courses, one-to-one tutoring etc. but they are either way too expensive or they aren't very good in terms of being in a country half way across the world or maybe they have bad ratings. Anyway, what I'm trying to ask, despite all the negative put backs and all the issues that seem to follow me whenever I try to learn this damn language, what would be the best way to teach myself this language or any other language, or where are the best places to have someone teach me for free/cheap prices? I just essentially want to make something basic like a video game like Tetris or something so I at least have some knowledge of making a video game so I can maybe learn other things much easier.
    P.S. I am in top sets for all my classes at school, so any intelligence issues aren't a part of this. I guess you could maybe call it laziness, but I just prefer to say that I am too used to people teaching me things and doing things for me rather than teaching and doing things myself. So if I were stuck on an island alone I really would not know what to do at all because I would mainly rely on other people.
    P.P.S. Just for anyone's curiosity, I use Eclipse as my IDE on a Windows 7 Ultimate OS.
    P.P.P.S. I am British.
    P.P.P.P.S. I have read through about 4 books about Java, but on most of them I just get really bored and stop reading them half way through because they either don't explain what I want to know or they really suck at explaining what I want to know.
    P.P.P.P.S If you are going to post a good tutorial, please post one that I have most likely NOT been on. PLEASE. I have gone through MANY tutorials which all of them don't do me any favours. Please post one that you think that I might not have seen and actually tells me what EACH line of code does and WHY it does it and WHY I might use it and WHERE I might use it. Etc.
    P.P.P.P.P.S If this is a TL;DR kind of post, then I am awfully sorry to have bored you, please go onto another post, but thank you very much for taking the time to actually LOOK and CLICK on my post. However if you do not have any intention of helping my dilemma, please leave as although I am asking for A LOT for FREE, I really don't need pointless posts that really do not solve my problem. Thanks.
    P.P.P.P.P.P.S (Last P.P.S I swear! I just keep forgetting things.) If you have any questions to ask or I might not have asked something properly, feel free to ask as I will probably be refreshing this page non-stop for the next 2 weeks. Thanks ^^
    For all the people out there who are THAT awesome to post here answers to these questions, I really salute to you and I would VERY gladly give you money for your time and effort, if I had the funds to give you what it's worth. ;-)
    Edited by: 983242 on 21-Jan-2013 16:26

    Before reading this MASSIVE postI didn't read it. I went straight to the questions. The rest of it was a complete waste of your time. Nobody cares whether you are 15, are stressed, get bored, etc. You should spend more time learning and less time emoting, and typing.
    I am rubbish at spelling.So fix that. If you stay in this business you will have to spell properly or get nowhere. Compilers won't accept mis-spellings: why should anybody else? Get over it. In a few years you will have to write a resume. If I get it and it is misspelt it goes in the bin.
    1) What is SUPER used for, when should I use it and why should I use it?It is used for two purposes that are described in the Java Language Specification. If you can't read language specifications you will have to learn, or get nowhere. You can't learn languages in forums.
    2) When making a new class and you type PUBLIC [insert class name here](){} what does this do and why does it need to be the same name as the class it is in?That's two questions. 'public' is used for a purpose that is described in [etc as above]. The class name needs to agree with the file name because that is a rule of Java. Period. There's a reason for the rule but you should be able to discover it for yourself eventually, and it doesn't actually matter what the reason is at this stage in your development.
    3) Why do you need to make new classes inside already made classes sometimes?Why not?
    4) What is the use of NEW and why do you need to use it when you are creating something like a JFrame, where for example you would use it in your main function and have NEW [insert name of function with JFrame inside]();, why can't you just do [insert name of function with JFrame inside]();?Meaningless. You have to use the language the way it was designed. Same applies to most if not all your questions.
    5) What is actionPerformed, where is it used and why should I use it?See the Javadoc.
    6) When using a function, what is achieved when you call another class and make another variable inside said function? Eg, public [insert class name here]([insert other class name here][insert new variable name here]){}I cannot make head or tail of this question. You could try making it intelligible.
    7) What 'type' is an ENUM?It is of type Enum.
    Is it an int? String? Double?No, no, and no.
    So if I were to make ENUM [insert name of enum here] {A, B, C, D, E, F, G}; So what would happen if I were to say PUBLIC [insert name of enum here] B = 5; what would that mean? Would that assign it as an integer?I'm getting sick of this [insert name here] business. Try making your questions legible and intelligible. And again, an enum is not an int.
    8) When should I use enums, what is the point in them?When you want them. Not a real question.
    9) What does [inset object here].ORDINAL mean?Nothing. There is no such construct in Java. There might be an occasional class with a public variable named ORDINAL, in which case it means whatever the guy who wrote it meant. If you're lucky he documented it. If not, not.
    10) Although I understand that the RETURN statement is used to end a function and return it with a value if there is one specified, but when it returns it with that value that you may have specified, what happens to that value, how do I retrieve it and how do I use it?You store it in a variable, or pass it to another function, or use it as a value in a statement, for sample as an if or while condition.
    When will I know when to use RETURN?Err, when you want to return a value?
    11) Briefly explain how to use KeyEvent, getKeyCode and just anything else to do with accepting user input and how I would use it. In a forum? You're kidding. Read the Javadoc. That's what I did.
    12) When using the KeyAdapter, why do you need to make a new class inside an already made class?You don't.
    13) What is the difference between ++object and object++?This is all described in the Java Language Specification [etc as above] and indeed most of this stuff is also in the Java Tutorial as well. Read them.
    Does it really matter which way I use them?Of course, otherwise they wouldn't both exist. Language designers are not morons.
    Why should I use them differently and how will it affect my code if I use them differently?That's just the same question all over again.
    14) What's the difference between an IF statement and a BOOLEAN statement?The difference is that there is no such thing as a boolean statement.
    POINTLESS QUESTIONSThanks for stating that.
    THAT I JUST FEEL LIKE ASKINGBad luck. I don't feel like answering pointless questions. Ever.

  • Work Paths, selections, and general doing my job better question...

    I currently work for a company that prints "Fathead" like wall graphics, i set the images up to print for them, but im looking for a better way to do what i do. Specifically my working with illustrator and Photoshop to setup the cut line for each image. Here is my current step by step procedure:
    1) Open image (usually a JPG) in Photoshop CS4
    2) Using mainly the Lasso tool's i select the subject to be printed. I'm very fast doing this.
    3) Copy/Paste the selection i just made into a new and save it as a TIF file.
    4) Back to the original selection i Smooth and Contract the line a few pixels and hit "Make Work Path"
    5) Export that path to illustrator (which leaves me with an .AI file)
    6) From here im done with Photoshop and i open both the .AI and TIF files into Adobe illustrator CS4
    7) The .AI file i give a stroke and then on the Swatches tab i hit New Swatch, name it "CutContour", and select Spot Color & RBG
    8) I then copy the CutContour line, paste it onto the TIF image, and line it up over the subject
    9) From here all that's left to do is make it the right size it's to be printed at and save it as an EPS file and im done.
    The main reason im asking for help here is because I'm not happy with the quality of the cutline Photoshop exports to illustrator (the ai file) after i make it a work path. The anchor points and handle's are often in need of a lot of adjustment despite the fact that my selection in Photoshop was right on the money.
    One side note that might be a direction for me to head in,...
    I recently was given a jpg file from a guy who said he had already made the selection for me. I wasn't quite sure what he meant but when i saved the image as a tif, opened it in illustrator, and hit CTRL-A to select everything i noticed a cutline was already present. After further examination of the jpg in Photoshop i noticed a "Path 1" on the paths tab, and more importantly that cutline when opened in illustrator was nuts on! Meaning none of the anchor points and handle's needed to be adjusted at all.
    Now the person who sent me this file was a customer so i can't rightly ask them how to better do my job :-) lol ...but maybe someone here can tell me how they (for lack of a better word) embedded a cutline or path i guess it's called into a jpg file like that? This would at least save me the step of exporting my selection to illustrator as an AI file and im wondering if however they did it is more accurate then the "Make Work Path" option i currently use.

    ...useing File | Export | Paths to Illustrator is what i outlined above that i currently do...
    My apologies for not catching that. Honestly, my eyes glazed over at about step 2 of your procedure.
    I'm not happy with the quality of the cutline Photoshop exports to illustrator (the ai file) after i make it a work path.
    A couple of possibilities come to mind. What Tolerance value are you using when you first make a work path out of your selection in Photoshop? 0.5 pixel is the highest precision available, and that's what you should use if you want your path to accurately reflect your selection. Be warned, however, that your path will likely end up with a lot of points, making for an unnecessarily complex path. (Try it with a simple circle.)
    Another possibility is that you're working with a low-quality, low-resolution JPEG as your source image. JPEG compression artifacts can affect selection accuracy (with automated tools, like the magic wand or eraser), and overall resolution, of course, will limit path precision. Not much you can do about that other than to start with better-quality images.
    After further examination of the jpg in Photoshop i noticed a "Path 1" on the paths tab, and more importantly that cutline when opened in illustrator was nuts on!... maybe someone here can tell me how they (for lack of a better word) embedded a cutline or path i guess it's called into a jpg file like that?
    Using a low tolerance (high precision) value make a path from your selection in Photoshop and save the path. Save As a JPG, and the path will be saved along with the image. Do not use Save for Web to create your JPG file.
    As others have pointed out in earlier posts, learning to use the pen tool is your best bet... and an absolute necessity if you're going to be doing a lot of this stuff.
    Regarding the creation of clipping paths in Photoshop, slap me silly, but I'm going to refer you to the manual (online Help) for that. And if you think that unkind, try posting the question over at the Photoshop forum. Wear a helmet.

  • I want to know how to clear the text area by the push off my next question button and ask a new ques

    I want to know how to clear the text area by the push off my next question button and ask a new question - also I want to know how to code in my project to where a user can enter a math question in one border container and the answer enters into the next container
    heres my code so far
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" backgroundColor="#1E5C75">
        <fx:Script>
            <![CDATA[
                protected function button1_clickHandler(event:MouseEvent):void
                    //convert text area into labelid to be identified by actionscript
                    richTextLabel.text = myArea.text;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <!--container 1-->
        <s:BorderContainer borderWeight="7" x="28" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
            <!--data Entry control-->
            <s:TextArea id="myArea" width="153" height="68"/>
            <!--end of data entry control-->
            <s:Button width="151" label="ask a question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        <!--container2-->
        <s:BorderContainer borderWeight="7" x="509" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
    <!--data entry control-->
            <!--convert tne data entry control into a label id in actionscript-->
            <s:Label id="richTextLabel" width="153" height="68"/>
            <s:Button width="151" label="next question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        </s:Application>

    This is a user to user support forum.  We are all iphone users just like you.
    You are not addressing Apple here at all.
    This is an odd way to ask your fellow iphone users for help. Berating oterh users will not help you.
    "it's too fragile"
    No it is not.  i have never damaged one, nor has anyone I know.
    " U loose data when Ur phone is locked"
    No you don't.  Why do you think this?
    "and there is no customer support!!!  "
    Wrong yet again.  Apple has an 800 number and they have many retail stores and they have support articles that you can access using the search bar. Or you can contact them throgh express lane online
    "but I will go back with Blackberry "
    Please do.
    Good ridance

  • Using Suri asking any localised question in the UK, it responds with 'cannot help' can only use US locations etc. and in US English. Have I missed something or set something up incorrectly? I also thought it would interface with your Facebook but it just

    Using Suri asking any localised question in the UK, it responds with 'cannot help' can only use US locations etc. and in US English. Have I missed something or set something up incorrectly? I also thought it would interface with your Facebook but it just comes back with a 'I can't help you with Facebook' message

    Yeah, Siri - a headline feature on the iPhone 4s page - is beta at the mo.
    But then anyone who's used Macs for a few years will know that most new software is pretty much still in beta when it's released anyway. Only Apple could get away with it and retain customers

  • I forgot my Apple ID security question answers and cannot contact iTunes support by phone. The only way I can ask for help is via email. How can I make that happen?             Thanks

    Hi! So I haven't used iTunes in a few months but I just got an iTunes gift card and want to make a purchase. iTunes redeemed it just fine but now that I want to make a purchase I am having problems. I can't remember my security question answers and iTunes is requesting them. I have two other verified emails but the are NOT rescue emails. I can't contact iTunes over the phone because my phone lines are out and are going to be out for a long time. The only way I can contact them is by email. How can I do this? Is there an easy way to just reset all my security questions? Please help a girl out. I just want my music!
    Thanks so much

    Alternatives to Reset Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Start here to find your country, and how you can contact Apple:
             Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Support in your country and ask to speak to Account Security.
              Customer Service: Contacting Apple for support.
    How to Manage your Apple ID: Manage My Apple ID

  • Sometimes ill ask siri a question and try to ask another and the speaker button only beeps once and stops? Help Please

    I asked siri my name and it says it but when i try to ask another question the speaker button just rings and thats it

    After Siri answers your question you have to tap the microphone image on the device screen to reactive Siri and ask a different question.
    Hope that helps

  • I am trying to purchase an app and when i try ti it tells me to login. When I log in it ask me security questions which I don't even remember the answers to. I put, "forgot answers" and it told me to check my email but I don't receive it.

    I am trying to purchase an app and when I try to it tells me to login. When I log in it ask me security questions which I don't even remember the answers to. I put, "forgot answers" and it says, "we can help you reset your security information by sending a message to your rescue email address: [email protected]" I only have one email and thats on Yahoo. i still click send email button and it tells me to check my email but i dont recieve anything. please help me

    That's not a good sign if it said it was going to send it to an email address you've never heard of. Contact iTunes Support and let them know this: http://apple.com/support/itunes/contact/

  • TS3297 I have an iPhone and recently bought an iPod 4 touch what l am using the same apple ID for. The iPod won't let me download songs from iTunes it is asking me security questions which I don't think I have put answers to in the first place.

    I have an iPhone and recently bought an iPod 4 touch what l am using the same apple ID for. The iPod won't let me download songs from iTunes it is asking me security questions which I don't think I have put answers to in the first place, because of this it won't let me buy any songs on iTunes

    It's probably asking you to verify the security code found on the back of your credit card.
    Regards.

  • I am attempting to make my first purchase in the App store, yet it is asking me security questions I know I didn't enable and I keep getting locked out of my account despite resetting everything.

    This usually wouldn't pose to be a problem, but I am a college freshman and I just redeemed my $100 giftcard to the app store. I am beyond frustrated and don't know what to do.
    It is my first time making a purchase off of this Mac with this account, so it is asking me two security questions. It keeps asking me who my favorite and least favorite teachers were. I know for a fact that these are not the security questions I enabled, so I went in to change them again and logged out of everything. I logged back in and I was getting the same thing from the App store -- it was asking me questions I didn't enable. I've been locked out of my account for eight hours twice and all of my Mac's information is at home and not easily accessable to me, so I don't want to have to call and be asked for information I do not have.
    What do I do? I need some crucial apps for classes that start in less than fourty-eight hours from now?
    I have changed my appleID's information three times now: passwords, rescue email, and of course, my security questions. I am at my wits end and not pleased that I will possibly be losing $100!

    You've been hitten by Apple's recent SNAFU. I fear you are SoL until their pending investigation fiasco is over with.

Maybe you are looking for