Questions tagged [jsp]

JSP (Jakarta Server Pages, formerly JavaServer Pages) is a Java-based view technology running on the server machine which allows you to write template text in client side languages (like HTML, CSS, JavaScript and so on) and interact with backend Java code.

jsp
Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Getting contents of a frame within a frame in Javascriopt

I'm trying to use Javascript to get an element from a frame within a frame. The structure of the page is as attached in the image. I've tried using window.frames[0].document.querySelector('[name=&...
-2 votes
0 answers
19 views

How to rewrite JSF using JSP or any other equivalent technolgies? [closed]

We have an application for which UI was developed using JSP, Servlets and JSF pages (of course, HTML and Javascript on client side). All JSF pages are not XHTML and they are all JSP pages. Since ...
0 votes
3 answers
39 views

How to put Java code in JSP file with SpringBoot?

I got this error after I put this code on my index.jsp file The code : <body> <h1>Student</h1> <p> Status Connection : ${connStatus == "Connected" ? &...
-1 votes
0 answers
5 views

Encode.forHtml() is not working in OWASP 1.2.1 in JSP

Encode.forHtml() is not working in OWASP 1.2.1 in JSP, in Java its working For our production hosts it seems to be working, but not in our local testing environment. What could possibly go wrong that ...
0 votes
2 answers
7k views

Spring Boot jsp files cannot be found

I'm developing simple Spring Boot MVC application. Previously I had everything working with just Spring + Hibernate (that is there was servlet.xml etc.) and I'm trying to rebuild project to use Spring ...
0 votes
3 answers
3k views

autoSizeColumn doesn't work with my HSSFSheet POI

I want to adjust the width of my columns with autoSizeColumn, but it doesn't work, any idea? Statement StReporte = conexion.createStatement(); ResultSet rs_marcador = StReporte....
0 votes
1 answer
9k views

HTTP Status 500 - org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.register_jsp

I am having problem displaying register.jsp webpage from Tomcat Server. The register.jsp is located in WEB-INF/jsp and also at webapps/register folder and RegisterController.class is located at WEB-...
-1 votes
0 answers
6 views

how to mavenize an oc4j oas10 application

I have an old jsp application that runs on oc4j oas10, java 1.5, I have tried several ways to mavenize this application, but I can't get it to work, I would also like to be able to run it with an oc4j ...
0 votes
2 answers
195 views

Testing email contact form with JWebUnit without sending the email

I have a Java web application built using servlet and JSP pages. I have written some integration tests using JWebUnit (http://jwebunit.sourceforge.net). I have a test method like this: @Test public ...
4 votes
3 answers
18k views

Dynamically Populate Drop down List In Spring MVC

I am new to Spring MVC. I have two Dropdown Lists in Jsp.One for country and Other for State. As soon as i select country from list State list should be populated with respective lists. My ajax ...
0 votes
1 answer
10k views

Dynamic drop down list with AJAX and database

I'm hoping someone could guide me in the right direction. What I'm trying to do is create two drop down lists where the second one (cities) depends on the first one (states). For example, when I click ...
0 votes
0 answers
10 views

<sql:setDataSource var="db" driver="com.mysql.cj.jdbc.Driver"> throws java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver [duplicate]

connection my sql database in jstl tag so getting error like <sql:setDataSource var="db" driver="com.mysql.cj.jdbc.Driver" url="jdbc:mysql://localhost:3306/jdbc_db" ...
0 votes
1 answer
3k views

Display loading state while java code on jsp site is executed

I found similar things, but none of them actually fits my wishes. I´ve got one jsp page where the java code which takes 10-30 seconds to finish (i am getting something from a database and build charts)...
0 votes
1 answer
20 views

Can't load Css file in Jsp Page

I'm trying to connect CSS with the JSP page. I wrote like this ` <link href="<c:url value="/resources/css/plugins.css" />" rel="stylesheet"> <link ...
-1 votes
3 answers
2k views

My class files inside WEB-INF/classes gets deleted when i load my webapp in webapps folder [duplicate]

I'm using Tomcat 5, when I start the server and load my app from webapp folder, my JSP loads but class files inside the WEB-INF/classes is being erased automatically and when I load the class files ...
1 vote
1 answer
2k views

Sitemesh 2.4.2: How to use decorators other than body decorator

I am using struts2-archetype-starter Maven template to create Struts2 webapp. Though, I used Struts2 before, I am new to Sitemesh. I have one adminTemplate.jsp in my decorator folder, containing one &...
-1 votes
0 answers
36 views

Dispatcher servlet not able to find view in Spring Boot 3.2.4

I am getting an error saying, DispatcherServlet - Completed 404 Not found. My project is packaged as a jar and the jsps are located in src/main/resources/META-INF/resources/jsp. In my application....
2 votes
2 answers
12k views

ServletException in '/left.do': java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.tiles.leftlogged_jsp

After integrating ESAPI into a login form I am getting a rendering issue and an error after a successful login. The error generated in the browser states: javax.servlet.ServletException: org....
21 votes
7 answers
60k views

Can sendRedirect() act as a post method instead of get? - jsp/servlets

I have a simple form which accepts a username and a password. I have to use sendRedirect() method for the page to redirect to one page if log in is valid and to another if not. I need to use ...
0 votes
1 answer
263 views

IBM Rapid Application Developer 8.5.1 scrollbar not draggable (Enterprise Explorer\Package Explorer) + Ctrl-F on JSP sometimes not working

I currently have IBM Rapid Application Developer 8.5.1 installed on Windows 7 64 bit and I'm having these two issues: I'm unable to scroll by dragging the scrollbar with my mouse on both the ...
1 vote
1 answer
12k views

How to set the value of a check box dynamically in jsp (values are coming from database) [duplicate]

I have a jsp file in which i have to display the notes with there date and description Since there can be more than one note(as in a scheduler) for a particular date so more than one notes are ...
4 votes
5 answers
64k views

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator [duplicate]

I followed the guide in this link to install JSTL but I got the following error when I tried to launch my JSP page: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator The ...
-2 votes
0 answers
23 views

JSPC didn't work after I switch to openJDK: Could not find tools.jar

I have a project with JSPC process which compile JSP pages before it is packaged: <groupId>org.jasig.mojo.jspc</groupId> <artifactId>jspc-maven-plugin&...
4 votes
1 answer
4k views

Thymeleaf or JSP: which is better with Spring Boot?

Is Thymeleaf better with Spring Boot than JSP? How about their performance? Is there any suggestion for alternate UI framework to work with Spring Boot?
1 vote
2 answers
12k views

Passing JSON Array from javascript to spring mvc controller

I am working on spring mvc and I need to pass JSON array to spring controller from my jsp using ajax. Can anyone help me out how to pass, map and access JSON array in controller. (JSON array would be ...
1 vote
2 answers
194 views

What is page contentType in JSP?

What is the point of this part of an auto-generated JSP page in IntelliJ IDEA? <%@ page contentType="text/html;charset=UTF-8" language="java" %> Because I don't see any loss ...
0 votes
0 answers
29 views

Unable to compile the class for JSP in tomcat 8.5.95 [duplicate]

I am developing a project "Expense Tracker" .This is my second project, Im Stuck with this error. HTTP Status 500 – Internal Server Error Type Exception Report Message Unable to compile ...
0 votes
0 answers
51 views

Liberty doesn't compile JSP

I am currently migrating an app from Websphere 9 to Liberty. I have an issue which I don't know if it is a bug from Liberty or a configuration issue from my side. Server.xml: <?xml version="1....
17 votes
12 answers
173k views

ORA-12518, TNS:listener could not hand off client connection

I am using ORACLE database in a windows environment and running a JSP/servlet web application in tomcat. After I do some operations with the application it gives me the following error. ORA-12518, ...
8 votes
4 answers
54k views

File upload with ServletFileUpload's parseRequest? [duplicate]

I upload the file which I browse with input type="file" in my web App. The issue is I get the FileItem list size as 0 though I can see all uploaded file info under request -> ...
-2 votes
1 answer
262 views

Why no files found using file uploading in Struts 2

I am using org.apache.commons.*, org.apache.commons.disk.*, org.apache.commons.fileupload.servlet.* packages for file uploading in JSP program and there was no need of Struts and it was working great, ...
6 votes
1 answer
28k views

JSP Error: According to TLD, tag form:input must be empty, but is not

I try to create form in JSP and have one problem with input field. Here is part of my JSP page: <section> <div class="container"> <h4>Add new PC or Laptop</h4> ...
1 vote
1 answer
46 views

Why ${message} appear as it is in View and not the real message passed in Spring MVC controller [duplicate]

I'm trying to learn Spring MVC and encountered an issue. Please see the attached code. I'm not getting the real message on View and instead ${message} on View. What could be the issue here? This is ...
0 votes
0 answers
12 views

How can i connect my 4 objects in my jsp file so it can run perfectly [duplicate]

So i have been working on this project my teacher gave me. A SIMPLE(but problematic for me) Java website made from 4 objects, 1 servlet, and 1 jsp file. And after long hours of finding the error, i ...
-1 votes
1 answer
63 views

java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.jsp.ImportTab_jsp

We are getting below exception 2024-03-13 11:42:00,723 ERROR | Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [java.lang.ClassNotFoundException: org.apache....
1 vote
5 answers
10k views

return if a user exist in database

I have a MySQL database where I have a userid and a password column. Each of them has the value "mads". I have some problems that I have been struggling with some days now, because I didn't program so ...
13 votes
9 answers
23k views

Spring Boot - where to place the jsp files

I am trying to develop a new Spring boot application using MVC as a first step to move my existing Spring MVC application to Spring boot. However, I am facing an issue with the mapping of jsp files. ...
-1 votes
0 answers
17 views

An error occurred: Cannot run program "C:\Users\ford\AppData\Local\Programs\Python\Python311\python.exe": CreateProcess error=5, Access is denied

I'm encountering a problem while trying to call a Python program from a JSP (JavaServer Pages) file. Despite ensuring that the Python script (careerbook_refyx.py) has appropriate read and execute ...
-2 votes
0 answers
39 views

Issue with dropdown menu in the jsp page(cannot import the choice in the db)

So I want to fix an issue with the jsp page. As you may see this form is for registering a new product into database. You add some stuff like ID of product, some category of a product(if it is ...
0 votes
0 answers
22 views

javascript function changes when used with jsp [duplicate]

I am starting my long and bumpy road to move website i made 20 years ago to Jakarta ee backend, mysql and html javascript frontend. Have some success with java, but problems in javascript. In my JSP I ...
2 votes
1 answer
5k views

No suitable driver found for JDBC MySQL [duplicate]

We're having some trouble finding out why we are getting an error message when creating a connection with DriverManager. Here is our code: package Databank; import java.sql.Connection; import java....
-1 votes
0 answers
52 views

Database ConnectionError [duplicate]

java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892) at org.apache.catalina.loader....
21 votes
4 answers
59k views

change language input type=file

I´m using for my app spring-mvc and I have managed go up file to server, with label: <form:input path="file" type="file" id="file"/>, but I have a problem when my app changes of language, ...
0 votes
1 answer
5k views

Where is the work directory of embedded tomcat for a spring boot / spring mvc application?

I would like to ask where is the location where you can see the work directory of a spring boot / spring mvc applicaiton. Specifically I want to know Transpiled JSP files converted to java files. I ...
1 vote
2 answers
96 views

How to fix checkmarx reflected XSS attack in JSP page?

In the below JSP page Checkmax shows a Reflected XSS attack as I am using ${pageContext.reqest.contextPath} variable in JavaScript source. I have tried using <script type="text/javascript&...
9 votes
2 answers
83k views

DataTables warning: table=userTable - Invalid JSON response?

I use jQuery DataTables and get this warning message: DataTables warning: table=userTable - Invalid JSON response A servlet fetch users from MySQL which I want to display in a jQuery Datatable, ...
0 votes
0 answers
19 views

Where should i place my index.jsp and index.jsp1 for my app to run in tomcat app [duplicate]

This is what i get when i run my app, you can see the directory on the left. I tried moving index.jsp in /src/main/webapp/WEB-INF/src but then my css files are not working. Can you help me figure out ...
1 vote
1 answer
33 views

JSP: "object cannot be resolved to a variable" when used in nested tag

I am trying to build app pages via JSP, using nested tags within an outer tag ("page"). All of the tags need access to the same object, which is passed in from the controller. But I can't ...
4 votes
1 answer
9k views

How do I access <c:set var> in a <%= scriptlet %>

I started following one tutorial about JSTL tags. The repositories tutorial used are too old, so I wanted to try it my way using some newer versions. Unfortunately, I am stuck now. I will tell you ...
0 votes
0 answers
17 views

How to use JSTL in JSP: jakarta.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator [duplicate]

I am using TomCatServer v10.1 for Java Web Development project. I am not able to use JSTL in JSP and the error is HTTP Status 500 – Internal Server Error Type Exception Report Message java.lang....

1
2 3 4 5
1042