Questions tagged [jsp]

Java Server Pages (JSP) is used to create dynamically generated web pages based on HTML, XML, or other document types. JSP is similar to PHP, but it uses the Java programming language.

Questions can be related to implementation of JavaServer Pages(JSP), with Java Servlets, connecting to databases, creating web-applications, using netbeans, eclipse, or other IDEs

Introduction

JSP is a server-side programming technology that enables the creation of dynamic, platform-independent method for building Web-based applications. JSP have access to the entire family of Java APIs, including the JDBC API to access enterprise databases.

JSP pages execute as servlets but allow a more natural approach to creating static content. Although servlets and JSP pages can be used interchangeably, each has its own strengths.

Servlets are best suited for service-oriented applications (web service endpoints are implemented as servlets) and the control functions of a presentation-oriented application, such as dispatching requests and handling nontextual data.

JSP pages are more appropriate for generating text-based markup such as HTML, Scalable Vector Graphics (SVG), Wireless Markup Language (WML), and XML.

Links for learning about JSP

39 questions
30
votes
5 answers

Why is JSX good, when JSP scriptlets are bad?

React.js provides JSX as an XHTML-like syntax for constructing a tree of components and elements. JSX compiles to Javascript, and instead of providing loops or conditionals in JSX proper, you use Javascript directly:
    {list.map((item) => …
wrschneider
  • 1,259
  • 1
  • 10
  • 9
28
votes
2 answers

How can I debug a JSP?

I'm trying to edit a JSP for a project and I'm getting a NullPointerException somewhere in the JSP when it's requested from my server. My web server (JBoss) is reporting the exception, but it's giving me a bogus line number. It's reporting that the…
ampersandre
  • 391
  • 1
  • 4
  • 8
10
votes
2 answers

Client-side Rendering vs JSP's for Spring MVC Front End Dev

Firstly, a note on the app I'm about to discuss: It's quite large, on the order of magnitude of a service app like Airbnb -- i.e., it's not just a static web page, it is a full web application. It's in the early stages of development. Here's the…
Ovid2020
  • 111
  • 1
  • 1
  • 6
7
votes
2 answers

How difficult would it be to migrate a Struts/JSP application to Groovy?

I have taken over development of a JSP/Struts application. Right now it's a bit of a mess, and I'm finding the JSP pages with Struts tags to be insanely verbose. Has anyone migrated a Struts application to Groovy/Grails? Can it be done…
kevin cline
  • 33,608
  • 3
  • 71
  • 142
7
votes
2 answers

Where can I host my JSP+Java Web application?

My web application is currently written in JSP/Java, using an Oracle DB. I develop on Windows, and I use JDeveloper (Oracle's eclipse clone) and I use JDev's integrated WebLogic Server. I want to go live using a respectable Web hosting company. …
Brad
  • 1,161
  • 1
  • 12
  • 14
6
votes
3 answers

How should I go about "overhauling" a large legacy application?

Possible Duplicate: I’ve inherited 200K lines of spaghetti code — what now? For my next project, I've been tasked with "overhauling" a large legacy web application with many parts. It is a JSP application written in 2004 and it is used heavily…
CFL_Jeff
  • 3,517
  • 23
  • 33
5
votes
5 answers

Building a website, want to use java

I'd like to make a simple-ish website that is essentially a small game. Key strokes are to be processed and sent to a server (already acquired and should support SQL and JSP, I believe) which then translate to a location and written to the DB. SQL…
Robb
  • 201
  • 2
  • 7
5
votes
1 answer

Is JSP a good alternative to PHP

I'm wondering is JSP a safe alternative to PHP? Some things I'm concerned about are cpu usage, memory usage, and security.
Kelly Elton
  • 214
  • 4
  • 9
4
votes
4 answers

Why JSP over Servlets for view?

Although servlets does the task of sending the HTML code to the client programmers weight JSP over servlets for that. Even a JSP code is compiled into servlet before giving the response to the browser then why is JSP preferred? If servlet is used…
log N
  • 487
  • 2
  • 7
  • 13
4
votes
2 answers

Can the overuse of custom taglibs disrupt the outsourcing of html designers?

Yesterday me and a friend were talking about the overuse of custom taglibs. We create taglibs for everything. We create taglibs in order to wrap jQuery UI elements (tabs, button, etc), and other plugins elements as well. We often wrap them together…
Renato Gama
  • 141
  • 4
4
votes
4 answers

When are scripts inside HTML not considered a bad practice?

I am new to web development. While studying the Play framework and JSP, I noticed that they both give an option to place script (in jsp scriptlet) inside HTML, but in both books I am reading they both say it is bad practice and don't give an…
james
  • 143
  • 1
  • 6
3
votes
0 answers

Setting permissions issue for admins and lower users in project

I am working in a jsp project an got stuck in a big problem. My project consist of accounts table for super admin, reseller, admin and users for executives and manager mapped in the account Permission Super admin can see or add details of reseller,…
singhakash
  • 131
  • 4
3
votes
1 answer

Why use JSP instead of servlets?

(Rewritten for reopening:) What are relative advantages of Servlets over JSP, or vice versa? Might JSP be preferred because it is easy to put code inside JSP, or Servlets because with them code can be separated from view? Are there other…
JNL
  • 904
  • 2
  • 8
  • 18
3
votes
2 answers

JSP, EL, JSTL: learning from a web designer perpective

I have two books geared toward learning JSP. From what I've read, one motivating feature/benefit is that it is easier for web designers (they apparently don't, as a rule, know Java) to work with dynamic pages via EL/JSTL. From what I've seen so far,…
yas
  • 183
  • 1
  • 8
2
votes
1 answer

Best practice to confirm unique username for user creation in JSP and JDBC?

First let me state the asynchronous approaches:- The user enters a character into the username form field. I create a connection to the database, use a prepared statement to confirm whether the username already exists, close the connection, and…
Nikhil
  • 29
  • 2
1
2 3