jsp

Show Images with name containing special characters

Hi, I am trying to display some images containing special characters like ☻ ☺ ♥ or Chinese or Arabic characters in their names using jsp...but the images are not getting displayed !! <img src = "pipo².jpg" /> <img src = "pip☺☻♥o².jpg" /> What am I doing wrong !! ...

Can a Tomcat web app programmatically change the jsp servlet's "development=true" parameter?

I am referring to the following parameter of Tomcat's web.xml file: <servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> . . . <init-param> <param-name>development</param-name> <param-value>true</param-value> </init-param> . . . ...

JSP - Diplaying images with src "num%C2%B2.jpg"

Hi, I created a static jsp page with an image whose src is set to num%C2%B2.jpg (actual name of the image is num².jpg ) But apache is not able to locate the image.. I googled for a sample application and found an image gallery- https://jgallery.dev.java.net/ but even this application breaks for num².jpg what could be the problem? ...

How can Hulu.com keep track of your position in a tv show?

I'm watching a tv show on Hulu.com (which is btw, the absolute best streaming-video site around) and whether I close my browser, disconnect from the internet, and even if I restart my computer in the middle of watching a show, the next time I go to their site, I can resume the tv from exactly the time where I left off in the show. My qu...

help with struts2 form & combobox

hi, i have a combobox in a form and when i click submit i get this error. HTTP ERROR: 404 No result defined for action MyAction and result input in the action i tried to return INPUT instead of SUCCESS but still doesnt work. any ideas what can be wrong? thanks. ...

JSP Tutorial for ASP.Net Developer

I am an ASP.Net developer looking to expand my dope skillz to the wonderful world of Java. Strangely, there seem to be a ton of "ASP.Net for the JSP Developer" tutorials, but very few (no?) "JSP for the ASP.Net Developer" tutorials. Just simple things like the difference between the file structures and layout, what webserver to use and h...

JSP socket only sending string once

Hello everyone and thanks in advance. This is a last ditch effort to figure out what the problem is or find a better solution. I am using JSP filter to filter web access to a tomcat web server. I have a client, a server and the filter. The client and the filter open up sockets the the server receives them. I heard that opening up a ...

How to communicate between a JSP filter and a JAVA program

Is there any way to send a string to a JAVA program from a JSP filter? I tried sockets; didn't work. I tried external files; didn't work. So, I'm kind of at a Witt's end here on the subject. ...

Problem with Session Scope while using with Java Bean

FIRST.JSP <jsp:useBean id="Bean" scope="session" class="Bean.Student_Enrollment_Bean" /> <jsp:setProperty name="Bean" property="*"/> <tr> <td >Student First Name</td> <td> <% if( (Bean.getStudent_first_name()==null) || (Bean.getStudent_first_name().trim().length()==0) || Bean.getStudent_first_name().equals("null")) { %> ...

Method calls in EL

Hi there, When I write Java webapps, I usually use JSTL tags. I think that these tags are great, except for one thing that pisses me off: while the expression language allow you to access bean properties, it does not allow you to call its methods. In release 1.0, it was not even possible to obtain the length of a string or the number o...

Custom rendering in JSP based on type of class without instanceof

How would you properly render a list of objects in jsp with differing types? Say, for example, I have to render these different objects in a specified order. One way could be to use a common type variable or instanceof but that means having a big switch/if statement to manage them all: <c:forEach var="o" items="${bigListofObjects}" >...

Use of ajax to call JMS

Hi I have the followig code: page1.jsp The ajax function called on click of button function ajaxFunction() { var xmlHttp; xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { alert("Data loaded"); } } xmlHttp.open("GET","page2.jsp",true); xmlHttp....

JSP Tag files: checking for nesting

I am writing some nested custom tags using JSP. I understand there are two ways to do this: 1) to write tag handler that extends BodyTagSupport, 2) to write a tag file. In the 1st method, code is ugly. And I couldn't find a way to incorporate current struts tags.If I write the following using a JspWriter, I get this string in final HTM...

Use GZIP, JSON responses and JQuery

However, I want to compress my responses with GZIP wheren possible. I tried using the Compression filter code available for free download in the headfirst site. It works great for html, images, css and javascript. I post the filter next. It checks if GZIP is an accepted encoding and it adds gzip as Content-Encoding. See: wrappedResp.se...

JSP - Quiz

I am developing a Quiz module. I have stored all the questions,its options and other details in a array of vectors. I want to display the first question to the user and when he submits it only then the second question should be displayed on the page...and so on... ie on the click of submit an event should occur such that the counter get...

Avoiding IllegalStateException in Java/Servlet web stack

I don't know, but I feel that IllegalStateException is causing undo headache. If I have a request say a JSP or some other servlet and need to associate a filter with that request. I can't do any other modifications to the output to the client if the response has already been committed? For example, I see in JSP code that sets the mime...

How to do a OR in a c:if statement in jsp.

How do I properly declare a or statement i try this without success: <c:forEach var="route" items="${map.street}"> <c:if test="${route.value.type == 'road' || route.value.type == 'street'}"> ...

How do you get glassfish to show debug information for JSPs?

I'm switching from Tomcat to Glassfish for an app server. Glassfish is so much more complicated its a little overwhelming. Anyway now I'm getting an exception: java.lang.NullPointerException at org.apache.jsp.jsps.login_jsp._jspService(login_jsp.java from :67) Where tomcat shows you the line number and gives me some information on ...

How to show a group of 3 elements of a collection using JSTL in JSP?

I have a list of n elements that I want to output in a group of 3. The size of the collection can vary a lot, but the output must be grouped in 3. <ul> <li> <div>element 1</div> <div>element 2</div> <div>element 3</div> </li> <li> <div>element 4</div> <div>element 5</div> <div>element 6</div...

JSTL forEach reverse order

Using JSTL's forEach tag, is it possible to iterate in reverse order? ...