error while forwarding page

Thread Solved

Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: error while forwarding page

 
-1
  #11
Jul 30th, 2008
Now here is crucial question: "Do you want to submit only average project and forget about it or you want to get best out of your project and learn something?"
If
  1. answer is I want average project and forget about it, then continue as you started. Unfortunately I do not see many members want to help with such lousy coding...
  2. answer is I want to submit best project and learn in same time, then you will take this design to Database Design section and seek advice on current state of your DB design as there are serious flows in it. For example, aren't they supposed to be same?
    CREATE TABLE markedevent
    (
     userid   int(4)  NOT NULL ,
     eventid      int(4)  NOT NULL,
      PRIMARY KEY ( userid)
    );
    
    
    CREATE TABLE  Event
    (
      Eventid     int(4)  NOT NULL  AUTO_INCREMENT,
      Description   varchar (255)  NOT NULL,
      Publish       varchar(20)   NOT NULL,
      Questionid   int(4)    NOT NULL,
      Targetgroup   varchar(70)   NOT NULL,
       Anonymous  varchar(15)   NOT NULL,
       PRIMARY KEY (  Eventid )
    );
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 38
Reputation: guravharsha is an unknown quantity at this point 
Solved Threads: 0
guravharsha guravharsha is offline Offline
Light Poster

Re: error while forwarding page

 
0
  #12
Jul 30th, 2008
Hi peter_budo,
Thanks for yor post.
The highlighted column in two tables stores the same data.
Now forget about markedevent table for time being.
now if i want to restrict user against polling same questions in second times, i check userid and eventid in final output table like:
  1. rs=stmt("SELECT userid FROM final where Userid='"+USERID+"'and Eventid='"+EVENTID+'""")
  2.  
if the user has polled perticular event previusly then his userid and corresponding eventid will be there in final table. if not then result of rs will be null. can i use like this?
  1. if(rs==null){
  2.  
  3. shows the event for polling}
  4. else{
  5.  
  6. }
whether i am doing in right ways?
Thanks and Regards
Haresh
Last edited by peter_budo; Jul 30th, 2008 at 8:18 am. Reason: Replacing [tex] for [code] tags
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 38
Reputation: guravharsha is an unknown quantity at this point 
Solved Threads: 0
guravharsha guravharsha is offline Offline
Light Poster

Re: error while forwarding page

 
0
  #13
Jul 31st, 2008
Hi peter_buto,
I am really interested about how to separate business logic from presentation logic.
Like you suggest me to do database connectivity with servlets or java class only.
As this is my first project, I require help from you.
Can I send my project folder with this post?
It’s really difficult to manage both this logic in jsp page with many times problem with closing scriplet.
Another one is can i write single page database connectivity code for entire project.
Thanks and Regards
Haresh
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: error while forwarding page

 
-1
  #14
Jul 31st, 2008
Yes you can attach compressed copy (in ZIP) of your project.
And it would be possible to have one servlet handling all, but I would advice against it (Java file with hundreds lines doesn't look pretty either ) and recommend splitting on more servlets to handle similar requests
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 38
Reputation: guravharsha is an unknown quantity at this point 
Solved Threads: 0
guravharsha guravharsha is offline Offline
Light Poster

Re: error while forwarding page

 
0
  #15
Jul 31st, 2008
Hi peter_budo,
Thank you very much for your help:
Here with I am attaching copy of project folder with database.
Thanks and Regards
Haresh
Attached Files
File Type: zip student.zip (443.3 KB, 2 views)
File Type: zip mynewdatabase.zip (3.0 KB, 5 views)
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: error while forwarding page

 
-1
  #16
Aug 1st, 2008
OK, I downloaded files, but first I will have to re-install NetBeans as I have the simplest package for Java coding and Mobility Pack
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: error while forwarding page

 
-1
  #17
Aug 1st, 2008
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
    1. 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:\"
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 38
Reputation: guravharsha is an unknown quantity at this point 
Solved Threads: 0
guravharsha guravharsha is offline Offline
Light Poster

Re: error while forwarding page

 
0
  #18
Aug 2nd, 2008
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
mysql -u userId -h Hostname -p here userId =root Hostname=localhost

Then it ask password. type password= root123
my datbase name is =mynewdatabase
Thanks and regards
Haresh
Last edited by guravharsha; Aug 2nd, 2008 at 1:32 am.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: error while forwarding page

 
-1
  #19
Aug 2nd, 2008
Originally Posted by guravharsha View Post
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
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 38
Reputation: guravharsha is an unknown quantity at this point 
Solved Threads: 0
guravharsha guravharsha is offline Offline
Light Poster

Re: error while forwarding page

 
0
  #20
Aug 2nd, 2008
Hi,
Here with I am attaching the database file in you suggested format.
Thanks and Regards
Haresh
Attached Files
File Type: zip mynewdatabase.zip (21.2 KB, 6 views)
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC