jsp

Does using "JSP Document" / "JSP in XML notation" imply outputting XHTML?

I'm really not sure about this: does using "JSP Document" / "JSP in XML notation" imply outputting XHTML? If so, is there anything special to look after as to produce a "valid" XHTML page? More specifically: can I have a valid "JSP Document" (JSP in XML) that is producing an invalid XHTML page? ...

Database Connection Problem with MS SQL Database: JDBC-ODBC Driver from JSP

I'm using Netbeans 6.8 to develop application using JSP. I'm able to work with it properly in my project guides system. But i'm unable to get the connection to database from my system. It shows error unable to connect. I have not changed any of the codes. How can I fix this error? ...

Set request attributes when a Form is POSTed

Is there any way to set request attributes (not parameters) when a form is posted? The problem I am trying to solve is: I have a JSP page displaying some data in a couple of dropdown lists. When the form is posted, my Controller servlet processes this request (based on the parameters set/specified in the form) and redirects to the same ...

Dispatcher for Filter Mapping

I have an app written for Servlet Spec 2.4 with an old webserver designed for Servlet Spec 2.3. The web.xml file has the following syntax: <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>*.action</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>...

Apache Struts: Cannot retrieve ActionForward

I am trying to learn the Apache Struts framework and I have written a small application that does class enrollments but whenever I try and load up my application it just spits out the following exception: javax.servlet.ServletException: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.J...

Oject Expected Error.

I am getting Oject Expected error.i am unable to find the reason . Can u tell me the senarios when this error ocurs. ...

checking session in servlet and jsp

Hi, In my web application i neet to check session already exist or not. i want to check this in my servlet and in jsp also. is there any way to check this. Thanks ...

Eclipse : What are these JSP errors?

Hi all, I've inherited a web application and when setting it up in Eclipse it shows errors in a particular JSP. The errors have no description associated with them in the Problems view, and clicking them there takes me to the top of the JSP, where the red error underline appears halfway through the string (see below). ... bah, can't ...

Testing if a User is Logged in Via JSP/Spring-MVC

Using Spring 3 MVC and JSP, I simply want to test if a user is logged in, I'm not interested in using Spring Security currently <jsp:useBean id="myAppUser" type="com.xxx.MyUser" beanName="myUser" scope="session" /> <c:choose> <c:when test="myUser.loggedIn"> //dostuff </c:when> <c:otherwise> //dootherstuff ...

Login session lost after flex chart is displayed from jsp

I have a java web application. When I log in to that application and navigate to a jsp which has flex chart embeded into it, the chart displayes just fine. I am using blaze ds remoting object mechanism. But when I want to navigate to a different page, it logs me out of application since the login session is lost. ...

Is there a limit to the scroll length of a web page?

I have a client who is building a business application that will be used with IE8 only. One of the requirements is to display all of the data in a single page. I am anticipating this data table to be somewhere between 3K - 10K pixels in length. In the worst case scenarios, more than 25K pixels. What are the technical considerations whe...

How to call Onload function in the Main page as well as @include file inner.jsp page

Hi, I have two pages one is the main page and the another one is the inner page: Page names: main.jsp , sidebar.jsp I want to call the onload function on both of these pages. Is that possible. If yes How? Below is the code for main.jsp: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DT...

JSP link submitting data to struts form bean

I am making a JSP page that links to a page where it will pull a list of data from the database depending on the user who is logged in. I am using a DataSourceRealm type authentication so I pull the username with a request.geRemoteUser() and want to submit that to my form when I click the link but I cannot figure out how to do that, my l...

[JSP, MySQL and Servlets] ResultSet loses first value

Code seems to work fine, but I noticed whenever I queried a string with only one result, it returned nothing. Somehow I am skipping the first result I think but have no idea why. else{ Conn con = null; try { con = new Conn(); } catch (Exception e) { e.printStackTrace(); } String sql = "SELECT productname, qu...

JSTL - Using forEach to iterate over a user-defined class

What methods do I need to add to a custom Java class so that I can iterate over the items in one of its members? I couldn't find any specifications about how the JSTL forEach tag actually works so I'm not sure how to implement this. For example, if I made a generic "ProjectSet" class and I woud like to use the following markup in the JS...

Need to format a set of float variables to 00.00

Ok so I have a database colum 'UnitPrice' with a range of values example: 23, 23.5, 43.23 Now I need to know if there is a way to format them all to the 00.00 format when printing them out. I've been failing at this for about an hour now... ...

Websites using JEE

Hi guys, I have a simple question, but I can't find out the answer. I'm wondering if we can see that a website is built using the JEE technology, or servlets/JSP. I think it could be possible to look for specials pages from the server (404, wrong parameters, ...) in some cases, but what about the everyday use ? In fact, I look for a co...

how to access owl file inside jsp

hi, I'm trying to access owl file using jsp.I've successfully load the owl file and quering that using SPARQL.But still I couldn't success with JSP. I'm always getting error "java.lang.ClassNotFoundException: com.hp.hpl.jena.util.FileManager " help me! Thank in advance! ...

How do I make a third party .jar available to my .jsp page?

I'm just starting to learn JSP (and I'm pretty new to Java in general), and I'd like to use JSON-lib with it. I want to make a page something like this: <%@ page import="net.sf.json.JSONObject"%> <% String json = new JSONObject().put("hello", "world").toString(); out.println(json); %> I downloaded json-lib-2.3-jdk15.jar and put it in ...

Print the jena result set in html(servlet/jsp).

I'm using servlet for manipulating ontology. I got the result of my SPARQL query and I want to display(print) that result in JSP (Servlet). Following code segment can be used to print the result in console. com.hp.hpl.jena.query.Query query = QueryFactory.create(queryStr); QueryExecution qe = QueryExecutionFactory.create(query,model); ...