Servlets :: Which Framework To Choose

Aug 11, 2014

I have good knowledge of servlet,jsp. I've also worked on mvc pattern and now looking to learn a web framework but i'm not sure which to choose between spring mvc OR struts.Should i first do struts and then go for spring or can i choose spring directly?

View Replies


ADVERTISEMENT

Servlets :: URL Routing Without Using A Framework

Feb 18, 2015

I am seen that ASP.NET apps have a handy feature called URL Routing. How will one implement this in Java without the use of heavy frameworks like Spring MVC ? How do you even begin writing a URL Router if there isn't anything available?

View Replies View Related

Servlets :: J2EE Without Particular Framework

Jul 24, 2014

Is it possible to develop huge enterprise applications without any particular framework?

Just with JSP, Servlets and Javascript/Ajax stuffs?

View Replies View Related

How To Choose The Right Collection

Feb 14, 2015

I have small project to be implemented in Java, which, expected the management of a parking.

The project has a class abstract Vehicle, whence derive three classes: Car, Motorcycle, Heavy Vehicles; the cost estimated time for the 3 types of vehicles are: 2€ for Cars, 1€ for Motorcycle and 5€ for H.V.

In addition, in class Ticket will be stored the arrival time of the customer and the characteristics of his vehicle.

Finally, in the class Parking(which provides 80 places available), here it should be added the various types of vehicles.

Now, I though of using an Collection, as Set.. So that they can not, two Vheicle with same license plate.

View Replies View Related

JSP :: Choose A Value From List Item?

Feb 11, 2015

I need to choose the value of a list item in jsp. There are many employees in various departments and i need to choose that employees in department wise.

Example. I have two list items in jsp

1. Select dept_no,dept_name from departments
2. SElect emp_name from employees, departments where emp_dept_no=curr_dept_no and curr_dept_no = dept_no

These two are the list items. When i choose the department from the first list item i need to display the employees in that particular department in the second list.

View Replies View Related

JSP :: Choose / Display Image Path

Mar 15, 2014

I want to do the followings:

-When i press "choose the Image Path" a window open like a picture 2.
-I want also satisfy the condition written in red.

View Replies View Related

Difference Between Multithreading With / Without Executor Framework

Mar 16, 2015

Difference between multithreading with and without executor framework.

View Replies View Related

Guessing Game Always Choose Same Number

Jan 4, 2015

I am using eclipse for this project. Every time I run this program the choose method will always choose 0. Ignore the Sleep.sleep() method, there is another class in the program that performs it.

import java.util.Scanner;
public class gamestart {
public static int num;
public static String name;
public static String diff;
public static String choice;

[Code] ....

View Replies View Related

Connecting Library And Swing Framework

Nov 8, 2014

May I know what it means when you say "What is the OOP mechanism is used to link the library and the swing framework?"

What are the examples of OOP mechanisms? Is there a website explaining this in detail?

View Replies View Related

On Play Framework Connecting To Eclipse

Nov 6, 2014

Question 1: Upon importing the Play Framework content in Eclipse there's a default codes as localhost:9000 is immediately routed to play framework website controllers, checked and running fine test, checked and running fine conf, checked and running fine the problem is the views under app on all youtube tutorials and other websites, the contents of views is editable but when my brother tried to, he cant edit it

Question 2: Is there an easy tutorial on POST, PUT, GET, and DELETE for eclipse-playframework

Question 3:my brother is using POSTMAN - RESTCLIENT to test his HTTP METHODS (post, put, get, and delete)and is there a tutorial where they also test the HTTP METHODS using POSTMAN?

View Replies View Related

Java Exception Handler Framework

Dec 30, 2014

I have a Query, what is the exception handling framework used my project, but we actually did not use any framework ,we used just normal try catch and throws, so what is the exception handling framework, when I browsed through net I found something like JEHA, so is there any other framework available.

View Replies View Related

Recursive Program - Choose K Objects Out Of N

Apr 20, 2015

I recently wrote a simple recursive program that chooses K objects out of N (I was asked to use the variables N choose the R, however) total objects. Here is the code:

int n = 0;
int r = 0;
//the total number of objects defaults to 0
String nChoice = JOptionPane.showInputDialog(null, "How many objects are there to choose from?");
String rChoice = JOptionPane.showInputDialog(null, "How many object are to be chosen from this group?");
try {
n = Integer.parseInt(nChoice);

[Code] ....

It works fine, however in my class we were given two different formula to implement into our code. I used the one above, obviously. However, the second formula we were given was:

C(n,R) = n!
-------(R!(n-R)!)

I had to get the spacing right.

How do I read this formula? How could it be implemented? What are the benefits (if there are any) from using one method over the other? Which method of calculating N choose K (or, in my case, N choose R) would be more widely accepted?

View Replies View Related

Populate Data In JSP Page - Collection Framework

Feb 20, 2015

I have one table in DB i.e. emp. I want to perform all CRUD (insertion,selection,deletion,updation) in DB. Now i want to populate that data in jsp page. Which Collection framework?

View Replies View Related

Which Collection Framework Class Will Delete Data

Jun 19, 2014

I got a question , which collection framework class will delete data if we call "get".

View Replies View Related

Implement HashMap Put And Get Methods Without Using Java Collection Framework?

Feb 11, 2014

How to implement HashMap put and get methods without using Java Collection framework?

View Replies View Related

JSP :: Would Template Based Framework Generates A Lot Of Request Traffic?

Nov 29, 2014

If I have a web page with a lot of data to show, say a lot of tables and graphics, would using non JSP based frameworks result in a lot more individual AJAX requests? For example if the page have 5 tables, with JSP the whole page will be returned to the browser with data for all 5 tables already. But if this is a pure HTML / Javascript based view, then we need to have each of the 5 tables to make individual AJAX requests in order to render the page. Is this indeed the down side for not using JSP?

The reason I'm asking is because I'm considering moving away from JSP to a template based framework such as Thymeleaf or Freemarker.

View Replies View Related

Choose Option To Get Contact Details - Not Getting Output Expected

Feb 20, 2015

When I run my program and choose option 2 to get contact details I am expecting it to display as follows (First Name, Last Name): Contacts how have been entered:

0) John Doe
1) George Smith
2) Nancy Davis

Please enter the number corresponding to the contact you would like to view:

Instead for a personal contact it is displaying as follows:Contacts who have been entered:

0) Doe 1 F St. (last name, address)

Please enter the number corresponding to the contact you would like to view:

Instead for a business contact it is displaying as follows:Contacts who have been entered:

0) 1 F St. jd@gmail.com (address, email)

Please enter the number corresponding to the contact you would like to view:

Then when I enter the number to display the contact for personal it is returning me only first name and business is only returning me first and last name. It should be returning the full contact info that was put in during the add contact step. I thought I programmed everything properly but it isn't displaying what I want to seeMy code is listed below.

ContactList

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package contactlist;
import java.util.ArrayList;
import java.util.Scanner;

[code]....

View Replies View Related

JavaFX 2.0 :: DateTimePicker - Option To Choose Date And Time?

Jun 6, 2014

JavaFX 8 has a DatePicker which is very nice. Does it have an option to chose a date and a time?

View Replies View Related

HiLo Game In Java - User Can Choose Up To 3 Different Levels With 3 Methods

Apr 25, 2014

I will try to explain what i want to code , a HiLo game where the user can choose up to 3 different levels(1-10, 1-100, 1-1000) with these 3 methods

public static void main(String[] args) {...}
public static int playGame(int maxNumber) {...}
public static void giveResponse(int answer, int guess) {...}

with no Random , i will use the:

int number = (int)(Math.random() * max) +1; to generate numbers

I have tried so many times , but i don't get it ....

My code so far :

import java.util.Scanner;
public class HL{
public static void main(String[] args ){
Scanner s = new Scanner(System.in);

[Code] ....

View Replies View Related

Modified Cash Register - Allow User To Choose Preferred Bills

Feb 5, 2015

I am trying to create a slightly modified cash register. The user will enter the amount of the item, the payment received, calculate the change/refund, and then allow the user to choose the preferred bills.

import java.util.Scanner;
public class Register {
private static Scanner input;
public static void main(String[] args) {
input = new Scanner(System.in);
System.out.println("*****CASH REGISTER*****" );
System.out.print("Item Amount: " );
int amount = input.nextInt();

[Code] ....

I will try to clarify the code, to make things a little easier to interpret. in the refund method, I have set up a 2-d array to exist and function as an excel sheet. The refund amount is passed to the method and compared to each bill of the array. Once the refund is determined to be greater than a bill, the user is prompted to enter the preferred bill type. This is where my problem is...I would like the program to then calculate the number of bills and keep a tally of those bills in the 2nd column and then determine the new refund amount at which point the user will be prompted again to determine the desired bill.

Then print out the array of bills that are not equal to 0.

View Replies View Related

Writing A Program Using Switch Statement - Allow Users To Choose Item Of A Menu

Oct 5, 2014

Write a program using switch statement to allow users to choose an item of a menu. For example, the menu looks like the following.

File menu
1. Open
2. Close
3. Save
4. Exit
Enter your choice:

If you type 1, then your program should print out "Open is selected" (double quotes not included).

Notice:
(1) Using Scanner to get user choice;
(2) If the number user input is not in {1,2,3,4}, your program should let user know that.

Here's what I have:

public static void main (String[] args) {
int user = 1
switch (1) {
case value: 1
System.out.println ("Open is selected");

[Code] .....

View Replies View Related

Servlets :: How To Get URL Of JSP Page

May 20, 2014

I am trying to use iText to create a PDF document. I found a nice tutorial online but one thing stumps me. How do I get the URL of the JSP page that contains the content? Since this will not be static, I don't want to hard code this. I am sure this is something simple but I am fairly new to servlets and JSP.

String File_To_Convert = "test.htm";

How do I get the url of the JSP page?

View Replies View Related

Servlets :: Possible To Use Annotations?

Aug 10, 2014

Is it permitted or possible to use annotations on classic servlets?

E.g.:

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

[Code] ....

I tried to visit my webapp with /appinfo appended after the context url but I get a 404 and I see no errors in the GlassFish4 log.

My project is using JSF 2.x with the viewservlet mapped on *.xhtml and it is using Spring Beans as well (using the Spring Context Loader), mapped to /rest/*. Do I need to map something else?

I can only get this servlet working without annotations but only using the old web.xml way.

I don't know what I need to do to get my servlet working with annotations.

View Replies View Related

Servlets :: Not Mapping To URL

Feb 4, 2015

I have a servlet that is not mapping to my URL:

<servlet-mapping>
<servlet-name>view</servlet-name>
<url-pattern>/View/*</url-pattern>
</servlet-mapping>

When I try to call the Servlet from a JSP:

<a href="/View/viewFlow?V1">V1</a>

The resulting link is [URL].... It's bypassing the project name. The link should be [URL]...

View Replies View Related

Servlets :: How To Map Website URL

Nov 25, 2014

I have my mapping as below

<servlet>
<servlet-name>main</servlet-name>
<servlet-class>co.edureka.controllers.MainController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

So that I can map the first request coming say www.xyz.net to my first page , it does the work but some of my css and images is not getting displayed .

So I did as below

<servlet>
<servlet-name>main</servlet-name>
<servlet-class>co.edureka.controllers.MainController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/first</url-pattern>
</servlet-mapping>

By doing this my css and images get displayed and everything works fine.

But the problem is I want to display my first page as user puts the url.

I am putting my jsp pages in WEB-INF/jsps , I am not putting it directly under WEB-CONTENT directory.

View Replies View Related

Servlets :: Need To Set Up A Server

Dec 20, 2014

I am new to Servlets and came across it in Head First Java 2nd Edition. I wrote the servlet code. I don't know how to run it. Do I need to set up a server?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved