peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1) Start using proper English it is one of the forum rules
2) You did not mention anything, just went on rants that the poster should not put his content in bean folder

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There is nothing to update in first table Emp_id what links both tables. So if you trying to get salary of an employee you either have already person's ID or you will find out through matching of employee name and department against Emp table. Once you get that ID then you can query salary table for that person salary

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

The name of the folder that holds Beans does not matter, it is by your preferences!
Leaving Java files in folder after server deployment is irresponsible of you...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You looking for JavaScript not Java, These two are very distinct technologies with similar names. And yes such thing can be done with JavaScript, simple search from google got me all these

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

By giving us some additional data like what is structure of these two tables?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

On question 1, I do not know, but I think it would be possible (you should ask the question in PHP section of the forum, I'm sorry I'm not into PHP development Java is my case)
Question 3, form action can be linked with any sort of page doesn't matter if the next page gone show just some content or if it will do some server side computing and then redirect you to next page.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you just want to have the form mail the results to an e-mail account, add "mailto:email@server.com" where the e-mail address is that of the account. This would be placed in the "action" property of the form.

If you can bother your self reading other people posts you would discover that I already said so in my one how to do it and you wouldn't just repeat already know fact ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Under a circumstance that requires high level of security, professionalism, performance, and reliability from end-users

Matter of personal opinion. I believe that Java web site or PHP web site will perform far better then ASP. However that is again my opinion

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

As long you do not provide pure HTML site nothing is as it seems in source view...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1. can one get client side php and if you can do you also need to install php on the client computer is the browser already php client side scripting enabled as it is for javascript?

No need for installation of PHP on client side, pages served by server to browser understandable format


2. can javascript be used to calculate vulues from text boxes in the form on the html document before the form info is send to the server?

Yes


3. can i press some button somewhere on the form which will result in php or even java processing being done on the server?

Yes, it is <input type="submit" value="Submit"> as part of the form coding


4. can i create an array of text boxes on the webpage, same as in java or vb 6, so that i can use a for loop to process the 600 text boxes and then process them with javascript?

PHP and JavaScript supports arrays

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

How you gone distinguish between users groups that is what I asked you to answer in Database design section when I provided few suggestions. Unfortunately so far I did not get answer to that...

Check second post of this thread there is already partial implementation. After validation of submitted data, connect to database to retrieve info on user. The query will either return user details if username and passwords are correct or NULL if one of them fail. If null close DB connection and jump to redirect and go back to login screen. However if query return user details do not close connection but run another query this time on events related to userID and groupID. Exact queries are up to you.
Passing user details from servlet to JSP in session is very simple something like this

// what is structure of User bean doesn't matter in this example
// data retrived from the database and stored in a instance of User bean "user"
HttpSession session = request.getSession();
if(BOOLEAN_DATA_SUCCESSFULLY_RETRIEVED)
{
	session.setAttribute( "user", user);
	RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/event_page.jsp");
	dispatcher.forward( request, response);
}
else
{
        String strError = "Wrong username or password!";
	session.setAttribute( "error", strError);
	RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/index.jsp");
	dispatcher.forward( request, response);
}
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

there are 10 different items in the machine.. and each one have 3 flavors.. and each flavor comes in two different sizes 10 oz and 16 oz. and there should be exactly 3 of each of the 10 soda items..

This doesn't give us any idea how you want to organize the interface, each of us will come with different design and that will just confuse you. Therefore do some sketch how you want to look like and attach it to your next post

i want to know how we can do it.. i want started using Netbeans and did the design. but no one doing in netbeans. coz lectuerer saying to try in j creator. but i kinda find hard in that. please if anyone can help me

"Coz" your teacher is right... "So move your a** soldier!"
We need some input on this or there is no point in helping as you will only copy&paste our work

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I'm sorry, I'm short for this challenge. What I found is that Duke's Bank application uses Enum. So what I can say is just dig arount and have look on source code

PS: lol my respond just minutes behind solution

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Alex I do not like that side either, many of the tutorials are lousy and old config with recent timestamps on the post, plus their idea of Java web development is complete mess.

Back on topic, here is link for some resources. It should include books and online resources from O'Reilly

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

We can help, but you'll have to get more specific.

He needs first to have look at Swing and get his ideas straight...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

The forum is not only about posting solution, but also asking questions. So there is your way how other may help you in your learning process

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Solved thread - you participate in discussion and if original poster decide problem is sorted he/she can mark the post as solved
Reputation - is the way how other members can show that they agree/disagree with your posts as being helpful/useless

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

thanks!.. hope u will help me.. and reply to my PM...

Please do not use PM for problem discussion. What is then purpose of this forum if we start sending messages to each other about all the ideas we have?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Sorry, but I selected the list from the top 10 (or so) posters. I would have like to have added more people because there are a lot of good avatars, but there is a max of 10. I didn't want to limit the list to mods because there are lots of other good avatars too and I didn't want this to turn into a popularity contest among mods.

You can not take me seriously on this sort of topics ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Still in development process but API is already available and there is lot of info on Sun website. Require knowledge of Java!!!

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

OK, the W3schools form is nice, but that's just a html.

Big mistake to underestimating that website

To send mail, you would need to use php, and that's means you need to use some real code (i.e. not dreamweaver). The obvious function for that would be mail().

Incorrect on this one too. I can send email from HTML document if I wish so. However I would recommend to use other available technologies over simple HTML, as you said we can use PHP but also Java web services (JSP & servlets for start) or ASP and I'm sure you can use any other programming language as long you are able to plug it into your website

Also, to put it into a database, you would want to know MySQL and how to make PHP interact with it.

Other technologies beside PHP available too

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I think you wanted to Say JavaScript instead of Java. However I admit that applet done in JavaFX is interesting too, this is because I seen presentation last week

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I have my certificate on few websites....

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Ahh damn it, I'm not included...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Here are some tutorials database connectivity. You better of with SQL Server then Access

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You been warned OmniX, not all people have JavaScript enabled...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Sorry matte I'm not expert on PHP and I went only by google. Try to ask in PHP section of the forum, I'm sure they will be able to point you to good links

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I finally had look on what you done so far. Many of the JSP pages with DB connectivity can be combine into one servlet and that will reduce size of the whole project. For example login process with retrieving user info you do (assuming we have correct username and password)

index.jsp=>as.jsp(to check username&password)=>try.jsp(to retrieve user group data and display events)=>Questionforvote/fillquestion.jsp

simplified version should be

  1. index.jsp
  2. loginServlet.class
    • setup db connection
    • check if user exist
      1. user doesn't exist
        • set error message
        • set session attributes
        • return back to index.jsp that will display error message from session
      2. user does exist
        • get events available for user
        • store events in the session
        • redirect to next page
  3. events.jsp

Any questions?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I presume you implemented some setter and getter methods in your "Game" bean. Therefore you should be able to get them with something like game.getMyEnumArray(numPosition)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What are you trying to achieve?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, you can as long you do it correctly...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

JDBC(TM) Database Access by Sun Microsystems always good place to start

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Have some good bed time reading ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes with sessions something like this

<% String e = (String) session.getAttribute( "error" );
if ( e != null ) 
  out.print( e ); 
%>

where the "error" string either been initialized or left intentionally empty depending for example on the outcome of the form validation

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Okay I've found a couple of helpful tutorials.. Just one question: how can I (from within the JSP code) set the window location to run a "mailto:..." command?

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_mail

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Tomcat website

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@james1700 - you reported the above post as "posting your personal details". You wrong about it as these data are free to access anyone who care to run "whois" on your website domain or any domain available on the net. Threatening the other member will not help too, so no PMs please

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Do you have Tomcat on your pc or access to Tomcat based web hosting?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

session.invalidate() - will remove all the objects session.removeAttribute(String name) - will remove only one object of given name

Question is: Do you keep in your session more then one objects?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You better provide better info on the request as there is nothing like "option menu". For basic Swing terminology see this

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Your original declaration

<img hspace="380"src ="board.gif" align ="center" width="300" heigh="300">

is pointing to same level location as your pages. Therefore it will not find the image. You should have it like this

<img src ="images/board.gif" width="300" heigh="300" align ="center" hspace="380">
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@now i placed this jsp and a folder Userpack containig ConnectionBean.class in Root of Tomcat 6.0

Wrong placement. Web project structure under Tomcat is as follows
PATH_TO_TOMCAT_FOLDER/webapps/YOUR_PROJECT_NAME/

  • *.html, *.jsp
  • can have folder img (for images) and css (for cascading style sheets)
  • WEB-INF
    • web.xml
    • lib - for all additional JAR files required by your project
    • classes
      • beans

Therefore you place your UserPack folder in place of beans folder and put that ConnectionBean inside that folder

More documentation can be found on Tomcat website

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@does this get written directly to the Dreamweaver page or should it be different
You do not want to use Dreamweaver for Java web development. NetBeans is more reasonable

@does the system.out.println() print on the browser
No that is system message that will displayed if anything happens while Tomcat server running command prompt

@what about a mailto link can you help me with that
mailto is a basic of HTML that you should already know, if not visit w3schools.com website

@i am sorry if these questions seem absurd but i am new with JSP and really need help for a major project
Do you have any Java programming experiences?

PS: Hijacking other people thread is not a nice thing to do...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Option 1) doing it with Flash, require to have Flash software and knowledge of the package. Positive - easy and quickly done. Negative - more images longer time to uploaded flash object on page access

Option 2) doing it with PHP, require to have PHP enabled server and knowledge of PHP. Positive - PHP is free. Negative - you have to know PHP in deep

Option 3) look for some plug-in from pro PHP coder

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

WEB PROJECT STRUCTURE not web page, something like this

My_project

  • index.html
  • login.html
  • page1.html
  • page2.html
  • images
    • img1.jpg
    • img2.jpg
    • img3.jpg
  • css
    • style1.css
    • style2.css
    • style3.css
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What is the structure of your web project and how did you declare image in the document?

PS: IE is not to be trusted. Firefox is much better in following w3.org standarts

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Hi Peter_bodu,
Sorry for late post as was not at my desk.
If you downloaded mysql database, then you can have the start window for it like-> start->programs->mysql_mysql server 5.o-->mysql command line client. otherwise you can access it in command promt window by using command

Thanks and regards
Haresh

I do have MySQL on my pc, but the file you provided are in wrong format. Please run that command that I provided in previous post to get them in "sql" file

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

When I directed you to Database Design section of the forum I was hopping some "DB monkey" will take care of the business. However it does look like we will have to trade ideas...

OK, I have here few questions and suggestions that I need to get answered:

  1. Does the user table gone hold only students details or also administrator details?
    • If it will hold both, how will you distinguish between student and admin?
    • If you planning to have separated table for each of them, do you have any specific idea about login implementation?
  2. In the user table you have groupid. Can the user be only member of one group or many groups?
  3. I feel like Questionid table and QuestionBank (described in 4th point) should be more flexible. I would prefer to call Questionid table Questioners or Surveys and have it following structure
    • surveyid - primary key, created from groupid+school year+additional number of test/survey (not required if only one per year)
    • groupid
    • description (survey/test title)
    • type - questioner(not marking) in class test(require marking)
  4. As mentioned before I would like to make it more flexible therefore I would drop idea of single question bank and create multiple tables with the surveyid as actual table name. This way
    • Query doesn't have to search whole question bank in order to locate questions related to selected survey
    • If somebody from admin/teachers mess up survey table they will not damage rest of the surveys
    • It will make easier to remove old …
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

well here are some links from google that can help you

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

For what sort of database is that zip file? Is that Derby or MySQL? If it is Derby you need to tell me how to import it and if it is MySQL then you didn't export it correctly...
The way to export from MySQL was something like this if I remember it:

  1. Open Command Prompt
  2. Got to top level of the hard disk C:\
  3. Type following command
    mysqldump -u YOUR_USERNAME DATABASE_NAME>FILE_NAME.sql -p

Replace sections in capital with your data and hit ENTER after "-p", where you will be asked for the password to your database. After that file with your given name and "sql" extension will be created on current directory level. So if you moved to the top as I told you it will be directly under root "C:\"