Home » Java Technology

Java Server Pages (JSP)

Display Data Records in TableTue, 15 Jul 2008 08:19:00 GMT

How can I use a resultset from a remote connection I get with a bean and display this on a JSP table? I am puting the resultset into an array and can put this into a list but I really need it in a table....

Comments (10) | Promote | Bookmark

Boolean Object in JSTLTue, 15 Jul 2008 09:38:00 GMT

Hello,I am a JSP, JSTL newbie and have really enjoyedthis forum!!My question is I need to evaluate a Boolean object,is there a way to do this?This is what I thought would work and no dice:<c:when test="${item.locked == 'true'}">Thanks in advance for your help!...

Comments (9) | Promote | Bookmark

JSP: DownLoad a fileTue, 15 Jul 2008 09:50:00 GMT

I have to give user a download file option. when he clicks: save dialog box has to opened and save the file at given path.There is a problem with my code: File fil = new File(file_name); long len = fil.length(); int leng = (int)len; byte []fileByte = new byte[leng]; //first read the file on the...

Comments (6) | Promote | Bookmark

Compiling JSP pageTue, 15 Jul 2008 09:19:00 GMT

Hi,How do i compile a jsp page manually through a command line tool...I dont want to use jspc of ant.Is it possible ?Atul...

Comments (5) | Promote | Bookmark

JSTL Tag File Attribute problemTue, 15 Jul 2008 09:43:00 GMT

Hi,I'm using Tomcat 5.0.28 version, JSTL 1.1, JSP 2.0.The problem is that the tag attribute value is not printing in jsp.The below is source of my jsp file - tagfiletest.jsp and this file has been directly placed in application home directory.<html><head><title>JSTL View<...

Comments (3) | Promote | Bookmark

Hashtable's java. lang. NullPointerExceptionMon, 14 Jul 2008 22:03:00 GMT

this is my code,a shopcart bean example;import java.util.*;public class shopCart{private Hashtable hashCart;public void shopCart(){try{hashCart = new Hashtable();System.out.println("initializing...");}catch(Exception ex){System.out.println(ex.toString());}}public void insCartItem(String merchNo,...

Comments (3) | Promote | Bookmark

Oracle CLOB & Java ?Tue, 15 Jul 2008 09:41:00 GMT

Hi,I need your help with a technical issueI would like to execute a query like :select arct_node, artcl_idx,artcl_content_1 from content whereartcl_content_1 like '' %copper %"and where arctl_content_1 is defined as CLOB. And when I excute the previousquery I have the message : incoheren...

Comments (3) | Promote | Bookmark

need help on multipart/form-dataTue, 15 Jul 2008 08:14:00 GMT

Hi,we have an application where JSP's sending a form data to the database.Form data validation is done on Javascript in the client side.Everything is working fine so far.My manager came up with a new requirement to upload and download files through the JSP's to the Oracle Database.In for...

Comments (3) | Promote | Bookmark

MyFaces x:tree(2)Wed, 16 Jul 2008 13:36:00 GMT

Hi FolksHas anyone used the MyFaces x:tree or x:tree2 components at all?I am trying to figure out how to set the action for the nodes of the tree but have not found a way to do it yet - has anyone any idea how this is done?There is no documentation for these tags anywhere Cheers...

Comments (2) | Promote | Bookmark

How to Pick up server name as Browser page TitleMon, 14 Jul 2008 22:00:00 GMT

I would like to know a way to pick the server name ( Test, Dev or Production) and display as a title of the logon screen.Eg:If from Development server : Log-on DevIf from Test server : Log-on TestIf from Production server : Log-onThanks in advance...

Comments (2) | Promote | Bookmark

How export a file from jspTue, 15 Jul 2008 08:36:00 GMT

I need to export file to the client machine. Can someone tell me how to do it?...

Comments (2) | Promote | Bookmark

Displaying alternative text when a tag's body is emptyTue, 15 Jul 2008 09:15:00 GMT

Hi all, I have a custom tag that does a sql query and displays the results. That works fine. However, I woud like to have an alternate message displayed if there is no results. I think this is easy to handle, but I want to use the standard JSP custom tag method, not some crazy scriptlet or some...

Comments (2) | Promote | Bookmark

Pass Object to PageWed, 16 Jul 2008 13:42:00 GMT

Alright all you JSF'ers. The admin piece of my current project has been switched over to JSF. Luckily, I didn't have but a couple of forms built around Struts so the move isn't too bad.I have a page with a dataTable and I have commandLinks for the Email Address. When I click on one o...

Comments (2) | Promote | Bookmark

In JSP : Retrieve data from a hashmapMon, 14 Jul 2008 23:00:00 GMT

Hi, I have a bean in my jsp and one of it's properties is a hashmap of objects. I'd like to go over the hashmap and check whether a particular key exists.Struts is also involved here, but I do not believethat Struts is causing any problems.The key/values are placed in the hashmap as foll...

Comments (2) | Promote | Bookmark

Thread: Problem with servletSat, 09 Feb 2008 08:27:00 GMT

Hi!I can't compile Servlet and I don't know what is wrong ?I got errors:GetMIDIFile.java:0: The method oracle.jdbc2.Array getArray(int) declared ininterface oracle.jdbc.OracleResultSet cannot override the method of the samesignature declared in interface java.sql.ResultSet. They must h...

Comments (2) | Promote | Bookmark

JSF Login SolutionWed, 16 Jul 2008 13:45:00 GMT

What's the best approach to authentication and authorization of the users on JSF?I'm using Struts, so I cannot find the solution, because I was used to set the login object on the session and verify on Action... and with JSF I can't!...

Comments (2) | Promote | Bookmark

Can't strut with struts!Tue, 15 Jul 2008 08:19:00 GMT

Every time I call "ValidateEmployee.do" in my inputContent.jsp it directs me to a blank white page on ie with this URL:http://localhost:8080/begjsp-ch18/validateEmployee.do;jsessionid=32...It should either go to the outputContent.jsp or revert back to inputContent.jsp containing the errors from...

Comments (1) | Promote | Bookmark

Exception Handling in JSPTue, 15 Jul 2008 08:41:00 GMT

Hello all,I have a JSP page which has an associated JSP error page. My JSP uses a Javabean component which throws a NumberFormatException during processing. But somehow this error doesn't showup on the error page!! Instead I get the following error:------Error page AddExpense An error occure...

Comments (1) | Promote | Bookmark

optionsCollection emptyMon, 14 Jul 2008 21:47:00 GMT

Hello, i use Struts 1.1, Eclipse 3.1 and JRE/JDK 1.6. I have this code in my JSP: <html:select name="initForm" property="idman" > <optionsCollection name="initForm" property="manList" /> </html:select>But i get only the empty dropdownlist without any errormessages...initForm is...

Comments (1) | Promote | Bookmark

Resource BundleTue, 15 Jul 2008 09:06:00 GMT

Hi All,I have deployed a web app and 'mypp.properties' file is in myproject/WEB-INF/classes directory.Property file ia part of the jar files and is deplpyed with it.I am getting the error:java.util.MissingResourceException: Can't find bundle for base name myapp.propertiesProperties f...

Comments (1) | Promote | Bookmark

class/function inside JSPTue, 15 Jul 2008 08:32:00 GMT

Is it legal to have a Java class/ function inside a JSP?...

Comments (1) | Promote | Bookmark

delayed forwarding?Tue, 15 Jul 2008 08:31:00 GMT

I want to do a jsp forward, but I want it to act like a browser refresh. The real problem is that I am in xhtml, so I can't use <meta> refreshing like I normally would.Imagine a splash screen effect...that is what I am going for.Tips and thoughts welcomed!...

Comments (1) | Promote | Bookmark

How do I start Tomcat under iMac command shellTue, 15 Jul 2008 08:07:00 GMT

It's linux based when it comes to iMac shell. I installed the Unix(TAR) version of Tomcat in there. How do I run the startup.sh under iMac command prompt. What env variable do I need to setup?...

Comments (1) | Promote | Bookmark

database connection using jstlTue, 15 Jul 2008 08:12:00 GMT

can somebody tell how to connect to a database using jstl...earlier i have done it using tr and catch......

Comments (1) | Promote | Bookmark

removing component from context.Wed, 16 Jul 2008 13:42:00 GMT

I am back with drop down questions.. threadwe are using third party tab component , if i use drop down( <h: selectOneMenu ) inside the tab, im getting this errorcom.sun.faces.context.FacesContextImpl addMessage Adding Message[sourceId=newRegularApp trixMainTabView:startpage:listTransit,summa...

Comments (0) | Promote | Bookmark

JDeveloper Business components JSP problem!Sun, 10 Feb 2008 21:28:00 GMT

Hi all,First of all sorry for my English language (very poor).My question is when I generate Business components JSP Application by JDeveloper 9iis running on JDeveloper(oc4j) without any problems but when I using resin server or tomcat I have this exceptionError Message: ?ApplicationModule? is...

Comments (0) | Promote | Bookmark

jsp:include causes StringIndex OutOfBoundsExceptionTue, 15 Jul 2008 09:47:00 GMT

I'm doing some maintenance coding, trying to move a bunch of scriptlet code into Struts actions.The problem I run into is with this line:code:<jsp:include page="common/header.jsp"/>Something about that include causes a nasty stacktrace:code:500 Internal Server Errorjava.lang.StringInde...

Comments (0) | Promote | Bookmark

searching a content in a fileMon, 14 Jul 2008 21:38:00 GMT

Hi All, suppose,there are(example D drive) some files which are having paragraph ... if i give some word in search button..then i submit..now i want the file/files which is having the particular word... how to do it?please anyone can explain methanks & regards,seetharaman...

Comments (0) | Promote | Bookmark

Regarding Struts : DispatchActionMon, 14 Jul 2008 22:59:00 GMT

Hi all! I'm new to Struts and was just going through the Struts built in action class DispatchAction. I'd created a subclass of DispatchAction and made the necessary mappings in struts-config.xml I had used the following EL snippet to make calls to the above said action class :<c:url...

Comments (0) | Promote | Bookmark

IMW-00005: end-of-streamSat, 09 Feb 2008 18:11:00 GMT

Hello,I made two simple jsp pages that use Oracle beans (navigator bar and edit record) to edit and save a database record. My application module uses oracle database connection and it works fine.When I ran those jsp pages localy in jDeveloper, everything was fine, but after deploying and settin...

Comments (0) | Promote | Bookmark