jsp

Disable JSP extension processing

I have a JavaEE 1.4 web application running on WebSphere Application Server 6.0. In web.xml, there is a servlet configured to intercept all server requests: <servlet-mapping> <servlet-name>name</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> This works fine until I try to request something ending with *.jsp. In this ...

Strip Images, CSS and JS from servlet-mapping

I am using the following servlet-mapping in my web.xml file: <servlet> <servlet-name>PostController</servlet-name> <servlet-class>com.webcodei.controller.PostController</servlet-class> </servlet> <servlet-mapping> <servlet-name>PostController</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> To do some ki...

Have you ever noticed some JSP incompatibilities with WebSphere ?

When we write in a Javascript expression : expression < <%=variableJsp%> the double "<" seems to be a problem and the JSP is not interpreted ? Is it a fault of the other servers that should not accept this type of expression ? Or WebSphere that bugs ? ...

Using Regular Expressions in JSP EL

In EL expressions, used in a jsp page, strings are taken literally. For example, in the following code snippet <c:when test="${myvar == 'prefix.*'}"> test does not evaluate to true if the value of myvar is 'prefixxxxx.' Does anyone know if there is a way to have the string interpreted as a regex instead? Does EL have something sim...

Concatenate strings in JSP EL?

I have a List of beans, each of which has a property which itself is a List of email addresses. <c:forEach items="${upcomingSchedule}" var="conf"> <div class='scheduled' title="${conf.subject}" id="scheduled<c:out value="${conf.id}"/>"> ... </div> </c:forEach> This renders one <div> per bean in the List. For the sublist, ...

example of using ServletUnit to test JSP's

Can anyone point me to an example of how to use ServletUnit to test JSP's? Do I need I need to call registerServlet()? If so, what class name do I pass? ...

Using a jsp bean in a session.

I am using a JSP bean and when I do an assignment to a new object, it gets over-written on a submit to the previous object. <jsp:useBean id="base" class="com.example.StandardBase" scope="session" /> ... //base object id = 396 base = new Base() //base object id = 1000 and on a resubmit of the page I get <jsp:useBean id="base" class="...

Structure JSP/Java code where logic is not in the JSP file

This is a design question and good practice question. How do you structure your Java web development such that a lot of logic is not in the JSP file. Should you use any of the JSP tags for if structures or loops. I see a lot of code where the logic is hard to follow because of poorly designed JSP files. And then when you want to outp...

java servlets

how to write contents of a text area to a file in servlets?? ...

Editable Word Document from JSP

Is there a way to create a link in a JSP page to a Microsoft Word document that you can edit and have it post back automatically to the server? I'm using Websphere Portal. Thank you! ...

displaytag table column totals

Hi, I'm using the displaytag JSP tag library to generate tables that show column totals. For example in the JSP code below, only those columns with the attribute total="true" will have totals generated. <display:table name="myTable" id="myTable" decorator="org.displaytag.decorator.TotalTableDecorator"> <display:column property="na...

Action and Jsp to get the iterator and display it..

This is my action class public Iterator<CgConsultant> getSearchresult() { List<CgConsultant> list =userSearch.getConsultantMatches(searchstring); System.out.println("The size of the resutl list:"+list.size()); Iterator<CgConsultant> iterator = list.iterator(); CgConsultant obj; while(iterator.hasNext()){ ...

What is a good Jsp IDE

I'm a c# developer but have a job that involves some jsp code. I've been using notepad++ which does a great job in highlighting but I'm missing the intellisense and find it difficult to find the methods I need. What is a good jsp IDE for someone coming for C# that has intellisense? Update I tried eclipse and idea but both interfaces ...

What would be the simplest way to deal with a text file using JSP?

First and foremost I should acknowledge that I have no experience at all using Java ServerPages, but I'm positive about achieving this task if you guys help me out a bit since it doesn't seem like something difficult for a seasoned JSP programmer. Anyway the thing is, there's an actual running JSP application within a *NIX box which I s...

What is the Best method to http transfer a file from the client to a server, in Java 1.5?

What is the Best method to http transfer a file from the client to a server, in Java 1.5? ...

countdown timer in JSP/Servlets

Hi, I am developing an online examination using servlets/jsp.I need to add a count down (hh/mm/ss) timer to the questions page that would end the exam and redirects to results page. I am done with all the other functionalities except the timer one. Can someone provide some help on this. Thanks ...

How to programatically encrypt/decrypt plain text credentials in JSP?

As as part of my daily routine, I have the misfortune of administering an ancient, once "just internal" JSP web application that relies on the following authentication schema: ... // Validate the user name and password. if ((user != null) && (password != null) && ( (user.equals("brianmay") && password.equals("queen")) || (user....

Not geting the object in the jsp send from the struts action class

Hello can anybody solve this please m creating the object in the action class public CgUsers getUserdetail(){ CgUsers user = userManager.getUser(id); return user; } And m trying using that object in the jsp page c:forEach items="${Userdetail}" var="user"> <ul> <li><c:out value="${user.getLastName()}"/...

displaytag: suppress zeros in HTML table

Hi, I have a HTML table that's generated in a JSP by the displaytag tag library. I would like to suppress any zeros that appear in the table, i.e. they should be replaced by a blank cell. Is there any straightforward way to achieve this? Cheers, Don ...

Are spaces allowed in the name attribute of a Struts logic:equal tag?

I came across the following markup in a JSP file in a legacy app I maintain: <logic:equal name="welcome memberInfoView" property="hasFoo" value="false"> That name attribute looks very wrong to me. Based on what I've read in the Struts docs, that space isn't allowed. Is this legal? If so, what would it be doing? If not, what might the...