Click here to Skip to main content
15,901,853 members
Everything / JSP

JSP

JSP

Great Reads

by Mircea Diaconescu, Gerd Wagner
Learn how to build a Java back-end web application with minimal effort, using Java Server Faces (JSF) as the user interface technology, the Java Persistence API (JPA) for object-to-storage mapping, and a MySQL database.
by V.
How to dynamically build a JQPlot graph through the code behind.
by Dynamsoft
In this article, I’ll show you how to capture images from your web browser, edit them, and then upload them to your system.
by Han Bo Sun
In this tutorial, I am going to show the readers how to create an MVC application using Spring Boot, packaging as a self host WAR file, and execute using embedded Jetty application server.

Latest Articles

by ToughDev
Create custom nanorc file for JSP in nano to enhance syntax highlighting and readability, along with basic autocomplete
by Han Bo Sun
This tutorial discusses the way to setup a Spring boot application that can utilize JSTL template and taglib.
by Han Bo Sun
In this tutorial, I am going to show the readers how to create an MVC application using Spring Boot, packaging as a self host WAR file, and execute using embedded Jetty application server.
by Han Bo Sun
In this article, I will show the reader how to secure a web application based on Spring Boot and WAR archive, using the Spring Security and Tags. The application will have a login page, page access based on user roles, login failure, and access denied pages.

All Articles

Sort by Updated

JSP 

27 Nov 2010 by #realJSOP
Googling this phrase - "deploy java servlet" - revelaed 500,000 hits, and the very first one has the title "Introduction to Java Servlets, Developing your first Java Servlet".Seriously dude - this is the internet, any question you might come up with has almost always been asked/answered...
28 Aug 2018 by @k5hu
ConfigObject.jsp web.xml
6 Sep 2018 by @k5hu
I am new to Struts. I have installed all the struts2 plugins in Netbeans 8.1. The server that I'm using is Glassfish 4.1.1. When I run the following code I get: HTTP Status 500 - Internal Server Error type Exception report messageInternal Server Error descriptionThe server encountered an...
30 Jun 2013 by _Amy
Have a look at this[^] article.--Amit
25 Jul 2013 by _Asif_
Check this link. It has given a code to execute notepad from browser though you may need to tweek it a bithttp://social.msdn.microsoft.com/Forums/en-US/3444c3c3-eef7-4f6b-b67c-086e34fc74be/how-to-execute-an-executable-file-ex-notepad-using-javascript-which-will-work-in-mozilla-firefox[^]
13 Jul 2015 by _Asif_
Your question made me swing :) Seems like you have just started programming. Well database do not connect to HTML using JSP. Rather the flow is like* JSP receives browser request* JSP connects to Database using some connection string* JSP emit HTML code using the data comes from...
15 Jun 2013 by abey e mathews
hi,i need to learn jsp,how to start..is need to learn core java first or can i directly learn jsp..
16 Jun 2013 by abey e mathews
http://www.jsptut.com/[^]
21 Dec 2021 by Abhijith moody
Am trying to connect jsp to mysql and it is not working , if i connect from php to mysql its working good , is am connecting from jsp then am getting error SQLException caught: Communications link failure Last packet sent to the server was 0 ms...
21 Dec 2021 by Abhijith moody
%@page import="java.sql.*" import="javax.sql.*"%> Connection...
23 Apr 2011 by Abhinav S
Put the following code in your conditions -document.form1.txt1.disabled=true;document.form1.txt1.readonly=true;
22 Aug 2011 by Abhinav S
See here[^].
15 Oct 2011 by Abhinav S
There are a number of approaches discussed here[^] in this discussion.You can try some of them.
27 May 2012 by Abhinav S
You can do this by using a binary field.Here[^] is a link that could help you.This link[^] provides another tutorial as well.A similar question[^] was asked some time ago.
4 Mar 2013 by Abhinav S
These may help you -http://www.the-art-of-web.com/javascript/validate-date/[^]http://www.webdeveloper.com/forum/showthread.php?142464-Javascript-validate-Time[^]
15 Aug 2013 by Abhinav S
Tryrst = rst.replace("\\","\\\\"); This[^] may help you.[edit]four \es in the replacement string.[/edit]
4 Mar 2014 by Abhinav S
Are you trying to insert data into the databaee?In that case, look at the insert query and ensure the number of columns you are inserting match those that are in the database.
5 Oct 2014 by Abhinav S
Some links -http://mrbool.com/how-to-populate-a-drop-down-box-with-select-tag-in-jsp-page/26527[^]http://www.roseindia.net/answers/viewqa/JSP-Servlet/30699-Populate-dropdown-menu-from-database-using-jsp-and-servlet.html[^]
11 Feb 2015 by Abhinav S
Desc is a keyword[^] in MySql. Thus your query fails on the second line.To fix the problem, escape the column name.Try "insert into blog(Name,"Desc",Author) values(?,?,?)");
20 Sep 2015 by Abhishek Das 90
Hello , everyone I am new in web programming. I want to learn how to attach JSP in HTML files and after that how to insert data in MySQL from that page ? I am waiting for your reply.
9 Mar 2013 by Abhishek Pant
try the code below: function doMath() { // Capture the entered values of two input boxes var...
3 Aug 2010 by Adrabi Abderrahim
Maybe, if you try to use PayPal can be better, see @"Website Payments Standard" https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_download_sdks[^]
19 Sep 2010 by Adrabi Abderrahim
for connecting pages by "submit" button you need to add "action=YOUR-PAGE" in form attributes. see here http://www.w3schools.com/TAGS/att_form_action.aspor maybe try to use redirect to you page.http://www.exampledepot.com/egs/javax.servlet.jsp/redirect.html
27 Sep 2010 by Adrabi Abderrahim
You're in hell :), I don't really read all this code but:why you use this? maybe should be:... your inputs herealso isn't a parameter name this is *label*String fn =request.getParameter("First Name");see in your...
12 Apr 2011 by Adrabi Abderrahim
You want do it with JSP?!you can use java xml/dom api!, see here many tuts http://www.java2s.com/Tutorial/Java/0440__XML/Catalog0440__XML.htm[^]if you need easy stuff try maybe JSoup, I use it for parsing HTML but you can try it with XML. http://jsoup.org/[^]
1 Dec 2015 by Aftab Ahmed Sajid
Preventing browsers from saving Admin user passwords, intentionally or unintentionally while using STRUTS forms
6 Oct 2016 by Aftab Ahmed Sajid
The simplest way to return json objects to client using struts 1
25 Jul 2017 by Afzaal Ahmad Zeeshan
That is because you are printing the headers of the table before even checking for the data. Which can be easily fixed if you first check for the data and then print the HTML document. ...
24 Oct 2017 by Afzaal Ahmad Zeeshan
Although not a part of the answer, but that is not JSON. That is just a plain JavaScript object. It is funny that JSON document and a JavaScript object are quite the same thing (but, still, naming them correctly can help you get valid and useful answers). Now for the answer part, you can just...
10 Dec 2018 by Afzaal Ahmad Zeeshan
You are injecting an invalid starter for the JSON document yourself, JSON.parse("(" + rawData + ")"); Your JSON documents can only start with {, or [, or they can have the data that they are representing—string, integer, whatever... RTFM. You can solve this problem by removing the...
10 Mar 2019 by Afzaal Ahmad Zeeshan
Because your object contains a property C1, not c1. JavaScript is case-sensitive, and you need to take care of that. Use this, var f = data.C1; Since your alert is showing undefined, it clearly means that the property is undefined, the object is not. If the data was undefined, it would have...
28 Nov 2011 by ahmed559
I wants to make changes in jframe such as border color of "close button" panel.Please give a solution.Now using netbeans IDE for development.
19 Jun 2011 by Ajvirk
Duke's soccer League: Home Page All Leagues list
26 Mar 2016 by Akanksha Seth
my code is not inserting values in the database.Kindly help!What I have tried:
1 Dec 2015 by Akshay Shringi
I am not getting how to code it that's why i havent wrote any code here. i have a database where i have asset id , make, model no, serial no and username . I have a serial number as a radio button and blank text box fields like username , make, model no ... when i select on serial number from 4...
30 Dec 2015 by Akshay Shringi
I have multiple text boxes and radio buttons , when i click on one radio button to display text box then and enter details , then i click on next radio button . my previous text box hides . There is only on text box that i can see at a time .code...
15 Jul 2015 by alex giulio
Hi experts!I used jqgrid plugin to create table. while i scroll horizontal bar to left or right i want to keep all contents of first column. I searched google but still haven't found ways yet. Expert who have experienced please help me! thank you so much!code:
21 May 2011 by Ali KÜÇÜK
>>>>>>
4 Mar 2013 by ali_heidari_
check this link , it will help you to get many ideas :system.datetime.dateand you can use this codes in c# too .:DateTime dt = DateTime.Parse("02/22/2012");//you can put a textbox.text instead this dateif (dt.ToString("mm/dd/yyyy") == dt.GetDateTimeFormats()[3])// an if statement check...
29 Feb 2012 by Alister007
follow linkshttp://www.eggheadcafe.com/community/asp-net/17/10136951/display-word-document-in-aspnet-control.aspx[^]http://www.dotnetspider.com/forum/31319-display-word-document-web-browser-asp-net.aspx[^]
2 May 2011 by Alok.Poojary
The following is a JSP code for K-MEANS CLUSTERING .... My proect , titled "Pattern Analysis of Web Usage for System Improvement", involves the web log info from a database and then considering the attributes IP address and WEBPAGES,IN THE FORM OF NUMBERS(X,Y) for K-MEANS CLUSTERING... the...
19 Aug 2013 by alybin
I create session on JSP and set attribute "userName", but I can get this attribute only on first page. When I go to the next page, attribute "userName" is lost. How can I solve this problem ?HttpSession session = request.getSession(true);LoginManager loginManager = new...
17 Jan 2013 by amanpavanker
If i click on the button then a c-program should execute in background and the output should be displayed in the AWT window.Use native method
19 Jun 2012 by Amit Bhoi
i want to use jtable in jsp plz, help me for this
30 Apr 2014 by Amit Moth
Pl help me to matched selected option list item to another selected option list with good looks & feel
12 Jun 2013 by amit29391
File file1 = new File(docpath);FileInputStream fis1 = new FileInputStream(file1);Then use prepared statement to insert in databaseps.setBinaryStream("your column index of database", fis1, (int) file1.length());
12 Jun 2013 by amit29391
try { Connection con = null; Statement st=null; Statement st1=null; int i; String connectionURL = "jdbc:mysql://localhost:3306/your db name"; String...
7 Jul 2013 by amit29391
use scriplet (i.e ) for writing java code in jsp page
24 Jun 2014 by Amitganguli
I am having problem generating pdf from html. i am currently working on a online shopping project which generates a bill. i have tried several libraries like itextpdf, flying saucer, itextrenderer but nothing proved to be fruitful..pls help me. i want to generate pdf from the output of a jsp file..
7 Nov 2010 by amitpinku8309
Hi, I am Amit,I made a JSP page with CSS style on struts 1.3 and when I run it with Glassfish server, its format and design is working but when I click a link which hyperlink to another JSP page its redirecting but CSS file is not working; means page design is not working.I am...
1 Feb 2013 by Andreas Gieriet
Do the following:1) save the submitted text into a local file2) run the C compiler on that file3) zip the result4) post that zip file to a public folder5) provide the link to the published zip fileDetails to be elaborated by you - access rights and security issues too......
17 May 2015 by Andy Lanng
UUID is a 128 bit code. The idea is that there are so many possible combinations (3.4*10^36) that every random one will be unique. It will not be 6-8 digits.Coupon codes should not be sequential. This makes them hack-able.You can use 1 of a couple of methods:1: Store all previous...
23 Jun 2014 by Anil Singh 2010
It might help youhttp://www.code-sample.com/2013/11/ajax-json-cross-domain-call-to-rest.html[^]
14 Jun 2014 by ankusha d bhat
I have created one web page using jsp.in which i included 3 sub jsp pages . to do javascript validation i need to get one specific html tag id from one jsp page to another jsp page .can you please help me to get the solution for this.
15 Jun 2014 by ankusha d bhat
I have created one jsp page .like(one.jsp) in this i am calling oneclick(example like validate()) event for submit button i need to implement this onclick validate method in different jsp for example (two.jsp).how i need to implement this functionality.
17 Jun 2014 by ankusha d bhat
In a jsp page,(in struds framework) I have defined a html:text field and the field property is String type(defined in bean). Now if I enter the integer value in text field how i have to separate these integer with commas like (1234,212,123)
30 Jul 2014 by ankusha d bhat
using javascript how to sort date and timestamp (format of date is like this(ex:09/may/2014 13:45:21) timestamp in 24 hours format kindly help me on this
10 Sep 2013 by Anurag Sinha V
Have a look at below links:http://www.java4s.com/jquery-tutorials/example-get-autocomplete-feature-in-javajsp-with-jquery-api/[^]http://viralpatel.net/blogs/tutorial-create-autocomplete-feature-with-java-jsp-jquery/[^]-anurag
6 Aug 2013 by Anusha Mallajosyula
I have the following code to display welcome message to user. Welcome,Is there any other way I can use tag? I am looking...
2 Jul 2013 by AnushaMallajo
Hi, I have developed a Facebook app. I was testing it on the localhost using http://localhost:8080/app_name. Recently, facebook has blocked apps on localhost. What is the alternative? How do I test my new modifications to the code in local host?
23 Jan 2014 by Anvesh Reddy N.R.
Hi, I am very new to AJAX, have knowledge on JSP & Servlet.Please provide a code for AJAX with JSP & servlet. Where, based on selection of Checkboxes, the text thus displayed on right side of page changes.
11 Aug 2011 by arielb
are you always getting to the else?it seems that you are always getting the onBlur="validateDate(this,1);ValidateDob(document.userRegistrationForm.dob,1);and never the other.is it true?
3 Oct 2011 by arielb
Hello, i'm trying to do the following:i have a servlet, which executes some code.in a case, i need to create a form element with stuff inside, and write it back to the "out" variable.the problem is, i dont want to use a string builder to do it, i'd like to create a JSP page which holds...
8 Nov 2013 by Arif Ansari Code
1 ASP primarily supports two scripting languages -- JScript and VBScript -- JSP actually supports real Java code, not a new scripting language.2 Active server pages or ASP runs on only Microsoft Windows platform while Java Server Pages or JSP is a platform independent and can run on any...
8 Jun 2012 by Arihantysr
how can i upload multiple files from html form into oracle db,using jsp???The front end code i got.It is,var upload_number = 2;function addFileInput() { var d = document.createElement("div"); var file =...
2 Jul 2012 by Arjun YK
courseid=reque...
31 Mar 2011 by Arndt Faulhaber
This means you compiled a class with the wrong java version (49.0 is Java 1.5, I think) and it seems in this case you try to run it in an older Java-VM...Try to set the javac to compile for an older Version e.g. 1.4 and retry.You can set this in your build files - assuming ant it would...
15 Sep 2016 by arun.emm
I'm passing values between controllers on different pages using angularjs. This is a part of my app.js.app.controller('JewelleryCtrl', function($scope, srvShareData) { $scope.sharedData = srvShareData.getData(); sessionStorage.clear(); });and i'm able to get the passed...
5 Sep 2011 by Ashish Tyagi 40
You can use META attribute of page. Like:-Your Page TitleOptional page text here.Where 2 in content="2;url=url to your jsp page" is delay of seconds to be...
5 Sep 2011 by Ashish Tyagi 40
Ok if you want to refresh the page only once per session then you can useYour Page Title
11 Apr 2012 by AshishChaudha
In my opinion it can be managed through sessionsif session is alive then redirect to third page and if not then redirect to login page if(session["uid"]+""""){ response.redirect("third page");}else{response.redirect("login page");}it will help you..
8 Oct 2012 by AshishChaudha
Try thisA Beginners Guide - Implementing Auto Suggest Functionality using Ajax Control Toolkit[^]Thanks
10 Oct 2012 by Ashraff Ali Wahab
You can find lot of examples in google.Below link may helphttp://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-First-Servlets.html[^]http://www.servletworld.com/servlet-tutorials/simple-servlet-example.html[^]
8 Jun 2012 by AspDotNetDev
I'm pretty sure this cannot be done with JavaScript without the data traveling to the server first. However, you can have it travel to the server using AJAX. See here: http://stackoverflow.com/questions/527955/how-can-i-upload-a-file-using-javascript-without-a-postbackAlternatively, you can...
16 Apr 2018 by Atul Rokade
Hi i have one html and jsp page in html page im putting value by dynamic text box and in jsp i tried to enter but when im try to click submit nothing has happen not able to understand where im stucking What I have tried: my html code: TODO supply a...
30 Apr 2018 by Atul Rokade
while updating data i'm facing exhausted resultset in page i retrieve two different data for first part For Login Credentials Approve working properly but For Task Approve part when i'm clicking update it is giving me Exhausted Resultset not understanding why this error showing What I have...
1 Feb 2012 by Avani Mathur
Hi,I have a small question regarding the exception i get for my servlet:javax.ejb.EJBExceptionThe output screen shows that the error is in my servlet in the processRequest method which is:public class ViewServlet extends HttpServlet {/*** Processes requests for both HTTP GET...
25 Feb 2013 by Avik Ghosh22
http://www.aspdotnet-suresh.com/2011/03/how-to-save-images-into-folder-and.html[^]
19 Jun 2013 by baby_girl25
Hi,I have problem in JEE dynamic web project. I try to using jena library in the project to retrieve sparql query result in indx.jsp but when run time the following problem are occured :HTTP Status 500 - Unable to compile class for JSP:...
15 Jul 2011 by bahareh_68
hi all.how can i use business classes in jsp pages and execute their method in eclipse?
14 Feb 2014 by Bala Selvanayagam
I am not too sure whether your code follows MVC patternIn MVC1.Model : Model is where the data classes, looks you have done this using the class "ModalClass"2 View : This should be almost pure HTML and should not have any data access class initiations / methods and you are defeating...
11 Jun 2012 by BalaThakur
Is there any implict objects are available in c# or asp.net like JSP request,response.
20 Dec 2013 by baliram bhande
how we can get specific jsp page id in servlet.?? i have three jsp pages and only one servlet .how can i reconize which jsp page hit to the servlet.
25 Dec 2013 by baliram bhande
jsp code"/>server side codeString articleId = request.getParameter("articleId");PrintWriter out = response.getWriter();out.println(articleId);
14 Feb 2014 by baliram bhande
refer this linkwww.oracle.com/technetwork/articles/javase/index-142890.html[^]
3 Feb 2012 by bbirajdar
Use this code in masterpage codebehindprotected void Page_Init(object sender, EventArgs e) { if (User="Balaji") { this.Page.Theme = "MyNewTheme"; } }
30 Mar 2012 by bbirajdar
Hire a developer from www.freelancer.com and he will write the program for you.Everybody please vote if my solution is correct..
23 May 2011 by Be Yourself
I have two JSP Pages One page has 3 hyperlinks and one single button.The Hyperlinks are:1.empID1 Value:22222.empID2 Value:33333.empID3 Value:4444Any Of these hyperlinks transfer the control to the same page.I want to retrive the value associated to the hyperlink that has...
19 Jul 2011 by Be Yourself
function submitSearch() { if(validatePSInputFields()) { reportsPSForm.generateButton.disabled=true;
11 Oct 2011 by Be Yourself
I have a link to local server that can be accessed from the local machine only.Now I want to display that link in the internet without publishing the IP in internet.I am using the java.net.url class to create the connection to local IP from the local server.But I am unable to download the...
4 Nov 2011 by Be Yourself
Most of the time My jsp page on the server is showing the following error:Error: Could not get markup. The cookie or session is invalid or there is a runtime exception. I am unable to trace out the exact issue why it is caused .I guess it is because of the time out period set for the...
19 Nov 2011 by Be Yourself
I have a link to a jsp page (say on server A) that connects to the local server for downloading a pdf file and displaynig the pdf file on the jsp again.I have got another server(say B) from which I want to display the pdf file from server A .I am using a jsp page in server B having a...
1 Dec 2011 by Be Yourself
Actually I am downloading a pdf file to be displayed on the page for which I am using a servlet that uses the URL to download the pdf file.After download is complete the pdf file is displayed in the jsp.But as the download takes some time I want to display some custom message in...
3 Apr 2016 by Beginner Luck
I cannot find where this com.crystaldecisions.report.web.viewer.taglib.ViewerTag class or library is in. I only have problem when i move my code to crystal report server build in tomcat serverWhat I have tried:I try what they say in the website...
15 Jul 2015 by Ben J. Boyle
From the jqGrid Wiki:http://www.trirand.com/jqgridwiki/doku.php?id=wiki:frozencolumns[^]Twomethods, either by declaring in the column model or dynamically using the setFrozenColumns method.
21 Aug 2013 by Bernhard Hiller
Looks like you mixed up varaibles in the if clause the line above.Since you initialize action to an empty string , it is never null. Consequently, checking for action being null - if(!action.equals(null)) - does not make sense. I suspect you wanted to check for request being null.By the way,...
22 Aug 2014 by bhagirathimfs
Below code may help you ,It will help you to go through one by one data..each() in jquery $.each(jsonobj, function(){ //Bind your table here. });