Jsp newbie, please help about @include

I am new to JSP.
I have two jsp files, say , jsp1 and jsp2.
JSP2 is perfectly working. I want to display the result of jsp2 with the result of jsp1.
But I additionally want to supply a value from jsp1 to a variable in jsp2 before calling jsp2.
The result of jsp2 depends on the value supplied.
I couldn't figure out how to do this. A simple @include directive like
<%@ include file="jsp2.jsp" %> doesn't seem to be suitable here.
What options are available here? Please help.
Thank you.

Thank you friends for the suggestion. I have yet to try your suggestions.
Before that I came across another problem. Would someone help please?
Why the jsp fails when I include the same JSP page twice in another jsp page?
Of the following two jsp files, the upper one is OK, but the lower one complains that it cannot compile (org.apache.jasper.JasperException).
test1.jsp:
<html><head><title></title></head>
<body>
<table>
<tr><td><%@ include file="single.jsp" %></td></tr>
</table>
</body>
</html>
test2.jsp:
<html><head><title></title></head>
<body>
<table>
<tr>
<td><%@ include file="single.jsp" %></td>
<td><%@ include file="single.jsp" %></td>
</tr>
</table>
</body>
</html>
I want to populate the cells of an HTML table with the results from the same jsp file, by supplying different values to a variable in the jsp file so that its results will be different for each cell. Am I being to foolish here?
Thanks.

Similar Messages

  • Issue about jsp taglib,please help

    Hello all,
    I want to use jsp tag like following:
    <c:import url="xxx.jsp">
    <c:param name="xxxAction" value="<portlet:renderURL/>"/>
    </c:import>
    and the value of the c:param can not accept the value generated by the <portlet:renderURL/> tag.
    I can resolve the issue by writing java code in the jsp(like ...java code...<c:param name="xxxAction" value="%=...%"/> ),much java code occur in the jsp,I do not like this solution.
    anybody has good solution please help me.
    thanks and rgds.

    Ram is correct. You can't nest custom tags as attributes to other custom tags.
    In this case the <c:param> tag offers the option of specifying the value as the body of the tag though, so the following should work:
    <c:import url="xxx.jsp">
    <c:param name="xxxAction"><portlet:renderURL/></c:param>
    </c:import>

  • Please help about encode password idm !!!!

    Hello All,
    I'm a newbie in IDM and in my work I have to encode password with CBC Algorithm before insert password in database (SQL server 2005).
    So I have already coding CBC Algorithm but I don't know where I put my CBC encoding Algorithm for when users change password on IDM.
    Please help me.
    Thank you for advance.
    waltt

    I'm assuming you're not talking about storing the password that way in the IDM repository but rather a separate database resource.
    I had a similar requirement with a different encryption algorithm and an Oracle database. I made my life a lot easier by having the database resource do the encryption. IDM will insert the password into the resource as plain text and, in my case, a trigger will catch it, call a stored procedure to change it from plain text to encrypted and then insert it. Since IDM never reads passwords from resources anyway the password was fully encrypted as stored in the resource and IDM never knows any better.
    Technically speaking you could have created a rule or custom form to do the password encryption before IDM sends it over the wire but if you've got an encrypted channel to the database then you might take my approach and skip having IDM do it altogether.

  • Junk characters like" � � "displayed in the jsp page please help.

    Hi,
    I am getting junk characters like � � displayed in the jsp page.
    In the JSP page i used javascript "& nbsp" for appending spaces to a string "CCR" to get "CCR " .
    Now the Resultant string "CCR " has three spaces appended to its right.
    This String is set in session in that JSP page.
    In the next JSP page i am getting that string from session.
    After getting the string the "substring" function is performed to get only the first 5 charcters of the string. Now the result is displayed as " CCR� � " with has last 2 characters as junk values � � insteed of displaying as "CCR ". Please help me in solving this issue.
    Please note that initially the sting "CCR" is got from the Oracle database in Solaris Machine.
    Regards,
    Vijay

    have you tried:
    strenuously inspecting the string that is coming from the db? do an actual loop over the string, character by character, dumping to System.out to make sure the characters are EXACT coming out of the db.
    note you have to append " " not just "& nbsp"
    post the code that is doing the output. the relevant bean code, the jsp, everything relevant - WITH COMMENTS discussing where things are happening.
    Also, is it "weird characters" in the browser only? have you done a view source on the actual html source that the browser is rendering (right click in IE and click view source). browsers can act odd if you don't feed then exactly what they want, and it looks like you're feeding it escaped characters that it is rendering as something else.

  • Please help about the limit request

    how to connect the internet for the mobile set 3110 classic
    because iam tried bye the contact provide service vodafone
    also contained the internet service provided with it service
    but massage comminig me tell me not contact or connection with internet
    please help me

    note:
    i am reading the note book about set and working it but wihtout ability
    what i do to connection with internet service

  • Please help about Report Printer and PS tables-objects . ..

    Hi everybody
    I'm in trouble. I have a requirement in PS módule related with reports created by the Report Printer tool. I don't have any idea about these topics.
    My requirement is to create a report (not with Report Printer) with the structure for projects, with all the structure Project-WBS-Network-Activity and with some values like Budget, Commit, Actual,  Paid, etc.
    The functional consultant only tells me about some reports created with Report Printer wich have the columns required, some report has the Budget, other one has the Commit, etc. For example, one report is the tcode S_ALR_87013532; i don't know if this transaction exists in all the SAP implementations or if it was created only for my company.
    These reports only show two levels (Project-Network) so i i have to investigate:
    1. How to get all the structure levels (project-WBS-network-activity)
    2. How to 'translate' in code some value showed in a report created with Report Printer, i guess these values are created with formules and objects.
    3. How to get the same values showed in these reports, but for the Networks and Activities.
    I do not know anything about PS module and Report Printer and i really don't have any idea about how to make my development.
    4. I think the functional consultant could be able to create the report himself with the Report Printer, but he tells me he does not manage this tool so good and he wants to send SAP mails with the reports, and he say the reports created with Report Printer can not send mails. Is this true ?  and then, would be easier for me to learn Report Printer and create the report myself instead to develop it ?
    Does somebody can help me ?     Any idea ?
    Please help !!     I don't know even how to start with this.
    Thanks in advance ..
    Frank

    Hi Frank,
    here're some links:
    -http://help.sap.com/saphelp_47x200/helpdata/en/ca/01993862b47c67e10000009b38f8cf/frameset.htm
    -http://www.sapgenie.com/abap/tables_ps.htm
    -Re: Project System Costs: budget/actual/commt/rem.plan/assd
    Andreas

  • Database Dropdown Population - Newbie, please help

    Hi,
    I am having problems populating a dropdown list in a jsp page with
    mulitple entries from a database. Can anyone please help me with the
    code or point me in the right direction. Im am using the oreily custom
    tags. The page is as follows.
    <%@ page language="java" contentType="text/html" %>
    <%@ page import="java.util.*" %>
    <%@ page import="com.ora.jsp.util.*" %>
    <%@ taglib uri="/orataglib" prefix="ora" %>
    <HTML>
    <BODY>
    <ora:sqlQuery id="sqlAdminDropdown" dataSource="AileenDB"
    scope="session">
    SELECT AdminName From Aministrator
    </ora:sqlQuery>
    <TABLE>
    <TR>
    <TD>
    ** Need to put the dropdown populated with ALL the
    AdminName here **
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    I have tried things like the following but dont have a clue:
    <html:select name="session">
    <html:optionsCollection name="sqlAdminDropdown"
    property="sqlAdminDropdown" labelProperty="AdminName"/>
    </html:select>

    Hi,
    I am having problems populating a dropdown list in a jsp page with
    mulitple entries from a database. Can anyone please help me with the
    code or point me in the right direction. Im am using the oreily custom
    tags. The page is as follows.
    <%@ page language="java" contentType="text/html" %>
    <%@ page import="java.util.*" %>
    <%@ page import="com.ora.jsp.util.*" %>
    <%@ taglib uri="/orataglib" prefix="ora" %>
    <HTML>
    <BODY>
    <ora:sqlQuery id="sqlAdminDropdown" dataSource="AileenDB"
    scope="session">
    SELECT AdminName From Aministrator
    </ora:sqlQuery>
    <TABLE>
    <TR>
    <TD>
    ** Need to put the dropdown populated with ALL the
    AdminName here **
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    I have tried things like the following but dont have a clue:
    <html:select name="session">
    <html:optionsCollection name="sqlAdminDropdown"
    property="sqlAdminDropdown" labelProperty="AdminName"/>
    </html:select>

  • JSP frameset (Please help)

    What in the world happen? I have to surrender myself to the simple HTML. Ok, I have a a.jsp that contains the following code:
    <html>
    <head>
    <title>JSP Page</title>
    </head>
    <body>
    <h1>JSP Page</h1>
    <FRAMESET ROWS="80,20" NORESIZE>
    <FRAME SRC="main.jsp" NAME=upframe SCROLLING=NO>
    <FRAME SRC="transfer.jsp" NAME=downframe SCROLLING=NO>
    </FRAMESET>
    </body>
    </html>
    As you can see, it's fairly straightforward and simple. But, the problem is I can't view the content of main.jsp and transfer.jsp which contains some text inside them! Please help.It's not even starting my work, i am stucked with this HTML problem. Unbelievable.

    <FRAMESET ROWS="80,20" NORESIZE>
    <FRAMESET ROWS="80%,20%" NORESIZE>Try this.
    And also you should not use <BODY> tag when you use <FRAMESET>. So remove this and also remove <h1> tag and line from the page.
    Message was edited by:
    harishoty

  • JSP - Servlet - Please help

    Hi:
    Can any one suggest me the code for the following scenerio, Am new to jsp-Servlet....
    I need to give an EMPNAME in a Textbox on clicking GO button from my JSP page, a servlet must process thei query and display the output of that employee details back to that JSP page..
    Please help me out with some code snippets...
    Regards,

    The sun's site provides a detailed introduction to JDBC. or
    have to google for JDBC and once you've understood the JDBC concept, then you could progress from there. There is no simple way of doing what you asked.
    You will need a database, though you could use MS Access. But you still need the JDBC.

  • Someone please help about my bubble pointer

    so when im randomly searching through text online(mostly using firefox), fast or slow, the pointer goes from looking normal, to zooming into a big ugly bold/bubbly fat looking pointer. its bizarre cause at first i really didnt noticed, but as i used mozilla more often, the problem occurred more frequently. honestly, its getting distracting to the point that i've stopped using firefox, and am using safari, which isnt bad, except for im used to firefox, and i like it.
    I've come to another similar discussion posted her on apple discussions, and no helpful solutions, just alot of complaints. PLEASE HELP!!! does anyone evem know what im talking about?

    What do i check? I downloaded Firefox, everything went fine and the settings are normal.

  • Problems with Servlet  to JSP communication please help!!!

    Hello All ,
    we have different web applications running
    e.g.
    We have 2 webApp named A and B are running and there URL are
    http://localhost:8080/A and
    http://localhost:8080/B
    and we have one common WebApp running at
    http://localhost:8080/common
    Our problem is that whenever a user log in to the system he/she will first call the
    common URL and then enter his user name and password
    and depending on his username we have redirect user to either A or B with his pasword and username as parameter to the request.
    i.e. in common module whenever i get userName and password we call a Servlet to authenticate the user and to detemine which webapp to forward to..
    i have to call jsp accordingly from servlet in common webApp to JSP in different webapp.
    I m wonderning how it is possilble.
    As
    i don't know how to call another webApp using
    RequestDispatcher.forward () method and
    also
    i am not able to set paramters with the request whenever i user response.sendRedirect() method
    I am wondering what could be the way to pass paramer to the request from servlet in one webApp to JSP in another webApp
    Please help its urgent!!!
    thankx in advance

    forward() can't call another webapp.
    There are several ways you could do this.
    1) Share the session object across both webapps and set something as an attribute of the session.
    2) Use a database or file storage to record the transaction, then go to the second webapp, which picks up that info.

  • Please help about HttpConnection

    Hi all,
    I am facing a typical problem about HttpConnection() for BlackBerry.But it is working fine in all other devices except BlackBerry.Bellow is the code:
    public synchronized String getResponse(String sRequest)
    String sReturn = null;
    HttpConnection c = null;
    java.io.InputStream is = null;
    StringBuffer sb = new StringBuffer();
    int ch;
    int rc;
    try {
    sRequest=sRequest.trim();
    c = (HttpConnection) Connector.open(sRequest);
    c.setRequestProperty("User-Agent", System.getProperty("microedition.profiles"));
    c.setRequestProperty("Content-Type", "application/octet-stream");
    rc = c.getResponseCode();
    if (rc != HttpConnection.HTTP_OK) {
    return null;
    is = c.openInputStream();
    while ((ch = is.read()) != -1) {
    sb.append((char)ch);
    is.close();
    c.close();
    sReturn = sb.toString();
    } catch(Exception e) {
    System.out.println("URLCatch : "+sRequest);
    sReturn = null;
    return sReturn ;
    }*"sRequest" is a simple URL String without any WAPGatewayIP & WAPGatewayAPN.*
    Please tell me what is the wrong inside this connection method? Why this is not establishing the connection in BlackBerry? Should i have to change anything in this method for BlackBerry?I tried a lot but colud not solve.
    Please help.
    Thanks in advance

    Hello Susanta_Mandal,
    How you resolve the HttpConnection issue in balckberry handdheld ? i am facing the same probelm.
    I am developing a mobile phone application(J2ME) for a BlackBerry handheld.In this application i use servlets for fetching Data,but when calling the URL it doesn’t work and shows the IOException : Timed Out Error. I am using Vodafone sim card (Mumbai India) and it's GPRS is enabled. and I also crosscheck our application with other handsets like Nokia,Samsung etc. using same simcard and it's working fine.
    I try to connect the URL in two ways.
    1) Connector.open("http://161.117.177.166:8080/temp/chart;deviceside=true”);
    BlackBerry APN setting for Vodafone
    Select Option -- > Advanced Options -> TCP/IP
    APN Setting Enabled Checked
    APN :portalnmms
    Username for APN :Left Blank
    Password for APN :Left Blank
    Result Is :- IOException : Timed Out.
    2) Send APN Parameter along with URL
    Connector.open("http://161.117.177.166:8080/temp/chart;ConnectionTimeout=120000;deviceside=true;WapGatewayIP=010.010.001.100;WapGatewayPort=9401;WapGatewayAPN=portalnmms",Connector.READ_WRITE,true);
    Result Is :- net.rim.device.cldc.io.waphttp.WAPIOException
    Regard's
    Prasanna K

  • Just upgraded to SL, Can't get imail to work.? (newbie) Please help!!

    I keep getting this message. Can someone please help me out. I am totally clueless!!
    *ERROR MESSAGE:*
    _"You can't use this version of the application Mail with this version of Mac OS X.You have Mail 3.6."_

    It works now!
    Here is what I did...
    In spotlight I typed "mail", I opened up a "message", and it opened. I looked on my desktop and there was an "iMail" icon that was not there before. I was then able to access the mail normally as i would with Leopard. I deleted the old shortcut on my desktop and placed the new icon in the lower toolbar.
    Worked as good as new..

  • Please help about Custom View fo EditorKit

    Thank You for reply
    TextArea in Visual Studio .NET is somehow displayed like that.
    - public class Test{
    |
    | + public Test(){
    | | ....
    | _ }
    |
    | + public int load(){
    | | ......
    | _ }
    |
    and if u press + symbol, method code is displayed.
    thats why i want to customized EditorKit's Views
    Please Help Me....
    Thanks..

    Thank You for reply
    TextArea in Visual Studio .NET is somehow displayed like that.
    - public class Test{
    |
    | + public Test(){
    | | ....
    | _ }
    |
    | + public int load(){
    | | ......
    | _ }
    |
    and if u press + symbol, method code is displayed.
    thats why i want to customized EditorKit's Views
    Please Help Me....
    Thanks..

  • Newbie needs help about Data Encryption

    bought a Wireless G router Saturday, followed the instruction on the cd and hooked up the router to the Desktop (ME) and the cable modem.  I am happy that my new laptop (XP) can surf the Internet anywhere in the house.
    Can anyone see what I can doing when I surf the net via the laptop (wireless)?  Can they see for example what I am typing in a Word document?
    Since the desktop is connected to the router, can anyone see what's in my desktop computer?
    On the laptop, I click on properties of Linksys router, it says: Data Encryptiopn No.
    Do I need to set the laptop up for data encrytion?  What is it encryting?  stuff I type in my e-mail? stuff I type using Word?  Does it only encrypt stuff that I send through the Internet?
    What's WAP, WEP?  Do I need it?
    I called Linksys Tech Support, gave up after waiting for 30 minutes.
    Please help.

    No, no one can see what you type on your WORD document or whatever you are doing on your computers. It says NO ENCRYPTION because you have'nt enabled any security on your router. What the encryption does, is that it prevents other people that has a wireless PC to connect in your wireless network and get internet access. Once the encryption is enabled, if a PC tries to connect, it will be asked for a password, so if they input the incorrect password, they will not be able to connect and use your internet access. Did I make it clear?
    WPA and WEP are types of encryption. WPA is more secured but it is not compatible with all wireless cards or laptop PC (if they are wireless ready). So i do suggest you use WEP on your router.

Maybe you are looking for

  • Dashed Line Print Problem

    I used the arch tool to create sine waves in Illustrator which are shown below. When the EPS is placed into Acrobat and the PDF is printed the ends of the dashed sine waves print as solid lines. I tried grouping each sine wave and that did not solve

  • Weblogic.security.X509 alternative in WLS 9.1

    Hi All We have setup IIS 5.0 with 2 way SSL for client connection. We have also configured IIS weblogic proxy for Weblogic 9.1 using iisproxy.dll. The connection between IIS and WebLogic 9.1 is HTTP based. We are trying to get the client certificate

  • Notification Center Tip

    Dear Apple, I am not sure if i have to post it here, but it seemed the best place. I'm using a macbook air latets generation with mountain lion 10.8.2. What loved about the new notification center in iOS5 were the weather and stocks widgets, now my q

  • How to store UTF-8 characters in an iso-8859-1 encoded oracle database?

    How can we store UTF-8 characters in an iso-8859-1 encoded oracle database? We can NOT change the database encoding but need to store e.g. Polish or Russian characters besides other European languages. Is there any stable sollution with good performa

  • Cannot send attachments

    can not send emails with attachments. can send email without attachments.