jsp

How to Create JSON Array

How to create something like this using jsp or java : { "Maths" : [ { "Name" : "Amit", // First element "Marks" : 67, "age" : 23 }, { "Name" : "Sandeep", // Second element "Marks" : 65, "age" : 21 } ], "Science" : [ ...

JSON Array Question

How to use jsp to get json resulting in folowing format ? { "firstName": "John", "lastName": "Smith", "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": 10021 }, "phoneNumbers": [ "212 732-1234", "646 123-4...

Cannot get Chinese characters correctly with ResetSet.getString

My project requires me to write a web application with JSP to communicate with Oracle 10g R2 The JSP/Javascript/HTML is held in OC4J 9i and the database is created with characterset as UTF-8. The interface between JSP and Oracle is based on JDBC Thin driver I tried to type in some Chinese characters on JSP page, then save to Oracle. In...

Syntax Highlight in structured text editor (JSP) in Eclipse

Hello guys, Is there a way to edit my color options for syntax highlighting in structured text editor in Eclipse like I can do for Java Source Code? The maximum I could do was change the font... Thanks for any help! ...

JSP works fine at localhost, but throws org.apache.jasper.JasperException on Debian server

When I run a WAR file on Debian, it throws org.apache.jasper.JasperException. The same WAR file runs fine on localhost. The server on both places is the same: Tomcat 5.5. Here is the stacktrace: org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWr...

[Eclipse] - Inserting Spaces Instead of Tabs in ALL Files

Our unit testing setup makes sure you use spaces instead of tabs in all files, including .jsp and jspx. I have set this option for the general editor but the jsp editor does not recognize/see this option and still continues to use tabs instead of spaces. Is there a way to force the jsp editor to insert spaces instead of tabs? :) ...

Access control for binary files with Java.

Hi All. This is the situation: We have some binary files (PDFs, PPTs, ZIPz, etc.) stored in a server different from where our application is. We need to make them available for the users in our app. But files have extremely sensitive information that can not be read by anyone else but the user that has access to them which means that w...

Graphic representation of instances in RDF (on website)

With Protege I made an ontology that has some classes and instances. Class "Knowledge" has a property "hasSubKnowledge" which domain and range are both of type "Knowledge". I have around 200 individuals of type "Knowledge". I made a JSP and my job is to somehow graphically represent my "Knowledge" tree (RDF). Is it possible that ontolog...

opensource java video/photo gallery web application

any recommendation of video/photo gallery java web application open source project? (something like youtube,picasa..) ? ...

javax.imageio.IIOException: Can't create output stream! (in java)

Dear all, i am getting following exception in this code, please do help me , javax.imageio.IIOException: Can't create output stream! de.laures.cewolf.ChartRenderingException: Can't create output stream! javax.servlet.jsp.JspException: Can't create output stream! at de.laures.cewolf.taglib.tags.ChartMapTag.doStartTag(ChartMapTag.j...

JSP: execution non-English chars in mysql query

I wrote a JSP code that needs to run some mysql INSERT queries that contains non-English chars (Persian). I run two types of queries first one is static application installation queries and second one is user inputs. After execution of both of queries non-English chars are imported as "?" as I check them in application itself and phpMyAd...

How to make Eclipse to format JSP code properly?

I use code formatting command (Ctrl + Shift + F) a lot in Eclipse IDE. While this works pretty well for Java / CSS source codes, the JSP formatting is just sucks. Is there any plug-in available to make the JSP formatting better in Eclipse IDE? By formatting I mean proper indenting of JSP/HTML tags. ...

jsp compile exception after endorsing jars

I am using opensaml 2.2.3 - Therefore I have to endorse the following jars: resolver-2.9.1.jar serializer-2.9.1.jar xalan-2.7.1.jar xercesImpl-2.9.1.jar xml-apis-2.9.1.jar This causes an error during jsp compilation in my web application: logon.jsp:26:20: Error in example.jsp" at line 83: No tag library could be found with this URI....

How to avoid jsession id being appended to url ?

We have a Spring , JSF application at Skill-Guru Problem: User opens the site by visiting through a url or directly typing www.skill-guru.com in url. Now when the user clicks on any link first time, a jsession id is appended to the url. for eg http://www.skill-guru.com/test/62/pmp-certification-practice-test;jsessionid=3FBFDD1C6C8A9A2...

JSTL fmt library throws 500 error, requires sessions enabled?

I'm developing a simple servlet/JSP, data-driven web site on Google App Engine. I've started to use the JSTL fmt library on some of my data entry forms and get the following session-related error when using tags <fmt:dateFormat> and <fmt:numberFormat>: [java] java.lang.RuntimeException: Session support is not enabled in appengine-web.xm...

Jasper Reports in JSP page

How to display jasper reports in JSP page? I am using iReport1.3.3 tool to create reports. I am struggling to display jasper report in JSP page. Is it possible to pass ArrayList to jasper reports? I need to display the report in PDF and EXcel format. ...

How can i get session id in java

Hello All! I want to build an api in java to solve the security image problem occurred while moving one page to another page in any website. How can i get the session id and cookies so that i can post it with the security image string. Thanks ...

How can I returns to a JSP with multiple forms with ActionErrors?

I have a JSP with multiple forms as the "edit" view of an object. Now I want to send one of the forms, but there is an error in the validate method, because one of the input fields was not filled. When the bean is validate and the error is found, Struts returns to the JSP which is defined as the INPUT for the bean in my struts-config.xm...

How do I perform bitwise logic within JSTL if statements?

I have a need to perform a bitwise test within a JSP but can't for the life of me figure out how to do it with EL. I want to do something like: <c:if test="${(test & testFor) == testFor}"> <h3>Test Passed</h3> </c:if> Of course I can do it with ordinary JSP syntax: <% if ((test & testFor) == testFor) { %> <h3>Test Passed</h3> <%...

How to bind ENUM to radiobutton ?

Type is enum property in object. jsp: <form:radiobutton path="type" value="Male" /> java: public enum TestType { Male, Female; } and got error Unable to convert value 'Male' from type 'java.lang.String' to type 'java.lang.Enum'; reason = 'java.lang.Enum is not an enum type' ...