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

How can i enabled checkbox while loaing the page . ,row are coming from database when i am using below function -

$(document).ready(function() {
	var checkboxes = $( ':inputtext' ),
		checkboxes.prop( 'checked', true );
});

Open in new window



it runs on load but value are coming from database after that that why above was't work
1
Learn SQL Server Core 2016
LVL 19
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

how can i show and hide one table based on a button click in jsp page.
0
how can i create a multi select box data getting from database and send selected value to other jsp or servlet.
0
want to fetch 2 columns data from jsp into vector suppose id and name .
after that want to display on same jsp 1 checkbox added in front of each row
while checking the checkbox  send id as checkbox parameter to servlet.
0
when i m generating .xlsx file it's genrating perfectly but every time some header name is missing .
suppose 20 column is there in a xlsx file some time 1or 2 or 3 header name was missing .
data are coming but only header name is missing there please let me know what is the issue.
0
hi am geting error in my app
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version name:   Apache Tomcat/9.0.20
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          May 3 2019 22:26:00 UTC
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version number: 9.0.20.0
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 10
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            10.0
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             C:\Java\jdk1.8.0_111\jre
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_111-b14
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         C:\Users\Desmond\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:\Program Files\Apache Software
0
hi am geting this error
size errorthis my code
 @Test
    void processFindFormReturnMany() throws Exception {
        when(ownerService.findAllByLastNameLike(anyString()))
                .thenReturn(Arrays.asList(Owner.builder().id(1l).build(),
                        Owner.builder().id(2l).build()));

        mockMvc.perform(get("/owners"))
                .andExpect(status().isOk())
                .andExpect(view().name("owners/ownersList"))
                .andExpect(model().attribute("selections", hasSize(2)));
    }

Open in new window

0
how can i retirve value from a database table and create a xlsx sheet in java . please give me some code samples.
0
my requirement is like generate xlsx file through java where sheet name and sheet data should be dynamically .it should come from data base please let me know if
not clear .


Test Case - one XLSX file generated it contains 3 sheets and some column wise data in all the sheets . sheet name and sheet data should come from database.
0
H team i worked with DataTable its a tabular structure i wan to do the  same thing with div only how can i implement it .
0
Learn Ruby Fundamentals
LVL 19
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

i have a jsp page where i m uploading a file my requirement is that file should not be save in any folder once i click a upload button in a jsp page request go to
servlet where i want to read the file path only .
0
How can i open popup.jsp from parent.jsp . display one table Employee_ID and Employee_Name on popup.jsp .in popup.jsp before each and every row there  is a checkbox after selecting checkbox there is a submit button which take specific rows Employee_ID and Employee_name to parent.jsp.
this work only taken care by jsp and servlet . no client site scripting required.
0
I am implementing google recaptcha into a JSP application and for some reason what ever i do the g-recaptcha-response variable is always null, has anyone encountered this problem before and know a possible cause
0
I have a table where i am using javascript,jsp and struts framework.
Require sorting order for the table for individual columns  and we need to sort the individual columns based on the entire records in the database.

Please find the attached table format.

Please provide sorting code for the above
tests.PNG
0
I have a PLSQL procedure that embed with HTML code. How can I use this procedure to print in JSP? Can provide sample code?
0
How to read real-time cancel appointment in the calendar using Exchanged server managed API
Getting below error:
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: The specified object was not found in the store.
        at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278)
        at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267)
        at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:165)
        at microsoft.exchange.webservices.data.core.ExchangeService.internalBindToItems(ExchangeService.java:1343)
        at microsoft.exchange.webservices.data.core.ExchangeService.bindToItem(ExchangeService.java:1378)
        at microsoft.exchange.webservices.data.core.ExchangeService.bindToItem(ExchangeService.java:1395)
        at microsoft.exchange.webservices.data.core.service.item.Appointment.bind(Appointment.java:118)
        at microsoft.exchange.webservices.data.core.service.item.Appointment.bind(Appointment.java:133)
        at com.docasap.ihub.exchangeserverengine.handler.e2d.StreamingAppointmentsHandler.notificationEventDelegate(StreamingAppointmentsHandler.java:96)
        at microsoft.exchange.webservices.data.notification.StreamingSubscriptionConnection.issueNotificationEvents(StreamingSubscriptionConnection.java:524)
    …
0
Using jsp sessions HOW TO SWITCH / (SWAP) THE LEFT AND RIGHT BUTTON  WHEN THE CLICK BUTTON IS PRESSED.?  refer screenshot. need to swich tthe button on click of the click button.
0
<%@page import="myServletPakage.RanUtilities"%>
<%@page contentType="text/html; charset=ISO-8859-7" language="java" import="java.lang.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%!
int numberToGuess = RanUtilities.randomInt(100);
 %>
 <% boolean win = false;
      int numberOfTries = 0;

 while(win==false && numberOfTries<10){%>
 <form>
EnterNumber:<input type = "text" name = "number">
 </form>
 <%
 String value =request.getParameter("number");

    %>
 <%
 int yourNumber = Integer.parseInt(value ); %>
 <% if(yourNumber == numberToGuess){
            win = true;
            System.out.println("You win this Game");%>
            <P> Your number is <%= yourNumber %>
            <br> You Win This game!!!
            
            <%
      } %>
 <% numberOfTries++; } %>
</body>
</html>
0
Hi,

I have problem to make the progress bar be animated. It shows a static progress bar with the green image only but no animation. I placed the code below for your reference. May I know what is the problem? Please help. Thanks.

I embedded all the codes below codes in the jsp (the framework is SpringMVC). How to make the progress bar animated? Also, we are using html4 but not the highest (html5).

HTML:
<div id="pwidget">  
<div id="progressbar">
    <div id="indicator"></div>
</div>
<div id="progressnum">0</div>
</div>
<input type="button" name="Submit" value="Start the progression"
    onclick="itv = setInterval(prog, 100)" />
<input type="button" name="Submit" value="Stop"
    onclick="clearInterval(itv)" />


CSS:

#pwidget
{
  background-color:lightgray;
  width:254px;
  padding:2px;
  -moz-border-radius:3px;
  border-radius:3px;
  text-align:left;
  border:1px solid gray;    
}
#progressbar
{
  width:250px;
  padding:1px;
  background-color:white;
  border:1px solid black;
  height:28px;
}
#indicator
{
  width:0px;
  background-image:url("shaded-green.png");
  height:28px;
  margin:0;
}
#progressnum
{
  text-align:center;
  width:250px;
}

Javascript code:

var maxprogress = 250;   // total to reach
var actualprogress = 0;  // current value
var itv = 0;  // id to setinterval
function prog()
{
  if(actualprogress >= maxprogress)
  {
    clearInterval(itv);    
    return;
  }
  var progressnum = …
0
Expert Spotlight: Joe Anderson (DatabaseMX)
LVL 19
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

Hi all,

I have problem to display my PDF file in an existing popup window using spring framework. The workflow is when I click a button from the main page, it popups a new window (child) and showing progress status. After the file finished generating, I set the view in controller and return to jsp. However, the PDF file displays (using DefaultResourceLoader and response.flushBuffer) in the main page instead of the popup window. I want to show in popup. Anything wrong? How can I specify which window the PDF should be displayed?

Please help. Thanks.
0
Dynamic Form/Table from BackEnd for every entities which has CRUD operations

I'm developing a Java Web application.

I need to

1st option list the user clicked entity menu on the UI
2nd search page where user enter values for the fields and we need to publish the search results in a table

Note: the number of columns will differ from entity to entity

In either case, i need to know hoe to define a generic entity, pojo, DAO and DAOimpl, service and controller class and view jsp page

What should be the return type Object for #1, #2

How to create a generic jsp page to display the results for any entity

Please advise

Thanks
0
can any one provide an sample application for tomcat 7.x that can trigger OutOfMemory and hung threads?.
0
I am learning spring Boot framework right now, I am trying to apply i18n concept on my simple application. But whenever I run the application, the following error returned: "No message found under code 'label.welcomeMessage' for locale 'en_US'.". I have read about this issue and tried a lot before I getting here to ask but noting have worked with me.

Here is my AppClass configuration:

package com.abed.main.configuration;


import java.util.Locale;

import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;

@Configuration
public class AppConfig implements WebMvcConfigurer{



    @Bean
    public LocaleResolver localeResolver()
    {
        SessionLocaleResolver slr = new SessionLocaleResolver();
        slr.setDefaultLocale(Locale.US);
        return slr ; 
    }

    @Bean
    public LocaleChangeInterceptor LocaleChangeInterceptor()
    {
        LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
        lci.setParamName("lang");

Open in new window

0
language: Java

 i have one bank statement  in xls format , which i already convert into csv format in java .  and display in jsp  ,but how user can recognized the amount is debit or credit because it come in one column i.e  amount . and  after edit  form jsp it will save in database , where two different column for debit and credit .....

Problem:  In excel File : there is two column Debit Amt. and credit Amount , but the transaction will be debit or credit , but when i convert into csv file ,  it not write null on blank cell . i

 used missing policy ,
 case Cell.CELL_TYPE_BLANK:
                                                                                               
                                  data.append("***" + ",");
                                    break;

 but it work on total blank column , not a every blank cell .

Kindly guide .Thanks  in advance .
0
Hello There ,
 I am new to Spring framework , i started to learn Spring MVC framework , i am currently trying to use internationalization (i18n)and localization (i10n) and every thin is going as expected

but here is my question in my project i have just 3 JSP and i have apply the (i18n) concept on them but i am wondering what if have 100 JSP , do i have to write a code and labels for all 100 JSP or can i make my all of my JSP app internationalized  just by clicking on a link to change between languages i want ???
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!