jsp

How can I detect which jsp includes a web page uses in a web application

Hi, I want to detect when an include in a jsp occurs in a web application and specifically which page is being included. I want to do this when the menu page is requested. One option is to overwrite PageContext but it turns out you can't access it anywhere to wrap it. As far as I can see PageContext is the only class which provides incl...

Java and tomcat vs ASP.NET and IIS

Until recently I'd considered myself to be a pretty good web programmer (coming up for 10yrs commercial experience on a variety of e-commerce, static and enterprise applications). I'm self taught and have always used the Microsoft product stack (ASP, ASP.NET)... My applications are always functional, relatively bug free, but have never...

class not found exception in hibernate

i am geting the following errot when i am tryinh to run my j2ee projrct. the same project was working before and i started geting this exception now. i am sure that all class are there along with their mapping files if i remove mappping of jobtitle from my hibernate.cfg.xml ien the project is running java.lang.ExceptionInInitializerErr...

How can you serve a dynamically generated file w/ Tomcat & Java technology?

Having a hard time figuring out how to send dynamic data to a web-app's user without having to create a file & using a dynamic link to static content using java technology. (The main reasons for avoiding the file creation on disk are security and speed) This is something I have previously done in python, but this web-app is intended to ...

Execute a method without blocking the client

Hi, I am using Java in order to create web application. The application has to load a form which is sent it's data to a jsp that call a long business logic. I need that the jsp will return a message like "thank you for using my service, an email will sent to you when the proccess is done." The problem is that if I will write something l...

What's the Difference Between <s:property ..> and ${param}

In struts I notice there are two different ways to access variables. I am curious what the difference is and when to properly use each one. For example, suppose we set the variable height like so: <s:set var="height">300px</s:set> Now I can use it two ways: <div style="height: ${height}">&nbsp;</div> ..or.. <div style="height: <...

Gantt Chart - JavaScript / JSP / Java / Groovy / Grails

I'm looking to add the ability to create a gantt chart to my web application. Currently my application is Grails based running on Tomcat. Research around SO seems to indicate that JFreeChart (http://www.jfree.org/jfreechart/) and Google Charts both might provide me with the ability to create charts that I could mold into what I need. B...

JSTL and Javascript

Is having tags inside a jstl tag considered bad form? So for example I know the following will work but is it considered bad form to have the script tags inside my jstl tags in my jsp ? <c:choose> <c:when test="${!empty bean.value}"> <p>Its not empty</p> </c:when> <c:otherwise> **<script> callJSSomeFunction(); ...

Cant open a doc file from the browser

I have a link using tag and it is linked to a .doc file in the server. When I click on the link, instead of giving the open, save box, it opens the file in the browser in the binary format. Has anyone encountered this problem? I am using a Weblogic server. ...

Converting jsp files to Django templates?

Hi, This is related to this question: how-can-i-port-a-legacy-java-j2ee-website-to-a-modern-scripting-language but with a narrower focus. We're pretty much rewriting our legacy Java app from the ground up for a variety of reasons, but attempting to keep the user interface pretty much the same. In one of the answers, someone said: ...

Compile and interpret JSP with Java only

I would like to compile and interpret JSP in Java, out of Tomcat or any other servlet container. I think I may use the Jasper libraries coming with Tomcat, but I can't find any example of how to do it on the Web. The minimum I need is a function that returns an String (HTML resulting text) from a compiled JSP and a HttpServletRequest, ...

Hooking into Display Tag pagination events

Does the Display tag JSP tag provide a way to hook into pagination events, so that you can execute your own code when the user pages the data? I couldn't work out how to do it from the docs. Thanks in advance. ...

Weblogic 9.2.2 JSP compile error custom function in taglib with Generics

Weblogic 9.2.2 throws a compile error when my custom function uses Java 1.5 generics. Let me explain. My JSP contains the following taglib: <%@ taglib prefix="validPre" uri="aValidURI"%> My tld contains a single custom function: <function> <name>contains</name> <function-class>SessionServiceImpl</function-class> <functi...

What is the simplest way to display httpServletResponse.sendError(403, "My Message") status from JSTL

I have a servlet which does some error checking and if something is wrong I will typically do this: response.sendError(403, "My message") return; I don't want to throw an exception from the servlet - because I would like to conform with HTTP status codes. In the web.xml I have configured the following: <error-page> <er...

Java web development environment to minimize build-deploy-test cycle time?

What Java web development environment is the best for absolutely minimizing the build-deploy-test cycle time? Web development environment: JBOSS, Tomcat, Jetty? Deploy WAR exploded? Copy WAR or use symbolic links? There are factors here I don't know about. Build-deploy-test cycle? The amount of time it takes to test a change in the bro...

Context based search in JSP

I have a strange issue with the <Select><option/></select> tag.I don't write any code to enable context search(ie. if I type A it will list all possible combinations with A like AA,Aa,Ab,AB,Ac,AC and so on(not in the same order)).Similarly if I type Ab it should list all combinations starting with Ab which it does but the problem is you...

Background image in .jsp with css

I have my .jsp file and when I put background image in some of the tags it doesn't appear there. I put images in .jsp with css: background:#233C9B url("design/header.gif"); folder structure is: css: -->file.css -->design: -->header.gif if I rename .jsp in .html the picture appears in browser but when I start it with...

Is it hard to convert a web app built with Jsp, Servlets & mySQL to one with Spring & Hibernate?

I'm currently working on building a java web app. I've been looking to use Spring and Hibernate so I get some proper exposure to them, but I'm just getting burned out reading and learning about them. If I go ahead and build it with JSP and Servlets on a MySQL back end, what kind of levels of code reuse would I be looking at? I imagine th...

Simple tag not able to intrepret session scope attribute

Hi, I'm trying to display an attribute value of ArrayList from JSP set in session scope in servlet as: hs.setAttribute("Attr",arr); //where hs is reference to HttpSession and arr is of type of ArrayList But when I invoked simple tag with the EL expression as optionList attribute value of advice tag in JSP as: <%@ taglib prefix="c" ...

CSS rule cleanup tool

We have several massive CSS files that just kept growing over the years whenever new elements were added to our system as well as JSP pages (which further include other JSP pages and so on) that reference these files. We know that we have many rules that are no longer used and many that are redundant. New tools just keep coming out. ...