Pass parameter to the jsp include
Hello,
Is it possible to pass a string to the <jsp:include page ?
Thanks!
~ Kyle
Use jsp:param.
Similar Messages
-
Repeating parameter names in jsp:include
Hi,
I have this jsp code fragment:
<div>
<jsp:include page="fragment_1.jsp">
<jsp:param name="param" value="hello world!"/>
</jsp:include>
<jsp:include page="fragment_2.jsp">
<jsp:param name="param" value="good morning!"/>
</jsp:include>
</div>
When this code executes, the value for param, as the fragment_2 is included, is "hello world!" and not "good morning!".
How can I use the same name for a param in fragment_2 ?
PietroThe problem is that nothing in the servlet specifications prohibits a requests from having more that one parameter with the same name. It looks that when you set a parameter with the jsp:param tag that it is appending another parameter with that name.
-
How to pass parameter to the Query String of the Named Queries'SQL
Firstly to say sorry,I'm a beginner and my English is very little.
Now I want to know
How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
Thanks.benzi,
Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
Also see section 5.9 and chapter 18 in the developer's guide.
thanks -
How to pass parameter to intro.jsp page ?
Hi all,
Anybody please tell me how to pass parameter to intro.jsp page.
Is there any param name defined in <forward > syntax ?
I have made following configuration in struts-config.xml file.
I want to pass parameter to intro.jsp page
<global-forwards>
<forward name="invalidsession" path="/intro.jsp" redirect="true" />
</global-forwards>
please reply soon.
Thanking you.Hi all,
I have a similar kind of question..
Iam trying to pass a string variable from JSP to servlet thro URL..
Im using tomcat5
COde:
String fname=request.getParamter("filename");
<jsp:forward page="/servlet/coreservlets.filedownload?name=" +fname />
It is generating a unterminated tag error..Please help.. -
How to pass parameter to my jsp apge included in adf inlineframe
Hi,
I would like to know how could i pass parameter to my adf inileframe src.
Because when i try to do this
<af:inlineFrame id="if1" source="/frontBackOffice/Scanning.jsp?param0=#{....}¶m1=#{....}" />
I have a error
ADF_FACES-30179:Pour plus d''informations, consultez le journal d''erreur du serveur à une entrée commençant par : l''élément UIViewRoot est NULL. Exception fatale lors de PhaseId : RESTORE_VIEW 1
Could you help me pleaseyou map the source to a backingbean.. and in the bean you just manipulate the parameters..
chk this link for an idea - search for af:inlineframe
http://biemond.blogspot.com/2009/02/facebook-adf-task-flow.html
<af:inlineFrame source="#{FaceBook.facebookLoginUrl}"
inlineStyle="width:99%; height:99%;"
shortDesc="Loginpage"/>
in the bean do this
private String facebookLoginUrl;
public String getFacebookLoginUrl() {
if (sessionID==null){
try {
client = new FacebookJaxbRestClient(APIKEY, SECRET);
token = client.auth_createToken();
facebookLoginUrl= "http://api.new.facebook.com/login.php?api_key=" + APIKEY + "&v=1.0&auth_token=" + token;
} catch (FacebookException ex) {
ex.printStackTrace();
return facebookLoginUrl;
} -
Pass Parameter to second.jsp using "form & action"
I wrote a JSP Portlet. Like the sample, multipage. But, I need to use <form> to pass the parameter to second.jsp
The first.jsp include:
<form name="parameters" method="POST" action="<%= HttpPortletRendererUtil.htmlFormActionLink(request,PortletRendererUtil.PAGE_LINK) + "?" + HttpPortletRendererUtil.portletParameter(request, "next_page") + "=second.jsp" %>" >
The provider.xml include:
<pageParameterName>next_page</pageParameterName>
But, error occur and show as following:
Wed, 21 Mar 2001 10:20:02 GMT
No DAD configuration Found
DAD name:
PROCEDURE : !null.wwpob_page.show
URL : http://oraas2:80/pls/null/!null.wwpob_page.show?_pageid=null
PARAMETERS :
===========
ENVIRONMENT:
============
Do I have to do something with next_page or pageID?
I have run the first.jsp in the sample that JPDK provided. After each click, the screen will refresh.
nullLeo,
The error you are getting is actually a portal error, you have an incorrect URL.
http://oraas2:80/pls/null/!null.wwpob_page.show?_pageid=null
If you notice, after pls, you should have a DAD name such as portal30. Instead you have null. Take a look at your Database access descriptors in Portal and update your URL.
Sue -
Syntax to pass parameter value to jsp using href in out.println
Hi,
I have the URL in the form as mentioned below:
<a href="b2c/marketing/showDocDetail.jsp"> <%=doc_no%></a>
I've created the hyperlink using href tag to the document number in the jsp using the below syntax.
<% String a1 = "Document ";
String a2 = "<a href=\"";
String a3 = "marketing/showDocDetail.jsp\">";
String a4 = doc_no;
String a5 = "</a>";
out.println(a1a2a3a4a5);
%>
When clicked the doc_no is passed to backend RFC and export parameter is retrieved to result.jsp where values along with doc_no are displayed.
the value after clicked is not being passed to action.java class that does the retreival.
Needful, backend class, bom, entry in config.xml is all maintained.
Please help me out with the syntax to pass the parameter value into java classHi Bharathi,
try below.
<%
String a1 = "Document ";
String a2 = "<a href=\"";
String a3 = "marketing/showDocDetail.do?docNo=";
String a4 = doc_no;
String a5 = " \">";
String a6 = doc_no;
String a7 = "</a>";
out.println(a1+a2+a3+a4+a5+a6+a7);
%>
I assume doc_no is java variable contains value of document number
Now create action entry in config.xml file. Suppose "actionDoc.java" class process it.
<action path="/marketing/showDocDetail" type="com.xyz.actions.actionDoc">
<forward name="success" path="/marketing/showDocDetail.jsp"/>
<forward name="error" path="/marketing/showDocDetail.jsp"/>
</action>
We are passing parameter docNo=doc_no to action class actionDoc.java in this class you can retrieve request parameter docNo from request object and then process it as you want.
Let me know if you face any problem or error.
eCommerce Developer
Edited by: Ecommerce Developer on Nov 9, 2009 8:35 AM -
Remove danger of using a request parameter in a JSP:include
HI,
I have a basic include where the filename is controlled by a request parameter:
<%String fileName = request.getParameter("param1")+".jsp"; %>
<jsp:include page="<%=fileName%>" flush="true" />This works fine but I am rather worried about the security as some can easily edit the URL to something like this:
http://www.mysite.com/include.jsp?param1=../../../passwords
Does anyone have any good security techniques that would strip out anything in param1 that could potentially be rather dangerous?
ThanksCheck/test the request parameter before using. Best way is to use a (controller) servlet for this.
-
How to pass parameter between two jsp pages using web link (not form)
Hi Friends,
I have two jsp pages and would like to pass a parameter from one JSP page (one.jsp) to another JPS page (two.jsp)
in one.jsp
<a href="two.jsp?ant="<%=ant%">"> <%=antName%> </a><br>
I don't know how to pass value of parameter "ant" to two.jsp from one.jsp.
Can anyone help this? Thank you in advance</a>Looks like you've got it almost right - just an extra unneeded "
<a href="two.jsp"?ant=<%= ant %>"><%=antName%></a>
which should render on the page as something like
My Ant Task
When you click the link, it should pass that parameter, and you can get it via request.getParameter(). -
Passing parameter to the i18n text from xml view in fiori app
Hi,
Could somebody let me know how to pass parameter to get the i18n text inside xml view of a Fiori app.
For e.g. inside my i18n properties file i have a entry like:
PEC_ISSUE={0}issues of total{1}
inside xml i use it like {i18n>PEC_ISSUE}
but now how do i pass those 2 parameters to this ??
i know in javascript it works with , (comma) but does not work in xml. Any help...
Thanks,
AshishHi Michele,
I found it. Below is the example from my coding.
<Text text="{parts: [{path: 'i18n>PEC_to'}, {path: 'promoprocsteps>RetailPromotionSalesFromDate_E'},
{path:'promoprocsteps>RetailPromotionSalesToDate_E'}],
formatter: 'retail.promn.promotioncockpit.utils.Formatter.formatDatesString'}" />
So you have to create a formatter and pass all the strings to the formatter and then do it inside JS.
In JS you do it in this way:
i18n.getText(i18String, [newString, string2]);
i hope this helps.
Regards,
Ashish -
Using a URL parameter by the JSP to pull in an html file for dynamic content ??
I would like to have a simple jsp which could be called from an URL
with a parameter. I'd like the parameter to be used by the JSP to form
a filename of a second file. This second will be a chunk of HTML
which is sucked in to the JSP to form some content in a particular
HTML table cell.
The ASP is this :
<%
targetPath = Server.MapPath(Request.QueryString("Content")+".txt")
// makes a variable called targetpath which is a filename called
something.txt
Dim filesys, myloadedfile, line
Set filesys = CreateObject("Scripting.FileSystemObject")
Set myloadedfile = _
filesys.OpenTextFile(targetPath,1,0)
Do
// loops round each line of the something.txt file putting them in the
JSP
line = myloadedfile.Readline
%>
<%=line%>
<%
Loop Until myloadedfile.AtEndOfStream
myloadedfile.Close
%>
Please can someone help me out with some info on the JSP equivalent
please?
Thanks Heaps
Rob
See Content tag on http://www.servletsuite.com/jsp.htm
This custom tag lets to add any file (even the outisde
of your web application).
[email protected] (rob) wrote:
>I would like to have a simple jsp which could be called from an URL
>with a parameter. I'd like the parameter to be used by the JSP to form
> a filename of a second file. This second will be a chunk of HTML
>which is sucked in to the JSP to form some content in a particular
>HTML table cell.
>
>The ASP is this :
>
><%
>targetPath = Server.MapPath(Request.QueryString("Content")+".txt")
>// makes a variable called targetpath which is a filename called
>something.txt
>
>Dim filesys, myloadedfile, line
>Set filesys = CreateObject("Scripting.FileSystemObject")
>Set myloadedfile = _
> filesys.OpenTextFile(targetPath,1,0)
>Do
>// loops round each line of the something.txt file putting them in the
>JSP
> line = myloadedfile.Readline
>%>
><%=line%>
><%
>Loop Until myloadedfile.AtEndOfStream
>myloadedfile.Close
>%>
>
>Please can someone help me out with some info on the JSP equivalent
>please?
>
>Thanks Heaps
>
>Rob
-
How to pass value from the jsp file to a java bean
I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
<%db.setDatabase(database);%>are coding to set my databse connection
private String database;
public Conn(){
try{
Class.forName("org.gjt.mm.mysql.Driver");
DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
String data=getDatabase();
String url = "jdbc:mysql://localhost/"+data;
Connection conn = DriverManager.getConnection(url);
setConnection(conn);
catch(SQLException e){
System.out.println(e.toString());
catch(Exception e){
System.out.println(e.toString());
public void setDatabase(String Database){
this.database = Database;
public String getDatabase(){
return this.database;
} and Below are error produce
Note: sun.tools.javac.Main has been deprecated.
/mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
in class bgoc.dbConn.Conn.
db.setDatabase(database);
^
1 error, 1 warning
please help me soon. any that come to your will help
thank youI have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
<%db.setDatabase(database);%>are coding to set my databse connection
private String database;
public Conn(){
try{
Class.forName("org.gjt.mm.mysql.Driver");
DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
String data=getDatabase();
String url = "jdbc:mysql://localhost/"+data;
Connection conn = DriverManager.getConnection(url);
setConnection(conn);
catch(SQLException e){
System.out.println(e.toString());
catch(Exception e){
System.out.println(e.toString());
public void setDatabase(String Database){
this.database = Database;
public String getDatabase(){
return this.database;
} and Below are error produce
Note: sun.tools.javac.Main has been deprecated.
/mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
in class bgoc.dbConn.Conn.
db.setDatabase(database);
^
1 error, 1 warning
please help me soon. any that come to your will help
thank you -
How to pass parameter to the method in EJB session bean from Managed Bean
Hi,
I need some guidance in accessing the EJB session bean methods from one of my backing Bean. I use EJB 3.0 Entity Beans and EJB Session Beans. I have to get value from my page and pass it thro the backing bean to the respective EJB session bean. I have no clue of how to do this,
When i click a command link on the page, in its backing bean click method, i am able to get a value and store in a variable under its click action. But from there i am not knowing of how to pass it as a variable to the EJB session bean and hence execute the query(this is where we have to pass the variable as a parameter in its where clause) in the entity bean.
I wanna know how to make a call to the EJB session bean and from there execute the Enitity bean.
Guide me regarding this....
Thanks
riUnfortunately dependency injection doesn't work for jsf backing beans, so you have to use a normal jndi lookup to find your session bean. The following example shows you how to find a session bean and call a method:
public void commandButton_actionListener(ActionEvent actionEvent) {
Context ctx;
try {
ctx = new InitialContext();
helloWorldEjb = (HelloWorldEJB)ctx.lookup("HelloWorldEJB");
hello = helloWorldEjb.sayHello(name);
System.out.println(hello);
} catch (NamingException e) {
e.printStackTrace();
} -
Problem with flush=true in the jsp:include tag
Hello
I have deployed a JSP based application , based on the apache struts framework. The web server is Sun One Webserver 6 Service Pack4, on a windows 2000 machine
The same application was tried on SunONE application server 7, and it works without any problem. However in this case the following error , on the page
javax:servlet.jspexception:Illegal to flush within a custom tag
Does this mean flush="true" is not allowed within custom tags
Or is there a workaround for this
Any help is appreciated
thanks
- AniruddhaHi,
This is a known problem, ��flush before you include�� limitation in JSP 1.1.
As a result, you have to state flush="true" every time you include a jsp using <jsp:include> tag if you are using JSP1.1.
Fortunately, it is fixed in JSP1.2. The flush attribute controls flushing. If true, then, if the page output is buffered and the flush attribute is given a ��true�� value, then the buffer is flushed prior to the inclusion, otherwise the buffer is not flushed. The default value for the flush attribute is ��false��.
Gary Wang
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/ -
Passing parameter to the external process like notepad, calc etrc.
Dear Experts,
Can anyone help me, to find out how can we pass the value parameter, during calling external process like Notepad, Calculator etc.
I want to fetch other data related to the parameter from the other ERP.
Eg. If I pass 'Hi ' as a parameter, then I want to print this text into the Notepad.
Please help.
Thanks in Advance
Kedar
Edited by: Kedar Paranjape on Jan 30, 2012 4:08 AMHi Kedar,
Welcome to SCN.First check whether is any rfc available for this or not.You can use GUI_RUN to call from sap.
Regards,
Madhu.
Maybe you are looking for
-
SSO Partner Application not working
Hi, I have OBIEE running on a different box. I need to enable SSO for OBIEE. I deployed the analytics.war file in the home oc4j container of Oracle Portal and manually registered it as a Partner Application, made following changes in mod_osso.conf in
-
Hi, Can anyone tell me what is the best way to handle this issue A credit memo has been issued to the customer for 75000$ since the invoice was cancelled. It is sitting in as an open item as on account cash since the customer has paid for that invoic
-
Where can I buy appleworks for my blueberry laptop??
I have a blueberry laptop apple ibook. I got it second hand. Everything works great. I just dont have the apple works program. My laptop is running mac os 9.2 where can I buy a compatible apple works program? also is this upgradable to a more recent
-
Attribute Columns in Table Fnd_Lookup_Values
Hello All, I am trying to update the attribute columns (Attribute1, Attribute2, Attribute3 etc) in the table Fnd_Lookup_Values from the Applications (Forms) side. How do I do it? From Application Developer > Application > LookUps > Common, I can Ente
-
/sap/hana/xs/sqlcc/ - 403 forbidden
/sap/hana/xs/sqlcc/ is blocked even for our SYSTEM user (403 forbidden), how do we gain access to it?