jsp

How to use ajax with prototype and jsps

I'm developing social faq solution. When I click on vote up or vote down, i want to make an ajax call to a java function. I've worked with struts on another project, and i was making call to struts action. Now I work only with simple jsp, servlets ... and I dont know how to make an ajax call to a java function which will send me json ...

What does the exception "javax.servlet.jsp.JspException: Broken pipe" signify?

I'm getting the following error: javax.servlet.jsp.JspException: Broken pipe Now I have seen questions/answers with respects to the socket exception, but this error is coming from a different package. Any help is greatly appreciated. BTW, I am seeing quite a lot of these errors in a struts web app Weblogic Node logs and I am think...

Struts2 scriptlet

Using struts2 with jsp with standard struts tag libraries. I'm trying to dynamically hide a DIV on page load, but still send it to the browser. This is so I can show it later via javascript. The request objects one and two are not easily referenced via a jsp:usebean tag. (They are enums and cannot be instantiated) I tried using a ...

Can I send a POST form in an encoding other than of its body?

Hi gang, I've Html page that looks like: <HTML> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'> <BODY onload='document.forms[0].submit();'> <form name="form" method="post" action="/path/to/some/servlet"> <input type="hidden" name="username" value="麗安"> <!-- UTF-8 characters --> </form> </BODY> </HTML> As you can ...

want to fill a textbox dynamically in jsp page

want to create a application using jsp pages such that it takes a value from user in a textbox and on the basis of that value it retrives other values from database and fill other textboxes with that retrived values ...

Mixing HTML and STRUTS2 tags

I have a form which has both HMTL tags and struts tags. I use the HTML tags because of alignment issues with struts tags. <s:form action = "setNode" name = "processing" method ="POST"> <script> <!-- createTree(catArray); </script> <br/> <s:radio name="processOption" label="" list="{'Add','Move','D...

Is it possible to make XSS attacks through html comments with JSP code inside?

Hello! Is it true that following code adds a XSS vulnerability to some JSP page? <!-- <%=paramName%>=<%=request.getParameter(paramName)%><BR> --> It looks like a "leftover debug" and definitely should be removed from the code, but how dangerous is it? ...

In JSF1.2 is it possible to redirect to a bean before a page is rendered?

Hi all, I know that in Seam, we could write an xml file (if my jsf page is named index.jsf -> index.page.xml) that we could add there action execute="#{loginAction.checkIfBlaBla}" so that JUST BEFORE the index.xhtml is rendered we could call a method of a Bean (Session or Managed, in seam it doesnt matter) I am wondering if it is al...

How can I close the output stream after a jsp has been included.

I have a webpage that makes an ajax call to get some data. That data takes a long time to calculate, so what I did was the first ajax server call returns "loading..." and then the thread goes on to calculate the data and store it in a cache. meanwhile the client javascript checks back every few seconds with another ajax call to see if th...

Coding solution to WAR installation error (Websphere Portal 6.0) ?

I have a Websphere Portal application containing several portlets for which I'm currently working on some changes. A week ago, the WAR file produced by Rational Application Developer could be installed on the Portal server with no problems. Yesterday I made some seemingly minor changes to two JSP files and their associated "pagecode" J...

Linux supporting JSP

Does every Linux server support JSP files? ...

What is the exact difference between the scriptlet tags <%= some code %> and <# some code %>?

What is the exact difference between the scriptlet tags <%= some code %> and <# some code %>? ...

Does Displaytag stash the "media type" in a page or request attribute?

When you enable "export" from Displaytag, the tag code gives you links with special magic parameters that the tag recognizes as indicators that the table contents should be exported (as CSV, Excel, whatever). Well I'm interested in detecting the media type so that (for example) I can exclude columns that make no sense in an export (embe...

Realtime graph using JFreeChart and displaying in JSP

I'm trying to plot the system CPU utilization in a JSP page. I'm using JFreeChart library to do so, I have a problem, The generation of the graph I've written in a Servlet and that generates an image, so on the JSP page it flickers and reloads the image. Is there a better way to implement it as I want to see a continuous flowing graph...

errorPage directive works, but error-page in web.xml doesn't?

I get jsp exceptions causing a forward to my error page when I put this at the top of my JSPs... <%@ page errorPage="/error.page" %> but when I try to do it globally with web.xml like so: <error-page> <exception-type>java.lang.Throwable</exception-type> <location>/error.page</location> </error-page> I just get a blank page...

Guide need to build a JSP based webapplication

I want do a web-application that consists of the following pages: Main, Inventory, Shopping, Login, and Report. All will be JSPs and all will be called using the MVC pattern where one of two servlets uses the RequestDispatcher to call the appropriate JSP. This uses server-side forwarding and not redirection. I have ER diagram: http://ti...

Is it possible to evaluate a JSP only once per session, and cache it after that?

My site has a nav menu that is dynamically built as a separate JSP, and included in most pages via <jsp:include />. The contents and styling of the menu are determined by which pages the user does and doesn't have access to. The set of accessible pages is retrieved from the database when a user logs in, and not during the course of a se...

Load a jsp-file from a servlet (App Engine)

I would like to load a jsp file from a servlet-class I got in my App Engine project. I has been able to load jsp files by adding them to the web.xml file but is there any way to load them directly from a servlet class? Edit: I have tried this without success (no error msg or anything) req.getRequestDispatcher("file.jsp").forward(req, r...

sample code for Dynamically populating dropdown in JSP

Hi, I have two dropdowns in my form. The first one Queries for a set of data and displays them. Based on the value selected in the first dropdown i have to query the database, using that selected value as a parameter and populate the second dropdown. In short, based on the first dropdown, second one has to be populated dynamically. Am c...

Building asynchronous cache pattern with JSP

I have a JSP that will take some 8 minutes to render. The code logic itself can not be made more efficient (it will update often and be updated by basically a pointy haired boss). I tried wrapping it with a caching layer like <%@ taglib uri="/WEB-INF/classes/oscache.tld" prefix="oscache" %> <oscache:cache time="60"> <div class="pageco...