Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

JSP

JavaServer Pages (JSP) allow the development of dynamically generated web pages. It uses the Java programming language; JSP pages are translated into servlets at runtime, with each servlet being cached and reused until the JSP is modified. JSP allows Java code to be interleaved with static web markup content, so the resulting page can be compiled and executed on the server to deliver the content.

Share tech news, updates, or what's on your mind.

Sign up to Post

Dear,
What driver to choose below, when creating Database connection, to connect to SQL server DB?
18r.png
0
Free Tool: Path Explorer
LVL 10
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Hello,
facing a problem to choose best client side framework for localization with jsp?
I have REST API which i need to consume at client side and display it on jsp will it be safe to use spring mvc for client side?
What is the best practice to integrate client-server ?
0
Hello,

Need to clean cache of client browser,using jsp as front end.
though have already written the below code

 <% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 
 response.setHeader("Pragma","no-cache"); //HTTP 1.0 
 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server  
%>

Open in new window


But almost 90% of the times we need to ask the client to manually clean the cache,after that only the new changes are reflected in the client browser,say we have created new button on screen, which is not visible but when the user cleans the browser cache manually the button seems to work display.
0
Hi,

I have a requirement in Java script to run the select statements every 3 hours and update those select count(*) counts in a spreadsheet. Kindly share the code snippet to accomplish this request.

Also we are running

1. 2 scripts 3 hours once in a day.
2. 1 Script once in a day.
3. 1 script on particular times like 10.45, 11.15....

please let me know if you need any more details.

Thanks
Venkatesh.
0
how to export jsp content, (which will have html div and pie charts) to pdf/excel/csv..
any solution?
0
I want to develop charts in my project using jsp.
please suggest any open source which should have options to export to different formates.
0
Hi - I have the below line in my jsp and i am getting error saying
unterminated &lt;

 
var myString = "<img src='images/clear.gif' width='8' height='5'><mytags:dropdown  fieldID=" +"'"+ extDataID+ "'"+" category= " +  '<%=com.test.myString.GET_VALUE_TEST%>' + " selectedOption='' style='InputFields'/>";
			

Open in new window


so what is wrong in the above syntax is javascript not accepting <%= %>

I can pinpoint the error to this line because when i replace the above line with the below line no issues
var myString = "<img src='images/clear.gif' width='8' height='5'><input type='text' name=" +"'"+ test+ "'"+" maxlength = '40' size='64' value='' class = 'InputFields'>";

Open in new window


Thanks,
0
I am trying to create a dependent dropdown list. Right now in the masterDataQueryScreen.jsp, I am directly calling a method in in my MasterDataDao class called getAllSites. What I would like to do is create a dependent drop down list. So basically, if the division in the jsp has a value of either 33, 36, or 40 call the method getAllJJSites  in the MasterDataDao class to populate the second dropdown else call getAllSites. The getAllJJSites is on line number 642 in the MasterDataDao class. I have also included jquery-1.11.1.js under the js folder under WebContent. I am assuming I will need to use jquery. Please let me know what else is needed. Thank you so much in advance. I have been stuck on this issue for at least a month now and cannot find a great example using a query.
0
i have to represent no of device for each status(new,paired,blocked..etc) in the charts.
i want use  jquery and bootstrap with out using CanvasJS
please provide example of donut charts
0
I would like to see how to create a dependent dropdown list within my existing JSP page.
Basically, if I choose one value in the first dropdown list I would like to populate the second dropdown list with results from one query
else
I would like to populate the second dropdown list with results from another query.
I've heard jquery can do this but I have not found any examples related to query list results.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE
LVL 4
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

what kind of precautions we have to take while developing web application(JSP) to avoid/handle cross site scripting attacks.
we plan to use spring mvc framework as technology.
0
i want to implement report(charts) with JSP.. Inventory reports...SIM order reports.. should be exported to pdf and excel formate
i need some example charts for my reference.
please provide some references.
0
we have web portal, using Spring MVC.
we need to  Sending rest request to server from popup page(which as parent page)
we want to show messages to user about request status(sent successfully or not).. i need to achieve this with our refreshing page.

how can i achieve this.
0
Hi All,

I am having Issues trying to access a Tomcat JSP page from AWS ELB I can access it from the localhost,
but ELB isn't allowing me to get access out.

my EC2 Instance has security roles
HTTP 80 ::/0
HTTP 80 0.0.0.0/0
TCP 8095 0.0.0.0/0

The ELB has a listener for HTTP 80 HTTP 8095 with secturiy for
http 80 0.0.0.0/
TCP 8095 0.0.0.0/0
0
I have the following class definition:
class PurchaseData {
    public BigDecimal purchaseYears,
        contribRate,
        milYears,
        lapsedTime, lapsedTime2, lapsedTime3,
        factor,
        purchaseCost, purchaseCost2, purchaseCost3,
        paymentAmount;
    
    PurchaseData(BigDecimal py, BigDecimal cr, BigDecimal my,
        BigDecimal l1, BigDecimal l2, BigDecimal l3,
        BigDecimal f,
        BigDecimal p1, BigDecimal p2, BigDecimal p3,
        BigDecimal pa)
    {
        purchaseYears = py;
        contribRate = cr;  
        milYears = my;   
        lapsedTime = l1; 
        lapsedTime2 = l2;
        lapsedTime3 = l3;
        factor = f;
        purchaseCost = p1; 
        purchaseCost2 = p2;
        purchaseCost3 = p3;
        paymentAmount = pa;
    }
} 

Open in new window

Note that, all by itself, that class definition compiles w/o errors.

In my program I do the following:
PurchaseData rd = new PurchaseData();
//and I've tried:
PurchaseData rd = new PurchaseData(null,null,null,null,null,null,null,null,null,null,null);

Open in new window

when I try to run, I get:
org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 2,068 in the jsp file: /purchaseServiceCredit.jsp
The constructor purchaseServiceCredit_jsp.PurchaseData() is undefined

Open in new window

What am I doing wrong?
0
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%

Connection con = null;
Statement stmt = null;
ResultSet rs = null;


%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
function lobChange(lob,chan){
      var lobvalue=document.getElementById(lob).value;
      alert(lobvalue);
      
}
</script>
</head>
<body>


<%
try{
      Class.forName("com.mysql.jdbc.Driver");
      con = DriverManager.getConnection(
                  "jdbc:mysql://localhost:3306/usoutlookdb2017", "whirlpool",
                  "whirlpool");
      stmt = con.createStatement();
      String sql = "SELECT distinct lob  FROM lob_sls_chan_mdata ";
      rs = stmt.executeQuery(sql);
}
catch(Exception e)
{
      e.printStackTrace();
}
%>
 
<label>LOB</label>
<select id="lob" name="lob" onchange="lobChange(this.id,'chan')">
<option>SELECT LOb</option>
      <%
            while (rs.next()) {
      %>
      <option><%=rs.getString(1)%></option>
      <%
            }
            
      %>
</select>


<br>
<label>CHANNEL</label>
<select id="chan" name="chan"></select>


</body>
</html>
0
I'm very new to unifi, html and css. Please be gentle with me.
I have the current windows version of the Ubiquiti Unifi controller.
I am able to modify voucher.html and voucher.css to produce custom hotspot vouchers.
I want to print, on the voucher, the date and month the voucher was created.
I have added the following line to voucher.html:
<div class="create_time">Create Time: <unifi var="create_time" /></div>
 
The voucher prints "Create Time:" but does not print the date/time.
Any assistance is much appreciated.
0
Hi - I wrote the below functions/html to create 10 more dropdowns upon clicking the button, but for some reason it is not working.
what am i doing wrong ?

My requirement:
I have 5 dropdowns on left side and right side by default
when i click on add 10 rows button i should see 10 more dropdowns on left side and 10 more  dropdowns on right side (total 15)

<!DOCTYPE html>
<html>
<body>

<script>
function addDataRows(divname) {
   var newDiv=document.createElement('div');
   var html = '<select>
		<option value="volvo">Volvo</option>
		<option value="saab">Saab</option>
		<option value="opel">Opel</option>
		<option value="audi">Audi</option>
		</select>';
   newDiv.innerHTML= html;
   document.getElementById(divname).appendChild(newDiv);
}
function addLRows(divname) {
   var newDiv=document.createElement('div');
   var html = '<select>
				<option value="volvo">Volvo</option>
				  <option value="saab">Saab</option>
				  <option value="opel">Opel</option>
				  <option value="audi">Audi</option>
				</select>';
   newDiv.innerHTML= html;
   document.getElementById(divname).appendChild(newDiv);
}
function add10rows(Container1, Container2){
	var rowCnt;
	for(rowCnt = 1; rowCnt<11; rowCnt++) {
		addDataRows(Container1)
		addLRows(LocContainer)
	}
}
</script>
<table>
<tr>
	<table>
		<td align="left" nowrap width="40%" style="padding-left: 10px; padding-bottom: 10px">
				<select>
				<option value="volvo">Volvo</option>
					<option value="saab">Saab</option>
				  

Open in new window

0
public ModelAndView EditDetails(Http Request req,Http Response res,SampleDTO sampleDTO)
{
ModelAndView mvc=new ModelAndView();
String n=req.getParameter("name");
List<String>details=//some list values;
mvc.addObject("details",details);
mvc.setviewname("ll.jsp");
return mvc;
}
 

in jsp , can u say how to use spring bind and set to dto and use it in controller
0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

A technology that has been really helpful as a Java developer is the ability to hot swap code using a technology like jRebel. Not having to restart the application server every time I make a change has really sped up development.
1
Query is

select to_char(to_date(123,'j'),'jsp')from dual;

Please tell me what is JSP and how it works
and why use date function
0
i am new to rest api.
i want to implement REST API for my project which is developed with Spring framework.
i want to implement  REST API in best way.

Please provide sugggistions for design and development.
0
I have my code like below
      response = orch.process(request);

when i mover on to process method and click control and left mouse click it supposed to go to process method implementation but it is not doing in eclipse mars.

it used to work earlier not sure suddenly what happened stops working.

i restarted my laptop still not working.

please advise
0
java.lang.ClassNotFoundException this error occurs in jsp page after changes made in jsp.This kind of error occurred after update jRun4 with updater 7 using java 1.6 how to handle this error pls help.
0
I was reading about Resource Bundles

as below
internationalization feature of the JDK provides a mechanism for separating user interface (UI) elements and other locale-sensitive data from the application logic in a program.
I can relate with local sensitive data separation but not the UI elements like buttons etc why we need to separate?

pelase advise
0

JSP

JavaServer Pages (JSP) allow the development of dynamically generated web pages. It uses the Java programming language; JSP pages are translated into servlets at runtime, with each servlet being cached and reused until the JSP is modified. JSP allows Java code to be interleaved with static web markup content, so the resulting page can be compiled and executed on the server to deliver the content.

Top Experts In
JSP
<
Monthly
>