How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask TheDoctor Your Own Question

TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1429
Experience:  M.S. in Internet Information Systems
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

fighting app tied in to work in html

Resolved Question:

I would like to create a two player battle screen within html where users are able to upload and change and display pictures on the page. My team is using html css java, javascript and MySQL but are stuck with how to show this. We are building a basic fighting application. Can you help?

Submitted: 1 year ago.
Category: Homework
Expert:  david replied 1 year ago.
I would be glad to help. Can you provide a link or URL to the current page you are using for this project so I can take a look at what needs to be done.
Expert:  TheDoctor replied 1 year ago.
Hello and thank you for using JustAnswer.

Is this project for a homework/class assignment?

Please zip up all of your project files and upload the zip file to http://ge.tt

Once uploaded, you will be given a link on the right. Click on the 'Copy Link' option and then paste it into this thread.

Thank you
Customer: replied 1 year ago.

http://www.ge.tt/589Mkwb/v/0?c

Customer: replied 1 year ago.

Hi and yes this is for a class assignment/project

Expert:  TheDoctor replied 1 year ago.
Thank you,

By when is this required?
Customer: replied 1 year ago.


everything on our end by Friday. We have all the pieces. everything just need to be tied together and the site we would like to look better with background images and incorporate the actual arena game display from the java and MySQL database

Customer: replied 1 year ago.


we are not allowed to use flash

Expert:  TheDoctor replied 1 year ago.
Hello again,

I will contact you once this is complete, or if I need additional information.

Thank you
Expert:  TheDoctor replied 1 year ago.
Hello again!

I am currently working on your class project. I have what you originally created integrated into a web site. Now I will be working on MySQL integration.

What you had as far as the Java goes appeared to be a console application. I had to convert the arena launcher into a Servlet so that it could be called via AJAX.

Can you let me know what IDE you are using so that I can give you correct instructions on how to build and deploy your app once it is complete? I would recommend Eclipse.

Thank you
Customer: replied 1 year ago.


Hello! Thanks for your quick responses and help. Yes I have Ecplise installed but I am not familiar with it much. I am also not familiar with Ajax. I did not remember to mention we are to use JSPs. The teacher also makes us use command prompt for java and MySQL. And it should basic html. When it comes time for us to present it needs to look similar and kinda simple to explain

Customer: replied 1 year ago.


I believe the game has to be in Java but needs to be able to be displayed in the html pages

Expert:  TheDoctor replied 1 year ago.
Hello again,

No problem. I completely understand. There will be some set-up that you will have to go through in order to get the deployed application to work. Once this is complete, I will provide you with extremely detailed instructions about deploying a Dynamic Web Application to Tomcat using JDBC.
Customer: replied 1 year ago.

Thanks!

Expert:  TheDoctor replied 1 year ago.
You are very welcome.
Customer: replied 1 year ago.


Also why I wanted the user to be able to upload their own pictures is because I imagined both players pictures side by side with a healthbar underneath it and the game in the background simulating the fight and determining the winner. We decided to have a java game use a mathrandom function to determine player damage. But as long as we can show something to display the game on the site we should be fine. Or else they will be looking at a java command prompt screen for some fighting action.

Expert:  TheDoctor replied 1 year ago.
Hello again,

I understand. I will implement it the way you have described.

Thank you
Customer: replied 1 year ago.

Smile cool

Expert:  TheDoctor replied 1 year ago.
I will contact you once this is complete.
Customer: replied 1 year ago.
Ok thank you again
Expert:  TheDoctor replied 1 year ago.
You're welcome.
Expert:  TheDoctor replied 1 year ago.
Hello again!

You can download the file here:


I wasn't able to implement that fighter pictures at this time. Doing so will make this application way more complex than I think you want it to be. As I was already at 10+ hours working on the project, I wanted to get it to you and move on. The photos are not a required part of the project from what you have said.

The way this site works, it calls Java classes for the fighting and the results are displayed just like the were in the console. Accept they are displayed in the web page.

Now for the crazy amount of instructions and guidance.

First, you need to unzip the file. Inside of the zip, you will find a WAR file. In Eclipse, select File->Import. In the dialog, expand "Web" and select "WAR File"

If you do not have the Web->WAR File option, then your Eclipse is not set up to create Dynamic Web Projects. You will need to install additional software.

Select the WAR file and import the project. It will create the project in its entirety in your workspace. From there, you can view all of the files.

Inside of the following files:

login.jsp
register.jsp
secure/createfighter.jsp
secure/arena.jsp

You will find a line that connects to the database. You will see that the connection string is:

jdbc:mysql://localhost:3306/fa

You will also see that the password XXXXX is passed into the getConnection function is "root" and the password XXXXX XXXXX

If you have different setting on your computer, you must update these items in each of those files in order to connect to your MySQL Database correctly.

Speaking of the database, I had to alter it a bit. There are some basic structure changes. I included all of the SQL to create the database from scratch. It is a dump file from MySQL Workbench. I suggest you drop any database that you currently have and run this file. There is a small amount of test data that I left in. You can go into the database and delete it out if you wish.

Now that you have all of that done, you have to deploy the application. For this, you must have Apache Tomcat running. The first thing you are going to want to to is navigate to the project folders on your computer (not in Eclipse). Go to this directory WebContent/WEB-INF/lib.

Inside of there you will find a file called mysql-connector-java-5.1.24-bin.jar

Copy this file by selecting it and pressing CTRL-C, or selecting it, then right clicking on it, and selecting copy.

Then you need to go to your CATALINA-HOME, which is the installationd directory for your Apache Tomcat. Once there, go into the lib sub-directory and paste the mysql file into there. If you have a common sub-directory in your CATALINA-HOME, make another copy of the file into common/lib

If you already had Apache running, you will now need to stop it and restart it so that the driver file can be found.

Now you can actually deploy the application.

In Eclipse, right click on the project name in the project explorer. Go down to Export and select WAR File

For destination, click on the "Browse" button and then navigate to your CATALINA-HOME. In that directory, you will find another directory called webapps. Navigate into that folder and then click "Save". Pay attention to wat the war file is called when you are doing this.Then click "Finish".

Look at the Tomcat status window. You will see that a message eventually appears that states "Deploying web application archive..."

You can then go to the application. Let's assume that you deployed the war file as wosFightingApp.war

You could then access the application by going to:

http://localhost/wosFightingApp

That's assuming that your Apache Tomcat is running on part 80. If you changed the port to something else, then use that port instead. For instance, I use 4040 for tomcat:

http://localhost:2020/wosFightingApp


Alright, so that's the instructions for deploying the application. There are a ton of steps to stumble across. Deploying a Java web app with JDBC is not for the faint of heart. I will also provide you with this screencast of the app already deployed and working:


As you can see, the site is fully functional and ingrates with your Java-based game in real-time. It's just a matter of getting your environmetn set up completely correctly. To summarize:

1.) Unzip file
2.) Import WAR file into Eclipse
3.) Copy MySQL Driver jar file into CATALINA-HOME lib folders
4.) Restart Tomcat
5.) Create MySQL Database from the database.sql file provided
6.) Alter all of the JSP files to ensure that the connection string, username, and password XXXXX for the database are correct for your environment.
7.) Export the project as a WAR file into the webapps directory of CATALINA-HOME
8.) Wait for Tomcat to deploy the app.
9.) Visit the app and verify

If your course covered JSP and Java Servlets, getting the environment set up should have already been covered. If you need additional assistance, simply ask. And let me know if you have any other questions.

Please remember to rate my answer. It is the only way that I receive credit for my time and effort. If you require additional assistance, please know that you can return to this thread at any time, before or after rating, to follow-up with me.

Thank you so much for using JustAnswer. Have a great day!
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1429
Experience: M.S. in Internet Information Systems
TheDoctor and 3 other Homework Specialists are ready to help you
Customer: replied 1 year ago.


Hi Doctor,


 


Thanks again for your great work!! Here comes the questions.


 


Is only the admin allowed to create new fighters for this game?


 


We would get a java error message with something concerning the constaint foreign key for cfighter user_id when updating child row.

Is this also because we don't have a logout button that does not erase our previous login session? Because once we register and log in as someone else we are automatically logged in from then on and are unable to create a fighter.


In the create fighter jsp,


 


we had to do a workaround like this

System.out.println("The user_id in the session attribute is:"+session.getAttribute("user_id"));

String query = "INSERT INTO cfighter (name, gender, type, user_id) VALUES " +
"('"+name+"','"+gender+"','"+type+"','5')";

we had to put a number in instead of "+session.getAttribute("user_id"));


 

Expert:  TheDoctor replied 1 year ago.
Hello again,

In the project that I sent you, any user can register and then create a fighter. Your "work-around" is bad. If you instructor notices it, you are likely to have points deducted. If I were your instructor, they would be serious points, as hard-coding an ID into a program is a serious error that would bet you into serious trouble in the real world.

You can see from the video that I sent that I create a new registration and then created a fighter. That was perhaps my 7th or 8th registration. The foreign key error means that the registration did not occur successfully.

Please export your current project with all of your changes. Also, please dump/export the current copy of your database. Zip them up and send me those files so that I can take a look at what you have now and what data is in your database.

Thank you
Expert:  TheDoctor replied 1 year ago.
Hello again,

All you need to send me is a current WAR file and the database dump. That will enable me to see exactly what you current have and what is going on in your database. I may need to add some error checking and a Logout, which I will gladly do.

Thank you
Customer: replied 1 year ago.
Thank you
Expert:  TheDoctor replied 1 year ago.
Your welcome.

If you have those files ready for me, please upload them to http://ge.tt

Once uploaded, you will be given a link on the right. Click on the 'Copy Link' option and then paste it here.

Thank you
Customer: replied 1 year ago.
I will as soon as I can.
Expert:  TheDoctor replied 1 year ago.
I look forward to hearing back from you.
Customer: replied 1 year ago.

http://www.ge.tt/7dqkaLc?c

Expert:  TheDoctor replied 1 year ago.
Hello again,

You just sent me a copy of the zip file that I sent you, and a zip of the project directory. That is not what I need.

I need you to export your project to a war file. Do not send me the war file that I sent you.

I also need you to dump your CURRENT database. Do not send the database that I sent you.

Thank you
Customer: replied 1 year ago.

Is there an easy way to turn the project directory into war file?

Expert:  TheDoctor replied 1 year ago.
Right-click on the project name in the project explorer. Go Select "Export->WAR File"

That's all.
Expert:  TheDoctor replied 1 year ago.
Hello again,

I am unable to reproduce the error that you received. It is likely o due to something specific with your copy of the files, particularly the database. That is why I have been asking you to make a dump/export file of your current database so that I can view the data in it.

So if you can get me the WAR file and a current copy of your database by exporting it from phpmyadmin, I will take a look.

Thank you
Customer: replied 1 year ago.

The only war file I have is the one you sent. I am trying to create one off the zipped project files but having trouble. These are the only files I have until I am able to do so.


Mar 27, 2013 10:53:14 PM org.apache.catalina.core.AprLifecycleListener init


INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\11.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\13.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\VHStoDVD\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Java\jdk1.7.0_10;.


Mar 27, 2013 10:53:15 PM org.apache.tomcat.util.digester.SetPropertiesRule begin


WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorld' did not find a matching property.


Mar 27, 2013 10:53:15 PM org.apache.tomcat.util.digester.SetPropertiesRule begin


WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Deployment' did not find a matching property.


Mar 27, 2013 10:53:15 PM org.apache.tomcat.util.digester.SetPropertiesRule begin


WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:wosFightingApp' did not find a matching property.


Mar 27, 2013 10:53:16 PM org.apache.coyote.AbstractProtocol init


INFO: Initializing ProtocolHandler ["http-bio-8080"]


Mar 27, 2013 10:53:16 PM org.apache.coyote.AbstractProtocol init


INFO: Initializing ProtocolHandler ["ajp-bio-8009"]


Mar 27, 2013 10:53:16 PM org.apache.catalina.startup.Catalina load


INFO: Initialization processed in 3408 ms


Mar 27, 2013 10:53:17 PM org.apache.catalina.core.StandardService startInternal


INFO: Starting service Catalina


Mar 27, 2013 10:53:17 PM org.apache.catalina.core.StandardEngine startInternal


INFO: Starting Servlet Engine: Apache Tomcat/7.0.34


Mar 27, 2013 10:53:18 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom


INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [156] milliseconds.


Mar 27, 2013 10:53:19 PM org.apache.coyote.AbstractProtocol start


INFO: Starting ProtocolHandler ["http-bio-8080"]


Mar 27, 2013 10:53:19 PM org.apache.coyote.AbstractProtocol start


INFO: Starting ProtocolHandler ["ajp-bio-8009"]


Mar 27, 2013 10:53:19 PM org.apache.catalina.startup.Catalina start


INFO: Server startup in 2778 ms


java.sql.SQLException


: Access denied for user 'root'@'localhost' (using password: NO)


at com.mysql.jdbc.SQLError.createSQLException(



SQLError.java:1078)


at com.mysql.jdbc.MysqlIO.checkErrorPacket(



MysqlIO.java:4120)


at com.mysql.jdbc.MysqlIO.checkErrorPacket(



MysqlIO.java:4052)


at com.mysql.jdbc.MysqlIO.checkErrorPacket(



MysqlIO.java:925)


at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(



MysqlIO.java:1704)


at com.mysql.jdbc.MysqlIO.doHandshake(



MysqlIO.java:1250)


at com.mysql.jdbc.ConnectionImpl.coreConnect(



ConnectionImpl.java:2483)


at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(



ConnectionImpl.java:2516)


at com.mysql.jdbc.ConnectionImpl.createNewIO(



ConnectionImpl.java:2301)


at com.mysql.jdbc.ConnectionImpl.<init>(



ConnectionImpl.java:834)


at com.mysql.jdbc.JDBC4Connection.<init>(



JDBC4Connection.java:47)


at sun.reflect.NativeConstructorAccessorImpl.newInstance0(



Native Method)


at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)


at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)


at java.lang.reflect.Constructor.newInstance(Unknown Source)


at com.mysql.jdbc.Util.handleNewInstance(



Util.java:411)


at com.mysql.jdbc.ConnectionImpl.getInstance(



ConnectionImpl.java:416)


at com.mysql.jdbc.NonRegisteringDriver.connect(



NonRegisteringDriver.java:317)


at java.sql.DriverManager.getConnection(Unknown Source)


at java.sql.DriverManager.getConnection(Unknown Source)


at org.apache.jsp.register_jsp._jspService(



register_jsp.java:77)


at org.apache.jasper.runtime.HttpJspBase.service(



HttpJspBase.java:70)


at javax.servlet.http.HttpServlet.service(



HttpServlet.java:728)


at org.apache.jasper.servlet.JspServletWrapper.service(



JspServletWrapper.java:432)


at org.apache.jasper.servlet.JspServlet.serviceJspFile(



JspServlet.java:390)


at org.apache.jasper.servlet.JspServlet.service(



JspServlet.java:334)


at javax.servlet.http.HttpServlet.service(



HttpServlet.java:728)


at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(



ApplicationFilterChain.java:305)


at org.apache.catalina.core.ApplicationFilterChain.doFilter(



ApplicationFilterChain.java:210)


at org.apache.catalina.core.StandardWrapperValve.invoke(



StandardWrapperValve.java:222)


at org.apache.catalina.core.StandardContextValve.invoke(



StandardContextValve.java:123)


at org.apache.catalina.authenticator.AuthenticatorBase.invoke(



AuthenticatorBase.java:472)


at org.apache.catalina.core.StandardHostValve.invoke(



StandardHostValve.java:171)


at org.apache.catalina.valves.ErrorReportValve.invoke(



ErrorReportValve.java:99)


at org.apache.catalina.valves.AccessLogValve.invoke(



AccessLogValve.java:936)


at org.apache.catalina.core.StandardEngineValve.invoke(



StandardEngineValve.java:118)


at org.apache.catalina.connector.CoyoteAdapter.service(



CoyoteAdapter.java:407)


at org.apache.coyote.http11.AbstractHttp11Processor.process(



AbstractHttp11Processor.java:1004)


at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(



AbstractProtocol.java:589)


at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(



JIoEndpoint.java:310)


at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)


at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)


at java.lang.Thread.run(Unknown Source)


java.sql.SQLException


: Access denied for user 'root'@'localhost' (using password: NO)


at com.mysql.jdbc.SQLError.createSQLException(



SQLError.java:1078)


at com.mysql.jdbc.MysqlIO.checkErrorPacket(



MysqlIO.java:4120)


at com.mysql.jdbc.MysqlIO.checkErrorPacket(



MysqlIO.java:4052)


at com.mysql.jdbc.MysqlIO.checkErrorPacket(



MysqlIO.java:925)


at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(



MysqlIO.java:1704)


at com.mysql.jdbc.MysqlIO.doHandshake(



MysqlIO.java:1250)


at com.mysql.jdbc.ConnectionImpl.coreConnect(



ConnectionImpl.java:2483)


at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(



ConnectionImpl.java:2516)


at com.mysql.jdbc.ConnectionImpl.createNewIO(



ConnectionImpl.java:2301)


at com.mysql.jdbc.ConnectionImpl.<init>(



ConnectionImpl.java:834)


at com.mysql.jdbc.JDBC4Connection.<init>(



JDBC4Connection.java:47)


at sun.reflect.NativeConstructorAccessorImpl.newInstance0(



Native Method)


at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)


at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)


at java.lang.reflect.Constructor.newInstance(Unknown Source)


at com.mysql.jdbc.Util.handleNewInstance(



Util.java:411)


at com.mysql.jdbc.ConnectionImpl.getInstance(



ConnectionImpl.java:416)


at com.mysql.jdbc.NonRegisteringDriver.connect(



NonRegisteringDriver.java:317)


at java.sql.DriverManager.getConnection(Unknown Source)


at java.sql.DriverManager.getConnection(Unknown Source)


at org.apache.jsp.secure.arena_jsp._jspService(



arena_jsp.java:80)


at org.apache.jasper.runtime.HttpJspBase.service(



HttpJspBase.java:70)


at javax.servlet.http.HttpServlet.service(



HttpServlet.java:728)


at org.apache.jasper.servlet.JspServletWrapper.service(



JspServletWrapper.java:432)


at org.apache.jasper.servlet.JspServlet.serviceJspFile(



JspServlet.java:390)


at org.apache.jasper.servlet.JspServlet.service(



JspServlet.java:334)


at javax.servlet.http.HttpServlet.service(



HttpServlet.java:728)


at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(



ApplicationFilterChain.java:305)


at org.apache.catalina.core.ApplicationFilterChain.doFilter(



ApplicationFilterChain.java:210)


at org.apache.catalina.core.StandardWrapperValve.invoke(



StandardWrapperValve.java:222)


at org.apache.catalina.core.StandardContextValve.invoke(



StandardContextValve.java:123)


at org.apache.catalina.authenticator.AuthenticatorBase.invoke(



AuthenticatorBase.java:472)


at org.apache.catalina.core.StandardHostValve.invoke(



StandardHostValve.java:171)


at org.apache.catalina.valves.ErrorReportValve.invoke(



ErrorReportValve.java:99)


at org.apache.catalina.valves.AccessLogValve.invoke(



AccessLogValve.java:936)


at org.apache.catalina.core.StandardEngineValve.invoke(



StandardEngineValve.java:118)


at org.apache.catalina.connector.CoyoteAdapter.service(



CoyoteAdapter.java:407)


at org.apache.coyote.http11.AbstractHttp11Processor.process(



AbstractHttp11Processor.java:1004)


at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(



AbstractProtocol.java:589)


at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(



JIoEndpoint.java:312)


at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)


at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)


at java.lang.Thread.run(Unknown Source)

Expert:  TheDoctor replied 1 year ago.
I am not certain why you sent me all of that. But I know what is causing the user_id issue.

I'll let you know how to fix it in a couple minutes.
Expert:  TheDoctor replied 1 year ago.
Hello again,

You do not create a WAR file from a zip file. You open Eclipse. On the left is a project explorer. The project has a name. You right-click on the name of the project. You go down to "Export" and you select "WAR File". You do not do anything with zip files. It is all done inside of Eclipse.

But in any case, I'm pretty sure I know why you received an error on the user_id session variable. I believe your session is terminating. If the session terminates, then the user_id will not equal anything. This will result is create fighter attempting to insert a blank into that field, which would result in a foreign key violation (exactly what you are seeing).

There are a couple things that need to be done to address that. I will send you a new WAR file with the fixes.

Thank you
Customer: replied 1 year ago.

If I exported it I was thinking it would still be to same as the one you sent me because no changes were made on this laptop or on eclipse at all. I was trying to get the project directory from the zip to open in Eclipse because that folder had yesterday's changes and then I would export it in Eclipse but it wasn't working out for me. I am glad you were able to figure it out nonetheless. Thanks

Expert:  TheDoctor replied 1 year ago.
Hello again,
Here is the new war file:

Attachment: 2013-03-28_034926_wosfightingapp.zip


I set the session timeout to 2 hours and added a logout. I also made it so that the page will not let you on the create fighter page (or any other logged in page) if your session has timed out. You must log back in. That should prevent that error from happening again.
Thank you again. Let me know if you need anything else. And if you have any more projects, please feel free to send them to me by starting your questions with **For TheDoctor**
Customer: replied 1 year ago.
Awesome I will. I appreciate your time and patience with me.
Expert:  TheDoctor replied 1 year ago.
No problem. Have a great night.
Customer: replied 1 year ago.


our teacher had once gave us a server.xml and told us to put in the conf folder within Tomcat. He started showing and told us to copy statement realms like this for example

<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/customer?user=root&amp;password=isabe01"
userTable="client" userNameCol="username" userCredCol="password"
userRoleTable="roles" roleNameCol="role"/>

For our project realms, are not needed right?

Expert:  TheDoctor replied 1 year ago.
You would use that if your webapp is utilizing container managed security through Tomcat. The fighting app at this time does not use container managed security. So you wouldn't need that.
Customer: replied 1 year ago.
Ok thanks. Is there a way to turn the class file back into .java files? I am looking for a way to read the class files beccause remember the java files we created kept looping when there was a draw. I would like to see the changes you may have made to the java part
Expert:  TheDoctor replied 1 year ago.
Hello again,

I can get the Java files to you later today.

Thank you
Expert:  TheDoctor replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience