Questions tagged [jsp]

14440 questions
0

votes
0

answer
17

Views

How to pass list from jsp to servlet

How to pass list from jsp to servlet? actually, I want to add the dianomic field in my JSP and insert it through a servlet.
Tutan Ghosh
1

votes
1

answer
294

Views

Difference between sightly and jsp?

Why is there a need to move away from JSP codes when the world doing just fine with it? When I ask the difference between JSP and sightly I only find the advantages of sightly but I want to how are they different fundamentally? What does it mean when they say sightly provides better segregation of b...
Vishal--JAVA--CQ
1

votes
2

answer
2.4k

Views

EL expressions are not evaluated in JSP page of JSF

My inputname.jsp file enter your name page My welcome.jsp file Welcome , to JSF 1.2 World! my web.xml file Faces Servlet javax.faces.webapp.FacesServlet 1 Faces Servlet *.jsf my faces-config file /user/inputname.jsp welcome /user/welcome.jsp UserBean net.roseindia.UserNameBean req...
DanMatlin
0

votes
0

answer
6

Views

Exception in thread “main” java.lang.IllegalArgumentException: PWC6309: Illegal compilerSourceVM: 12

I tried to run this below code: JSP Page Hello World! But the IDE show me an error: Exception in thread 'main' java.lang.IllegalArgumentException: PWC6309: Illegal compilerSourceVM: 12 at org.apache.jasper.JspC.setCompilerSourceVM(JspC.java:724) at org.netbeans.modules.web.project.ant.JspC.main(JspC...
Huy
1

votes
3

answer
18.6k

Views

auto refresh jsp page when data changes

I have a JSP page which shows items included in an Array (Just a very simple list). In the background the Array might change i.e. adds a new Item or remove one. How can I auto refresh the page when the Array changes?
MBZ
0

votes
0

answer
3

Views

Need to retrieve rows from database

I'm trying to retrieve row by row from the database. Here I'm having 2 inputs from a user and use those 2 in 'where' condition of the query. But my code doesn't work properly. Someone, please help me with this! I'm using eclipse oxygen and mysql workbench Statements.java: public class Statements { p...
1

votes
1

answer
6.2k

Views

How to retain the form values after refresh in jsp?

I have read many topics regarding this issue but almost all of them aims at how to retain the values of the form once the form is submitted. But in my case I don't want to submit the form.I'm having 3 checkboxes and based on the selection of the checkbox by the user some values are displayed dynamic...
Saumil
1

votes
1

answer
1.9k

Views

Struts 2 tag lib for number textfield

I have this code in a JSP page using Struts 2 Framework to get a number. How can I specify the min, max value and step of this field like in HTML5?
Tera Mind
1

votes
3

answer
71

Views

cannot change language in spring application

I'm trying to change language using tag. But it doesn't get recognized. language.jsp English | French AppConfig.java @Configuration @EnableWebMvc @ComponentScan(basePackages = {'com.dilini.controller', 'com.dilini.service'}) @Import({DatabaseConfig.class, SecurityConfig.class}) public class AppConf...
pippi longstocking
1

votes
2

answer
9.2k

Views

How to access the web application context from a javascript file? [duplicate]

This question already has an answer here: How do you get the contextPath from JavaScript, the right way? 5 answers I have a javascript file 'util.js' which I am using in a jsp file. How to access the application context EL ${pageContext.request.contextPath} in the javascript file? This EL is worki...
srikanth
4

votes
2

answer
122

Views

servlet abort multipart form data submission after validation fail

I have one jsp page which allows the user to submit a multipart form data to the servlet. This multipart form has Order Id field and another field for uploading a video of 1GB. Now at the server, I perform validation on Order Id to check if order Id is valid or not, If order id is invalid I just ret...
ashish pandey
1

votes
3

answer
1.6k

Views

java.lang.NoSuchMethodError in jsp when calling a java method whose signature has been changed

I have a java method with the original signature as follows: public boolean sampleMethod(int num) This is being called in a lot of jsp's in my project. Recently, I needed to change the method signature to: public boolean sampleMethod(long num) With this new signature, all the method calls in my jsp'...
Pink Angel
1

votes
1

answer
38

Views

Remove inline javascript in jsp foreach

I currently have a jsp page like the following: Submit form with default Submit form for detail id function myFunction1() { document.myForm.id.value = 0; document.myForm.submit(); } function myFunction2(detailId) { document.myForm.id.value = detailId; document.myForm.submit(); } For security reason...
Dale
1

votes
1

answer
310

Views

Integrate/ Inject React Component into Static(loaded) HTML

What i want is to be able to render HTML from react component, after a page has loaded without reloading it. I have a parent JSP loaded from a struts2 action, inside of which we are planning to integrate ReactJS as a roadmap to complete client-side UI. Here is the Child JSP. Sample JSX import React...
namasri aditya
1

votes
0

answer
139

Views

Tomcat throwing error

Working on a JSP project. And the tomcat log has been throwing this error. I've no idea where the issue is. Hopefully someone can point me in the right direction. It seem to be something to do with a filter CorsFilter i created. However, when i deleted the servlet, the record disappeared along with...
root
1

votes
1

answer
90

Views

All tab content is coming on page load. I want only active tab data to be displayed

I am using below code to display the json data into tabs using javascript. I am able to display the data in UI. But it is not coming proper tab format. Tab click also not working. Could you please help me to resolve my issue. Below is my code: var responseText = [{ 'area': 'CSE', 'cus': 'progress',...
Rahul
1

votes
0

answer
39

Views

autocomplete function is not working

I am having the list of names inside a string in a JSP page. and I want to show the data in the name field by autocomplete function but i am unable to get that. script> $(function() { var name=[]; $( '#Name' ).autocomplete({ source: name }); }); I want to show list in this field.
Pooja
1

votes
0

answer
81

Views

how to save value from POST method into parameter of Java class?

I'm new in Java, and currently try to create my own project, but have a problem with displaying information about user in his main page. Now I need to save a value from my JSP page (/login) which use method POST into parameter of my Java class('Controller'). login.jsp Log in with your account Log in...
Junior Java Mike
1

votes
0

answer
22

Views

Override group policy to render page in document mode 9

Application is using tomcat. Ive added this tag to one of the jsp files. After going to the page in IE11 and viewing source, i can see the tag shows up right under the title Create Traveler however the page is still rendering in document mode 7 because of the group policy. Is there a way to overri...
Jake O
1

votes
0

answer
84

Views

Can the href tag of jnlp file is pointed to .jsp file to match the location rule in DeploymentRuleSet

We are trying to use Java Deployment Rule set feature to launch our web application with different JRE version. As all the application JRE files are unsigned, we have to give the DRS rule id as location of the jnlp file which should match with the jnlp file location. But the jnlp file is created dyn...
pgsvr
1

votes
0

answer
24

Views

404 error while accessing local file in jsp

Below is my project structure. i am using jboss server with eclipse MyProject |_data_folder |_data.txt |_src |_war i have also copied this txt file to server by the above txt file, i am trying to call in ajax by below code $.ajax({ url: '/WEB-INF/classes/data.txt', // path to file dataType: 'text',...
daisy
1

votes
0

answer
36

Views

How to display result of SQL in alert message using javascript in jsp?

Below is COUNT SQL statement in jsp. As you can see my dropdown of studentlevel will display the count of each level. If a user clicks on one of the dropdowns, then if the studentlevel achieved the maximum number of 5 people the system will produce an alert message but I failed to do so. I think my...
nazirah n.
1

votes
1

answer
56

Views

How can I use variables declared in javascript inside Java code?

I am making a website that gets some data from a database using SQLite. In order to connect to the database, I use the following Java code inside a jsp file. It creates an array that stores the information from the database. Next, I have this Javascript code that is supposed to change an element fro...
Smirlianos
1

votes
1

answer
350

Views

How to insert the values of a radio button and checkbox to my database with jsp? [duplicate]

This question already has an answer here: How to transfer data from JSP to servlet when submitting HTML form 4 answers i'm having some troubles with my code and i don't know how to continue. What i have is a web page that shows a list of tweet previously searched by the user. Now what i want is to...
Fernando
1

votes
0

answer
31

Views

display image from hex string in jsp

I have an image store as hex string in my postgreSQL database. How I can display this image in my jsp page?
Ranjan Yengkhom
1

votes
1

answer
36

Views

Finding parent or sibling browser window

Ok, this is a little broad but please, please don't ding me. I am grasping at straws here... I have a third party web application. They have given us a 'plugin' approach in which a button event can call a .jsp page. So through their application the user clicks on a button that calls this .jsp page t...
Gina Marano
1

votes
0

answer
46

Views

Hide field by combo value

I have two fields in a form. One is a drop-down list with 4 values ​​and another is a text field. I'm trying to perform a control to hide the free text field when I load the form with data and that record I choose has a value from the drop-down list in particular. The problem is that I do half o...
Bufank85
1

votes
0

answer
25

Views

Shared Library of jsp files between

I have multiple projects that use the same framework. To share java code between them is easy, but how do you share jsp pages. For example, I have public static enum DialogResponseType { ERROR, WARNING, INFORMATION, GOOD, SERVER, SUCCESS } To use the enum in my jsp I have a fragmentStatus.jsp funct...
Siddharth
1

votes
1

answer
376

Views

Null Pointer Exception in for each loop [duplicate]

This question already has an answer here: What is a NullPointerException, and how do I fix it? 12 answers I am Developing Movie Rental Application in JSP. After selecting movie with the help of checkbox, when I am iterating with that it is giving me null pointer exception. Here is the code for Stat...
Divyani Garg
1

votes
0

answer
49

Views

Dynamically generate jsp and its dropdowns

In my case I have to make a template jsp kind of page using which have to load up different jsps dynamically including it's drop-downs. I have save the details including drop-down details in a table. How to display the drop-down since the same template shall be used to render different jsps. So in c...
archMage
1

votes
1

answer
73

Views

Object as a key value in HashMap and using in jsp

@Entity @Table (name = 'lectureHall_details') public class LectureHall { @Id @GeneratedValue(strategy = GenerationType.IDENTITY ) private int id; private String Name; private String code; private String description; private int capacity; ....... } This is how my LectureHall class look like. @Entity...
1

votes
1

answer
276

Views

Return a random number range between 0 and a variable

I have some JSP that holds a number inside a variable, it looks something like this What I'd like to do is create another variable that gives a random number between 0 and the number stored in this variable. I know that you can use Math.random with Java to do this but I'm unsure how to modify it to...
James Ives
1

votes
1

answer
48

Views

Forwarding from servlet to JSP cause HTTP 404

I have seem some question similar like mine(like this one), but none of them solved my question. So I'll post one. My JSP website structure is like this: /subpage/funcA.jsp /main.jsp My main page contains all necessary js and css definitions, subpages don't have those defines. So If I'm going to dis...
user6309529
1

votes
0

answer
113

Views

JSTL-Iterate in HashMap<String,Object> from JSP

I have a map HashMap were define on the nex way: HashMap issue = projectM.loadIssue(id_tarea); where the method 'loadIssue' call a store procedure from mysql. This procedure give back a list, then I convert the Hashmap in ArrayList> to iterate it in JSP. Now, I have the next line in my code: request...
Angel Mauricio
1

votes
0

answer
486

Views

GlassFish Server 4.1.1 start failed, what i can do?

GlassFish Server 4.1.1 start failed Please check server admin user name and password properties. Also please check the server log file for other possible causes.
rajitha
1

votes
1

answer
289

Views

Netbeans Spring Boot Initilizr project: Unable to see jsp content in web browser

I am reading Spring in Action, 4th Edition by manning publications and Chapter 5 is about Spring Web App. I am trying to implement textbook example in Netbeans using Maven template Spring Boot Initilizr Project. (Examples by author use Gradle. I want to use Maven Project Management tool) However wh...
JMD
1

votes
1

answer
90

Views

Can't Load Google Chart Using Json File with JSP

Im using Google charts API to load a pie chart from json file data Here is where the chart is created (The HTML File) : // Load the Visualization API and the piechart package. google.charts.load('current', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is l...
Anas Elbenney
1

votes
0

answer
89

Views

Why Eclipse doesn't recognize method from Spring?

I have some jsp file with the following line: At build() Eclipse complains: The method getBuild() is undefined for the type MvcUriComponentsBuilder.MethodArgumentBuilder But here's the doc about build(). So if everything is working normally(I've tested all the way and everything worked as planned),...
GabrielRado
0

votes
2

answer
32

Views

jquery onclick event doesn't work for link

i have a script on top of my jsp page just before . everything works as expected except onclick event for . this is my code: $(document).ready(function () { $.ajax({ url: 'paging', type: 'GET' }).success(function (data) { $('#pagination').empty(); $.each(data, function (index, user) { $('#pag...
mehti
1

votes
2

answer
318

Views

Pass value Bean to Class then Class to JSP

I did initialize my bean like below : I have created a PropertyDataFill Class using getter setter of following variable : private String current; private String name; private String isActiveU; private String isActiveG; private String isActiveM; What I want is to pass this data to JSP : Where I...
Insanity Geek

View additional questions