jsp

workaround for GWT+Jetty JSP compiler issue? (Java 1.5 source level not recognized)

As this thread shows, there seems to be an issue getting JSPs to compile in GWT hosted mode with the new Jetty server: 2. ERROR in /tmp/Jetty_0_0_0_0_8080_war____ut4fm1/jsp/org/apache/jsp/ test_jsp.java (at line 53) new java.util.ArrayList<String>(); ^^^^^^ Syntax error, parameterized types ar...

What are the life cycle methods of a Java Server Page?

What are the life cycle methods of a Java Server Page? ...

Masterpages in JSP

Hi, is there a concept like ASP Masterpages in JSP? Regards. ...

how to check the login in jsp

this the first time i use jsp, and i face some problems. i want to know how to check teh login if i have to tyoe of login. for examplem i have the student and professor. when the anyone is login it should check if he student or professor to forward him to the right page, the student should go to the take_quiz.jsp page and the professor ...

how to reload my select element of html from database in java

Actually wat I need is: I have submitted some data in database from a html form. Then I have to load one column of that data in select tag of another form. I have done this but problem is that how will I increase the number of options as the number of records are increased. Code is as follows <%@ page import="java.util.*"%> <%@ page ...

jstl/jsp - iterating over a vector of beans.

I have a vector of beans that holds information I want to display in my jsp page. I'm currently just using standard java expressions to display this, I want to look into using jstl to separate concerns. Is this possible, and how? I've been googling but I can't seem to find anything. ...

Is there an Updatepanel control (like ASp.net) in java

Hi, Im basically a .net developer, I am now working on a java web project, here i need to basically get values from the back end (say generating a random number) and update that random number every second on the front end, i want to use jquery for this, in ASP.net, i know that I can have an updatepanel and use _doPostBack to update th...

insert data into database with jsp

i have to inser data from a form into DB, i tried this code it was work but now it doesnt work. i want to know where is the problem with this code this is the code Connection con =null; try{ String driveName = "com.mysql.jdbc.Driver"; Class.forName(driveName).newInstance(); } catch(java.lang.ClassNot...

JSF and Spring performance vs poor JSP performance

I saw some JSF projects developed by my collegues and these projects seemed to me very slow. Does anybody have the same opinion? I'm currenly using jsp+jstl and jQuery for "rich" client. I wonder what advantages and disadvantages have modern frameworks (jsf, wicket, tapestry..) over old plain jsp. It would be great if people who ...

Jsp download file size.

We are running tomcat, and we are generating pdf files on the fly. I do not have the file size before hand, so I cannot direcly link to a file on the server. So I directly send the output. response.setContentType("application/force-download"); OutputStream o = response.getOutputStream(); And then I directly output to this OutputStre...

With facelets what is the equivalent to fmt:formatDate?

I am converting a JSP web page to facelets view handler. What is the equivalent to fmt:formatDate etc.? I know that it isn't supported. But is there an alternative? A third level implementation? ...

Include the content of a file in JSP

Hi, I would like to include the content of a file inside an JSP page. Usually, I would use something like: <jsp:include page="<%= path_to_file %>" /> However, this will not work here since the file I am trying to include is outside the web deployment. The ugliest solution I've seen is something like this: <td> <% BufferedReader br...

Perform task in JSP using a Hashmap lookup

I have a Hashmap and a set of keys. For each key, I want to perform a task depending on whether or not it is present in the hashmap. Can someone show be a way to do this? I'm using Struts and JSPs in my application ...

Keeping queries out of JSP - how?

I'm a big fan of keeping application logic in the servlet, and keeping the JSP as simple as possible. One of the reasons for this is that any good web designer should be able to expand upon his HTML knowledge to build in a few JSTL tags to do simple iteration, access beans, etc. We also keep the more complex/ajax/js components behind a t...

XQuery as alternative to JSP/Java for web services?

I noticed that DataLogic (or is it MarkLogic?) and SqlServer 2005 both support xquery for RDBMS access and (seem to; haven't tried this myself yet) offer xquery inside JSP/ASP. That leads me to wonder whether java code could disappear from the presentation layer. I.e. JSP/ASP would only contain html plus xquery code that accesses the DBM...

How can I display a status message while a file is uploading?

Can any one give a simple method using JavaScript to display a status message while file is uploading and fade away when file is uploaded? ...

reading a json object in jsp

i have a JSON object passed to the jsp page. it is passed as a string. now i have to parse this string and retrieve the values that are passed through the JSON object. so that i can print the values in the same jsp. ...

Not Serializable Exception

i am trying to create a mock shopping cart for a uni project. im using two java classes Item and shoppingCart, shopping cart uses a vector to store Items and then writes them to a file. i am trying to use the classes on a jsp page but when i try to write to the file i get an java.io.WriteAbortedException: writing aborted; java.io.NotSeri...

Using Jboss Portal, How do I retrieve page properties in a jsp?

Using Jboss portal, how do I retrieve the page properties in a jsp? I've declared my page like that in *-object.xml file: <page> <page-name>MyPage</page-name> <properties> <property> <name>layout.id</name> <value>generic</value> </property> <property> <name>hidePanel</name> <value>true</value> ...

How can I pass a variable to a JSP class using the URL?

I'm trying to modify someone's written JavaScript code to pass a URL variable (called manufacturer) into a Java class. The interesting thing is the file is an HTML file with JavaScript. Because I'm new to JSP, I'm not even sure if this can be done but here is the HTML/JavaScript code: <html> <head> <script type="text/javascript"> var...