<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[JavaRanch: "JSP"]]></title>
		<link>http://www.coderanch.com/forums/forums/f-50/JSP</link>
		<description><![CDATA[The newest discussed topics in the forum "JSP"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Fetching information from database in jsp</title>
				<description><![CDATA[Good day everyone Please i needs help.This code was used to fetch information from database.<br /> whenever a correct id at BEANS.JSP is entered ,it will fetch every information from that row.<br /> But the problem am having is that it will retrieve every information on that row but the Image cannot<br /> be retrieve instead it will retrieve image link.Please how do i solve this problem  using JSP only.  <br /> <br /> Thanks for help.<br /> <br /> below is the code<br /> <br /> -----------BEANS.JSP------------<br /> <br /> <pre>  

&lt;HTML&gt;
    &lt;HEAD&gt;
        &lt;TITLE&gt;Database Lookup&lt;/TITLE&gt;
    &lt;/HEAD&gt;
 
    &lt;BODY&gt;
    &lt;BODY bgcolor=&quot;#ffffcc&quot;&gt;
    &lt;center&gt;
        &lt;font size=&quot;7&quot; color=&quot;green&quot;&gt; DATA RECOVERY FROM DATABASE&lt;/font&gt;
    &lt;hr size=&quot;20&quot; color=&quot;green&quot;&gt;
    &lt;/center&gt;


&lt;center&gt;
        &lt;FORM ACTION=&quot;rice.jsp&quot; METHOD=&quot;POST&quot;&gt;&lt;fieldset&gt;&lt;legend&gt;
        &lt;font size=&quot;5&quot; color=&quot;green&quot;&gt;
            PLEASE ENTER YOUR ID  HERE FOR SEARCH &lt;/font&gt;&lt;/legend&gt;
            &lt;BR&gt;
            &lt;INPUT TYPE=&quot;TEXT&quot; NAME=&quot;id&quot; size=&quot;40&quot;&gt;
            &lt;BR&gt;
            &lt;INPUT TYPE=&quot;RESET&quot; value=&quot;CLEAR MY ACCOUNT&quot; size=&quot;40&quot;&gt;&lt;INPUT TYPE=&quot;SUBMIT&quot; value=&quot;SEARCH   MY   ACCOUNT&quot;&gt;&lt;/fieldset&gt;
&lt;/center&gt;



        &lt;/FORM&gt;
    &lt;/BODY&gt;
&lt;HTML&gt;

  </pre><br /> <br /> <br /> -------------------BEANS.JSP--------------------------<br /> <br /> <br /> <br /> <br /> <pre>   


&lt;%@ page import=&quot;java.sql.*&quot; %&gt;
&lt;% Class.forName(&quot;com.mysql.jdbc.Driver&quot;); %&gt;

&lt;HTML&gt;
    &lt;HEAD&gt;
        &lt;TITLE&gt;Fetching Data From a Database&lt;/TITLE&gt;
    &lt;/HEAD&gt;

    &lt;BODY&gt;

    &lt;center&gt;
        &lt;font size=&quot;7&quot; color=&quot;green&quot;&gt;Fetching Data From a Database&lt;/font&gt;

    &lt;/center&gt;

        &lt;% 
            Connection connection = DriverManager.getConnection(
                &quot;jdbc:mysql://localhost:3306/money&quot;, &quot;root&quot;, &quot;root&quot;);

            Statement statement = connection.createStatement();

            String email = request.getParameter(&quot;email&quot;);  

            ResultSet resultset = 
                statement.executeQuery(&quot;select * from login where id = '&quot; + id + &quot;'&quot;) ; 

            if(!resultset.next()) {
                out.println(&quot;SORRY, WE COULD NOT GET YOUR INFORMATIONS. &quot;);
            } else {
           
        %&gt;

        &lt;TABLE BORDER=&quot;1&quot;&gt;
            &lt;TR&gt;
               &lt;TH&gt;YOUR SURNAME:&lt;/TH&gt;
               &lt;TH&gt;YOUR FIRSTNAME:&lt;/TH&gt;
               &lt;TH&gt;YOUR image:&lt;/TH&gt;
                          &lt;/TR&gt;
           &lt;TR&gt;
               &lt;TD&gt; &lt;%= resultset.getString(1) %&gt; &lt;/TD&gt;
               &lt;TD&gt; &lt;%= resultset.getString(2) %&gt; &lt;/TD&gt;
               &lt;TD&gt; &lt;img src=&quot;rice.jsp?imgid=?&lt;%=resultset.getBlob(3)%&gt;&quot; width=&quot;50&quot; height=&quot;50&quot;&gt;&lt;/TD&gt;


                          &lt;/TR&gt;
       &lt;/TABLE&gt;
       &lt;BR&gt;
       &lt;% 
           } 
       %&gt;

&lt;BODY bgcolor=&quot;#ffffcc&quot;&gt;
&lt;font size=&quot;5&quot; color=&quot;green&quot;&gt;&lt;a href=&quot;login.jsp&quot;&gt;CLICK HERE TO GO BACK&lt;/a&gt;&lt;/font&gt;


    &lt;/BODY&gt;
&lt;/HTML&gt;

 </pre>]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487197/2189265</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487197/2189265</link>
				<pubDate><![CDATA[Sun, Mar 14 2010 20:02:05 MDT]]></pubDate>
				<author><![CDATA[fredrick esedo]]></author>
			</item>
			<item>
				<title>Error in &lt;jsp:usebean&gt; </title>
				<description><![CDATA[Hello friends .. i am new to jsp .. please help me out ..  I am getting ." Fail" in the end .. tell me where i gone wrong.....<br /> <br /> <b>LOGIN.HTML</b><br /> <br /> &lt;form action="login.jsp" &gt;<br />              <TABLE><br />                 <TR><br />                        <TD>&lt;input type="text" name="username"&gt;</TD><br />                 </TR><br />                 <TR><br />                         <TD>&lt;input type="password" name="userpass"&gt;</TD><br />                 </TR><br />                 <TR><br />                     <TD >&lt;input type="submit" name="Submit" value="Submit"&gt;</TD><br />                 </TR><br />             </TABLE><br />         &lt;/form&gt;<br /> <br /> <br /> <b>LOGIN.JSP</b><br /> <br /> &lt;jsp:useBean id="useLoginBean" scope="request" class="vcs.LoginBean" /&gt;<br /> &lt;jsp:setProperty name="useLoginBean" property="urid" param="username"/&gt;<br /> &lt;%&lt;br /&gt;  if(useLoginBean.check()==0) {<br />     out.println("Done");<br />  }<br />  else if(useLoginBean.check()==0) {<br />     out.println("not match");<br />  }<br />  else {<br />     out.println("fail");<br />  }<br /> %&gt;<br /> <br /> <br /> <b>LOGINBEAN.JAVA</b><br /> <br /> package vcs;<br /> <br /> import <a href="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html" class="api" title="Java API" target="_new" rel="nofollow">java.sql.Connection</a>;<br /> import <a href="http://java.sun.com/javase/6/docs/api/java/sql/DriverManager.html" class="api" title="Java API" target="_new" rel="nofollow">java.sql.DriverManager</a>;<br /> import <a href="http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html" class="api" title="Java API" target="_new" rel="nofollow">java.sql.ResultSet</a>;<br /> import <a href="http://java.sun.com/javase/6/docs/api/java/sql/Statement.html" class="api" title="Java API" target="_new" rel="nofollow">java.sql.Statement</a>;<br /> <br /> public class LoginBean {<br /> <br />     String urid, urpass, urlevel, urblock;<br /> <br />     public String getUrblock() {<br />         return urblock;<br />     }<br /> <br />     public void setUrblock(String urblock) {<br />         this.urblock = urblock;<br />     }<br /> <br />     public String getUrid() {<br />         return urid;<br />     }<br /> <br />     public void setUrid(String urid) {<br />         this.urid = urid;<br />     }<br /> <br />     public String getUrlevel() {<br />         return urlevel;<br />     }<br /> <br />     public void setUrlevel(String urlevel) {<br />         this.urlevel = urlevel;<br />     }<br /> <br />     public String getUrpass() {<br />         return urpass;<br />     }<br /> <br />     public void setUrpass(String urpass) {<br />         this.urpass = urpass;<br />     }<br /> <br />     <br /> <br />     public int check() {<br />         String pwd=null;<br />         try {<br />             Class.forName("oracle.jdbc.driver.OracleDriver");<br />             Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "system", "manager");<br />             String sql = "SELECT urpass FROM SYSTEM.USERLOG WHERE urid = '" + urid + "' AND urblock= 0";<br />             Statement state = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);<br />             <a href="http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html" class="api" title="Java API" target="_new" rel="nofollow">ResultSet</a> res = state.executeQuery(sql);<br />             while (res.next()) {<br />                 pwd = res.getString("urpass");<br />             }<br />             con.close();<br /> <br /> <br />         } catch (Exception e) {<br />             System.out.println(e);<br />         }<br />         if(pwd!=null) {<br />             if ((urpass).equals(pwd)) {<br />                 return 0;<br />             }<br />             else<br />                 return 1;<br /> <br />         }<br />         return -1;<br />     }<br /> }<br /> <br /> <br /> <br /> <br /> <br />  URID       URPASS       URLEVEL       URBLOCK <br />  rohan         abc               0             0 <br />  braj            xyz               1             0 <br />  anoop         abc                2                0 <br />  ashwin          xyz           3                 0 <br /> <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487186/2189202</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487186/2189202</link>
				<pubDate><![CDATA[Sun, Mar 14 2010 17:41:06 MDT]]></pubDate>
				<author><![CDATA[rohan abes]]></author>
			</item>
			<item>
				<title>Dir Structure messed up??</title>
				<description><![CDATA[I could not get my home.html to show up.<br /> <br /> <pre>&lt;%@include file=&quot;include.jsp&quot;%&gt;
&lt;% Redirected because we can't set the welcome page to a virtual URL. %&gt;
&lt;c:redirect url=&quot;/hello.htm&quot;/&gt;</pre><br /> <br /> <pre>
&lt;%@ page session=&quot;false&quot;%&gt;
&lt;%@ taglib prefix=&quot;c&quot; uri=&quot;http://java.sun.com/jstl/core&quot;%&gt;
&lt;%@ taglib prefix=&quot;fmt&quot; uri=&quot;http://java.sun.com/jsp/jstl/fmt&quot;%&gt;</pre><br /> <br /> Here's my project dir structure (1st picture) and what shows up at startup (Run in Server).<br /> <br /> <br /> Any idea will be greatly appreciated.<br /> <br /> <br /> <br /> <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487169/2189146</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487169/2189146</link>
				<pubDate><![CDATA[Sun, Mar 14 2010 14:40:12 MDT]]></pubDate>
				<author><![CDATA[Mimi Tam]]></author>
			</item>
			<item>
				<title>tag file parameters</title>
				<description><![CDATA[I created a tagfile and I want to have an either/or required parameter.  In other words, you must specific 1 of 2 parameters.  Any suggestions on how best to approach this?  Right now I've just made them all optional and rely on myself to know that I need to specify one or the other.  <br /> Thanks]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487167/2189141</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487167/2189141</link>
				<pubDate><![CDATA[Sun, Mar 14 2010 14:17:02 MDT]]></pubDate>
				<author><![CDATA[Jim Largent]]></author>
			</item>
			<item>
				<title>what is the equivalent in JSP - of PHP: send in body of email file.php</title>
				<description><![CDATA[PHP CODE:<br /> <pre>  ob_start();
include ('../confirmBookingPlacedNowEmail.php');  //  in many &lt;?=$param1 ?&gt; initialized IN parent file(container file)
$message_place_booking = ob_get_clean();

mail($to,$subject,$message_place_booking,$headers);  </pre><br /> <br /> <br /> what is the equivalent in JSP?<br /> IF OUR FILE FULL OF PARAM IS confirmBookingPlacedNowEmail.jsp? like &lt;%= %&gt;, we suppose that script called this file[confirmBookingPlacedNowEmail.php] like in php, has all param initialized IN so the jsp takes them?<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487121/2188936</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487121/2188936</link>
				<pubDate><![CDATA[Sun, Mar 14 2010 04:11:34 MDT]]></pubDate>
				<author><![CDATA[Leonidas Savvides]]></author>
			</item>
			<item>
				<title>mail website</title>
				<description><![CDATA[do you know how to develop a simple mail website. <br /> for eg.<br />  im having a domain www.example.com<br /> and every visitor to my site can create his own email address as <a class="snap_shots" href="mailto:example@example.com">example@example.com</a><br /> is this thing possible with the help of jsp???]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487078/2188770</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487078/2188770</link>
				<pubDate><![CDATA[Sat, Mar 13 2010 13:14:34 MST]]></pubDate>
				<author><![CDATA[ankur garha]]></author>
			</item>
			<item>
				<title>checkboxes and radiobuttons as options</title>
				<description><![CDATA[Hello all members,<br /> <br /> I am creating an assesment application where i have to display some questions with radiobuttons as options for selecting only one option <br /> & in some cases, checkboxes as options for selecting multiple options.<br /> <br /> How i can implement the above in jsp?<br /> <br /> Can I have to add a column in database for detecting button type?????<br /> <br /> Please help.<br /> <br /> Thanks in advance. ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487047/2188641</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487047/2188641</link>
				<pubDate><![CDATA[Sat, Mar 13 2010 07:52:20 MST]]></pubDate>
				<author><![CDATA[anuj thite]]></author>
			</item>
			<item>
				<title>JSP EL  and Javascript?</title>
				<description><![CDATA[What is the difference between JSP EL and JavaScript? Are they both same?<br /> <br /> They both are used to "put dynamic content into the static html pages"?<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487018/2188492</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487018/2188492</link>
				<pubDate><![CDATA[Sat, Mar 13 2010 00:22:03 MST]]></pubDate>
				<author><![CDATA[Anuradha Prasanna]]></author>
			</item>
			<item>
				<title>Dynamically Allocate Array lists to options in a dropdown for struts JSP</title>
				<description><![CDATA[The situtation is ... <br /> When user selects a value from Dropdown 1. Then depending on the value selected another dropdown should be populated from 1 of 2 diffrent Araaylist in struts form. <br /> <br /> I'm absloutely naive at AJAX. I don't know how AJAX will work here. <br /> <br /> The deciding dropdpwn is<br /> <pre>  
&lt;td class=&quot;LLFormInputText&quot; &gt;
      &lt;html:select styleClass=&quot;text&quot; name=&quot;tradeForm&quot; property=&quot;tradeGroup&quot; tabindex=&quot;1&quot; onkeypress=&quot;return goReturn(event,0);&quot; onchange=&quot;showHide();&quot; &gt;
      &lt;bean:define id=&quot;tradeGpOptions&quot; name=&quot;tradeForm&quot; property=&quot;tradeGpOptions&quot; type=&quot;java.util.ArrayList&quot; /&gt;
      &lt;html:options collection=&quot;tradeGpOptions&quot; property=&quot;value&quot; labelProperty=&quot;label&quot; /&gt;
      &lt;/html:select&gt;	
&lt;/td&gt;
  </pre><br /> <br /> The one that needs to be set is <br /> <pre>  
&lt;td id=&quot;tmsSecurityCodeType&quot; class=&quot;LLFormInputText&quot; &gt;
  &lt;html:select styleClass=&quot;text&quot; name=&quot;tradeForm&quot; property=&quot;securityCodeType&quot; tabindex=&quot;8&quot; onkeypress=&quot;return goReturn(event,0);&quot; &gt;
  &lt;bean:define id=&quot;secCodeTypeOptions&quot; name=&quot;tradeForm&quot; property=&quot;secCodeTypeOptions&quot; type=&quot;java.util.ArrayList&quot;  /&gt;
  &lt;html:options collection=&quot;secCodeTypeOptions&quot; property=&quot;value&quot; labelProperty=&quot;label&quot;/&gt;
&lt;/html:select&gt;	
&lt;/td&gt;	

// OR	
&lt;td id=&quot;intlSecurityCodeType&quot; class=&quot;LLFormInputText&quot;  &gt;
  &lt;html:select styleClass=&quot;text&quot; name=&quot;tradeForm&quot; property=&quot;securityCodeTypeIntl&quot; tabindex=&quot;8&quot; onkeypress=&quot;return goReturn(event,0);&quot;&gt;
  &lt;bean:define id=&quot;secCodeTypeOptionsIntl&quot; name=&quot;tradeForm&quot; property=&quot;secCodeTypeOptions&quot; type=&quot;java.util.ArrayList&quot;  /&gt;
  &lt;html:options collection=&quot;secCodeTypeOptionsIntl&quot; property=&quot;value&quot; labelProperty=&quot;label&quot;/&gt;
  &lt;/html:select&gt;	
&lt;/td&gt;
</pre><br /> <br /> I tried hiding and showing them as required . <br /> <pre>  
function showHide(){

document.getElementById('tmsSecurityCodeType').style.display = 'none';
document.getElementById('intlSecurityCodeType').style.display = 'none';

var tradeGp = document.getElementById('tradeGroup').value;
				
if( tradeGp == &quot;TMS&quot; ){

document.getElementById('tmsSecurityCodeType').style.display = 'inline';
document.getElementById('intlSecurityCodeType').style.display = 'none';

}else if ( tradeGp == 'FISSMC' || tradeGp == 'FISSEU' || tradeGp == 'FISSAS' || tradeGp == 'TRANSRPT'){
						
document.getElementById('tmsSecurityCodeType').style.display = 'none';
document.getElementById('intlSecurityCodeType').style.display = 'inline';
						
}
</pre><br /> <br /> but when the form is submitted it doesn't take the value for the secCodeTypeOptions options even when it is displayed rather it picks up the first value from the secCodeTypeOptionsIntl array <br /> <br /> I would appreciate if someone can tell me where I'm wrong ....please help me how can I get thru ....]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487011/2188439</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487011/2188439</link>
				<pubDate><![CDATA[Fri, Mar 12 2010 22:10:19 MST]]></pubDate>
				<author><![CDATA[Vertika Solanki]]></author>
			</item>
			<item>
				<title>Writing JSP from scratch</title>
				<description><![CDATA[I have been programming since last 5 years. I have maintained JSPs but not written one from scratch. What I want to know is, do people first create html pages using some html editor and then convert into a JSP or they directly create JSPs. Which editor is normally used for creating JSPs in eclipse?]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487006/2188402</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487006/2188402</link>
				<pubDate><![CDATA[Fri, Mar 12 2010 19:37:54 MST]]></pubDate>
				<author><![CDATA[Muhammad Imad Qureshi]]></author>
			</item>
			<item>
				<title>JSP taglib Paggination</title>
				<description><![CDATA[Hi,<br /> <br /> I want to display records from the db in the form of tables using pagination.<br /> <br /> I found display tag as a useful one but I can see a problem with that.<br /> <br /> The tag takes the list which contains the data and records per page to display the contents and pagination.<br /> <br /> If the user clicks page no 2, all the records needs to be loaded into the list and given as input to the name attribute which doesnt makes sense i beleive.<br /> <br /> Is what i say correct or is there any better of doing it.<br /> <br /> I require a pagination taglib where I input the the total number of records, records per page, uri, page param amd it should give me the paginnation.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486955/2188150</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486955/2188150</link>
				<pubDate><![CDATA[Fri, Mar 12 2010 09:27:54 MST]]></pubDate>
				<author><![CDATA[Ramkumar Subburaj]]></author>
			</item>
			<item>
				<title>Problem - Configuring init parameters for jsp</title>
				<description><![CDATA[I have a jsp(BasicCounter.jsp) in my C:\tomcat\tomcat-6.0.24\webapps folder,<br /> <br /> <pre>&lt;!-- This jsp gives the number of times it is accessed during a particular session --&gt;
&lt;%@ page import=&quot;foo.*&quot; %&gt;
&lt;html&gt;
&lt;body&gt;


&lt;%! 
int doubleCount(){
count=count*2;
return count;
}
%&gt;

&lt;%!
public void jspInit(){
ServletConfig sConfig = getServletConfig();
String emailAddr=sConfig.getInitParameter(&quot;email&quot;); //line 1
ServletContext ctx = getServletContext();
if(emailAddr == null){
emailAddr=&quot;goodforme@yahoo.co.in&quot;;
ctx.setAttribute(&quot;mail&quot;, emailAddr);
}
}
%&gt;

&lt;%! int count=1; %&gt;
The page count is:
&lt;%= doubleCount() %&gt;
&lt;br&gt;
&lt;%= (String)getServletContext().getAttribute(&quot;mail&quot;) %&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><br /> <br /> And in my "web.xml" iam doing the following for configuring the init parameters,<br /> <br /> <font color='darkred'>&lt;web-app ...&gt;<br /> &lt;!-- Configuring servlet init parameters for jsp--&gt;<br /> &lt;servlet&gt;<br /> &lt;servlet-name&gt;MyBasicCounter&lt;/servlet-name&gt;<br /> &lt;jsp-file&gt;/BasicCounter.jsp&lt;/jsp-file&gt;<br /> &lt;init-param&gt;<br /> &lt;param-name&gt;email&lt;/param-name&gt; //line 2 <br /> &lt;param-value&gt;ikickedyou@wickedlysmart.com&lt;/param-value&gt; /line 3<br /> &lt;/init-param&gt;<br /> &lt;/servlet&gt;<br /> <br /> &lt;/web-app&gt;</font><br /> <br /> When i load the jsp page as, "http://localhost:8080/BasicCounter.jsp", i get<br /> <br /> <font color='blue'>The page count is: 2 <br /> <a class="snap_shots" href="mailto:goodforme@yahoo.co.in">goodforme@yahoo.co.in</a> </font><br /> <br /> Can you please tell me why my init parameter, "email" is not coming correctly in line 1, as i configured it in line2 and line 3 <br /> anyone can you correct me so i can get the value for "email"  correctly?<br /> Iam a beginner in jsp.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486947/2188125</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486947/2188125</link>
				<pubDate><![CDATA[Fri, Mar 12 2010 08:57:24 MST]]></pubDate>
				<author><![CDATA[Anuradha Prasanna]]></author>
			</item>
			<item>
				<title>java.sql.SQLException: No suitable driver found</title>
				<description><![CDATA[Hello friends, I'm having a problem using Oracle Type4 driver.<br /> I had the following code:<br /> <br /> &lt;%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%&gt;<br /> &lt;%@page errorPage="/errorpage.jsp"%&gt;<br /> <br /> &lt;sql:setDataSource url="jdbc:oracle:thin:@localhost:1521:orcl" driver="oracle.jdbc.OracleDriver" user="gameshop" password="gameshop" var="database" /&gt;<br /> <br /> &lt;sql:update sql="insert into ORDER_SUBMITTED values(ORDER_SUBMITTED_SEQ.nextval, ?, SYSDATE)" dataSource="${database}" var="order_submitted"&gt;<br /> 	&lt;sql:param value="${userinfo.user_id}"/&gt;<br /> &lt;/sql:update&gt;<br /> <br /> <br /> running this produces following error:<br /> <b>Unable to get connection, <a href="http://java.sun.com/javase/6/docs/api/javax/sql/DataSource.html" class="api" title="Java API" target="_new" rel="nofollow">DataSource</a> invalid: "java.sql.SQLException: No suitable driver found for ${database}" </b><br /> <br /> I've tried these things:<br /> 1. The driver requires "ojdbc14.jar" file so I put it in both the lib(i.e in WEB-INF/lib and Tomcat/lib) but nothing solved the problem.<br /> 2. I have tried using it on both Tomcat 5.5 and Tomcat 6 but the problem still remains same.<br /> 3. I also tried to use the driver "oracle.jdbc.driver.OracleDriver" instead of "oracle.jdbc.OracleDriver" but no improvement.<br /> 4. The classpaths for ojdbc14.jar file is also set in Environment variable. One <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> desktop application is running fine with this driver, but I'm using it first time with JSP's JSTL. <br /> <br /> <br /> Please help......It's been one day I'm stuck with this problem<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486939/2188069</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486939/2188069</link>
				<pubDate><![CDATA[Fri, Mar 12 2010 07:59:14 MST]]></pubDate>
				<author><![CDATA[Harish Moolchandani]]></author>
			</item>
			<item>
				<title>Help with update</title>
				<description><![CDATA[Hi All,<br /> I am developing an application where in i have 30 rows from the mysql database for a calender month. one of the field is read-write,so i have 30 update buttons. Now when a user updates (for ex:24th record's read-write field), i need to update the same on the database. But i am confused how to map the update to the corresponding records.<br /> i have attached the image of the JSP.<br /> in the attached image, requested field is read-write field. if the user updates that field for any particular date then that update has to be reflected on the database.<br /> Please advise how to go on.<br /> Thanks in advance.<br /> 				]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486918/2187947</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486918/2187947</link>
				<pubDate><![CDATA[Fri, Mar 12 2010 06:16:47 MST]]></pubDate>
				<author><![CDATA[Jaidev Arer]]></author>
			</item>
			<item>
				<title>Validate HTML field on the server</title>
				<description><![CDATA[This is my JSP file:<br /> <pre>    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;&gt;  
    &lt;title&gt;Cadastro de Clientes&lt;/title&gt;  
    &lt;/head&gt;  
    &lt;body&gt;  
        &lt;h1&gt;Cadastro de Clientes&lt;/h1&gt;  
        &lt;br&gt;&lt;/br&gt;  
        &lt;form action=&quot;multizone.jsp&quot; method=&quot;POST&quot;&gt;  
        &lt;p&gt; Nome:  
            &lt;input type=&quot;text&quot; name &quot;nome&quot;/&gt;  
           CPF/CNPJ:  
           &lt;input type=&quot;text&quot; name &quot;cpf_cnpj&quot;/&gt;  
           RG:  
           &lt;input type=&quot;text&quot; name &quot;rg&quot;/&gt;  
       &lt;/p&gt;  
       &lt;p&gt; Endereco:  
           &lt;input type=&quot;text&quot; name &quot;endereco&quot; size=&quot;50&quot;/&gt;  
           Bairro:  
           &lt;input type=&quot;text&quot; name &quot;bairro&quot;/&gt;  
           Cidade:  
           &lt;input type=&quot;text&quot; name &quot;cidade&quot;/&gt;  
       &lt;/p&gt;  
   &lt;/body&gt;  
   &lt;/html&gt;  </pre><br /> I have the following function validation cpf (document required in Brazil)<br />  <pre>public class ValidaCpfCnpj {  
     public static boolean valida_cpf_cnpj(final String CNPJ_CPF) {  
   
         if(CNPJ_CPF.length() == 11) { //CPF  
             int acumulador1 = 0;  
             int acumulador2 = 0;  
             int resto = 0;  
             StringBuffer resultado = new StringBuffer();  
             String digitoVerificadorCPF = CNPJ_CPF.substring((CNPJ_CPF.length() - 2),  
                                                               CNPJ_CPF.length());  
             for(int i = 1; i &lt; (CNPJ_CPF.length() - 1); i++) {  
                 acumulador1 += (11 - i) * Integer.valueOf(CNPJ_CPF.substring((i - 1), i));  
                 acumulador2 += (12 - i) * Integer.valueOf(CNPJ_CPF.substring((i - 1), i));  
             }  
             resto = acumulador1 % 11;  
             if (resto &lt; 2) {  
                 acumulador2 += 2;  
                 resultado.append(2);  
             }  
             else {  
                 acumulador2 += 2 * (11 - resto);  
                 resultado.append((11 - resto));  
             }  
             resto = acumulador2 % 11;  
             if (resto &lt; 2) {  
                 resultado.append(0);  
             }  
             else {  
                 resultado.append((11 - resto));  
             }  
             return resultado.toString().equals(digitoVerificadorCPF);  
         }  
}</pre><br /> <br /> What I need is this: How do I fill in the field to the CPF in the HTML form it is validated by the function that is running on the server. If number entered in the field for a cpf invalid, returns a message and erases the contents, but it goes smoothly. ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486907/2187892</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486907/2187892</link>
				<pubDate><![CDATA[Fri, Mar 12 2010 05:03:47 MST]]></pubDate>
				<author><![CDATA[Paulo Correa Silva]]></author>
			</item>
			<item>
				<title>Synchronization issue in Jsp</title>
				<description><![CDATA[Hi all,<br /> <br /> I have a jsp pagewhere I have used an useBean for instantiation of a bean in session scope.<br /> Now the problem is that sometimes this page is giving <a href="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html" class="api" title="Java API" target="_new" rel="nofollow">NullPointerException</a> when multiple user or may be first time hitting this page.<br /> In compiled <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> file of this jsp there is a synchronized block(synchronized(session)) where the instantiation is occuring.<br /> <br /> So I am confused what is happening as because <b>the requests will wait untill instantiation</b> ,so no question of "Null".Please help.<br /> <br /> <pre>  &lt;jsp:useBean id=&quot;obj1&quot; scope=&quot;session&quot; class=&quot;com.test.NavigateIt&quot;/&gt; 
           &lt;%
String name = &quot;ABC&quot;;
if (!obj1.getAttribute(&quot;name&quot;).equals(name)) obj1.update(name);
%&gt;

 </pre><br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486877/2187758</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486877/2187758</link>
				<pubDate><![CDATA[Fri, Mar 12 2010 01:09:29 MST]]></pubDate>
				<author><![CDATA[Kousik Majumder]]></author>
			</item>
			<item>
				<title>EL evaluation within bracket and without bracket</title>
				<description><![CDATA[hiiii folks <br /> <br />               I have a doubt on EL evaluation technique. Please anybody explain me how el evaluates the expression when it's inside quotes &quot;&quot; and without quotes sorrounded.<br /> <br /> for ex i saw a quiz<br /> <br />  ${&quot;a&quot;&lt;&quot;b&quot;} returns true<br /> <br /> ${a&lt;b} returns false. how?<br /> <br /> <br /> thanks in advance&gt;]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486868/2187713</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486868/2187713</link>
				<pubDate><![CDATA[Thu, Mar 11 2010 23:48:58 MST]]></pubDate>
				<author><![CDATA[sakthi vadivel]]></author>
			</item>
			<item>
				<title>Why only Maps and List is supported for tags</title>
				<description><![CDATA[Why is that  only Maps and List are support by the JSP tags. Why not the Sets and Queue ?]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486854/2187628</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486854/2187628</link>
				<pubDate><![CDATA[Thu, Mar 11 2010 21:50:29 MST]]></pubDate>
				<author><![CDATA[James Tharakan]]></author>
			</item>
			<item>
				<title>confused about the usage of JSP tags </title>
				<description><![CDATA[I am kind of confused about the usage of tags...<br /> Like to set the property of  a bean we can use <br /> <br /> &lt;jsp:useBean id="useThis" class="com.model.Car" scope="page" &gt;   (If a bean does not exist then a bean can be created )<br />     &lt;jsp:<b>setProperty</b>&gt;<br /> &lt;/jsp:useBean&gt;<br /> or<br /> &lt;<b>c:set </b>var=useThis scope="page" value="value" /&gt; (bean can also be created like this)<br />  <br /> but now sure which one is better and why....<br /> <br /> and<br /> To display the bean property we can use <br /> &lt;jsp:useBean&gt;<br />  &lt;jsp:<b>getProperty</b>&gt;  <br /> &lt;/jsp:useBean&gt;<br /> or<br /> &lt;<b>c: out </b>value="${useThis.name}" default="not set" /&gt;<br />  <br /> <br /> Is there is any kind of rule when to use one thing but not the other... I mean how is the choice made   :confused: ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486851/2187618</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486851/2187618</link>
				<pubDate><![CDATA[Thu, Mar 11 2010 21:14:54 MST]]></pubDate>
				<author><![CDATA[James Tharakan]]></author>
			</item>
			<item>
				<title>Regarding Ajax</title>
				<description><![CDATA[hi,<br /> <br /> <br />  I am doing one project using ajax with jsp i do not know how to use ajax in jsp can you give any note or example regarding to work with jsp and ajax.<br /> <br /> <br />                         Thanking You.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486846/2187601</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486846/2187601</link>
				<pubDate><![CDATA[Thu, Mar 11 2010 20:28:42 MST]]></pubDate>
				<author><![CDATA[santhosh kumar vk]]></author>
			</item>
			<item>
				<title>Does this situation need filter?</title>
				<description><![CDATA[I have menu with tabs in my web application. but those tabs are visible/accessible based on security settings. I have tab id and user id. <br /> Right now I have created a common method at one place and calling it from various controllers and checking for the authority settings.<br /> <br /> But is filter best choice here or the way I have implemented is ok or something else?]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486842/2187588</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486842/2187588</link>
				<pubDate><![CDATA[Thu, Mar 11 2010 19:37:26 MST]]></pubDate>
				<author><![CDATA[Vikas Kapoor]]></author>
			</item>
			<item>
				<title>Using a JSP and EL to a file or ByteArrayStream?</title>
				<description><![CDATA[I need to populate a non-HTML text stream (say an email message) with data in my POJO bean. If I want to send it out to a browser, its easy. But I want the text, processed with EL, locally to the server.<br /> <br /> The idea would be to take a JSP page as a "template" and then populate the template with appropriate EL values. This allows a GUI designer/artist to make the JSP look<br /> as cool as they want, using tools they know how to use, and lets me, the engineer, not care about how its made pretty.<br /> <br /> Is this possible? Any ideas on how to start?<br /> <br /> thanks<br /> pat]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486780/2187239</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486780/2187239</link>
				<pubDate><![CDATA[Thu, Mar 11 2010 07:39:31 MST]]></pubDate>
				<author><![CDATA[Pat Farrell]]></author>
			</item>
			<item>
				<title>data are not showing in a Jsp using link</title>
				<description><![CDATA[<br /> i have a Jsp page. in this Jsp page having some links. i want when i click to link of result some data should be display. but it does not displaying. please check the below code.<br /> <br /> Indus.jsp<br /> <pre>  
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Indus Public School&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div align=&quot;center&quot;&gt;&lt;font size=&quot;+3&quot;&gt;
Indus Public School&lt;/font&gt;
&lt;/div&gt;

&lt;table width=&quot;700&quot; height=&quot;500&quot; border=&quot;0&quot; align=&quot;left&quot; 
cellspacing=&quot;0&quot;&gt;
&lt;td width=&quot;150&quot; rowspan=&quot;2&quot; valign=&quot;top&quot;&gt;

&lt;table width=&quot;200&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;td height=&quot;100&quot; bgcolor=&quot;#476bc0&quot;&gt;
&lt;div align=&quot;center&quot; class=&quot;boldhead&quot;&gt;&lt;font size=&quot;+1&quot;&gt;
&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;tr&gt;
&lt;td height=&quot;40&quot; bgcolor=&quot;#728DCF&quot;&gt;
&lt;a href=&quot;&quot;&gt;Profile&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height=&quot;40&quot; bgcolor=&quot;#728DCF&quot;&gt;
&lt;a href=&quot;&quot; class=&quot;smalltext&quot;&gt;Staff&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td height=&quot;40&quot; bgcolor=&quot;#728DCF&quot;&gt;
&lt;a href=&quot;indus.jsp?value=result&quot; class=&quot;smalltext&quot;&gt;Result&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;%String value=&quot;&quot;;
if(value!=null && (value.equals(&quot;result&quot;)))
{%&gt;
&lt;h1&gt;Indus Public School &lt;/h1&gt;
&lt;%
}
%&gt;
&lt;/body&gt;
&lt;/html&gt;  </pre><br /> <br /> please suggest.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486761/2187078</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486761/2187078</link>
				<pubDate><![CDATA[Thu, Mar 11 2010 05:13:25 MST]]></pubDate>
				<author><![CDATA[Babu Singh]]></author>
			</item>
			<item>
				<title>Expression Language</title>
				<description><![CDATA[As per the rule, anything inside [] which is not in quotes must satisfy <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> naming rules. Then how does following code work even though thing inside [] is not in quotes and which doesn't comply to java naming rules?<br /> <br /> <pre>
String [] list = {&quot;one&quot;, &quot;two&quot;};
request.setAttribute(&quot;arraylist&quot;, list);
${arraylist[1]}
</pre><br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486702/2186780</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486702/2186780</link>
				<pubDate><![CDATA[Wed, Mar 10 2010 23:54:09 MST]]></pubDate>
				<author><![CDATA[MaheshS Kumbhar]]></author>
			</item>
			<item>
				<title>Role based Authorization for Tree Structure</title>
				<description><![CDATA[I have a javascript based tree structure in my jsp, I want to perform user level authorization for each node/leaf of the tree on clicks on the corresponding node/leaf. I am using the tree structure from <a class="snap_shots" href="http://www.destroydrop.com/javascripts/tree/default.html" target="_new" rel="nofollow">http://www.destroydrop.com/javascripts/tree/default.html</a> . I am adding the id, parentId, Name, Title,and path information of the node/leaf  from the database by using JSONObject.  I have a scenario where, at present I have 2 types of users - Admin and Group Users. Admin is authorized to view the entire tree structure. Group user is assigned to a particular group and should be able to view the tree structure according to the group to which he belongs. How should I perform user level authorization for this?]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486699/2186770</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486699/2186770</link>
				<pubDate><![CDATA[Wed, Mar 10 2010 23:41:33 MST]]></pubDate>
				<author><![CDATA[Deepaks Deshpande]]></author>
			</item>
			<item>
				<title>A simple web-app to retrieve and display an Excel Sheet</title>
				<description><![CDATA[Hi,<br /> <br /> <i>What I am trying to do:</i> Reading an Excel sheet from a remote location and passing it on to a JSP page.<br /> <br /> <i>What I have managed so far:</i> I have managed to read the Excel Sheet from the remote location. This was done using a <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">Java</a> class and POI.<br /> <br /> <i>What I need help with:</i><br /> 1. How to pass the Excel Sheet(retrieved in the java file) to a JSP page which will display the excel sheet. I have researched somethings but am not clear how to go about doing it.<br /> 2. I am OK with the JSP page opening the excel sheet separately, but is it possible to display it within the JSP page itself? I was wondering about using iFrames but i think its client side basically. Is it possible to use it in a JSP?<br /> <br /> <i>Code Snippets:-</i><br /> <br /> <a href="http://java.sun.com/javase/6/docs/api/java/io/ByteArrayInputStream.html" class="api" title="Java API" target="_new" rel="nofollow">ByteArrayInputStream</a> bais = new <a href="http://java.sun.com/javase/6/docs/api/java/io/ByteArrayInputStream.html" class="api" title="Java API" target="_new" rel="nofollow">ByteArrayInputStream</a>(baos.toByteArray()); <br /> <br /> //<font color='green'>baos is a ByteArrayOutputStrream whichread the Excel sheet from the remote location.</font><br /> <br />             //<font color='green'>POI Coding to read the excel file</font>          <br />             POIFSFileSystem fs = new POIFSFileSystem(bais);<br />             HSSFWorkbook wb = new HSSFWorkbook(fs);<br /> <br /> <u><b>Application FLow:- </b></u>A HTML(user enters the filename here) ==&gt; passes filename to ==&gt; JSP==&gt; passes filename to ==&gt;Java (retrieves file)<br />                               Java==&gt; passes File to ==&gt;JSP : DISPLAYS THE FILE<br /> <br /> <br /> Thanks in advance.<br /> <br />             <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486685/2186735</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486685/2186735</link>
				<pubDate><![CDATA[Wed, Mar 10 2010 22:08:21 MST]]></pubDate>
				<author><![CDATA[Shantanu Rathore]]></author>
			</item>
			<item>
				<title>How can i Jsp page itself</title>
				<description><![CDATA[I have two Jsp pages named bestschool.jsp and schoolnames.jsp.<br /> <br /> I am calling schoolnames.jsp from bestschool.jsp.<br /> <br /> I want when I click the link on INDUS School. It can show all concerning link of INDUS School links like profile, result, facility etc. in the same place instead of other naming school links. <br /> <br /> my requiremet main is i want to update the information on same Jsp page.<br /> <br /> How can I implement this with in Servlets/Jsp.<br /> <br /> Please review below JSP’s files<br /> <br /> schoolnames.jsp<br /> <pre> 
&lt;table width=&quot;200&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;td height=&quot;100&quot; bgcolor=&quot;#476bc0&quot;&gt;
&lt;div align=&quot;center&quot; class=&quot;boldhead&quot;&gt;&lt;font size=&quot;+1&quot;&gt;
School list&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;tr&gt;
&lt;td height=&quot;30&quot; bgcolor=&quot;#5577C6&quot;&gt;
&lt;a href=&quot;&quot; class=&quot;smalltext&quot;&gt;INDUS School&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height=&quot;30&quot; bgcolor=&quot;#728DCF&quot;&gt;
&lt;a href=&quot;&quot; class=&quot;smalltext&quot;&gt;Vaise School&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height=&quot;30&quot; bgcolor=&quot;#728DCF&quot;&gt;
&lt;a href=&quot;&quot; class=&quot;smalltext&quot;&gt;D.G.V School&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height=&quot;30&quot; bgcolor=&quot;#728DCF&quot;&gt;
&lt;a href=&quot;&quot; class=&quot;smalltext&quot;&gt;D.P.S School &lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
   </pre><br /> <br /> bestschool.jsp<br /> <pre>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Best school&lt;/title&gt;
&lt;link href=&quot;mystyle.css&quot; rel&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div align=&quot;center&quot;&gt;&lt;font size=&quot;+2&quot;&gt;
Best Schools in Rohtak&lt;/font&gt;
&lt;/div&gt;
&lt;table width=&quot;700&quot; height=&quot;500&quot; border=&quot;0&quot; align=&quot;left&quot; 
cellspacing=&quot;0&quot;&gt;
&lt;td width=&quot;200&quot; rowspan=&quot;2&quot; valign=&quot;top&quot;&gt;
&lt;%@ include file=&quot;schoolnames.jsp&quot; %&gt;
&lt;/td&gt;
&lt;td height=&quot;328&quot; bgcolor=&quot;#476BC0&quot; valign=&quot;top&quot;&gt;
&lt;p&gt;&nbsp;&lt;/p&gt;&lt;p&gt;&nbsp;&lt;/p&gt;&lt;p&gt;&nbsp;&lt;/p&gt;
&lt;/html&gt;    </pre><br /> <br /> please suggest.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486622/2186426</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486622/2186426</link>
				<pubDate><![CDATA[Wed, Mar 10 2010 10:09:52 MST]]></pubDate>
				<author><![CDATA[Babu Singh]]></author>
			</item>
			<item>
				<title>Form is not submitting on TAB navigation </title>
				<description><![CDATA[Hi All, <br /> I have a problem while submitting the form through tab navigation. <br /> <br /> in a form I have browse button(created using &lt;input type="file"&gt; tag) but this is hidden by a customized browse button as shown in the following code. <br /> <br /> &lt;form id="uploadform" name ="uploadform" method="post" enctype="multipart/form-data" action="&lt;e:txDir /&gt;/SaveImageEvent" &gt;<br /> target=&quot;logo_upload&quot;&gt; <br /> <br /> &lt;input type="file" class="hide" id="datafileLogo" name="datafileLogo" &gt;<br /> onChange=&quot;javascript:saveImage('repLogo','datafileLogo','logo_upload');&quot;/&gt; <br /> <a  id="likfileLogo" rel="nofollow"><img  border="disabled"/></a> <br /> &lt;/form&gt; <br /> <br /> //this method is used to open the file selection window on clicking the image above Browse image. <br /> this.openFileWindow = function(objectId) <br /> { <br /> var flvar = document.getElementById(objectId); <br /> flvar.click(); <br /> } <br /> <br /> <br /> //this save image method is called when the user selects the image from the file window( on onChange) .Here I have to use the TAB navigation only to select and submit the selected file. <br /> this.saveImage = function(imagePrefix,imageName,displayImageFrame) <br /> { <br /> var fileName = document.getElementById(imageName).value; <br /> var fileType = fileName.substr(fileName.lastIndexOf(".")); <br /> var fileSystem = new ActiveXObject("Scripting.FileSystemObject"); <br /> var thefile = fileSystem.getFile(fileName); <br /> var size = thefile.size; <br /> <br /> if(((fileType == &quot;.gif&quot;) || (fileType == &quot;.GIF&quot;)) && (size &lt;= 1048576)) <br /> { <br /> document.uploadform.imageType.value = fileType; <br /> document.uploadform.imagePrefix.value = imagePrefix; <br /> document.uploadform.fileOperation.value= 'saveImage'; <br /> document.uploadform.target = displayImageFrame; <br /> document.uploadform.imagefileName.value = imageName; <br /> document.uploadform.submit(); <br /> } <br /> else <br /> { <br /> util.alert("Images must be .gif files less than 1MB is size. Click the information icon in the coverpage options section for more information."); <br /> } <br /> <br /> } <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486605/2186324</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486605/2186324</link>
				<pubDate><![CDATA[Wed, Mar 10 2010 08:46:31 MST]]></pubDate>
				<author><![CDATA[G.T. Reddy]]></author>
			</item>
			<item>
				<title>May include run-time value as attribute in custom tag?</title>
				<description><![CDATA[&lt;datetime:currentdatetime dateOnly="&lt;%= request.getParameter("dateonly") %&gt;" /&gt; <br /> <br /> May include &lt;%= request.getParameter("dateonly") %&gt; as attribute value like above, in custom tags(struts)?<br /> <br /> eg...<br /> <pre>     
/WEB-INF/tlds/datetime.tld
&lt;tag&gt;
&lt;name&gt;currentdatetime&lt;/name&gt;
&lt;tag-class&gt;datetime.CurrentDateTimeTag&lt;/tag-class&gt;
&lt;body-content&gt;empty&lt;/body-content&gt;
&lt;attribute&gt;
&lt;name&gt;dateOnly&lt;/name&gt;
&lt;required&gt;true&lt;/required&gt;
&lt;rtexpvalue&gt;true&lt;/rtexpvalue&gt;
&lt;type&gt;boolean&lt;/type&gt;
&lt;/attribute&gt;
&lt;/tag&gt;
</pre>]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486589/2186263</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486589/2186263</link>
				<pubDate><![CDATA[Wed, Mar 10 2010 07:22:31 MST]]></pubDate>
				<author><![CDATA[Leonidas Savvides]]></author>
			</item>
			<item>
				<title>javabeans/ relational db</title>
				<description><![CDATA[When you are creating beans do you create one for each table in your database?<br /> <br /> Can you have a HTML form that has components that use more than one bean? Updating data to more than one table?<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486583/2186223</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486583/2186223</link>
				<pubDate><![CDATA[Wed, Mar 10 2010 06:41:39 MST]]></pubDate>
				<author><![CDATA[J Bo]]></author>
			</item>
			<item>
				<title>Retaining jsp form data when accessing a separate menu item</title>
				<description><![CDATA[Hello,<br /> <br /> I am trying to retain all the jsp form values when a user exits the jsp and accesses another jsp from a menu item, then returns back to the original jsp.<br /> <br /> So:<br />    1.  User enters form information in jsp<br />    2.  User chooses menu item during visit or entering the jsp.  (The menu item references another jsp which is a "how to" page)<br />    3.  User return to original page via a javascript.history() command.<br />    4.  Original info on original form is empty.<br /> <br /> Thanks!<br /> <br /> I usually go through a servlet when processing jsp info but not in this case.<br /> <br /> Thanks so much!<br /> <br /> Mel...<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486442/2185546</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486442/2185546</link>
				<pubDate><![CDATA[Tue, Mar 9 2010 12:11:26 MST]]></pubDate>
				<author><![CDATA[Melodie Rice]]></author>
			</item>
			<item>
				<title>JSP Bean,not able to work my first bean</title>
				<description><![CDATA[I have created a webproject in which i have one jsp firstView.jsp captures details about the person and relays the information to the second jsp viewInformation.jsp.<br /> The source code is as below:<br /> <b>FirstView.jsp</b><br /> <pre>  
&lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=ISO-8859-1&quot;
	pageEncoding=&quot;ISO-8859-1&quot; import=&quot;viewBean.Person&quot; %&gt;
	
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
&lt;jsp:useBean id=&quot;person&quot; type=&quot;viewBean.Person&quot; class=&quot;viewBean.Person&quot;
	scope=&quot;request&quot;&gt;
	&lt;jsp:setProperty name=&quot;person&quot; property=&quot;*&quot; /&gt;
&lt;/jsp:useBean&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;&gt;
&lt;title&gt;First View&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;form id=&quot;firstViewForm&quot; name=&quot;firstViewForm&quot; target=&quot;&quot; action=&quot;&quot;&gt;
Enter First Name Here : &lt;input type=&quot;text&quot; id=&quot;firstName&quot;
	name=&quot;firstName&quot; maxlength=&quot;10&quot; size=&quot;10&quot;&gt; &lt;br&gt;&lt;/br&gt;
Enter Last Name Here : &lt;input type=&quot;text&quot; id=&quot;lastName&quot; name=&quot;lastName&quot;
	maxlength=&quot;10&quot; size=&quot;10&quot;&gt; &lt;br&gt;&lt;/br&gt;
Enter Age Here : &lt;input type=&quot;text&quot; id=&quot;age&quot; name=&quot;age&quot; maxlength=&quot;10&quot;
	size=&quot;10&quot;&gt; &lt;br&gt;&lt;/br&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre><br /> <br /> <br /> <br /> viewInformation.jsp<br /> <br /> <pre>
&lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=ISO-8859-1&quot;
	pageEncoding=&quot;ISO-8859-1&quot; import=&quot;viewBean.Person&quot;%&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;&gt;
&lt;title&gt;View Information&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;jsp:useBean id=&quot;employee&quot; type=&quot;viewBean.Person&quot; class=&quot;viewBean.Person&quot;
	scope=&quot;request&quot;&gt;

&lt;/jsp:useBean&gt;
&lt;form id=&quot;viewInformationForm&quot; name=&quot;viewInformationForm&quot; action=&quot;&quot;&gt;
FirstName of the person is &lt;jsp:getProperty name=&quot;employee&quot; property=&quot;firstName&quot; /&gt;
&lt;br&gt;&lt;/br&gt;
LastName of the person is &lt;jsp:getProperty name=&quot;employee&quot; property=&quot;lastName&quot; /&gt;
&lt;br&gt;&lt;/br&gt;
Age of the person is &lt;jsp:getProperty name=&quot;employee&quot; property=&quot;firstName&quot; /&gt;
&lt;br&gt;&lt;/br&gt;
 
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre><br /> <br /> <br /> <br /> The bean i have used is under package viewBean, which I have kept under src/viewBean folder. The output folder for the class files is under the lib folder.<br /> The bean class is as under<br /> <br /> <pre>

package viewBean;

public class Person {

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String firstName;
	public String lastName;
	public int age;

}

</pre><br /> <br /> <br /> However whenever i hit the firstview.jsp i get an exception:<br /> <br /> org.apache.jasper.JasperException: /pages/firstView.jsp(5,0) The value for the useBean class attribute viewBean.Person is invalid.<br /> 	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)<br /> 	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)<br /> 	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)<br /> 	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1272)<br /> 	at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1178)<br /> 	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)<br /> 	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)<br /> 	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)<br /> 	at org.apache.jasper.compiler.Node$Root.accept(Node.java:495)<br /> 	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)<br /> 	at org.apache.jasper.compiler.Generator.generate(Generator.java:3426)<br /> 	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:216)<br /> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)<br /> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)<br /> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)<br /> 	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)<br /> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)<br /> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)<br /> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)<br /> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br /> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br /> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br /> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)<br /> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)<br /> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)<br /> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br /> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br /> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)<br /> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)<br /> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)<br /> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)<br /> 	at java.lang.Thread.run(Unknown Source)<br /> <br /> <br /> <br /> Please help. I am stuck.<br /> is there some place else where i need to keep the bean class file. or have i used the bean correctly.<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486433/2185509</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486433/2185509</link>
				<pubDate><![CDATA[Tue, Mar 9 2010 10:53:32 MST]]></pubDate>
				<author><![CDATA[Stanley Walker]]></author>
			</item>
			<item>
				<title>please help i am in big trouble, my  project  is not working, this is urgent.</title>
				<description><![CDATA[i am working on a project that is based on jsp. my project is NOT  working in my system  but is running  properly in another system.  both system are running netbeans  6.8 and same appache tomcat server 5.5.17.  <br /> <br /> the error is that:  when  i am trying to run it , it is saying deployment failed  and the browser is launched . In the browser it is saying "unable to connect to local host",  but it is  running properly on another system. My browser is mozilla fifefox 3.6<br /> <br /> what can be my problem. please help me.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486386/2185234</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486386/2185234</link>
				<pubDate><![CDATA[Tue, Mar 9 2010 06:50:07 MST]]></pubDate>
				<author><![CDATA[j u ray]]></author>
			</item>
			<item>
				<title>Reading a CSV file and storing it into an array and then displaying it on a HTML screen</title>
				<description><![CDATA[Hi Everyone,<br /> <br /> <b>Requirement:</b> TO read a CSV file and transferring the content into an array which I can display on a JSP/HTML screen.<br /> <br /> <i><b>Description:-</b></i><br /> 1. I want to read a CSV file stored in a particular location on my computer.<br /> 2. As per my understanding, the CSV file is a comma separated file with each line representing a row in a table. The columns are separated by commas.<br /> 3. I want to store the CSV file contents in an array in exactly the same structure as the original tabular format.<br /> 4. Then I want to display the file on a JSP screen or a HTML screen in tabular format again.<br /> <br /> <b>Notes:-</b> <br /> The CSV file I have is a pretty big one because it has a lot of data. The data is mostly 'string'.<br /> <br /> Since this is the first time I am trying something like this I dont have any idea about the code. Can anyone help me out with a small example explaining me how to go about doing this? <br /> <br /> Thank you all in advance. Eagerly awaiting a response. Thanks <br /> <br /> Shantanu]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486355/2185081</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486355/2185081</link>
				<pubDate><![CDATA[Tue, Mar 9 2010 04:50:31 MST]]></pubDate>
				<author><![CDATA[Shantanu Rathore]]></author>
			</item>
			<item>
				<title>Free instances held up by c:forEach tag</title>
				<description><![CDATA[Dear All, <br /> <br /> Our application in production started throwing outofmemory error recently.  I used JProbe profiler to narrow down lottering objects.<br /> <br /> I found that there is an arraylist which in turn holds many DTO objects is not getting released.  I create this arraylist in view bean and loop it through in jsp using c:forEach tag.  I found from profiler that c:forEach tag is holding live references hence this object is not getting garbage collected.  I confirmed it by removing c:forEach tag and putting scriplets instead.  The instances are getting garbage collected perfectly when used with scriplets!!<br /> <br /> I tried removing the variables using c:remove tag.  But didn't help.  Please find below the piece of code.<br /> <br /> <pre>  
&lt;c:set var=&quot;attrList&quot; value=&quot;${viewData.xxxAttributes}&quot; scope=&quot;page&quot; /&gt;
&lt;c:forEach var=&quot;attribute&quot; items=&quot;${attrList}&quot;&gt;
    &lt;tr&gt;
		&lt;td &gt;&lt;c:out value=&quot;${attribute.description}&quot;/&gt;&lt;/td&gt;
		&lt;td &gt;&#160;:&#160;&lt;/td&gt;
		&lt;td &gt;&lt;c:out value=&quot;${attribute.value}&quot; escapeXml=&quot;false&quot;/&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;c:remove var=&quot;attribute&quot; /&gt;
&lt;/c:forEach&gt;
&lt;c:remove var=&quot;attrList&quot; /&gt;
  </pre><br /> <br /> Can someone please suggest me how can I make this "attribute" variable reference to null?  Really don't want to use scriplet since it will be a step back.<br /> <br /> Thanks in advance]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486354/2185079</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486354/2185079</link>
				<pubDate><![CDATA[Tue, Mar 9 2010 04:47:03 MST]]></pubDate>
				<author><![CDATA[Abhijith Prabhakar]]></author>
			</item>
			<item>
				<title>Creating a forum </title>
				<description><![CDATA[ :confused: :confused: :confused:Hey Guys   :D. I'm currently studying <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> and I am busy with my Project, which entails creating a forum.<br /> I wnted to know ; How do i display user user topics and replies. Is it ok to use expressions to display these on my <br /> Jsp.  :rolleyes:]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486326/2184984</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486326/2184984</link>
				<pubDate><![CDATA[Tue, Mar 9 2010 02:48:46 MST]]></pubDate>
				<author><![CDATA[Karabo Mashiyane]]></author>
			</item>
			<item>
				<title>Dual Authentication Issue</title>
				<description><![CDATA[Hi,<br /> <br /> At our work we are setting up a system with SSL and it will act as a web server.<br /> <br /> It is using Apache with ajp connector to connect into Tomcat. The problem occurs when a <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> applet which uses RMI tunneling is launched.<br /> <br /> The user follows these steps to reproduce the issue.<br /> <br /> 1. using IE7 user logs in and enters standard username and password when the prompt appears<br /> 2. navigation works correctly as long as no java applet is launched<br /> 3. clicks on a link where java applet is launched and the user gets prompted again to enter standard username and password<br /> 4. once the username and password has been entered the session runs smoothly with no more prompts for these credentials<br /> 5. close IE7 and open up again, go through the same steps and it happens again<br /> <br /> The initial login prompt is an IE one. The second looks like a java one, it is titled "Authentication Required" when using Java 1.6_15. If you are using Java 1.4_2 or 1.5_15 the dialogue is titled "Password Needed - Networking".<br /> <br /> This issue happens with IE6, 7 and 8 using either Java 1.4, 1.5 or 1.6. It does not happen when using Firefox. We haven't tested any more browsers.<br /> <br /> Please also note that this issue does not occur if the web server has SSL turned off.<br /> <br /> Thanks in advance]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486283/2184799</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486283/2184799</link>
				<pubDate><![CDATA[Mon, Mar 8 2010 23:20:54 MST]]></pubDate>
				<author><![CDATA[Ryan Sandow]]></author>
			</item>
			<item>
				<title>problems in a Chat Client/Server application</title>
				<description><![CDATA[Dear Freinds,<br /> me and my freinds are developing a Chat Client/Server application.I am core <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> programmer and has a good knowledge in Servlets/JSPs still we are facing many problems in our project. :confused: we want to include the functionalities of real time file sharing and creation and exchange of MIDI sequences in our project.will you please suggest me which one is the best way to implement such type of project with interactive functionalities.<br /> 1.Core Networking<br /> 2.JMS<br /> 3.RMI/IIOP<br /> I want also to know what would be best possible architecture of my web based application.......<br /> there are many problems before us<br /> 1.should there be any controller servlet or all JSPs?<br /> 2.how would i pop up a splash screen and a swing frame from a jsp for user login details?<br /> 3.database connectivity code should be on login page or on any other loginhandler page? <br /> please help us in the best informative way and suggestive books and tutorials!!!!!!!!!thanking you all....If it is necessary i can represent my coding pages here.reply soon. :rolleyes: ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486236/2184613</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486236/2184613</link>
				<pubDate><![CDATA[Mon, Mar 8 2010 14:16:25 MST]]></pubDate>
				<author><![CDATA[Ankit Tripathi]]></author>
			</item>
			<item>
				<title>Problem with anchor tag # when trying to open pdf </title>
				<description><![CDATA[Hi All,<br /> <br /> I have a requirement to open a PDF document (to open an existing pdf on server not creating) with showing the appropriate section which user clicked and also need to update the count in database.<br /> <br /> In order to do this i have followed these steps:<br /> Ex: Lets say XYZ.pdf file which has a, b and c sections. To show section a in the URL it is some thing like ../../XYZ.pdf#a<br /> <br /> <br /> 1. First, i called my controller class when user clicks the link (to update the count in database) and in controller i used Spring MVC redirect function to open XYZ.pdf#a. But the problem is its removing   the # from URL and showing entire XYZ.pdf opening first page instead of showing #a section. That too this is happening in IE browser not in Firefox.<br /> 2. I have tried another way by calling a dummy jsp from controller and onload of that jsp i did location.href function to show the pdf document. It worked but the problem is with back button, if i use POST method back button displays page cannot be displayed message, if use GET method back is not working i will be in same page forever it wont allow you to go back.<br /> <br /> I hope i cleared explained my problem, Could any one please help me.<br /> <br /> Thanks in advance!<br /> <br /> - Vamshidhar Nimbagiri<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486230/2184580</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486230/2184580</link>
				<pubDate><![CDATA[Mon, Mar 8 2010 13:09:10 MST]]></pubDate>
				<author><![CDATA[vamshidhar nimbagiri]]></author>
			</item>
			<item>
				<title>JSP custom tag unable to pass dynamic value</title>
				<description><![CDATA[I am facing problem while passing dynamic values in my custom tag.<br /> I have created one tag which is retrieving some data based on passed-in values. It is working fine with static values like in my jsp if I use<br /> 	&lt;xyz:GetValues brandCode='01' locationType="DEL" currencyCode="GBP"/&gt;<br /> i.e.  in my tag I am passing 3 values and getting some results.<br /> <br /> But when I am using same tag with dynamic values like <br /> <br /> &lt;xyz:GetValues brandCode='&lt;%=code%&gt;' locationType="DEL" currencyCode="GBP"/&gt;<br /> <br /> It is showing JasperException (i.e. According to TLD or attribute directive in tag file, attribute brandCode does not accept any expressions).<br /> <br /> Following are my configurations for this project:<br /> <br /> 1.	I am using struts2.0 and tomcat6.0.<br /> 2.	In my tld(for this customized tag), I have mentioned <br /> &lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;<br /> &lt;!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"&gt;<br /> &quot;http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd&quot;&gt;<br /> &lt;taglib&gt;<br /> 	&lt;tlibversion&gt;1.0&lt;/tlibversion&gt;<br /> 	&lt;jspversion&gt;1.1&lt;/jspversion&gt;<br /> 	&lt;shortname&gt;DemoTags&lt;/shortname&gt;<br /> 	&lt;uri&gt;http://www.abc.com&lt;/uri&gt;<br /> 	&lt;info&gt;Demo Tags Library&lt;/info&gt;<br /> <br /> 3.	My web.xml contains <br /> &lt;web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee <a class="snap_shots" href="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" target="_blank" rel="nofollow">http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd</a>"	id="WebApp_ID" version="2.5"&gt;<br /> <br /> Please suggest.<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/486188/2184305</guid>
				<link>http://www.coderanch.com/forums/posts/preList/486188/2184305</link>
				<pubDate><![CDATA[Mon, Mar 8 2010 06:17:08 MST]]></pubDate>
				<author><![CDATA[Amit Kohli]]></author>
			</item>
	</channel>
</rss>
