jsp

why there is a need of pageContext in jsp

when we can access all the implicit variables in jsp , why do we have pageContext. solution : if we use el expressions or jstl , to access or set the attributes we need pageContext. let me know whether i am right. ...

What is the difference between escapeXml and escapeHtml?

I would like to escape characters in JSP pages. Which is more suitable, escapeXml or escapeHtml? ...

Why am I getting a JasperException PWC:6299 for a custom jsp EL function?

I have a custom EL function defined as follows: <function> ... <function-signature> java.lang.String getAsText(com.test.Outerclass.InnerEnum) </function-signature> ... </function> Here is what my class looks like: package com.test; public final class Outerclass { public enum InnerEnum { // ommited for clarity ...

Order of JSP page imports

Does the order of the imports in a JSP page matter? I have a JSP page that worked just fine in JBoss 4, but is not compiling in JBoss 6. These are the imports: <%@ page import="com.at.enp.SecurityManager, com.at.enp.util.webUtil, com.at.vb.mod.fa.db.RPData.ResetOption, com.at.enp.modules.loyalty.MetricSetting, ...

Can't resolve objects using EL

public class Foo extends Properties { public String getVal(){ return "2"; } } In my HttpServlet class' doGet(..) method I am doing this, Foo foo = new Foo(); request.setAttribute("key", foo); Then in the .jsp is this code, 1 ${key} 2 ${key.val} 3 <%=request.getAttribute("key")%> 4 <%=((Foo)request.getAttribute(...

from javascript call a jsp page

Dear All, I am new to stackoverflow i have doubt regarding calling jsp from javascript file. my file contain one html file with javascript(home.html) and one jsp file(login.jsp) In html(home.html) file i have 2 textbox and 2 buttons one for login and another for reset.when i click the login button i should call a js for textbox field v...

How come request.getPathInfo() in service method returns null?

I wrote Front Controller Pattern and ran the test. Somehow request.getPathInfo() is returning null when it should return the path info. 1. HTML that calls servlet <a href="tmp.do">Test link to invoke cool servlet</a> 2. Map the servlet in DD. Anything that has .do extension (ex tmp.do) will invoke the servlet "Redirector" <!-- SERVL...

Set and get values in session - Web Applications with PL/SQL

I have two web applications: a based in web pl/sql and another in jsp My login web page is in pl/sql from this application to access through a link on my jsp page. I want to keep the user session connected in web pl/sql and then I take it in my application jsp. In jsp for set and get values session I use: HttpSession session = request.g...

How to develop a Client/Server/Host Remote Desktop Solution that can tunnel through Firewalls and NAT

Hi Everybody, Im starting a college in which i hope to develop (most of at least) a Java & JSP based remote desktop application that replicates Logmein's architecture. I would appreciate some ideas on how to implement this from a network & software perspective. The following diagram is a good representation - http://blog.donet.com/wp-co...

how to call the jasper report in jsp page

I made one jasper report using ireport3.7.4 version, now i have to use that or call that report in my java application where i am using servlets,jsp and struts framework, apache tomcat as server. I want steps regarding how to call the jasper report with some example. ...

Arabic characters appears like ??? after adding a Filter to JSP page

When I add a Filter to a particular JSP file, the Arabic characters in the output appears like ???, even when the page encoding is been set to UTF-8 by <% @page pageEncoding="UTF-8"%> and <% response.setCharacterEncoding("UTF-8");%>. The strange thing is, before I added the Filter, the output of all Arabic pages appears with correct e...

Convert a List to String to populate webpage in JSP

I have DAO bean rows retrieved in a List. In my JSP I am accessing the List to iterate thru to populate my page. My JSP can't access the List because it says it must be a String when I execute a request.getParameter. How I convert this to String eventually populate my page? public List getAccessRequest() { List accessRequesttList ...

database problem

In the code given below i m not getting any output. if i give that connection success statement i get that but not getting the count. Pls help me <%@ page import="java.sql.*"%> <%@ page import="java.io.*"%> <% try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:ge","ge","ge"); ...

Get Gmail addressbook in my site

Hello, My application is fetching all the contacts of my gmail account. i try this using GoogleAPI. i got success. but when i am trying to access gmail it will redirect to gmail login page. i do not want to gmail login page instead i want my login page. so how to override gmail login page . please help me out. ...

How to include jsp include directive in JspWriter

I have my requirement like this buffer.append("<table width="+tableWidth+" height="+tableHeight+">" + "<tr>" + "<td class="+cssTableBackGround+">" + NBSP2+ "" + "<img id='"+ID+"' border="+0+" src="+imageDown+" name='toggleImage'/> (\"javascript:simpleToggle('"+ADVANCED+"',) " + NBSP2+ "<font class="+cssClass+"> "+ "Edit ChairPerson" + "...

oracle to flat file

I need to create a flat file and push information into it from oracle database using JSP. I require a sample code. Help will be appreciated. ...

output JSON array in a html table(a jsp page)

Hi, as the title suggested. how do i output a json array correctly in a table from a jsp page? right now whenever i display the json array object using but it just displays the whole contents of it in json string i.e {name: hello, address: baker street } but what i want to do is somehow parse this and display the info appropriatly lik...

Requested resource not found for sub-context in case of JSF

My JSF application is deployed under tomcat and server.xml is configured as follows for my application <Host name="myapp.com" appBase="/home/myapp/public_html"> <Alias>www.myapp.com</Alias> <Context path="" reloadable="true" docBase="/home/myapp/public_html" debug="1"/> <Context path="/manager" debug="0" privileged=...

JSP 2 and Servlet 2.4 broke my custom tags

Hello experts, We recently switched to Servlet 2.4 and JSP 2 on a project and our custom tags no longer work. We have tags like: <myTags:someTag value="${x}" /> and once in the tag we evaluated x bean and went from there. Now the evaluation happens directly in the JSP and we get a String (apparently x.toString()) set for the value at...

What is JSP 2 version of <c:set>?

Hello experts, How can I set a value using JSP 2? I mean, if ${val} is the new version of <c:out value="${val}" />, what is the JSP 2 version of <c:set var="val" value="bla" />? ...