jsp

variable column

I have a database in MS-Access which has field names as "1", "2", "3", ... "10". I want to select column 1 then when I click a button, column 2, column 3, ... and so on. How to do that? Actually i want to make a project in JSP. ...

Is there any benchmark which compares PHP and JSP?

I don't want to make a holy war. I just want to know if there is such benchmark? Or maybe you can say something about this thread from your experience? ...

database display in textarea

I have a database, I used jsbc::odbc to connect it with my JSP page. Now I want that the contents of my access database to be printed in a textarea of my JSP page with a next and previous page button by which I can switch between different fields of database. Can anybody help me with the code? ...

"Form" - If-else Statements

I'm trying to realize a simple form: there's a globalname and globalpass, and the User is asked to type in his name and pass. If name == globalname and pass = globalpass -> "Hello name" If name == blank or pass == blank -> "O NOEZ, you fergit sumpn!" If name != globalname or pass != globalpass -> "WHUT? Who be you, intruder?" So far ...

Convert typed-in Text to lowercase

I've got an index.jsp with [snip] <% String name = request.getParameter("name"); String pass = request.getParameter("pass"); String globalname = "webeng"; String globalpass = "2009"; if (name !=null && pass!=null && name.equals(globalname) && pass.equals(globalpass)) { %> <hr /> <p><b>Howdy, <%= request.getPara...

Using mySQL on Tomcat server?

Hi all, I have the following problem at the moment. I am using mySQL and Tomcat for my college project, and I am able to connect mySQL DB locally from a jsp page. However, if I try to use mySQL and server in my college, I got the following error Exception: Communications link failure. The last packet sent successfully to the server was ...

calling a function

I made a database, I am printing my required field in a marquee. Now i want that if (change>0); print (image_21); else print (image_2); This is the code I am using: <%@page import="java.sql.*" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> <...

Java String Encoding to UTF-8

Hi All, I have some HTML code that I store in a Java.lang.String variable. I write that variable to a file and set the encoding to UTF-8 when writing the contents of the string variable to the file on the filesystem. I open up that file and everything looks great e.g. shows up as a right arrow. However, if the same String (containing ...

AntClassLoader cannot be cast to URLClassLoader

I have an Ant task to compile jsp files with Jasper. The first step is generate the java files: <java classname="org.apache.jasper.JspC" fork="no" failonerror="true"> <classpath refid="my.class.path" /> <arg value="-uriroot" /> <arg value="${apps}" /> <arg value="-d" /> <arg value="${jsp}" /> <arg value="-p" /> ...

JSP and dynamically agregated css

Is there a better way to aggregate several css files ( based on what a give page requires ) than including them in a jsp file with c:if tags? The top of the file (sitting outside of web-inf dir, alongside images files and such) <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ page contentType="text/css" %> ... fo...

JSP page without HTML code for exporting data to Excel Sheet

Hi friends, I am facing a problem in exporting my data to excel sheet, this is because of some code which other developers in my team made. So the main problem is to export the data to Excel or .cvs using JSP page but without using any HTML code. Any suggestion would also help me to explore in my developing arena. Thanks for your efforts...

forward from servlet in higher directory to jsp in subfolder

Hi. i have root/logged/form.jsp root/servlet root/logged/form.jsp I have jsp page logged/form.jsp this submits form to servlet action="../update". Now i want to add some parameters to request and forward it to logged/form.jsp but its not working and showing me form.jsp in root context only root/servlet. Please help what url should i ...

Displaying xhtml content in a jsp page

Hi All, I have a JSP page that displays XHTML content. I have included the following lines at the top of my JSP page: <?xml version="1.0" encoding="UTF-8"?> <% response.setContentType("application/xhtml+xml"); %> <% request.setCharacterEncoding("UTF-8"); %> If I change the above line to: <?xml version="1.0" encoding="UTF-8"?> <% res...

XHTML in JSP page

Hi All, I have a jsp file that display XHTML, the problem is that shows up as a question mark in the rendered page. First few lines in my JSP look like this: <% response.setContentType("application/xhtml+xml"); %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&g...

Tomcat cannot resolve '<%@ include file', possibly related to taglibs JasperException: File Not Found

In the jsp i have: <%@ include file="/assets/includes/inc_standard_init.jsp" %> In the browser I get: org.apache.jasper.JasperException: /oprs.jsp(1,1) File "/assets/includes/inc_standard_init.jsp" not found org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher...

Where is Bea Weblogic Work Folder

I know that this may be a trivial question but I really cannot find the work folder in Oracle BEA weblogic 10.3. Unlike the Apache Tomcat where it is clearly in the work directory usually under WEB-INF. I already researched it on JavaRanch and it said that the directory is at: \bea\user_projects\domains\YOUR_DOMAIN_NAME\servers\AdminSe...

Should I implement a custom properties file based authorization tag to go with authz from Acegi Security?

I'm searching for the best way to handle view-level authorization (where you hide markup based on a user's roles). The typical way to do this is with the Acegi Security authz tag, as follows: <authz:authorize ifAnyGranted="ROLE_FOO, ROLE_BAR, ROLE_BLAH"> <!-- protected content here --> </authz:authorize> The problem with that appro...

Sending & in query String

From first.jsp I am sending some parameters to result.jsp as - <a href="result.jsp?itemId=${itemId}&itemName=${item.itemName}&itemCode=${item.itemCode}')">Show Items</a> Here ${item.itemName} can have values like "food & stationary". When item name contains an "&", I am not able to get whole value on result page, its printing only "fo...

Can i break up a jsp foreach loop with stripes layouts

Say I have the following for each in a stripes layout definition <c:foreach items="${foo}" var="bar" > <s:layout-component name="whatever" /> </c:foreach> Then when I render I do something like this <s:layout-component name="whatever"> //Do something with bar </s:layout-component> The whatever component is rendered before ...

array as hidden variable

can array be used as hidden variable on jsp.....like I have a form i.e a simple java class,I want it to be as hidden variable can I do it.. Thanks in advance ...