[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

HI Team,

I'm displaying  some database data of 5 columns(no,name,desg,sal,url) using JqGrid table in jsp.  I have added one submit button to each grid row. The data is displaying and the button is also added.I have written a js function(redirect(url)) . Now i want to invoke the js function by passing  'url'  column value as a parameter . How can i proceed?? Please help me
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: 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!

HI Team,

I developed JqGrid with spring MVC. When i run the application , the controller is not invoking.

my jsp:
---------
jQuery(document).ready(function() {
            $("#list").jqGrid({
                url:'/crud',
......

controller
__________

@Controller
@RequestMapping("/crud")
public class JqGridController {
    @Resource(name = "jqGridService")
    private IJqGridService jqGridService;

    @RequestMapping(method = RequestMethod.GET)
    public @ResponseBody CustomUserResponse getAll() {
        System.out.println("Received request to get all database records");
......

The  Sys.out() is not executing

Can any one help me??
0
I have an old Java web application that still uses Applets (not my decision).

After a recent Java upgrade (I believe it was 1.7 to 1.8) the app now throws a ClassNotFoundException and says that it can't find the JApplet class the Applet derives from before the Applet can load.

The path to the class is specified in a jsp page called loadApplet.jsp.

Here is the code in the loadApplet.jsp file. The only part that isn't an exact copy and paste is ThePathToTheJAppletClassWhichItAlwaysFoundBefore.class - which is just a string that defines where the package is.

<OBJECT classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase = "https://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0" height = "0" width = "0">
<PARAM NAME = "CODE"          VALUE = "ThePathToTheJAppletClassWhichItAlwaysFoundBefore.class" >
<PARAM NAME = "type"          VALUE = "application/x-java-applet;jpi-version=1.3.1" >
<PARAM NAME = "scriptable"    VALUE = "false" >
0
hi am having this error when seting my java home am in window 7
[code]C:\Users\userpc>java -version
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries


C:\Users\userpc>java -version
Error occurred during initialization of VM
Unable to load native library: Can't find dependent librarie

C:\Users\userpc>set JAVA_HOME=C:\java6

C:\Users\userpc>SET PATH=PATH%JAVA_HOME%\BIN;

C:\Users\userpc>JAVA -VERSION
'JAVA' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\userpc>set JAVA_HOME=C:\java6

C:\Users\userpc>SET PATH=PATH%JAVA_HOME%/BIN;

C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\userpc>SET PATH=PATH%JAVA_HOME%;

C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

Open in new window

[/code]
0
Dear Expert, I am facing the problem of inserting multiple checkbox values (retrieve from the database) then insert it into the child table. I getting an error.

TABLE SUBJECT THAT I ALREADY SET THEIR OWN ID (FIXED ID) (PARENT)
--------------------------
SUBJECTID                SUBJECTNAME
----------------            ------------------------------
PT3_ENGLISH            ENGLISH
PT3_BM                      BAHASA
PT3_SC                       SCIENCE
PT3_MATH                 MATHEMATICS

STUDENT TABLE SHOULD LOOK LIKE THIS. (CHILD)

STUDENTID                CATEGORY             SUBJECTID
----------------               -------------------         ----------------------------          
201734                        PT3                         PT3_ENGLISH            
                                                                     PT3_BM                      
                                                                     PT3_SC                      
                                                                     PT3_MATH

The scenario is when the student chooses service category. eg: PT3 . So that the student can choose multiple checkbox subjects.eg: english, math, sc, Bahasa.
The question: How can I do the multiple insert checkbox values into table in database.

here I am attaching my jsp registration.jsp



										 <div class="one_third first">Service Type:
										<select name="type" id="type" required>
												

Open in new window

0
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
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
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
Technology Partners: We Want Your Opinion!
Technology Partners: 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!

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
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
<%@ 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>

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
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
<display:column url="/editFixedRonuAction.do" paramId="id"
                                                      media="html" paramProperty="ronuAreaCode" headerClass="listMenu"
                                                      titleKey="label.rnumberEdit">
                                                      <bean:message key="button.edit" />
                                                </display:column>

in above code,I want to pass ronuId and ronuAreaCode both variable to action class.

Please suggest solution
0
Free Tool: ZipGrep
LVL 11
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

hidden field while scaning through hp fortiify
0
I am having a SOAP API project in which I send the request in XML while calling the API from SOAP UI to create the account on portal. In return, I get the response in XML.

Now I want to change it to Web UI (Don't want to use SOAP UI). To do that I want to use HTML form which will have input fields like v1:type,company name etc (Currently, I pass the fields in XML request using SOAP UI) and while submitting the form, API should be triggered and parse the XML response to display on Web UI.

Note : I am also having the certificate (jks) for API in SOAP UI. where that certificate will I configure?

Please help me as I am very new in this area.

Below is the request and response.

Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v="abc.com" xmlns:v1="abc.com">
   <soapenv:Header>
      <v:vfExtendedHeader>
         <v1:traceIdentifier>
            <v1:applicationId>VSDM_PROVISIONING</v1:applicationId>
            <v1:serviceId>ARI_sis_${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:serviceId>
            <v1:serviceInterfaceVersion>2.0</v1:serviceInterfaceVersion>
            <v1:timestamp>${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:timestamp>
            <v1:referenceId>ARI_rid_${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:referenceId>
            <v1:correlationId>NULL</v1:correlationId>
      

Open in new window

0
getting HP fortify low issue Hidden filed in the below line in jsp .please help to solve

<input type="hidden" name="ProceedName" value=<%=pageReg%>>
0
hi does anyone know how to implement   marquee element in oracle java adf
0
how to insert multiple checkbox data into database table at the same id using jsp servlet?
0
I'm looking to modify the Default Landing Zone of Open Meetings.  I'm looking for where in the open source code of this program that I can adjust sessions, invitations, meeting rooms, and the default landing zone upon entering the system.  I'm looking for some direction on this, and for any advice on which parts of the code or what source files that this might be coming from.  Please help.  Thank you!

David
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
>

No Top Experts for this time period. Answer questions to earn the title!