Posts

Showing posts with the label apache tomcat

Create react app by live-server || live Server || React App

Image
First install node and check node -v and npm -v Create a directory mkdir <your_directory_name> Run command npm init (press enter and use all defaults) by this command package.json file will be created in root directory for creating Dependency we run this command npm install --save-dev babel-cli babel-preset-react npm install --save-dev babel-cli babel-preset-env sudo npm install -g  babel-cli babel-preset-env babel-preset-react ( Installed "babel-cli@6.26.0" with binaries:  - babel-doctor  - babel - babel-node  - babel-external-helpers ) this packages are created. Install live server npm  install  -g  live - server Now again make a directory inside root directory mkdir public (you can take name as you want) mkdir src (you can take name what ever you want you want) inside public folder create two new file index.html index.js inside src folder create one new file  main.js ( this is file where react app execution is start. you can take

Array of string arguments in Java || string args[]

public static void main( String []args ). This string args is used to taking input from console,when we access the file and give some input value. suppose our filename is ABC.java And the className, which has Main method is ABC. To compile this we Run command- javac ABC.java After the compilation this will generate class code that is- ABC.class When we run this using- java ABC “ if here we pass some value this value will go to the args ”. so thats why we use it.

HTTP status 404 in servlet programming in Java ( Apache Tomcat 7)? || http 404

Error 404 is generate when, Database connection is failed. Incorrect query parameters. Incorrect dB name. Mismatch swapping between webpages.