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

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

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
i am using jsp page to insert some value but when the parameters get to the servelet the values received are null when I am using Post method but when Get method is used then it works fine.
request.getParameter() is returning null value when post method is used but when get method is used it works fine and the values get inserted

anyone have idea how to fix this???

//Jsp Page

<%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!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=UTF-8">
    <link rel="stylesheet" href="insert.css">
    <title>Database Update</title>
    </head>
    <body>
    <h1 class="main-header">Enter the Details</h1>
    <div class="fullbody">

    <form action="Insert" method="post" enctype="multipart/form-data">
    <div class="text">
    <b>Stuid:</b>
    <input type="text" placeholder="stuid" name="stuid" pattern=[0-9]{1,} title="can only have numeric value" required>
    <b>Student Name:</b>
    <input type="text" placeholder="student name" name="name" pattern="[A-Za-z ]{1,45}" title="can only have alphabet and space" required>
    <b>Student Mobile no.:</b>
    <input type="text" placeholder="student mobile no." name="stumob" pattern=[0-9]{10} title="10 digit number" required>
    <br>
    <b>Father's Name:</b>
    <input type="text" …
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
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
Free Tool: ZipGrep
LVL 9
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.

I am having array of json object in java script and want to iterate in jsp.
we are using struts 1.1 kindly help.
0
I have a legacy system developed 10 years ago.

 A jsp page---SalesEditBillingAddress.jsp

<jsp:include page="/WEB-INF/forms/include/edit_billing_address.jsp" > 
<jsp:param name="dept" value="sales"/>
</jsp:include>    

Open in new window


second jsp page---marketingEditBillingAddress.jsp

<jsp:include page="/WEB-INF/forms/include/edit_billing_address.jsp" > 
<jsp:param name="dept" value="marketing"/>
</jsp:include>    

Open in new window


The reason to pass the parameter is because the generic page----edit_billing_address.jsp has different form action need to be submitted based on different parameters.

  <html:form action="/actions/${param.dept}/editBillingAddress">
<html:text name="customerBillingAddressBean" property="address1"  maxlength="60"> </html:text> 
.............
<html:text name="customerBillingAddressBean" property="contact" maxlength="60"></html:text>
<html:text name="customerBillingAddressBean" property="email" maxlength="80"></html:text>

<button type = "submit" class ="btn btn-primary">Submit</button>		   
</html:form>        

Open in new window



however, tomcat 8.0 with java 1.8 complain about this line of code:
<html:form action="/actions/${param.dept}/editBillingAddress">

Open in new window


javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /actions/${param.dept}/editBillingAddress

The example on this page:

http://beginnersbook.com/2013/12/jsp-include-with-parameter-example/

shows that my code is nothing wrong about it.

my question is: how to make the parameter work in the action URL?

I also tried the following code:

			 
			 <c:set var="myVar" value="${param.dept}" />

			 <c:if test = "${myVar eq 'sales'}">
			   <html:form action="/actions/sales/editBillingAddress">  
			 </c:if>
		    
		        <c:if test = "${myVar eq 'marketing'}">
			   <html:form action="/actions/marketing/editBillingAddress">
		         </c:if>

                ............. many input fields ...............

                        <button type = "submit" class ="btn btn-primary">Submit</button>		           
	                </html:form>        
	  

Open in new window


but it doesn't work because the eclipse compiler give error message due to only one closed form tag could be found.
0
[root@web02 ~]# cat /etc/*-release
CentOS release 6.8 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
CentOS release 6.8 (Final)
CentOS release 6.8 (Final)

[root@web02 ~]# yum info -v apache-tomcat-apis
Loading "fastestmirror" plugin
Config time: 0.076
Yum Version: 3.2.29
rpmdb time: 0.000
Setting up Package Sacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.rafal.ca
 * extras: centos.mirror.rafal.ca
 * updates: ca.mirror.babylon.network
pkgsack time: 0.126
Installed Packages
Name        : apache-tomcat-apis
Arch        : noarch
Version     : 0.1
Release     : 1.el6
Size        : 246 k
Repo        : installed
From repo   : base
Committer   : Andrew Overholt <overholt@redhat.com>
Committime  : Tue Feb  2 07:00:00 2010
Buildtime   : Wed Nov 10 19:18:17 2010
Install time: Sun May 28 11:58:23 2017
Installed by: root <root>
Changed by  : System <unset>
Summary     : Tomcat Servlet and JSP APIs
URL         : http://tomcat.apache.org/
License     : ASL 2.0
Description : Apache Tomcat's Servlet 2.4/JSP 2.0 and Servlet 2.5/JSP 2.1 APIs.

[root@web01 ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

[root@web01 ~]# yum info -v apache-tomcat-apis
Loading "fastestmirror" plugin
Config time: 0.009
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.globo.tech
 * extras: centos.bhs.mirrors.ovh.net
0
hi does anyone know how to implement   marquee element in oracle java adf
0
Hi,

What is the use of below command from eclipse project by right clicking and run as "maven build.."

what is meaning of shade why we need to give in the goal?

please advise
0
how to insert multiple checkbox data into database table at the same id using jsp servlet?
0
Hi,

When i right click on junit test(say ProductWeightTest.java) and run as Junit test from eclipse i keep getting popup with error

error could not create the java virtual machine error a fatal exception has occurred. program will exit



when i run individual test (checkWeightLessthan10Lb) in above test ProductWeightTest.java  i keep getting initialization error in eclipse console.

i tried changing eclise .ini entries but still getting same error. please advise
0
when i run junit test class getting initializationError Runner: Junit 4

not sure why suddenly i am getting that error and how to resolve it.

please advise
0
Hi,

I have a setter method(setBeginDate) that changed by some one from calendar date object to String object.

now i have to change my unit test to reflect that by changing to String.

articleVisibleData.setBeginDate(setDateMonthYear(30, 1, 2015));

How i edit method above so that i get String

earlier method is

            public Calendar setDateMonthYear(int day, int month, int year) {
            Calendar cal = GregorianCalendar.getInstance();
            cal.clear();
            cal.set(Calendar.DAY_OF_MONTH, day);
            cal.set(Calendar.MONTH, month);
            cal.set(Calendar.YEAR, year);
            return cal;
      }

now i am trying like below but wont work


      public String setDateMonthYear(int day, int month, int year) {
            String str="";
            str= str.concatenate(date).concatenate(month).concatenate(year)
            return str;
      }


earlier from test case i used to call like

articleVisibleData.setDate(setDateMonthYear(30, 1, 2015));

please advise
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.

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
I am a newbie JSP & Servlets.I  am trying to  use(copy)    code of one JSP page  to another JSP page.The goal is to have the   same functionality across the two pages.But it seems I am missing  implicit objects attributes  set up in previous page.How can I have previous Implicit objects displayed in my  current page?
0
I had this question after viewing Struts bean:define tag.
0
Hello,
I want to edit my adobe muse website's code on Netbeans and J2EE. I want to convert the HTML code of my site into a JSP I exported the HTML code of my site but don't know what to do next. Please help me
0
Hi,

I am new here. I was working on jsp pages and looking forward to implement a hiding function for a division based on if condition as shown below code:

<c:forEach items="${roleMapList}" var="item">
<c:if test="${item.rolemaproleid == 1 && item.rolemaproleid == 2 && item.rolemaproleid == 3}">
                           
/*  Here I have to implement code (jquery/javascript) to disable a div having an id= "hidingDiv"  */
                           
</c:if>
</c:forEach>

Could you please help me to surve for this day
0
I have JSP page and drop down list programatically populated.
Now, under some circumstances that dropdown should be disabled, but user should be still able to see all of it's element, but can't actually select it, something like this: https://jsfiddle.net/nenadbulatovic/6g4pmmpv/1/

Obviously as there is condition I can't just put disable next option.

This is actual part of code (drop down) where I need that.

  <div class="row-fluid">
    <div class="span3">
      <label><%=Constants.REQUIRED%>&nbsp;<c:out value="${requestScope.RESOURCES_MAP.SITE_PARENT}"/>:</label>
        <select class="selectpicker" data-width="100px" id="siteParentNameSelect" style="width:250px;margin-bottom:0px;">
          <option value=''>${requestScope.RESOURCES_MAP[SELECT]}</option>
          <c:forEach var="siteParentName" items="${siteParentNameList}">
            <option value="${(pageContext.request, siteParentName.id)}" ${siteParentName.id == '0' ? 'selected = "selected" ' : ''}> ${siteParentName.name}</option>
          </c:forEach>
        </select>
    </div>
  </div>

Open in new window


I should check if some condition like "enabledFlag" and then if it is true/false enable/disable its elements for selection.
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!