jsp

Ternary Operator in JSP EL fails

Is nesting of EL Expressions in Ternary Operator allowed? What is wrong with the following expression? <input class="text_field" type="text" name="receivedBy" id="receivedBy" style="width:250px;" maxlength="64" value="${empty obj.val ? obj1.attr1.val ' ' obj2.attr1.val: obj3.val"}/> ...

Is there an option in eclipse like "view servlet" in netbeans for jsp files?

If you work in netbeans you pretty much know the context menu entry "view servlet" on an jsp file. What it does is show you the generated servlet java code from the jsp. Is there something similar in eclipse? ...

i18n : Umlaut not being displayed correctly in JSP

Hi All, I have a JSP that is supposed to display some German text from some .properties files by using fmt:message, e.g. The corresponding entry in the .properties file is: service.test.hware.test = Hardware prüfen (umlaut between r and f in 2nd word). On internet explorer this displays as: Hardware prüfen the umlaut being corr...

How to put a .jsp file on tomcat in Linux terminal?

Hi, everyone, I want to ask a question about the tomcat and the Linux terminal. I have a jsp file and a tomcat server. After I use the terminal to login in my Linux computer, I want to put the file to the tomcat server. However, I don't know the cmd of this action. Does anyone can help me? P.S can also provide some basic cmd for the Li...

Garbage collection of pagecontext attributes java

Consider, pageContext.setAttribute("name", new String("Shal")); String name1= new String("Jason"); pageContext.setAttribute("Alternate Name", name1)); how the memory is allocated for the above two attributes,how and when that memory allocated will be recovered. What is the best practice to follow ...

deployment time of "ear" annoying using jboss,ant, jsp's and prehistoric pc

I am developing a web based java app, running on jboss and sql server. I seem to find myself spending an inordinate amount of time recompiling/deploying just to tweak the interface in jquery/javascript/css/html. Any tips for reducing the turnaround ? Its deployed to an ear file, so I can not alter the jsps/javascript after deployme...

Vector in JSP page

How I can iterate a vector in a JSP page? I have done it: <% Vector value = (Vector) request.getAttribute("status"); for (Enumeration e = value.elements(); e.hasMoreElements(); ) { StatusItem myStatus = (StatusItem) e.nextElement(); } %> Is there any way to do it with jsp tags? Thx ...

How to pre-compile jsp tag files?

http://download.oracle.com/javaee/1.4/tutorial/doc/JSPTags6.html says: Tag files can also be compiled into Java classes and bundled as a tag library. This is useful when you wish to distribute a binary version of the tag library without the original source. If you choose this form of packaging, you must use a tool that ...

accessing the .java file from .jsp file in Eclipse

in eclipse IDE how can i access a java class from .jsp exactly like accessing a servlet from a jsp file ? in other word, what should i replace with question marks "????????" <form name="myForm" action="???????????????" method="post"> </form> when i run engine.java file from "mypackage" package tomcat application servers shows this add...

Struts Nested Tag with Dynamic Parameters

I have a legacy Struts 1 application which uses the nested tag. Can I inject a dynamic parameter into the nested tag? For example, <nested:select disabled="<c:out value='${requestScope.disableSelectBox}' />" /> I also tried doing: <nested:select disabled="${requestScope.disableSelectBox}" /> In both of the above examples, the disab...

Glassfish 2.1.1 - Session Beans repeatedly call init() and destroy()

I have a Web Application that I'm trying to move from Sun Application Server V9 to Glassfish V2.1.1 I'm using Netbeans 6.0.1 to develop the App, and it's using JSP, SessionBeans and JDBC to connect to MySQL. I've made good progress and can compile and deploy the App. to Glassfish OK. The App starts and I takes me to my login page, wher...

How to use the JSTL "if" tag without getting "..attribute test does not accept any expressions"

Hi, I've been googling around for quite some time now and I've decided to ask this here, how would I make the following code work? <c:if test="${null != searchResults}" > <c:forEach items="${searchResults}" var="result" varStatus="status"> I've tried many different variations of this, such as: <c:if test="${search...

JSP not detecting the javascript file

From a servlet, I'm forwarding the request to a JSP page which renders a FusionChart. But I've a problem in loading the chart. The JSP file is not detecting the JavaScript file. The folder structure is: axis | WebContent | WEB-INF | classes |_ com |_FusionCharts.js |_MyChartJsp.jsp...

Populate JSP Form

How to populate a form when JSP is called first time ? I need to process an XML file when a page is refreshed & populate the form in the JSP page?(not using frameworks) ...

Access request object in JavaScript

I have a form in jsp. I have to populate it based on the request object (from the servlet). How do i use Java Script for accessing request object attributes or if you can suggest me any other better way to populate form dynamically? ...

How can I create a Java web application which looks the same as my desktop?

I want create a web application which looks similar as my Windows 7 desktop. I am using JSP and JSF. I wonder how I could create a start button and gadgets. Can anyone give me some hints? ...

Extending JSP Custom Tags

How do you extend an existing JSP custom tag? As you know, a custom tag consists of two parts, an implementation class and a TLD file. I can extend the parent custom tag's class, but how do you "extend" its TLD file? One obvious solution is to cut and paste it and then add my stuff, but I wonder if there's a more elegant solution like t...

Tomcat still does not show directory list even if I enabled it in conf/web.xml

So I already set listings to true and tomcat still does not show my directory. I also restarted the server numerous times but still same effect. ...

How do you spell check JSP files in your application ?

I need to run spell check on jsps in our enterprise apps. I want the spell checker to ignore the html/css/javscript/jsp/java keywords and check on regular english labels. Is there an API or perl/unix script way of doing this ? I dont want to open each jsp in ms-word to do that check. ...

Showing Suggestions below text field taking values from database.

I am having a form. I want to show user suggestions about the name of the security he can enter. For the same I want to use the values of securities that I have installed in my Oracle Database. I want to do something like this, if user enters a, he should get all security names below the text field which starts from a, when user selects...