Hey everyone,
So my setup for my web application is that I have a general header and footer and then I just include them in all my other pages so that all the common elements for all the pages are in a single page. The only problem I'm running into is when I want to redirect the user back to a login page if the "username" session has n...
Hi
I'm trying to get an SQL query to work within a JSP file. The JSP file is pulled by a VXML file here is my JSP file code:
<?xml version="1.0"?>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<% boolean success = true; // Always optimistic
String info = "";
String schoolname = request.getParameter("schoolname");
...
In text fields of my JSP, I wish to know whether user is typing in the data or just pasting.
How can I identify this using javascript ?
EDIT: As per Andy's answer I know how I can go about it, but still curios how those guys wrote onpaste event.
...
Suppose that I have two objects with the same property name that I am iterating over with Struts 2.
class Book {
// assume that there is a public getter and setter
public String title;
public List<Chapter> chapterList;
}
class Chapter {
public String title;
}
In my JSP page, I want to iterate over the Book and Chapter. While ite...
I'm using Eclipse/Spring source to edit JSP tags and EL. If I want to check what all the properties of a variable are is there a way to do this? Or even find out which file is generating the variable that's passed in. I'm thinking something along the lines of firebug for Javascript, where you can select an object and drill-down to get it...
i am new in JSP,i have some problem with the following code :
<%@ page contentType="text/html;charset=Big5" %>
<html>
<head>
<title></title>
</head>
<body>
<form method="post" action="InsertStudent.jsp">
<input type="text" size="20" name="txtName" />
<input type="text" size="20" name="txtDob" />
<...
hi,
select name from suggest where name like 'aero%' and rownum<=10;
I am getting only 8 keywords ( database has 8 keywords) but I want to count the number of keywords from database to my JSP program.
This gives 8 keywords:
rs.getparameter("name");
But I want to count the keywords. Can you give me any sample program?
than...
Hello Everyone.
I am new to Jquery. I want to read specific data(some div's only) from a webpage and store it in my database. Now I am not able to do so as load functions loads the data into the current page id. My goal is to read specific data and store them in database. So which Jquery function should I use for this? if someone can th...
Hello,
I have something like this in my Spring Application:
public class Book{
public Book(){
sheets = new LinkedList<Sheet>();
}
protected List<Sheet> sheets;
//getter and setter
}
I add several Sheets to the sheet list and I print a form in a JSP like this:
<form:form modelAttribute="book" action="${dest_...
Hi,
i'am using JSF and Spring in a web application. If the Spring Controller throws exceptions i map them to special views.
Now I'd like to catch all exceptions which are thrown out of scope of the Spring Context.
In my web.xml i've defined an error page.
<!-- handle uncaught exceptions -->
<error-page>
<exception-type>java.lang....
Hi,
I haven't managed to find a way to pass parameters to JSF/JSP web pages through url parameters.
http://.../jsfApp.jsp?param1=value1&param2=value2
Could someone point me at the right direction with this?
Thanks!
...
A websphere 6.1 server is running a struts application that seems to be working fine. In the logs, however, I'm seeing the following error message, which is being continually emailed to the support staff.
[3/16/10 15:42:08:089 CDT] 00000023 SystemOut O FATAL - [03-16-2010 15:42:08] root: The following page could not be found in the ...
Hi,
I had all my servlets and classes in the default package. I have created these and JSP's and its all working fine.
However i want to import some of the classes into the JSP's so i moved all the classes and servelts into a new package called Driver. I did not change any code anywhere, just moved it into a new package. The applicatio...
Hello,
I have used Eclipse 3.4 to create a Dynamic Web Project. I have also configured my server to use port 8443 with ssl. If I start my server I can access my test.jsp by going to it's address
https://localhost:8443/TestContext/test.jsp
In eclipse, I have installed this server and added my project to the server. If I Run test....
I need to use hidden variables in my JSP for session tracking. This is the code:
<input type="hidden" name="REQ_TOKEN" value="<%=session.getAttribute("SESN_TOKEN").toString()%>" />
I am using this to compare the request token with session token, so only when both are equal I will evaluate that request otherwise I will throw an error.
...
Hi everyone I'm trying to compare two values using struts2 s:if tag but its not working. If I hardcode the values it works but I want it to be dynamic.
The variable stringValue is of type String.
The variable currentLongValue is of type Long.
<s:set var="stringValue" value="order"/>
<s:iterator value="listTest">
<s:set var="currentLon...
I am trying to send data to my jsp via:"xhr.send(projectCode);"
but apparently the parameter is not received when I am trying to realise it with System.out.print it is a null displayed.
so the story from the begining. my javascript function send the parameter to the jsp whitch construct an xml file and resend to the first one.
this will ...
I am trying to send special characters like spanish chars from my page to a JSP page as a form parameter. When I try get the parameter which I sent, it shows that as "?" (Question mark).
After searching on java.net thread I came to know that I should have following entry in my sun-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE...
I'm trying to iterate through a set of keys in a properties file, so that only the "message.pX" is output.
a.property=foo
message.p1=a
message.p2=b
message.p3=c
some.other.property=bar
I don't know how many properties with the prefix (message.p) will be in the file, so I want to display any that are present. I've already got a bean c...
Hai can u please tell me how to insert, delete data into and from table using jsonReader in jsp
...