jsp

Is JSP good for building web sites?

Can someone tell me please does JSP display good performance when building a website with it? Can it be as fast as PHP? The reason I am asking is because I see these days everybody is building their front ends with PHP or ASP.NET. Since I am a Java developer I really want to be able to build the application in Java as the backend and ...

JSP.13.8 Example Simple Tag Handler Scenario doesn't work?

This test was prompted by reading a question on the Sun java forums and thought I would try it out. The JSP2.0 specification section JSP.13.8 contains an "Example Simple Tag Handler Scenario". I copy and pasted the code fragments and attempted to run it. Environment: Apache Tomcat version 5.5.26 and 6.0.14 (tested on both) Java: 1.5 ...

Problem with JSP servlet and Ajax

I have a JSP with a Javascript tree control and I want the user to be able to hide or show this tree at the touch of a button and for this change of state to be carried through to other pages visited, i.e. if on page A, the user hides the tree, then on page B, the tree should remain hidden and so on until the user decides to show the tre...

Any fast way to convert a scriptlet-infected JSP app into Struts?

We've got a legacy app to support. It's pure JSP, i.e. JSP opens connections, does business logic, submits forms (usually to the same JSP), and so on. It's 400+ pages, with some pages are as large as 100K. The app is expected to be extended and modified over the next few years, so we're looking into ways to split presentation and busine...

Traditional HTML/CSS/JS + PHP vs. Flex + Java Servlets -- a little more than that

So the situation is a bit complicated. There was one graduate student who was developing this web application by himself using Flex and JSP. He moved on with his career and took a job somewhere else. He still has access to the application and frequently maintains it. Along with couple other students and I took over the project the grad ...

sendRedirect or request Dispatch is more efficient?

SendRedirect or requestdispatch ?Which should be more preferred?Which is more efficient? ...

Using JSP code in JavaScript

I want to use JSTL's fmt tag in javascript to localize my alert messages. My javascript file is a standalone file and when I include fmt tag in js file browser gives javascript errors, is it possible to treat .js file as .jsp file using web.xml configuration? Can anyone please suggest me how can I do that? ...

Displaying time in JSP page.

This was my line in demo.jsp demo Hello there!!! The time is <%= new java.util.Date()%> which when i opened in firefox doesn't show the time. instead displays the same line: "The time is <%= new java.util.Date()%>" ...

Quickly output Session ID within a .JSP?

I would like to quickly output the current session id on a .jsp page for debugging purposes. Is this possible? Does anyone have a JSP snippet that does this? Thanks very much! Edit: I found what I was looking for: <c:out value="${pageContext.session.id}"/> ...

Call PHP code from JSP Page

I am trying to call a piece of PHP code from my JSP Page. How do I do that? I normally use servlets but I need this PHP code for creating a particular report since it sorts the table fields dynamically which I am unable to do with my servlet. Please help! ...

How can I change my context root in WebWork?

I am currently working on a huge web application consisting of JSPs. Also i use WebWork framework. Until now the context root of my application was "/". Now I want to change that to "nstat". How should I handle the relative and absolute calls from my JSPs? ...

How to get value from struts bean?

I am new to struts. I'm just trying to build a simple application that gets the input from the user and display it. For which I got the input from the user and stored it in a bean and I have also displayed it in the next page using bean:write but how to place it in a text box. I tried to use html:text but I don't know how to place the v...

How to Host mail using java api ????

Hi, i want to host mail on my machine.So i can able to send and received mails through my machines. is there any api in java to do the same.. thanx ...

How to send the SQL query results to a jsp page?

I have a database with the fields id(number), name(string), address(string). I wrote a java program EmployeeDAO to execute the query. I'm storing it in a ResultSet object "rs". I need to display this result set as a table in a JSP page. How do i send this "rs" to the JSP page? some help? public class EmployeeDAO { public _ list() thro...

Capture JSP output, save to file

I'm tasked with trying creating a site which will create custom HTML templates. The customizations are based-up customized upon user input. I'm currently using tomcat / JSP for the rest of the front end. What I want to do is create the HTML templates in JSP to output conditional HTML code, but instead of display this HTML output to th...

Browser asking to save JSPs

I've worked with JBoss and WebLogic before, but at my current job, we're using OC4J, which is a first for me. I think that my problem might be related to that. I'm creating an EAR file that has one WAR file inside it. The top level JSPs seems to display correctly, but when I try to display a JSP in a subdirectory, like secure/index.do or...

Servlets and JSP video tutorials

Are there video tutorials for Servlets and JSPs with the same caliber as asp.net and windowsclient.net Learn section? ...

How to enable debug_mode for a JSP page

when you hit a serious compilation error while writing JSP pages and running under Oracle OC4J or Application Server, you can end up with the following displayed on screen: 500 Internal Server Error OracleJSP: An error occurred. Consult your application/system administrator for support. Programmers should consider setting the...

Download and change the extension of a file generated with JSP

I am generating a csv (comma separated value) file with Java Server Pages (JSP). The URL shows "my_generated_csv.jsp". What I want to do is simple: The user clicks "Generate" which downloads the generated CSV file. I'd like to generate it with the JSP. Do I need to rethink my approach? Edit: The following code works to make the file d...

Showing a Splash Screen during script execution

Hi, I want to know how to show a splash screen (like a gif or jpeg file) on the user screen during my script execution. Thank you for your help. ...