jsp

J2EE taglibs and optional packages

I have deployed an optional package as a jar file in Weblogic 9.2 (servlet 2.4, jsp 2.0). In my war file, I specify the jar as an optional package in the MANIFEST.MF. I am able to use a filter and servlet class from the jar file, but I'm not able to find a taglib from my jsp. I'm getting the No tag library could be found with this UR...

WAMP equivalent for JSP

I already have WAMP server installed in my system which makes life much easier :-). So can anyone tell me what is the WAMP server equivalent for JSP? ...

[Struts 2] Problem setting back indexed properties from JSP to action class.

Hi, We are working with struts 2.0.14 and facing problem setting back indexed properties from JSP to action class. Code looks similar to this. public class MyExample extends ActionSupport { private List<Person> persons; private List<String> names; public String execute() ...

Problem regarding calculation in JSP

The problem with this code is I'm getting the popularity of an author as 0% (I mean zero percent if the number of borrowed books is 14 and the total number of books borrowed of the selected author is 3 - it should be 21.42%). Why is this happening? All result are correct except the last one: Author is 0 % popular (for above given data...

Refactoring JSP pages

hi i want to take out the common content in the 2 FACES JSPS and put in one jsp and include two tabs in that FACESJSP and those two tabs will show the differet content any help with sample code pls? ...

Why does Spring MVC appends a "1" to the path to generate id of form:checkbox ?

If I have a checkbox like this in my jsp: <form:checkbox path="agreeToLegalAgreements" /> It results in: <input id="agreeToLegalAgreements1" name="agreeToLegalAgreements" type="checkbox" value="true"/><input type="hidden" name="_agreeToLegalAgreements" value="on"/> Why is a "1" being appended to the id ? The reason I ask is because I h...

Why WebSphere 6.1 (JDK 1.5 Compliant) compiles my JSPs as JDK 1.4?

Our web application is JDK 1.5 compliant, and is running succesfuly on WebSphere 6.1 However, some JSPs we have that contain Java code in 1.5 syntax fail to compile by WebSphere. It seems that for some reason, WebSphere treats the JSPs as 1.4 complient and fails to compile. Any idea why and how to solve this? (Stop writing Java in JSP...

Include all files under a folder

i have a folder of javascript files, is it possible to include all of the files under that folder automatically? something like <jsp:include-all parentFolder='/javascript' extension='.js' /> OK to make it clear i have an ajax application, with lots of js fragments, but i want to aggregate all of them into one big js file so to spee...

How to save content of a page call into a file in jsp/java?

Hi There, In jsp/java how can you call a page that outputs a xml file as a result and save its result (xml type) into a xml file on server. Both files (the file that produces the xml and the file that we want to save/overwrite) live on the same server. Basically I want to update my test.xml every now and then by calling generate.jsp th...

j2ee application in tomcat

Hi, I've developed a j2ee application, now say sample.war is the file. When we port this to tomat webapps, it explodes to sample folder. But if we want to run this application for two people, how do we do that? some thing like http://address.com/user1/ and http://address.com/user2/ and in this we have different CSS (only the look varies...

struts 2 if : compare enum

Hello all, I have a Struts 2 jsp with the following code... <s:iterator value="categories" id="category" status="iteratorStatus"> <s:if test='#category == "M" '> snip </s:if> The problem is the java code behind categories is.. private static final CategoryEnum[] PRIVATE_VALUES = {A,B,C,M }; public static final List<Catego...

Exception Handling in Jsp

Hi, How will you handle the exception without sending to error page? How will you set a message detail to the exception object?(Not using any JSTL Tags) Thanks, Ravi ...

JSP deploy problem in jboss

I have Jboss 4.0.4GA setup in Linux. after I start my jboss without problem, I tried to access JSP page in browser, got error: The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. A name was started with an inva...

Trying to update the file in src/web/prod folder (jsp)

Hi, I am using jboss, eclipse and svn together. I have to files in my test folder: test/create.jsp and test/data.txt . What I want to do is when I call my create.jsp it will update my data.txt . Obviously I want my data.txt to stay where it is as other scripts are tryong to read from it. I have tried dozens of new ways to put the path ...

requestDispatcher Interface Vs sendRedirect

Hi, Can I know the difference between the RequestDispatcher interface and sendRedirect(). Thanks Ravi ...

How to import .class file in jsp page which is not in standard library?

I would like to read excel file in java. For that no classes are provided by java standard library. I have downloaded required classes but I am not able to import them. One solution is jsp:usebean but they are near about 300-400 classes so I can't use usebean. Please suggest another solution. ...

How to force a JSP to send the page in ISO-8859-1?

I wanted to send a page in ISO-8859-1 instead of UTF-8. The page is built with a JSP and some content retrieved by a CMS. I tried to put this in the JSP, but the navigator stills performs the page in UTF-8. grid.jsp: <%@page contentType="text/html; charset=iso-8859-1" pageEncoding="iso-8859-1"%> <html> <head> ...

File not found when browsing

I have one problem that is to upload file. It is working perfectly on my computer but fails when deploying to a server. The system is to browse the file, then the system will zip it before uploading it to the server. When a client browse a file, the server will generate an error that the file is not found. Here is my code: try { ...

how to call jasper report on jsp page

When I call the jrxml file through .load(), its throw a exception FileNotfoundException. I have tried with absolute path, but it does not work. Please help. ...

Is there a way to Show/Hide elements without CSS?

Hello All, I am making one Web UI 508 compliant and one requirement states "working with Web UI when CSS is disabled". We have several places where we show/hide elements using style=display:inline and style=display:none and calling them accordingly using JS function calls. When i disable the CSS (using WAT2.0), the hidden elements are a...