How to go to different jsp pages based on different selection?
I put SELECT and OPTION in the page. I want to go to different jsp
pages when different OPTION been selected, but there is only one URL
in the action attribute. How can I do it ?
add a javascript on the select tagg:
onchange=javascript:jump(this);
Then make a javascript to pull out the url from the value attribute in the
selected option tagg.
http://javascript.internet.com/
"hgui" <[email protected]> wrote in message
news:[email protected]..
> I put SELECT and OPTION in the page. I want to go to different jsp
> pages when different OPTION been selected, but there is only one URL
> in the action attribute. How can I do it ?
Similar Messages
-
How can I share values between different jsp pages?
Hi,
I'm doing a jsp, bc4j application (JDeveloper 9.0.3), and I need to share some values between different jsp pages. To do this,
I have used the tag <jsp:usebean.....></jsp:usebean> in this way:
on pageone.jsp
<jsp:useBean id="param" scope="session" class="MyPackage.Parameters" ></jsp:useBean>
on pagetwo.jsp
<jsp:useBean id="param" scope="session" class="MyPackage.Parameters" ></jsp:useBean>
and so on, in order to refer to the same instance of the class "Parameters".
After deploying, the application works well only if the client is the same pc where the AS resides, otherwise the variables of "Parameters" are null.
Please, could you help me?
Thanks
Nunzio.I am seeing an indication on 9.0.3 that static includes are not static, but instead always dynamic. The compiler generates a call to the included page, and doesn't include the content in the calling page as it should.
-
CurrencyString in JSP-page based on a sql-only ViewObject
I have made a JSP-page based on a sql-only ViewObject against the hr employees table, and
the currencyString on the page doesn't work! The <c:out value="${Row.currencyString}"/>
makes a "*" on every row. How come that this only happens to sql-only ViewObjects? The sql
in the view is simply "select * from employees", and I'm using the 10g production build 1605.You just have to make sure that the view object has a Key Attribute, then the indicator will show appropriately. The key is required so that currency can be tracked.
This is documented in the help topic "About the Oracle ADF Bindings" in the section "About the Iterator Binding" -
How to do transactions in jsp pages using Java & MySQL ?
Hi,
I'm a newbie..
I'd like to know "How to do transactions in jsp pages using Java & MySQL ?"
Platform: Windows XP, Apache Tomcat 5.5, MySQL 5, Java bean without EJB
what are the the different types of transactions? Differences between them?Pls provide examples?
Which among them is the best method to implement a transaction?
Pls help me...
thnx in advance...http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
-
How to print report in jsp page?
excuse me,i am new to jsp
may i know how to pritn report in jsp page or html?
tqhere is a hacked up example.. i ripped out a lot, so it may not compile, but you get the idea... the full version is really long and not much new info.. just all awt/display stuff...
package rowe;
import javax.swing.*;
import java.util.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.sql.*;
import utility.*;
import java.awt.print.*;
public class rowePrint extends JFrame implements ActionListener, Printable{
String printType = "";
static JButton j = new JButton("Print");
FontMetrics fm;
String jID, promotion, product, jComments;
public void getInfo(int jid) {
ResultSet rs;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:rowe");
Statement stmt = conn.createStatement();
rs = stmt.executeQuery("select j.id as jID, j.comments, p.title as pTitle, p.product, p.packagingCartonCost, p.foldingQuarterCostPerM, p.foldingQuarterCostPerM, j.customizationOption as setupFee, p.perMcost, p.qtyCarton, d.name as dName, d.contact as dContact, d.email as dEmail, d.address as dAddress, d.city as dCity, d.state as dState, d.zip as dZip, d.phone as dPhone, d.fax as dFax, r.name as rName, j.totalQty, j.orderIn, j.estFreight, j.miscCost, j.coverSelection, j.imprintSelection from jobs j, promotions p, dealers d, reps r where j.promotion = p.id and j.dealer = d.id and j.rep = r.id and j.id = " + jid);
rs.next();
jID = rs.getString("jID");
jComments = rs.getString("comments");
promotion = rs.getString("pTitle");
product = rs.getString("product");
} catch (Exception e) {
System.out.println("getinfo: " + e);
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof JButton) {
wookie();
public void wookie() {
PrinterJob printJob = PrinterJob.getPrinterJob();
Paper paper = new Paper();
PageFormat page = new PageFormat();
paper.setImageableArea(0, 0, 600, 780);
page.setPaper(paper);
printJob.setPrintable(this, page);
try{
//printJob.pageDialog(page);
// if (printJob.printDialog()) {
printJob.print();
} catch (Exception e) {
System.out.println("wookie1" + e);
public static void main(String[] args) {
rowePrint at = new rowePrint("Invoice");
at.getInfo((new Integer(args[0])).intValue());
at.drawShapes();
// at.wookie();
public void drawShapes() {
setBounds(0, 0, 670, 550);
addWindowListener(new WindowAdapter() {public void windowClosing(WindowEvent e) {System.exit(0);}});
j.setBounds(10, 10, 10, 10);
j.addActionListener(this);
getContentPane().setLayout(null);
getContentPane().add(l);
getContentPane().add(j);
show();
public rowePrint(String s){
printType = s;
public void paint(Graphics g) {
g.setFont(new Font("Serif", Font.BOLD, 18));
g.drawString(promotion, 20, 30);
g.setFont(new Font("SansSerif", Font.PLAIN, 4));
g.drawString("" + new java.util.Date(), 20, 37);
g.setFont(new Font("Serif", Font.BOLD, 21));
g.drawString("Rowe Furniture", 440, 35);
g.fillRect(440, 40, 145, 25);
g.setColor(Color.white);
fm = g.getFontMetrics(new Font("Serif", Font.BOLD, 21));
g.drawString(printType, 512 - (fm.stringWidth(printType) / 2), 60);
public int print(Graphics g, PageFormat pf, int pi) throws PrinterException {
if (pi >= 1) {
return Printable.NO_SUCH_PAGE;
paint(g);
return Printable.PAGE_EXISTS;
} -
Branch to different page based on the selection of select list
Hi All,
I have to create an application in which i have a form containing a field with static lov's ...
now i want that whenever i click on a save button it branches to some page based on the selected value of lov of that field...
like if i select marketing from lov and press save button then it will branch me to marketing page...
so how can i achieve that in my apex application
please help if anyone knows the answerin the page branch, change the page to *&PX_LOV_NAME.*
change X to page number and the LOV_NAME to the name of your select list
Don't forget to add the . on the end
Hope this helps -
How to produce different outbound delivery based on different schedule line
Hi,
I want to create different outbound delivery based on different schedule line time,but system automatically create a combining delivery document with a sum number.
For example,
schedule line
date goods issue time qty
2011.08.24 08:00:00 1
2011.08.24 10:00:00 1
when I create the outbound delivery, system create only one document with quantity 2.
But I need two documents with quantity 1 in every document.
How to solve this requirement?
Thanks.Hi,
I viewed the item requirement in VOFM, found that they are status check for the copy control, not the split control.
Could you please give me a example?
In the copy control--header--conditions----order requirement ( or combination requirement )
They are like this :
(001)
bp_subrc = 0.
Check that reference document is an order (if not, issue error)
if cvbak-vbtyp cn vbtyp_auft. "Auftrag?
perform message_handling in program (programmname)
using cvbap-posnr
'003'
'E'
'VL'
cvbak-vbeln
space
space
space.
bp_subrc = 1.
check 1 = 2.
endif.
Check the status of the Fonds-Management
IF CVBUK-FMSTK EQ 'A'.
PERFORM MESSAGE_HANDLING IN PROGRAM (PROGRAMMNAME)
USING CVBAP-POSNR
'889'
'E'
'VL'
CVBAK-VBELN
SPACE
SPACE
SPACE.
BP_SUBRC = 1.
CHECK 1 = 2.
ENDIF.
Check that order is not blocked by the automatic credit check
if cvbuk-cmgst ca 'B' and
cvbuk-abstk ne 'C'.
Credit check is irrelevant for correction deliveries
if v50agl-sofauftrag eq charx and
tvak-lisof eq space and
likp-lfart eq tvak-korli.
else.
perform message_handling in program (programmname)
using cvbap-posnr
'060'
'E'
'VL'
cvbak-vbeln
space
space
space.
bp_subrc = 1.
check 1 = 2.
endif.
endif.
Check the user status from the order header
if not cvbak-objnr eq space.
call function 'SD_STATUS_VBAK_CHECK_INTERN'
exporting
i_objnr = cvbak-objnr
i_vrgng = vrgng_sddn
exceptions
allowed_with_warning = 01
not_allowed = 02
object_not_found = 03
others = 99.
if sy-subrc ne 0.
Fehler nicht bei MODKZ = '2' (Erlaubt mit Warnung)
if sy-subrc gt 1.
bp_subrc = 7.
Else ist nötig, da Routine mit "changing sy-subrc" gerufen wird
elseif sy-subrc eq 1.
bp_subrc = 0.
endif.
Check Global delivery flags
line deleted: "n_911988
perform message_handling in program (programmname)
using cvbap-posnr
sy-msgno
sy-msgty
sy-msgid
sy-msgv1
sy-msgv2
space
space.
Bei Fehler: Bedingung verlassen
check bp_subrc ne 7.
endif.
endif. -
How to call Servlet from jsp page and how to run this app using tomcat..?
Hi ,
I wanted to call servlet from jsp action i.e. on submit button of JSP call LoginServlet.Java file.
Please tell me how to do this into jsp page..?
Also i wanted to execute this application using tomcat.
Please tell me how to do this...? what setting are required for this...? what will be url ..??
Thanks.well....my problem is as follows:
whenever i type...... http://localhost:8080/appName/
i am getting 404 error.....it is not calling to login.jsp (default jsp)
but when i type......http://localhost:8080/appName/login.do........it executes servlet properly.
Basically this 'login.do' is form action (form action='/login.do').....and i wanted to execute this from login jsp only.(from submit button)
In short can anyone please tell me how to diaplay jsp page using tomcat 5.5
plz help me. -
How to develop and Run .jsp page from Jdeveloper 10g
Dear All,
I need to develop one small JSP page using Jdeveloper10g. pls share information How to develop and Run .jsp page from Jdeveloper 10g.
Thanks in Advance,
Hanimi.Hi Gyan,
Any Idea how to get DB connection for JSP Pages.
Our Java guys developed one JSP page for Login page.
After Log in instead of standard responsibilites page we calling custom jsp page, For getting DB connection they defined one properties file and hard coded DB details on that file and calling, but client is not accepting hard coding.
Pls give any idea for getting DB connection directly in JSP pages.
Hanimi. -
The best way of carrying the search string across different jsp pages?
I heard about transfer object. What about carrying object with session for different pages.
Please suggest me the best approach to
carry the search string across different jsp pages?
thanks
vijendraI doubt its possible even with a fancy HTML widget, although the last iBA update now allows links to other books.
-
HOW DO I STOP MY JSP PAGE FROM INSERTING DATA IN DATABASE EACH TIME REFRESH
Hi,
HOW DO I STOP MY JSP PAGE FROM INSERTING DATA IN DATABASE EACH TIME REFRESH?
Thanksemekaco wrote:
Hi,
HOW DO I STOP MY JSP PAGE FROM INSERTING DATA IN DATABASE EACH TIME REFRESH?
ThanksSTOP SHOUTING!
now, while displaying the form generate some random number, or take the current time in millis or whatever. Put that number in a hidden field. Insert that unique number along with the real data into the database, but before you do check if the number already exists. If it does you can be pretty sure this is a resubmit of the same data, so don't allow it. This is one way of many to prevent resubmission of existing data.
A good way to prevent a refresh from resubmitting altogether is to do a redirect to a result page right after you deal with the POST request. When the user presses refresh then, he/she will refresh the redirect and not the form submit. -
How to set title of jsp page from resource bundle
hi ,
How to set title of jsp page from resource bundle....Depends on how you configured and declared the resourcebundle in your JSP. The usual way is just<title>${resourceBundle.messageKey}</title>
-
How user can change password @ jsp page
[att1.html]
Try http://dev2dev.bea.com/codelibrary/code/pwchange.jsp
It is for 8.1, but it can be a good starting point
<[email protected]> wrote in message news:[email protected]..
How i can develop a jsp page that let user change their login password that stored in reaml residered at WebLogic 7.0 srever.
Thanks in advance.
[att1.html]
-
How to create dynamic ed flash charts based on user selected fields in Orac
Hi all,
Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
Thanks
ManishHello,
Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
NPE error when navigating to next page based on lov selection
hi there am having problem whn navigating to next page based on lov selection,when i select value and click the button to navigate am geting NPE ERROR
{code}
<DCUtil> <findSpelObject> [598] DCUtil, returning:oracle.jbo.uicli.binding.JUFormBinding, for uam_view_pageDefs_SelectOrgPageDef_WEB_INF_Updatetaskflow_definition_xml_Updatetaskflow_definition
<DCIteratorBinding> <releaseDataInternal> [599] Releasing iterator binding:variables
<DCIteratorBinding> <releaseDataInternal> [600] Releasing iterator binding:UpdUamOrganisationLovIterator
<DCIteratorBinding> <releaseDataInternal> [601] Releasing iterator binding:UpdUamOrganisation1Iterator
<DCIteratorBinding> <releaseDataInternal> [602] Releasing iterator binding:UamUserdetailsViewVo1Iterator
<XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
javax.servlet.ServletException: java.lang.NullPointerException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 38 more
Caused by: java.lang.NullPointerException
at showSelectedOrg(OrgDetails.java:2455)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... 45 more
THIS IS THE LINE AM GETING THE ERROR
method.getParamsMap().put("rowKey", newVal);
<af:selectOneChoice value="#{bindings.Orgid1.inputValue}"
required="true"
id="soc1" autoSubmit="true" valuePassThru="true"
contentStyle="width:145px">
<f:selectItems value="#{bindings.Organisationid.items}" id="si1"/>
</af:selectOneChoice>
<af:commandButton text="UpdateOrganisation"
id="cb1"
action="#{pageFlowScope.addMember.showSelectedOrg}"/>
public String showSelectedOrg() {
/* if(getorgids() == null ||getorgids().equals(null)){
JSFUtils.addFacesErrorMessage("Select Atleast One Organisation");
JSFUtils.showFacesErrorMessage("Select Atleast One Organisation");
BindingContext lBindingContext = BindingContext.getCurrent();
BindingContainer bindings = lBindingContext.getCurrentBindingsEntry();
// get the list binding for the Organisation lov
JUCtrlListBinding list = (JUCtrlListBinding)bindings.get("Organisationid");
// get the selected index from the list which is stored in the Orgidd1 attribute
AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("Orgid1");
Integer selid = (Integer)attr.getInputValue();
// load the listdata
Object row = list.getDisplayData();
// get the selected row from the list
Row lFromList = (Row)list.getValueFromList(selid);
// from the row we get the PK the orgnasationId
Object lAttribute = lFromList.getAttribute("Organisationid");
Object orgname = lFromList.getAttribute("Organisationname");
Number newVal = (Number)lAttribute;
String neworg = (String)orgname;
_logger.info("Information: selected Organisation = " + newVal);
System.out.println("neworg " + newVal);
System.out.println("testorg " + neworg);
selectedState = neworg;
// get the MethodAction for setCurrentRowWithKeyValue
OperationBinding method = bindings.getOperationBinding("setCurrentRowWithKeyValue");
// set hte needed parameter as the organisation id
method.getParamsMap().put("rowKey", newVal);
method.execute();
// after execution check for errors
List errors = method.getErrors();
Exception ex = (Exception)errors.get(0);
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, ex.getMessage(), "Select Atleast One Organisationtest");
FacesContext.getCurrentInstance().addMessage(null, msg);
// keep on page in case of an error
// navigate to the next page
return "show";
{code}
am in jdeveloper 11.1.1.6.0adf009, please read the post I posted the link to in my previous replay. The old code format tag don't work in the new forum!
Still the same error. The stack trace still points to it, you only need to read it carefulle
javax.faces.el.EvaluationException: java.lang.NullPointerException
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
Caused by: java.lang.NullPointerException
OrgDetails.showSelectedOrg(OrgDetails.java:2456)
The origin is
method.execute();
and the real reason is
MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51);
What does it tell you?
Timo
Maybe you are looking for
-
Is there continuous play of a song while importing cd's iTunes?
I would like to know if there is a feature for, once the songs you are importing from a cd, when you play a song from the cd itself, if you hit the eject button while the song is playing, the song continues to play without delay. If there isn't, this
-
HELP !! Trying to video chat with a friend I haven't seen in 23 years.
I'm getting the "insufficient bandwidth" error when trying video or audio chat. PowerMac on my end, new iMac on the other end. My friend has successfully done video chat with a friend overseas so it seems that her end is fine. I do have a Linksys WRT
-
[CS3][JS] everyItem() and getElements()
I am trying to work out how everyItem() and getElements() work. In the following snippet I'm trying to get the top margin of every page to change, without using a loop. (I realise I could do this with masterpages, but that isn't the point of this exe
-
How can i reboot my imac when it won't open?
-
do I need to upgrade?