jsp

efficient way to create a xls file in a jsp page

Hello, what is the most efficient way to create a xls file in a jsp page? I created an xls file using poi in jsp page, but if not the most efficient. Thanks ...

Caching contents of a page?

Hi, I'm generating page content like: // index.jsp <% List<Horse> horses = database.getHorses(); for (Horse it : horses) { %> <div><%= it.getName() %></div> <% } %> is it possible to grab the entire page content at the end of the jsp file, and dump it into a String, like: String page = this.getPrin...

bean userList not found within scope, after some test of login functionality with Jmeter.

I have a web app (using Hibernate, and I cannot avoid that because is one of the point of the exam test ) for a university project in wich I need a login functionality. After I run some test with Jmeter (basicaly http get e post in the login) I found that after 20 test the webapp stop working returning this message : bean userList not f...

website offline jsp

Hi!!! =) I am creating a website using jsp, ajax, servlets. My framework is prototype. The connection is bad, so I would like my web application to respond correctly in situations like this. For example to give a message indicating you are working offline, and to report when plugged in again and can continue. The solution should wo...

Getting 'global' variables from other jsp pages?

Hi, Can a variable declared in one jsp file be used in another, if imported? Example: // index.jsp <% int count = 40; %> <%@include file='go.jsp'%><% // go.jsp <% count += 10; %> is count visible to go.jsp? I am guessing this is not good design anyway (expecting global variables to be around for you from another page), just wonder...

Best book to learn JSP fast and quick

Please suggest me a good book to learn JSP and JDBC basics fast and quick. Its like i have 3-4 days to go through the basics of JSP and JDBC. I have never used them before, however i have worked on java a lot. Currently, I am programming on ROR. So, a nice book to get me through the basic stuff of JSP and JDBC ...

How to get value to dropdown from database using ajax ?

Hi, I have dropdown with some optional value.if change the those value based on that will display another dropdown with value from database.I am doing this process in jsp page.First dropdown values are static(coded in jsp).but second dropdown values are come from database when changeevent of first dropdown. Here i need to implement aja...

forward()/redirect() usage for a signup process?

Hi, I'm trying to finalize a signup process for my webapp, but am getting confused with servlet forwarding/redirects (again). The flow looks like this: // /signup/index.jsp <form action='/user/signup'> </form> <% if (request.getAttribute("msg") != null) { %><div><%= request.getAttribute("msg") %><% } %> // Servlet which maps to '...

Which web technology to learn for an experienced C++ developer?

Friends, I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here. PHP, Python or JSP, considering the fact tha...

add literal type in to model

I tried to add the data type property value in to my model..it works fine..when i wrote like this: Literal link = model.createTypedLiteral("www.google.lk", XSDDatatype.XSDstring); Statement value = model.createStatement(ind, pro, link); model.add(value); when i pass it as a argument: Literal link = model.createTypedLiteral(onto.getli...

App Engine JSP without code inside

Is it possible to use JSP sort of as a template without having code inside? Values should be inserted into a hash map, and the JSP can read the values from there. Is it possible to code like this in a GAE application, or do you need external tools/frameworks to accomplish this? In other words, is it possible to pass values from the s...

how to over ride request object in ServletRequestWrapper?

I want to over ride the default getParameter() method of ServletRequestWrapper with getParameter() method of SecurityRequestWrapper. For example, if I am using a simple jsp form to take the name of a person, String name = request.getParameter("firstName"); I want the above getParameter() method to be from the SecurityRequestWrapper ...

How to set session max inactive time?

Hi, I get the session MaxInactiveInterval time using the following query. I am developing web application using JSF Framework var sessionMaxInactiveTime = ${pageContext.session.maxInactiveInterval}; I need to set maxInactiveInterval. how to set maxInactiveInterval using JavaScript, JQuery, or to write Servlet. But i want to contr...

problem with running jsp and servlets on tomcat 6.0

I've got tomcat 6.0 installed and was just creating my first jsp/servlet application. i set my directory as .../tomcat 6.0/webbapps/sella my folder is the name sella as you know. i created the first .jsp file and placed it in the above directory on my fisrt browse on mozilla it worked well as expected in the tutorial. i created a ../tomc...

JSP Redirection and passing value

Hi , I have a JSP in which i am redirecting to another jsp like ,i dont have any other data in that jsp,i want to pass a value from this jsp(index.jsp) to the redirected jsp(login.jsp),how will i do this? Here "logonInput" is defined in struts-config.xml index.JSP is like <%@ page language="java" contentType="text/html;charset=UTF-...

what is difference between JspWriter and PrintWriter ?

what is difference between JspWriter and PrintWriter ? ...

problem dealing with request parameter using jsp within a javascript block

Hi all, I've a jsp page which saves a request parameter inside a javascript variable. Say a user visits the page through a wish list then the param fromWishList is set to 1, if the user visits this page from other source then there is no param called fromWishList. //following code is inside a jsp page <script type="text/javascript"> ...

org.apache.jasper.JasperException: Cannot find any information on property 'sName' in a bean of type 'AddUserBean'

Hi, I have a html page with a user registration form. I collect the data and action is : <form name="register" action="../JSP/Register.jsp" method="post"> Then on the jsp page i have <HTML> <HEAD> <TITLE>Reg JSP</TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="commonstyle.css"> </HEAD> <BODY> <jsp:useBean id ="user" class ...

Tomcat unable to find jsp in war file

I recently switched one of my static html files to a Spring controller that uses a JSP to render its view. I use jetty to test locally and local testing shows the page rendering fine. Upon deploying to our test server, which uses Tomcat 6.0.26, I get the following exception: javax.servlet.ServletException: Could not get RequestDispatche...

Bind arraylist value to JSP dropdown list

I have a arraylist with some data. I need to bind that data to a dropdown list in JSP and get the selected index. Can any one help me for this? ...