peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Java Web Application Learning Trail, read and quickly learn before they find out you don't know

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Why did you use numeric value that is not affiliated with group description. You should always use meaningful names simple "user" and "approver" will do it nicely. As for the query this is up to you as we do not know what you are about to do.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Just add extra column to your table to declare user groups

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes the browser IRC doesn't work

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I think people have drifted away from religion, because of all the reports (theft, sexual abuse, ect...). As a matter of fact, there was a report recently about some churches being sold / converted for other purposes.

Man, you should visit London for excursion on church conversions...
I know at least 10 in my closes area

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I can report I have very good results of code tags use in web development section (specially in PHP and ASP/ASP.NET). Hence my user title ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

The book is either to old or it is wrong reading, you do not want to add extra things to your Java home directory. If you need to add something you would normally set CLASSPATH to folder where the content is stored. The image you want to use need to be in same folder as the final class file you get after compile...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

With installation of MySQL server by default you get these databases mysql and information_schema (as long admin did not remove them). Simply use them in connection string and then execute create database command like in this example

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Doesn't have to be necessary in Java. With S60 you have choice between Symbian coding or their support of Java. There are some pro and cons for both of them. Obviously these two technologies, plus Microsoft approach, are repeated all over by many people. Not many actually know that you can do lot of things for mobiles in Python, Flash Lite, BREW and lately Android (google is little behind with they toy)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I've developed over 40 applications for Mobile 5.0 and forbidding users to access the Today screen, disabling the Start button and the big X in the upper right corner of the screen.

He-he that will be because Java phones don't have such things ;)

Web development is still tricky for all mobile platforms as not many websites have portal for mobile access like large companies such as BBC, London Transport, Google, Yahoo etc.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Salem is right that you should choose platform by your language preferences. For example I'm comfortable in Java and J2ME is was far easier to use for me then Symbian C++ (even though I got no less then 75% for all assignments) Be aware C++ for mobile device so often called Symbian is very distinguish/different from C++ as you may know. I had lot of problems to look up methods in Symbian documentation and secondly they do loots of changes from one version to other, so if you find by any chance some nice tutorial from something you trying to implement you have like 50-50 chance that it may work or throw hell of errors in your face.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Sorry I move it here because I thought this is only possible with JavaScript:(

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

onMouseover is JavaScript action. Do you want to move this post to JavaScript section?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I'm sorry this is not "IDEA STORE" we can help you with some technical issues, but not with functionality

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What functionalities? That is up to you to find out. Every student project require some degree of RESEARCH!

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You just answered your own question. Ads are one of the reason and another will be excessive use of sport updates

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That is OK.
Are you gone do anything with database structure? It is very inefficient...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Have look at chap1 from Beginning JSP, JSF and Tomcat Web Development: From Novice to Professional pg11 onwards can be to some interest to you. Source code is available for download too

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes that is sort of joke from jwenting as your question is sort of joke for us. Both of the technologies as evolving over time and have theirs pros and cons. It is up to you which path you choose to follow...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1) None of the drop-down option was declared as default to display <option value="o2" selected="selected">2</option> 2) You want to run this or something similar in functionality not technology

<% String s = request.getParameter("mode"); %>
<p><%=s%>

when a change was detected on drop-down not immediately after you display it on screen. For such thing JavaScript would be more suitable

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

But i want to calculate sec highest marks of the student.

You need to run query that will look up all the students with their marks of given subject. Sort them descending order and ask for second of them. So try to come with some query and if doesn't work out post it and we may have go on it.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes there is import option for text file that you can use for SQL file import. Please see attached image. Sometimes it may kick off with error message about different type of DB used but that can be solved by editing sql file.

VernonDozier commented: Helpful +5
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yeah you right, only console. Stupid of me...
If you able to log in yahoos' phpMyAdmin there is somewhere option to import or create table out of existing sql file. I gone check on my hosting, give me few minutes...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I think your command is in wrong order. Following works for me

mysql -u username  DB_NAME < mysql_fix_privilege_tables.sql -p

Once I execute command I'm asked for password which I type in and job is done.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Why don't you have only (PK)Sub_id and Sub_name in Subject table
and
(FK)Stud_id, (FK)Sub_id, Marks in Stud_Sub table?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Please read the whole post. It was not my problem but other member's! I just provided solution.
Please read the forum rules

We strongly encourage all posts to be in full-sentence English. Please do not use "leet" speak or "chatroom" speak.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Personal attacks on forum members are not tolerated
Sort your dictionary as there are no English words as u, nd, ur, ny, dnt, r but for sure you, and, your, any, don't, are

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

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

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

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

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

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

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

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

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