Can I execute four servlets in succession using rd.forward
Hi^^,
I have created 1 JSP and four servlets which are as follows:
Login.jsp
SessionLogin.java
Authenticate.java
Authorize.java
Bologin.java
The Login.jsp transfers the control to SessionLogin.java which transfers the control to Authenticate.java which then transfers the control to Authorize.java which then transfers the control to Bologin.java. I do this using the RequestDispatcher code. My query is that is it technically correct to do this or I am violating ther MVC principle.
thanks
Hi,
fyi, my project is part of a larger project which is based on MVC architecture. I just need to follow the flow and code the servlets so that they are executed in the right sequence. However thanks for your suggestions, i do value them.
Regards,
Prashant
Similar Messages
-
Can't execute SQL Named query that uses connect by...
I'm having problems using the connect by with ReportQuery.setHierarchicalQueryClause (detailed in earlier post) so I defined a named query to execute the following sql;
select distinct(role_id)
from role_principal
connect by prior role_id = principal_id
start with principal_id = #principalId
When I run similar SQL in SqlPlus, i get results like this;
ROLE_ID
202
500
501
502
503
But when I run the query using Toplink like this;
Vector args = new Vector();
args.add(principal.getId());
roles = (Vector) session.executeQuery("orclGetRolesOfPrincipal", args);
I get this exception;
TopLink Warning]: 2005.10.05 10:58:14.362--ClientSession(18082301)--Thread(Thread[main,5,main])--Local Exception Stack:
Exception [TOPLINK-6044] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041116)): oracle.toplink.exceptions.QueryException
Exception Description: The primary key read from the row [DatabaseRecord(
ROLE_PRINCIPAL.ROLE_ID => 202)] during the execution of the query was detected to be null. Primary keys must not contain null.
Query: ReadAllQuery(oracle.xdo.server.security.authorization.model.RolePrincipalRelation)
at oracle.toplink.exceptions.QueryException.nullPrimaryKeyInBuildingObject(QueryException.java:662)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:349)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObjectsInto(ObjectBuilder.java:633)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.buildObjectsFromRows(DatabaseQueryMechanism.java:141)
at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:440)
at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:727)
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:559)
at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:408)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1977)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:973)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:945)
at oracle.xdo.server.dataservices.impl.toplink.TLDataAccessManagerImpl.getObjects(TLDataAccessManagerImpl.java:346)
It seems to have a problem that there's not a parent record for role_id 202, which is a root level record and so should not have a parent.
I appreciate any help that can be provided.
Thanks,
-Tim WatsonHello Tim,
Not sure of the problem in the first post, but in this one, you are executing the query as a ReadAllQuery. The results only contain the role_id, but TopLink expecting atleast all the primary key fields inorder to build the objects to return them to you. Try executing this SQL in a report query instead, or set the results to return all the fields so TopLink can build the objects.
Best Regards,
Chris -
The javadoc for HttpUtils.parseQueryString() says that it has been deprecated and "moved" to HttpServletRequest, but it looks to me like it has not.
Specifically, if I call request.getAttribute("javax.servlet.include.query_string") on an included servlet to get its query string, I can't parse it.
Looks like I either have to write my own parser, or use the deprecated method of HttpUtils. Why do I have to make this crappy choice? Why is HttpUtils deprecated, instead of fixed? Or is there another way?again with the assuming that one has the request object.
Nope, got a string, that's it.
back to original post. -
Can not execute 'asset year change' successfully.
Hi all,
I started run asset accounting sub-module of ECC 6.0 in 2007. After I posted depreciation on all of periods of fiscal year 2008. I change asset fiscal year to 2009 by 3 steps: First, I checked all of periods from fiscal year 2007 to fiscal year 2008 to ensure them were posted. Second, I executed "Year-end Closing" fiscal year 2007 and 2009. Third, I run "Fiscal Year Change" program to change fiscal year into 2009. But, the system responsed as below:
"Target fiscal year specifications 2009 wrong for company code MH01
Message no. AA709
Diagnosis
You have requested a fiscal year change for the year 2009.
In company code MH01, this is not the fiscal year which directly follows the current, or just completed, fiscal year.
System Response
Company code MH01 will not be processed.
Procedure
Correct your entry."
I'm very confuse. Please help me.Hi,
check t.code:ob52 and make sure that periods in 2009 has been open?
all the best
Prasad -
How can i execute codedui scripts by using dll
how Can I Execute Coded UI scripts by using the DLL from anywhere after creating the build
Hi yellesh,
If you mean that you want to run your test with bat file, as far as I know, we could call the MSTEST command line.
set mstestPath="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
%mstestpath%\mstest /testcontainer:AutomatedUITest.dll /resultsfile:TestOutput.trx
Reference:
https://social.msdn.microsoft.com/Forums/en-US/29af65b3-598b-4205-80e6-35b942113f3b/how-to-run-coded-ui-scripts-trhu-bat-file?forum=vsautotest
https://social.msdn.microsoft.com/Forums/en-US/42a5d8f2-fe58-4133-b09d-28fa0553ab1a/run-coded-ui-test-in-certain-moment-in-future?forum=vsautotest
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Executing a full-text search using KM APIs
Hello,
I'm doing a KM Folder search using KM APIs. The code looks similar to this
=====================================================
IGenericQueryFactory queryFactory = GenericQueryFactory.getInstance();
IQueryBuilder queryBldr = queryFactory.getQueryBuilder();
IPropertyName ipn = new PropertyName("http://sapportals.com/xmlns/cm", "lang");
IQueryExpression queryExpr =
queryBldr.like(ipn, language.toLowerCase());
IGenericQuery query = queryFactory.toGenericQuery(queryExpr);
IResourceList result = query.execute(
collection, Integer.MAX_VALUE,7,false);
======================================================
Issue: How can I execute a full-text search using these APIs.
i.e. If the keyword exists in the body of the document, the search should return that document.
Any help on this would be much appreciated.
Thanks,
HarmanThanks for your helpful answers.
So, which APIs should I use to accomplish my goal? I need to search for custom KM attributes, AND the body of the document.
We are currently running EP6 SP2.
Should I use the IFederatedSearch API.
Thanks,
Harman -
i m using repot engin to disply report its running in windows well in my local machine but whn i deployeed it to test server (AIX) it gave me this error server is websphere
E SRVE0026E: [Servlet Error]-[Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.]: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:175)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:91)
at java.awt.Font.initializeFont(Font.java:333)
at java.awt.Font.<init>(Font.java:368)
at com.actuate.ereport.engine.templateio.TmplReader.getFont(Unknown Source)
at com.actuate.ereport.engine.templateio.TmplReader.getFont(Unknown Source)
at com.actuate.ereport.engine.templateio.XMLTmplReader.handleFont(Unknown Source)
at com.actuate.ereport.engine.templateio.XMLTmplReader.closeObjects(Unknown Source)
at com.actuate.ereport.engine.templateio.XMLTmplReader.endElement(Unknown Source)
at com.actuate.ereport.engine.templateio.XMLTmplReader.startParsing(Unknown Source)
at com.actuate.ereport.engine.templateio.XMLTmplReader.readTemplate(Unknown Source)
at com.actuate.ereport.engine.templateio.TmplReader.ReadTemplateFromBytes(Unknown Source)
at com.actuate.ereport.engine.templateio.TmplReader.readTemplate(Unknown Source)
at com.actuate.ereport.engine.ACJEngine.readTemplate(Unknown Source)
at com.actuate.ereport.engine.ACJEngine.readTemplate(Unknown Source)
at com.actuate.ereport.eapi.factory.DesignFactoryImpl.load(Unknown Source)
at com.actuate.ereport.eapi.factory.DesignFactoryImpl.load(Unknown Source)
at ccrmsweb.actions.PrintRpts.execute(PrintRpts.java:129)
Please tell me wht exactly i have to do, i men exactly its very urgentCheck this thread:
Re: Can't connect to X11 window server using 'localhost:0.0' -
How can I execute program after using F4_Filename function?
Hi all,
I'm a new user on the forum. I've been working with ABAP and SAP for a few weeks. I wrote a program for importing data from excel file to SAP using BDC. During searching this forum I found information about F4_Filename function which allows users to browse the disc for a file. I'd like to add this function to my program. I have a parameter for a file name but this is an ordinary static string field. When I added the code which I found in the message on this forum the rest of program doesn't execute.
This is simple program for example:
REPORT Z_TEST8_AB.
DATA f_name TYPE STRING.
PARAMETERS p_file like rlgrap-filename DEFAULT 'c:\test.xls'.
f_name = p_file.
write:/ f_name.
This program works correctly. There is a field for parameter. I can change the default name for a file.
After all, I can run the program (F8) and rest of the code is executed. The field for parameter dissapears from the screen and the file name is displayed. ( command write)
Now I added a function F4_Filename
REPORT Z_TEST8_AB.
DATA f_name TYPE STRING.
PARAMETERS p_file like rlgrap-filename DEFAULT 'c:\test.xls'.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-repid
dynpro_number = syst-dynnr
field_name = 'p_file'
importing
file_name = p_file.
f_name = p_file.
write:/ f_name.
I can browse a computer for a file now but after selecting the file I can't run the rest of the code. When I click on the icon or press key F8 the field for parameter doesn't dissapier and the command write is not executed.
What do I do wrong?
Could anyone suggest me a solution? How can I executed the code after using this function?
Thanks in advance.
Regards,
Arek.Hi arkadiusz,
1. simple
2.
<b>start-of-selection.</b>
f_name = p_file.
write:/ f_name.
regards,
amit m. -
How can I execute a query using RSCRMBW_REPORT?
Hi everybody,
I have read the document:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3ba5e590-0201-0010-59b1-cab51fd245b7
and found it is very intersting for my requirement.
I copied the report,and modified it regarding our case.But during the second call,I get runtime error.
I debugged the code, and found the error results from method GET_CUBETYPE() of class CL_RSCRMBW_BAPI.In this method,it tries to create a object which is TYPE REF TO cl_rsd_dta.
CREATE OBJECT lr_dta
EXPORTING
i_infoprov = g_s_status-infocube
But g_s_status-infcube is null.
I am not able to find where this 'infocube' component in this g_s_status struction is filled,even I found,I don't know how I can give this infocube parameter from report which 2 FM are called.
My code is following:
parameters: p_repuid TYPE RSCRMSTATUS-REPORTUID
DEFAULT 'Z_IC_01/Z_COMP_Q003'.
parameters: p_split type BAPI6110DIM-DIM_NAM.
data:name_query TYPE CHAR50,
result_table LIKE RSCRMSTATUS-TABNAME,
it_return LIKE BAPIRET2 OCCURS 2 WITH HEADER LINE,
infocube TYPE CHAR30,
compid TYPE CHAR30.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_repuid.
CALL FUNCTION 'RSZ_COMPONENT_TREE_GET'
EXPORTING
i_title = 'Query auswählen'(031)
IMPORTING
E_INFOCUBE = infocube
E_COMPID = compid
EXCEPTIONS
OTHERS = 1.
IF sy-subrc GT 0.
ENDIF.
concatenate infocube '/' compid into p_repuid.
START-OF-SELECTION.
CALL FUNCTION 'RSCRMBW_REPORT'
EXPORTING
i_mode = 'OPEN'
i_reportuid = p_repuid
I_PACKSIZE = 10000
I_EXECMODE = 'TABLE'
I_EXTRACT = 'ZBWTEST'
I_SPLIT = p_split
I_CLEAREXTRACT = 'X'
TABLES
E_T_RETURN = it_return.
CALL FUNCTION 'RSCRMBW_REPORT'
EXPORTING
i_mode = 'START'
i_reportuid = p_repuid
I_PACKSIZE = 10000
I_EXECMODE = 'TABLE'
I_CLEAREXTRACT = 'X'
TABLES
E_T_RETURN = it_return.
So far this creation of report is only the 2nd step.But I am not sure how step 3 to step 6 should be done so that the report can be execute exactly.
What should I do? Pleas help me!
Thanks in advance
Regards,
Liying
Message was edited by: Liying Wang
Message was edited by: Liying Wang
Message was edited by: Liying WangLiying
Were you able to get a solution to this problem? I am facing the same issue too. The g_s_status-infocube is showing blank.
Regards
Dilip -
How can i execute a workflow using a bapi/wapi??
Hi All,
How can i execute a workflow using a bapi/wapi??
pls advice
thanksHi Hrus,
it's not as simple as a single BAPI to approve a workflow.
Workflow comes with a Workflow API (WAPI) that you can use to programmatically interact with the workflow system. The WAPI is implemented as a group of RFC-enabled function modules that are prefixed with "SAP_WAPI_".
Approving a workflow is simply taking a decision path for a workflow item. It is logically no different to rejecting the same workflow item or any other workflow decision.
As part of NetWeaver workflow is tightly coupled to the WAS platform you are running on so you may need to perform WAPI operations slightly differently on older releases.
Some of the WAPI calls you might need to use include: -
SAP_WAPI_GET_HEADER to get the workitem header
SAP_WAPI_READ_CONTAINER to get the workitem container
SAP_WAPI_GET_OBJECTS to get the attached objects
SAP_WAPI_DECISION_READ to get a list of possible decisions
SAP_WAPI_SET_WORKITEM_STATUS to set the workitem status
SAP_WAPI_WRITE_CONTAINER to write to the workitem container
SAP_WAPI_EXECUTE_WORKITEM to execute the workitem
I usually do what you are trying to do by adding the decision to the workflow container and then executing the workflow.
Be warned, you can really stuff things up if you get this wrong! Make sure you know what you are doing.
Quoting from Practical Workflow for SAP by Alan Rickayzen, et al from SAP Press...
Writing directly to the workflow container is dangerous because it can compromise the integrity of the process.
...be careful that you do not waste time duplicating existing ad hoc features of SAP's Workflow Engine.
For example you can use events (combined with wait steps), instead of container modifications to force the workflow to restart.
Cheers
Graham Robbo -
Can't execute net use with CF9
On our win 2003 dev server we cfexecute a batch file which in turn calls another batch file, CONNECT.COM which temporarily connects to each of our production servers so that we can copy new files over to production using BeyondCompare. This has been working fine for years.
CONNECT.COM is like this but of course encrypted:
REM %1 is drive letter, e.g. X: $2 is sharename, e.g. "\\dw1\dw"
net use %1 %2 {synchuser password here} /USER:domainname\synchuser /persistent:no
We recently upgraded from CF7 to CF9 and at the same time switched to using a non-administrative account to run CF under. Now our synchronization script won't complete, i.e. it runs the batch file to the point where CONNECT.COM is called then times out while trying to make the connection.
We also run this script as a CF scheduled task and have the same problem so we tried running the task using an admin username/password.. That didn't help.
I'm an administrator and can run the batch file with no problem. I can also run it using a windows scheduled task running under the admin uesrname/password we tried with the CF scheduled task. It just seems that ColdFusion can no longer execute the NET USE command.
Any ideas?
ThanksIt sounds like the account used to start the ColdFusion service does not have the rights it needs on the servers in question. Either change the account that the CF service runs under, or give the CF account the necessary priviledges to the files in question.
-
How can i know which index will be used when executing the query ?
1 ) I have query in which i have 3-4 tables but there multiple index on one column .
so how can i know which index will be used when executing the query ?
2) I have a query which ia taking too much time . how can i know which table is taking too much time ?
3) Please Provide me some document of EXplain plan ?Hi Jimmy,
Consider the below example
/* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
CREATE TABLE FIRST AS
SELECT * FROM all_objects;
UPDATE FIRST
SET object_name = 'TEST'
WHERE owner != 'SCOTT';
CREATE INDEX idx_first ON FIRST(object_name);
SELECT *
FROM FIRST
WHERE object_name = 'TEST';
It has not used index
Execution Plan
Plan hash value: 2265626682
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 58678 | 7334K| 163 (4)| 00:00:02 |
|* 1 | TABLE ACCESS FULL| FIRST | 58678 | 7334K| 163 (4)| 00:00:02 |
/* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
SELECT *
FROM FIRST
WHERE object_name = 'emp';
This has used the index
Execution Plan
Plan hash value: 1184810458
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 128 | 1 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| FIRST | 1 | 128 | 1 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_FIRST | 1 | | 1 (0)| 00:00:01 |
From this we can come to the conclusion that, whether to use one index or not by oracle
would also depend on the data which is present in the table. This has to be this way as
we see in the bind peeking, if oracle sticks to only one plan, say only use the full table
scan, it would be a performance hit when it searches for the second query ie where object_name
='emp';
2.
If we have a query like below.
select * from emp
where upper(ename) = upper(:p_ename);
Evenif we have the index on ename column, oracle wouldn't be able to use the index, as there is a function in the predicate column. If you need oracle to use the index, we need to create a function based index as below.
Create index idx_ename on emp(upper(ename));
Regards,
Cool -
How can i upload files in servlets and also using jsp
means that uploading files(.doc) or any files by using servlets and jsps
yawmark wrote:
saichand wrote:
means that uploading files(.doc) or any files by using servlets and jsps
[http://www.google.com/search?q=How+can+i+upload+files+in+servlets+and+also+using+jsp]
~Good topic titles are indeed brilliant search keywords. It's sad to see that it won't even come in the mind of the topicstarters to Google it before posting the topic. -
Can we execute multiple tasks using emcli
Hi,
I know we can execute any task on target using emcli but just wondering if we can execute multiple command in one emcli execution,
also does any one has any idea about how to pass the target variables in emcli command.
Thanks,
RituHi Salman,
Thanks for your reply but I do not want to use deplyoment procedured as this means for patching and provisioning related tasks,
I want to automate the health checks using EMCLI and for that I can use submit job verb of emcli,
I just wanted to if i have multiple command to pass to emcli,how to do that ?
Regards,
Ritu -
how can I see whatever I print through System.out.println in my servlets when I use iplanet 4.1
Hi Nitin,
Look out the below link, Hope this helps you.
http://knowledgebase.iplanet.com/ikb/kb/articles/4235.html
http://knowledgebase.iplanet.com/ikb/kb/articles/4790.html
http://knowledgebase.iplanet.com/ikb/kb/articles/4699.html
Regards,
Dakshin.
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers/support.
Maybe you are looking for
-
My iTunes simply will not open. I double click the icon and the cursor becomes an hour glass for a few seconds, then goes back to normal and nothing happens. I've tried uninstalling/reinstalling multiple times, but the problem remains. Can someone pl
-
When I export a file to interactive pdf or another swf file it does not show the flipped version of the flash file imported in it.It shows the original unflipped version!!!.. what should i do???
-
Help with Linking A Report in SCCM 2012
I've got a report that shows us Flash Players Versions by Count. I'd like to be able to create a linked report that shows the specific computers that have a specific version. The current report looks like this I'd like to be able to click on a link i
-
My ipad mini was connected to VGA projector but no image was seen
my ipad mini was connected to VGA projector but no image was seen
-
Just instaled but...
hi! got debian and gparted show me that arch is instaled but don't see the root(/) on mount point is that correct? http://i38.tinypic.com/10onsow.png also i can't boot into arch(got this error on grub): booting arch root (hd0,0) filesyste