jsp

How does Java expression language resolve attributes? (in JSF 1.2)

So we all know that #{someBean.value} will try and get the content of some property on 'someBean' called 'value'. It will look for getValue(). However, what if this property is boolean? It will look for isValue(). What it won't look for is hasValue(). This got me thinking, what exactly does it do? this: http://download.oracle.com/docs/...

ActionContext doesn't populate my variables

Hey Everyone, This one has me really stumped. I'm developing a web app for tomcat 6 and using struts2. I have an action that gets some variables from the ActionContext. The strange thing is that the variables, sometimes, don't get set the first time I try to assign them. The code looks like this... results = (List) ActionContext.getCo...

HTML Custom Input type for schedule

I'm looking for a way to input a 'schedule' for a task from a user of a web app I'm working on, and have it be used on multiple pages in my UI. I was looking for something that would allow me to configure whether was manually triggered, run monthly/weekly/daily/hourly, etc. and then based on the configured frequency show subfields, like...

JSP/Java table issue

I have a table that is populated depending on how many cars are there. If the number of cars is 1 it will give me the 1 row (where 5 attributes are arranged in 5 columns). If the number of cars is 2 it will give me 2 rows(same 5 attributes), & so on. Now I need to split the table into as many cars are there so that there is just one row ...

Equivalent to Struts 1.x "bean:define" tag?

Hi guys, I'm working on converting an old Struts 1.x application to Spring MVC, and in some of the jsp pages the "bean:define" tag is being used to get a string from a resource bundle, and is then used later in the page: <bean:define id="example_title"><fmt:message bundle="${example_Labels}" key="example_field"/></bean:define> then...

Passing customized messages from Servlet to a JSP page?

I am new to JSP and Servlets. What i want to know is the best way to pass some customized message to client web pages. For example suppose i have a web page say student.jsp which has a form,to register a new student to our online application.after successfully inserting all the fields of the form, user submits the form and data is subm...

can we include both a file type and text in a form in sending email using jsp

I'm developing an email program using JSP. In that I need to send data as well as upload file. <form name="email" enctype="multipart/form-data" method="post" action="/servlet/sendmail"> <input type="file" name="namefile" size="40"> <input type="text" size="100" name="sub"> <input type="submit" name="submit" value="send"> </form> ...

Three Column Layout and Spring-MVC

I want to implement ThreeColumnLayout for my web-app. E.g. having NavigationComponent, BookmarkComponent in Left Panel, OnlineUserComponent in Right Panel. There are also some more components, which can be made visual/hidden by User dynamically and User can move components here and there. E.g. from Left Panel to Right Panel and/or chan...

Multiple validators for one field. JSF

Can you apply multiple validators for one field. i.e: <ice:inputText id="tawjihiAvg" maxlength="5" partialSubmit="true" style="left: 0px; top: 144px; position: absolute; width: 144px" title="#{msg.Tawjihi_Average}" value="#{SessionBean1.tawjihiA...

Getting the PDF created using iText as pop up in JSF

Hi. I want create a pdf using iText. The method which does this is a JSF bean. What I want is, on click of a commandButton in JSF page, the PDF is created. It must then open as popup in a new window(or tab) keeping the JSF page unaltered. How can I accomplish this ? I know there is a way in javascript in which we can open a new window us...

form.submit() taking more time when there is large amount data is there to submit

We have a web page which enables the users to compose email and send. The HTML composer we use is FCK Editor. When they compose and say send We validate the email and subject. To avoid the user not to further manipulate the form we hide the whole form and enable another DIV which says "Mail sending...Please wait" We submit the for...

Cannot convert #{ad.userid} of type class java.lang.String to class javax.faces.component.UIComponent

I am getting home page, but when going to a JSP page which has a h:inputText I am getting the following error: root cause javax.servlet.ServletException: javax.servlet.jsp.JspException: org.apache.jasper.el.JspELException: /login.jsp(21,0) '#{ad.userid}' Cannot convert #{ad.userid} of type class java.lang.String to class javax.faces.c...

How to configure Jetty programmatically to execute JSP pages?

I found some hints on Stackoverflow how to enable JSP support in Jetty by editing web.xml. But can this be done programmatically, without any web.xml? (Preferable without writing an own servlet for that) Even REST services support with Jersey can be enabled programmatically in Jetty. I can't beleave that it's so hard for such wide-spre...

Read window.location.hash servlet-side not possible?

Hi, In my web app, a user can click an item in a list, and I modify the url in their browser: <li>Horse</li> <li>Cow</li> <li>Goat</li> function onListItemClicked() { window.location.hash = item.name; } this will change the url in the user's browser to: www.example.com#Horse www.example.com#Cow www.example.com#Goat...

Template engine JTPL how to work on netbeans 6.9

Hi All i'm coding jsp The First Step i coded the template html and css and now i want use template engine , i searching in goole.com and i found JTPL is simple template engine But i don't know how it work in netbeans IDE 6.9 Who can help me? ...

In Linux, where is the default root directory for log4j.appender.R.File?

Hi all, in windows, when I use the following File path, log4j will write the file to C:\eclipse\logs\appLog.log (I am using eclipse as the IDE in windows): log4j.appender.R.File=logs/appLog.log Then when I deploy the jsp to the apache tomcat in a Linux server, where does the log file go? (I try to avoid using absolute path because I w...

Fusion Charts Server side upload

Trying Server-side exporting using fusion charts.. works well with FF. however internet explorer says Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. " Help appreciated in advance... thanks ...

Newline not preserved when reading from Textarea

My java webapp fetches content from a textarea, and e-mails the same. The problem I'm facing is that the newline character in the textarea message is not preserved when reading the same using request.getParameter("message"); Any clues how it can be tackled? TIA. EDIT: The content in the textarea is: abcd abcd CODE: String ...

JSP deny direct access to URL by non-logged in user

I have a login and a user info page which is displayed after login. How can I block user info page from direct access by user? How can I implement that with session? ...

How to display a Struts <html:hidden> field?

I have a JSP with a Struts <html:hidden property="message"> field and I want to display it in the generated HTML to the enduser. ...