EJB3- get id after persist
Hi to all...i have an entity bean (UserEBean) and its "Id" is defined like:
@Id(generate=GeneratorType.SEQUENCE, generator="USERS_SEQ")
@javax.persistence.SequenceGenerator(
name="USERS_SEQ",
sequenceName="users_user_id_seq"
@Column(name="user_id", nullable=false)
public Long getUserId() {
return userId;
Respective session bean has the method:
public void save(UserEBean bean)
// TODO Auto-generated method stub
manager.persist(bean);
In an other class i set properties in an UserEBean variable and then i call:
userDAO.save(my_userbean);
How can i get the entity's ID which i just persisted?
Thanks to all!
Paolo.
Hi to all...i have an entity bean (UserEBean) and its "Id" is defined like:
@Id(generate=GeneratorType.SEQUENCE, generator="USERS_SEQ")
@javax.persistence.SequenceGenerator(
name="USERS_SEQ",
sequenceName="users_user_id_seq"
@Column(name="user_id", nullable=false)
public Long getUserId() {
return userId;
Respective session bean has the method:
public void save(UserEBean bean)
// TODO Auto-generated method stub
manager.persist(bean);
In an other class i set properties in an UserEBean variable and then i call:
userDAO.save(my_userbean);
How can i get the entity's ID which i just persisted?
Thanks to all!
Paolo.
Similar Messages
-
Jrun getting stopped after interval of time
Hi All,
I have application running on Jrun4. Application getting down
after interval of time...
Here's the error from log file..
06/12 18:26:28 error
javax.ejb.EJBException
at
jrun.ejb.interceptors.InvokerInterceptor.handleThrowable(InvokerInterceptor.java:75)
at
jrun.ejb.interceptors.InvokerInterceptor.invokeObjectMethod(InvokerInterceptor.java:159)
at
jrun.ejb.interceptors.ContainerManagedTransactionInterceptor.invokeTransactedMethod(Conta inerManagedTransactionInterceptor.java:148)
06/12 18:27:16 error Transaction is inactive
java.lang.IllegalStateException: Transaction is inactive
at
jrunx.tyrex.tm.impl.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:31 1)
at
jrun.ejb.interceptors.ContainerManagedTransactionInterceptor.handleTransactionException(C ontainerManagedTransactionInterceptor.java:445)
at
jrun.ejb.interceptors.ContainerManagedTransactionInterceptor.invokeTransactedMethod(Conta inerManagedTransactionInterceptor.java:150)
at
jrun.ejb.interceptors.TransactionInterceptor.invokeObjectMethod(TransactionInterceptor.ja va:130)
at
jrun.ejb.interceptors.StatelessSessionInstanceInterceptor.invokeObjectMethod(StatelessSes sionInstanceInterceptor.java:49)
06/12 18:26:38 metrics thrds (bsy/tot): 0/3 Sessions: 249
TotMem=159400 Free=54009
Please help us to solve the issue...
Regards,
HarshadJayashree,
This time, i am getting some other error....
06/19 11:11:39 info Transaction rolled back on JDBC
Connection from DataSource GPDB
06/19 11:11:58 metrics thrds (bsy/tot): 1/3 Sessions: -416
TotMem=320200 Free=165689
06/19 11:12:58 metrics thrds (bsy/tot): 1/3 Sessions: -418
TotMem=320328 Free=172949
06/19 11:13:58 metrics thrds (bsy/tot): 2/4 Sessions: -418
TotMem=320456 Free=186284
06/19 11:14:58 metrics thrds (bsy/tot): 2/4 Sessions: -422
TotMem=320520 Free=187180
06/19 11:15:58 metrics thrds (bsy/tot): 2/4 Sessions: -422
TotMem=320520 Free=187168
06/19 11:16:58 metrics thrds (bsy/tot): 2/4 Sessions: -424
TotMem=320520 Free=187131
06/19 11:17:58 metrics thrds (bsy/tot): 2/4 Sessions: -426
TotMem=320520 Free=188615
06/19 11:18:58 metrics thrds (bsy/tot): 2/3 Sessions: -426
TotMem=320520 Free=188533
06/19 11:19:58 metrics thrds (bsy/tot): 2/3 Sessions: -430
TotMem=320328 Free=188376
06/19 11:20:58 metrics thrds (bsy/tot): 2/3 Sessions: -432
TotMem=320328 Free=188359
06/19 11:21:58 metrics thrds (bsy/tot): 2/3 Sessions: -432
TotMem=320328 Free=188807
06/19 11:22:58 metrics thrds (bsy/tot): 2/3 Sessions: -434
TotMem=320328 Free=188805
06/19 11:24:00 metrics thrds (bsy/tot): 2/3 Sessions: -436
TotMem=320328 Free=188834
06/19 11:25:00 metrics thrds (bsy/tot): 3/4 Sessions: -437
TotMem=320328 Free=187441
06/19 11:25:48 user FileServlet: destroy
06/19 11:25:48 error [axis]
javax.servlet.UnavailableException: Cannot initialize
RequestProcessor of class com.getpaid.thincl
ient.web.control.RequestProcessor:
java.lang.ClassNotFoundException:
com.getpaid.thinclient.web.control.RequestProcessor
06/19 11:25:48 error [axis]
javax.servlet.UnavailableException: Cannot initialize
RequestProcessor of class com.getpaid.thincl
ient.web.control.AdminRequestProcessor:
java.lang.ClassNotFoundException:
com.getpaid.thinclient.web.control.AdminRequestProce
ssor
06/19 11:25:48 user FileServlet: destroy
06/19 11:25:49 error Session data is not serializable
(ID=223020de4bca$CF$02$5) - session is lost
06/19 11:25:53 error Session data is not serializable
(ID=2230b6e602e6$16$A6$F) - session is lost
06/19 11:25:56 error Session data is not serializable
(ID=223090e7a53d$26$03$0) - session is lost
06/19 11:25:57 info 184 session(s) persisted
06/19 11:25:57 user FileServlet: destroy
06/19 11:25:57 error [axis]
javax.servlet.UnavailableException: Cannot initialize
RequestProcessor of class com.getpaid.dmb.we
b.control.DrsRequestProcessor:
java.lang.ClassNotFoundException:
com.getpaid.dmb.web.control.DrsRequestProcessor
06/19 11:25:57 user resource: destroy
06/19 11:25:57 error Session data is not serializable
(ID=2230d87fb7cd$BB$8E$1) - session is lost
06/19 11:25:57 error Session data is not serializable
(ID=2230d9dca5bak$8E0$12) - session is lost
06/19 11:25:57 error Session data is not serializable
(ID=22304cc50835$FDC$90$) - session is lost
06/19 11:25:57 user FileServlet: destroy
06/19 11:25:57 error [axis]
javax.servlet.UnavailableException: Cannot initialize
RequestProcessor of class com.getpaid.rw.web
.control.ReportRequestProcessor:
java.lang.ClassNotFoundException:
com.getpaid.rw.web.control.ReportRequestProcessor
06/19 11:25:57 user FlashGatewayServlet: destroy
Can u please help me to resolved the issues?
Regards,
Harshad -
Screen fields not getting displayed after Line 16
Hi All,
There is a screen exit created in IW51, now the new requirment is to add 3 more fields. I added the fields below the exiting fields, in line number 15 , 16 &17. After executing the Tcode I could find that the field created in line 17 is not getting displayed in runtime. I have increased the screen length. The fields if moved to line numbers below 16 then they are getting displayed. Can anyone help me to find why it is not getting displayed after line 16.Hi,
Can you give me the Enhancement name?
I searched for the exits using package , but i did not find any screen exists for that IW51 Tcode? -
Production Reporting out put not getting deleted after 30mins what we set.
Hi,
This issue regarding Production Reporting. In the workspace the report output not getting deleted after 30minutes (while publishing the report settings were like delete after 30 mins). Any suggestions please .....
Thanks
VenkatHi Deepak,
Please chek the field / value which u have changed is relavant to printouts of the change.
You can check with following path
SPRO> MM > Purchasing > Message > Fields Relevant to Printouts of Changes.
Confirm tick is provided for PO ( P)
Vivek -
Hyperlinks from other placed indd documents or pdfs getting lost after export to PDF
after upgrade vom CS 5.5 to CS 6: hyperlinks from other placed indd documents or pdfs getting lost after export to PDF
I tried all options for the as well known and working export optionsafter upgrade vom CS 5.5 to CS 6: hyperlinks from other placed indd documents or pdfs getting lost after export to PDF
I tried all options for the as well known and working export options -
my ipad is notb getting open after my baby had bang with the door no scratch has come but it is not switching on can u please advice.
i will be thankful if u provide sufficient information.Hi Naveen,
What you are doing is not supported by Oracle. From EM Database Console FAQ (863631.1):
What action needs to be taken if the hostname or SID of the database server is changed?
If there is a hostname or SID change for the database server then the database console needs to be recreated. There is no other solution if the hostname or SID is changed other that recreating the database console. All database console configuration files are created under the hostname_sid directory and the configuration files along with the repository keeps reference of the hostname, which is why dbconsole needs to be reconfigured if there is change in hostname/sid.
Refer : Note.293678.1 How To Reconfigure DB Control After a Hostname, Domain name or Listener Change Has Occurred On The Server
And take a look at note 278100.1: How To Drop, Create And Recreate DB Control In A 10g Database
Eric -
"disp+work" process in not getting started after kernel upgradation
Hello Experts,
Good day…..,
I am new to SAP. I installed SAP ECC6 EHP4 with default kernel version 701 and it was working fine.
I have upgraded kernel version from 701 to 741, but the “disp+work” process is not getting started after kernel upgrade.
I have posted “dev_W0” log &
“disp+work” command result obtained in CMD prompt of respective server.
Please help me out in this. Thanks all in advance.
“dev_w0” Log”
trc file: "dev_w0", trc level: 1, release: "741"
* ACTIVE TRACE LEVEL 1
* ACTIVE TRACE COMPONENTS all, MJ
M sysno 55
M sid TNG
M systemid 562 (PC with Windows NT)
M relno 7410
M patchlevel 0
M patchno 42
M intno 20020600
M make multithreaded, Unicode, 64 bit, optimized
M profile D:\usr\sap\TNG\SYS\profile\TNG_DVEBMGS55_ABTHMSSB01
M pid 2392
M
M
M Wed Jul 23 02:04:35 2014
M kernel runs with dp version 208000(ext=117000) (@(#) DPLIB-INT-VERSION-208000-UC)
M length of sys_adm_ext is 500 bytes
M ***LOG Q0Q=> tskh_init, WPStart (Workp. 0 2392) [dpInit.c 731]
M DpCommonParamInit: rdisp/core_file_size = default --> no change
I MtxInit: 30000 0 0
M
M Wed Jul 23 02:04:36 2014
M DpIPCInit2: read dp-profile-values from sys_adm_ext
M DpShMCreate: alloate/attach shared memory (mode=ATTACH)
M DpShMCreate: sizeof(wp_adm) 24288 (1104)
M DpShMCreate: sizeof(tm_adm) 51472080 (256080)
M DpShMCreate: sizeof(ca_adm) 432000 (72)
M DpCommTableSize: max/headSize/ftSize/tableSize=500/16/7464064/7583152
M DpShMCreate: sizeof(comm_adm) 7583152 (14904)
M DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
M DpShMCreate: sizeof(slock_adm) 0 (296)
M DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
M DpShMCreate: sizeof(file_adm) 0 (80)
M DpSockTableSize: max/headSize/ftSize/tableSize=500/16/520064/520080
M DpShMCreate: sizeof(sock_adm) 520080 (1016)
M DpShMCreate: sizeof(vmc_adm) 0 (3208)
M DpShMCreate: sizeof(wall_adm) (ft=41664/fi=67472/hd=64/rec=192)
M DpShMCreate: sizeof(amc_rec_adm) (ft=86464/fi=67472/hd=64/rec=416)
M DpShMCreate: sizeof(websocket_adm) (ft=28864/hd=64/rec=272)
M DpShMCreate: sizeof(gw_adm) 64
M DpShMCreate: sizeof(j2ee_adm) 3936
M DpShMCreate: SHM_DP_ADM_KEY (addr: 00000000103D0050, size: 60433936
M DpShMCreate: allocated sys_adm at 00000000103D0250
M DpShMCreate: allocated wp_adm_list at 00000000103E20F0
M DpShMCreate: allocated wp_adm at 00000000103E2410
M DpShMCreate: allocated tm_adm_list at 00000000103E84F0
M DpShMCreate: allocated tm_adm at 00000000103E8730
M DpShMCreate: allocated ca_adm at 00000000134FF000
M DpShMCreate: allocated comm_adm at 0000000013568980
M DpShMCreate: system runs without slock table
M DpShMCreate: allocated sock_adm at 0000000013CA4130
M DpShMCreate: allocated vmc_adm_list at 0000000013D232C0
M DpShMCreate: system runs without VMC
M DpShMCreate: allocated gw_adm at 0000000013D23560
M DpShMCreate: allocated j2ee_adm at 0000000013D237A0
M DpShMCreate: allocated ca_info at 0000000013D24900
M DpShMCreate: allocated wall_adm (ft) at 0000000013D24B40
M DpShMCreate: allocated wall_adm (fi) at 0000000013D2F000
M DpShMCreate: allocated wall_adm (head) at 0000000013D3F990
M DpShMCreate: allocated amc_rec_adm (ft) at 0000000013D3FBD0
M DpShMCreate: allocated amc_rec_adm (fi) at 0000000013D54F90
M DpShMCreate: allocated amc_rec_adm (head) at 0000000013D65920
M DpShMCreate: allocated websocket_adm (ft) at 0000000013D65B60
M DpShMCreate: allocated websocket_adm (head) at 0000000013D6CE20
M DpShMCreate: initialized 21 eyes
M DpCommAttachTable: attached comm table (header=0000000013568980/ft=0000000013568990/fi=0000000013C86E10)
M DpSockAttachTable: attached sock table (header=0000000013CA4130/ft=0000000013CA4140)
X EmInit: MmSetImplementation( 2 ).
X MM global diagnostic options set: 0
X <ES> client 0 initializing ....
X <ES> EsILock: use Semphore 33 for locking
X Using implementation view
X <EsNT> Using memory model view.
M <EsNT> Memory Reset disabled as NT default
X ES initialized.
X
X Wed Jul 23 02:04:37 2014
X mm.dump: set maximum dump mem to 96 MB
M ThStart: taskhandler started
M ThInit: initializing DIA work process W0
M
M Wed Jul 23 02:04:44 2014
M ThInit: running on host ABTHMSSB01
I MtxInit: 0 0 0
M
M Wed Jul 23 02:04:45 2014
M calling db_connect ...
B Loading DB library 'D:\usr\sap\TNG\DVEBMGS55\exe\dboraslib.dll' ...
B Library 'D:\usr\sap\TNG\DVEBMGS55\exe\dboraslib.dll' loaded
B Version of 'D:\usr\sap\TNG\DVEBMGS55\exe\dboraslib.dll' is "741.10", patchlevel (0.42)
C Prepending D:\usr\sap\TNG\DVEBMGS55\exe to Path.
C Register application info.
C
C Wed Jul 23 02:04:47 2014
C Oracle client version: 10.2.0.4.0, (dbsl 741 040714, UNICODE[2])
C Detailed Oracle client (patch) info not available.
C *** ERROR => Connect via SAPUSER not supported for kernel >= 740.
[dbsloci.c 2406]
C Only Secure Connect method possible.
M ***LOG R19=> ThDbConnect, db_connect ( DB-Connect 000256) [thDatabase.c 76]
M in_ThErrHandle: 1
M *** ERROR => ThInit: db_connect (step TH_INIT, thRc ERROR-DB-CONNECT_ERROR, action STOP_WP, level 1) [thxxhead.c 2281]
M Wed Jul 23 02:04:48 2014
M
M Info for wp 0
M
M pid = 2392
M severity = 0
M status = 0
M stat = WP_NEW
M waiting_for = NO_WAITING
M workerType = DP_WORKER_DIAWP
M act_cs_count = 0
M csTrack = 0
M csTrackRwExcl = 0
M csTrackRwShrd = 0
M mode_cleaned_counter = 0
M control_flag = 0
M report = > <
M action = 0
M tab_name = > <
M
M ThIErrHandle: no current incoming request
M
M
M *****************************************************************************
M *
M * LOCATION SAP-Server ABTHMSSB01_TNG_55 on host ABTHMSSB01 (wp 0)
M * ERROR ThInit: db_connect
M *
M * TIME Wed Jul 23 02:04:48 2014
M * RELEASE 741
M * COMPONENT Taskhandler
M * VERSION 1
M * RC 16797709
M * MODULE D:/depot/bas/741_REL/src/krn/si/th/thxxhead.c
M * LINE 2470
M * COUNTER 1
M *
M *****************************************************************************
M
M PfRejectStatistic: clear statistic record
M PfClearAllRec: clear statistic area
M PfClearAllRec: statRecordAction = STAT_RECORD_ACTION_REJECT
M Entering TH_CALLHOOKS
M ThCallHooks: call hooks for event BEFORE_DUMP
M ThIErrHandle: entering ThSetStatError
M ThIErrHandle: do not call ThrCoreInfo (no_core_info=0, in_dynp_env=0)
M call ThrShutDown (1)...
M ***LOG Q02=> wp_halt, WPStop (Workp. 0 2392) [dpnttool.c 335]
“Desp+Work” Command result:
C:\Users\tngadm>disp+work
disp+work information
kernel release 741
kernel make variant 741_REL
compiled on NT 6.0 6002 x86 MS VC++ 16.00 for NTAMD64
compiled for 64 BIT
compilation mode UNICODE
compile time Jul 9 2014 16:39:46
update level 0
patch number 42
source id 0.042
RKS compatibility level 0
supported environment
database (SAP, table SVERS) 700
710
701
702
703
711
720
730
731
732
738
740
operating system
Windows NT 5.1
Windows NT 5.2
Windows NT 6.0
Windows NT 6.1
Windows NT 6.2
Windows NT 6.3
C:\Users\tngC *** ERROR => Connect via SAPUSER not supported for kernel >= 740.
[dbsloci.c 2406]
C Only Secure Connect method possible.
For this issue you need to set up SSFS.
1639578 - SSFS as password storage for primary database connect
I am new to SAP. I installed SAP ECC6 EHP4 with default kernel version 701 and it was working fine.
I have upgraded kernel version from 701 to 741
Are you sure kernel 741 is compatible with an EHP 4 system ?
Read this SAP note
1969546 - Release Roadmap Kernel 740
Regards
RB -
Hello,
I am trying to update my mac os x 10.7.3 to 10.7.4
Update gets stuck after 5 mins while updating.
Regards
DK MEDK ME wrote:
Hello,
I am trying to update my mac os x 10.7.3 to 10.7.4
Update gets stuck after 5 mins while updating.
Try going to
http://support.apple.com/downloads/
and download the Clint Combo 10.7.4 update and try installing that.
Cheers
Pete -
Desktop items get unsorted after cold boot on Snow Leopard 10.6.2
The Desktop items get unsorted after cold boot on Mac OS X 10.6.2 (Snow Leopard).
I have about 25 items (mostly aliases of files or folders) on the Desktop, sorted as vertical rows on left and right side of the screen.
When the issue hits, they all get located as vertical rows on the right side of the screen, unsorted in relation to their custom relative position before the issue.
Any idea? Thanks.Hi ApMaX
According to wikipedia the .DS_Store files on Mac OS X contain the metadata for icon position and view settings. If the file permissions for the Desktop .DS_Store file were incorrect then one could assume that the icon position and view settings aren't being saved.
First let us check the permissions on the .DS_Store file for the Desktop we can do this by running the following command in Terminal (located in the Utilities folder)
ls -ld /Users/<<UserName>>/Desktop/.DS_Store
replacing <<UserName>> with the short name of your user account (name as viewed in the finder sidebar)
On my system I get the following permissions readout
-rw-------@
Further info on .DS_Store files: http://en.wikipedia.org/wiki/.DS_Store
If your permissions differ then we will look at correcting them.
J.C
Message was edited by: J.C -
how do i delete everything off my iphone 6 before i send it off to get repaired after water damage and can't use it
If it does not respond when plugged to a computer running the latest version of iTunes, then it is indeed dead and no content will be recoverable.
-
The screen of my mac gets black, while the same the youtube works normally and the buttons maintain the blue color. What should I do?? It gets over after 5 to ten minutes and I only have it 2 weeks..
Welcome to Apple Support Communities
As this may be a hardware problem, make a backup of your files onto an external drive with Time Machine (if you have important files) and take the Mac to an Apple Store or reseller, or contact with Apple > http://support.apple.com/kb/HE57 You will get your Mac replaced or repaired for free. -
I get Apple Mail through having activated POP in gmail. Since a week, when I click on "Get Mail", after a delay I see brielfly flashing "Incoming message 70 or whathever the number in waiting is." and the green band extends to the end of the line in a fraction of a seconde, but then dissapears and no mails gets downloaded. It is not a matter of password etc.. that are all OK. Strangely, yesterdays, some email did come through after a few days of failure, but not anymore. Could it be related to hacking or something like that? Any thing I could try?
I have OX 10.6.8.
Many thanks for your kind suggestionsMaybe these will help:
https://discussions.apple.com/message/17677533#17677533
https://discussions.apple.com/message/18324129#18324129
https://discussions.apple.com/message/18203126#18203126 -
When i am on the 4 step in Search Result Display options, i get errors after 2 radio buttons
I am using Oracle portal 9.0.2 version
When i am on the 4 step in Search Result Display options, i get errors after 2 radio buttons
Default Search Results Page
This Search Portlet
An unexpected error has occurred (WWS-32100)
User-Defined Exception (WWS-11230)
Unknown Exception (WWC-45131)
ORA-20101:
ORA-06512: at "PORTAL.WWSBR_STDERR", line 437
ORA-06512: at "PORTAL.WWPOB_API_PAGE", line 3369
ORA-01403: no data found
ORA-01403: no data found (WWC-11230)
No data found (WWS-32101)
ORA-1403: ORA-01403: no data found
ORA-01403: no data found (WWC-36000)
Error: An unexpected error occurred: User-Defined Exception (WWC-43000)
Please help me with this one
P.S I tried to run inctxgrn.sql, but it did not solve the problemi solved the problem by runing 2 scripts as a portal user
You can refer to bug - 2418089. This was fixed in 9.0.2.3
begin
wwpre_api_value.set_value_as_number
p_path => 'oracle.portal.search',
p_name => 'searchresultpageid',
p_level_type => wwpre_api_value.SYSTEM_LEVEL_TYPE,
p_level_name => null,
p_value => 6,
p_commit => true
commit;
end;
begin
wwpre_api_value.set_value_as_number
p_path => 'oracle.portal.search',
p_name => 'searchresultpagesiteid',
p_level_type => wwpre_api_value.SYSTEM_LEVEL_TYPE,
p_level_name => null,
p_value => 6,
p_commit => true
commit;
end;
NOTE - The difference is the value of 'p_name' attribute. If u see carefully it is 'searchresultpagesiteid'. The first time u run this the value is 'searchresultpageid'. -
How to get ProcessInstanceId after Workflow KickOff. Am able to get the InvocationId
How to get ProcessInstanceId after Workflow KickOff. Am able to get the InvocationId.
This is the Snippet :
InvocationResponse response = myServiceClient.invoke(request);
invocationId = response.getInvocationId();
System.out.println("ClientParams="+response.getClientParameters());
System.out.println("OutputParams="+response.getOutputParameters());
System.out.println("invocationId="+invocationId);
JobManager jobManager = new JobManager(myFactory);
JobStatus jobStatus = null;
JobId myJobId = new JobId(invocationId);
jobStatus = jobManager.getStatus(myJobId);
System.out.println("Job Status: " + jobStatus.getStatusCode());
if (jobStatus.getStatusCode()==JobStatus.JOB_STATUS_COMPLETED)
System.out.println("INVOCATION COMPLETED SUCCESSFULLY!");
InvocationResponse jobResponse = jobManager.getResponse(myJobId);
jobManager.terminateJob(myJobId);
jobResponse.getInvocationId();
Process id need to be fetched after Workflow Kickoff
Can anyone please help me..?There are 5 process level variables that get populated when you invoke a process. They are
/process_data/create_time
/process_data/creator_id
/process_data/id
/process_data/status
/process_data/update_time
Within the xPath builder you can differentiate them from other process variable because they are italicized.
Now you can create your own process variable - let's say called pid - and have it contain the process id which is stored in /process_data/id.
The xPath would look something like
/process_data/@pid = /process_data/@id
If the pid variable is marked as an 'output' variable, then it will be returned as part of the InvocationResponse.
Jasmin -
HTML result gets truncated after including of the JSF page
Hi there,
I'm trying to create a page that will include dynamically content of JSF pages from another web application.
Thus, there is a web application (Pages) that is deployed under web context: /test-pages and another web application (Faces) that is deployed under web context: /test-faces.
The source code of /test-pages/IndexPage.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<title>
IndexPage
</title>
</head>
<body>
<h3>Page Start</h3>
<jsp:include page="header.jsp"/>
<br>
<h1>Index Page of the test-pages application</h1>
<br>
<jsp:include page="footer.jsp"/>
</body>
</html>
The source code of /test-pages/header.jsp
<%
ServletContext servletContext = request.getSession().getServletContext().getContext("/test-faces");
RequestDispatcher reqDispatcher = servletContext.getRequestDispatcher("/faces/header.jsp");
reqDispatcher.include(request, response);
%>
The source code of /test-pages/footer.jsp
<h2>Simple Footer</h2>
The source code of /test-faces/header.jsp
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:subview id="myID">
<f:verbatim>
<h2>Faces Header</h2>
</f:verbatim>
</f:subview>
The HTML execution result (http://localhost:7001/test-pages/IndexPage.jsp):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<title>
IndexPage
</title>
</head>
<body>
<h3>Page Start</h3>
<h2>Faces Header</h2>
Could you help me understand, why the result gets truncated after including of the JSF page.
Thanks,
SashaThanks you for reply!
Unfortunately, still no luck!
Any other ideas will be highly appreciated!
Maybe you are looking for
-
Weblogic Server 6.1 in Linux.
when I try to start the server It's giving the following error. Please suggest. The WebLogic Server did not start up properly. Exception raised: weblogic.management.configuration.ConfigurationException: undefined mbean reference: Targets at weblogic.
-
How to get maps on my native iPhone application
Hello, I m working on an application where i need to display the complete map on the application. I dont have any idea abt this. Kindly let me know how can i get the map so that i can display it on my application. I m working on an iPhone simulator.
-
Tools & Filters suddenly not working
A couple of days ago when I was trying to use the Liquify filter it opened but within it, I was not able to do anything, no controls or tools within it where active. Tried a couple of other filter and they worked. Restarted Elements, did not helt. Re
-
JSP generates error - thread.java:481 - Source code viewing is disabled
I run IBM WebSphere 3.5.3 on a WinNT platform. When I try to run my JSP testpage (which is a normal HTML page with jsp extension) I get the error message: thread.java:481 - Source code viewing is disabled. What is this? What can I do to get it runnin
-
Wie kann ich Lightroom 5 mit dem Internet verbinden?
Seit Lightroom 5 behauptet die Anwendung, ich habe keine Internetverbindung, was definitiv nicht stimmt. Daran scheitert sowohl die Übertragung eines fertiggestellten Buchprojekts an blurb als auch updates und verbindung zu Hilfeseiten aus der Anwend