Originally posted by Ameya Thakur:
I wanted my Resultset to get only the last 'n' records from the resultSet.
Say for Example, My Query Return 10 rows and i wanted to display only the last 4 records of the query.
Originally posted by Satish Gopalakrishnan:
I would like to know the methodology to modify excel sheets and save them from a JSP where they are displayed .
I have a page with two frames. One in which an Excel sheet is displayed. I want to the user to have the ability to save the changes he made by pressing a Save Button in the other frame . What is the best way to go about doing this. Any suggestions?
Originally posted by eloimachado eloimachado:
Hello!
When I am trying to run my Tibco Hawk Display, I get the window of Tibco Hawk Display Startup... telling me "Initializing WorkspaceManager..." for ever!
Why this happens? What shoud I do to solve this problem and start the Hawk Display?
Note: I use W2k.
Originally posted by sonu arora:
Bear
I want to read a config file inside a java file and then this java file will return the include directive (from config) to the calling jsp file which shld include the content of that included jsp.
That config file may have 0 or n number of jsp's to be included.
Originally posted by Ashish Agrawal:
Yesterday it rained heavily in Pune. It was the first rain of the season. I and my friends n'joyed a lot..
- Ashish Agrawal
Originally posted by Shabir Husain:
hi..
i wana create a bridge between apache and tomcat for jsp to servlet and servlet to jsp..so, what will be the configuration of apache and tomcat..
i have installed apache 2.0.49 at XP and tomcat 3.3.1...
Thanx
Shabir
Originally posted by Ko Ko Naing:
Yes, WhizLabs SCWCD 1.4 covers the latest exam from Sun... The version of the exam simulator is 5.2.0.0...
Originally posted by Kiran Kanade:
Are there any companies in Pune
interested in Japanese.
How much time it will take to
find the Job.
Do i need to do any certification
Originally posted by Chris Ramsey:
Thanks Sachya Joshi,
So the FlashCardSet class is a part of the model layer and not the controller. You are saying that I need a class I'll call FlashCardController that will check the answer and move the flash card to its appropriate list depending on if the answer she gave is correct or not and update the view to report whether her answer was correct or not.
This means that it needs to have a reference to the FlashCardSet, to get the flash card solution to compare her answer with and the FlashCardUI display the result. So is the textfield that she enters her answer in actually a part of the controller layer and not the view, like I was thinking?
Originally posted by Chris Ramsey:
I am writing a FlashCard application for my daughter. At the same time I want to learn and implement a design pattern that will allow me to add functionality easily and one that I can re-use for future apps. I've looked at MVC, EventManaging, Visitor and I feel I understand what they do, but it falls apart when I try to implement them. Here's a description of the what I think the classes I have so far and what role I think they play within the app:
1. FlashCardGenerator: (MODEL?)
The FlashCardGenerator class creates FlashCards. It's createFlashCard method is called to generator 2 random numbers and make an addition or subtraction flash card. (multiplication and division to be added later).
I'm not sure whether I should have an actual FlashCard class or a member variable of the FlashCardGenerator since its primarily just a string that holds the numerals, operator and the solution.
2. FlashCardSet: (VIEW of FLASHCARDMODEL?)
I am not sure if this class is necessary. It is an array list that holds the FlashCards generated by the FlashCardGenerator. This way the user can determine how many cards they want to solve for each round. I guess an alternative would be just to loop a call to FlashCardGenerator.createFlashCard method. One reason for having this class it that if any flash cards are answered incorrectly 3 times they are marked as incorrect and stored so that at the end of the round the program will inform her of how many were answered incorrectly and if she would like to try them again. So this class would have two ArrayLists (active and error) The active set holds the flashcard she is currently working on and the error set would house the incorrectly answered cards.
3. FlashCardUI (CONTOLLER TO FLASHCARDSET AND FLASHCARD)
This class has the flashcard panel, the progress panel and the skip and reset buttons. This is where I really want to know which pattern would best fit this scenario.
The basic program flow is this:
a. flash card is displayed
b. flash card is answered
c. answer checked against solution
d. progress panel updated
e. next flash card in set displayed
The skip button allows her to move to the next flash card in the set. The reset button clears the set and asks her if she would like to create a new set of cards. The progress panel has 2 labels (correctLabel and incorrectLabel) that are updated each time she answers the equation based on whether the answer is correct or not. My road block is here. Which class should be responsible for checking her answer against the solution and updating the UI based on the outcome? I have explored creating an AnswerEvent object that would hold her answer and go to some class to be checked against the solution. But again, should there be a separate class that does this? Should the UI class create the answerEvent? Maybe a CheckAnswer class that listens for answers and then returns a status of right or wrong? My thinking is that a design pattern will answer the questions and help me sort out who and where to do what, but which one. Thanks for your patience.
[ June 02, 2004: Message edited by: Chris Ramsey ]
[ June 02, 2004: Message edited by: Chris Ramsey ]
Originally posted by Sachya Joshi:
Hi all,
I am getting following error on tomcat start up...Can anybody guide me in this ?
Apache Tomcat/4.0-b4-dev
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN --> http://java.sun.com/dtd/web-app_2_2.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN --> http://java.sun.com/dtd/web-app_2_2.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
PARSE error at line 2 column -1
java.net.UnknownHostException: java.sun.com
XmlMapper: Can't find resource for entity: -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN --> http://java.sun.com/j2ee/dtds/web-app_2_2.dtd "n
ull"
PARSE error at line 3 column -1
java.net.UnknownHostException: java.sun.com
I am using SOlaris platform to run the tomcat.
My Guess:
1. during the tomcat startup, it is making call like
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')
Now during this call, it gets the DTD file and then validates the web.xml file with it. But, if during this process if it is not connected to the internet, it will not find the required resource i.e. DTD file and hence it will throw the above exception. Is it right ???
2. If that is the case, how can we tell tomcat not to go to net for DTD , but refer local DTD file ? is their any setting in context definition ?
Any help is appreciated.
Thanks,
Sachin
Originally posted by Sachya Joshi:
hi,
I am studying EJB using Head First by Kathy & Bert. It is fundoo book. It nicely goes to the deeper level of eachdeployment process. BUT, I donot understand why the authors have not mentioned about passing the parameters while creating InitialContext Object in FIRST chapter of the book.
I followed all the steps as per the book, but on running the AdviceClient I am getting error as
D:\Projects\advice>java -cp .;AdviceAppClient.jar AdviceClient
javax.naming.NoInitialContextException: Need to specify class name in environmen
t or system property, or as an applet parameter, or in an application resource f
ile: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:33)
at AdviceClient.main(AdviceClient.java:26)
Can authors please guide me in this ?
Thanks a Lot in Advance
Sachin
Originally posted by Dheeraj Thakur:
I found out the solution to this problem. It was the classpath settings and I have sorted it out.
Thanks for ur reply.
Dheeraj