| |

VerySource

 Forgot password?
 Register
Search
View: 923|Reply: 5

Ask two questions Java problem in servlet

[Copy link]

2

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

Post time: 2020-3-17 17:30:01
| Show all posts |Read mode
Ask two questions
1. The following code, how to end after throwing an error page? That is, the following code, how to goto after the (... 333;) pseudo-statement?
2. In the program, if there is a judgment of if (aaa == null), how to find a simple picture? End the following doIt () function?

code show as below,


// @Override
public void doIt (HttpServletRequest request, HttpServletResponse response)
throws EXXXException, EXXXXFatalException {
Ranch
String urlAllOK = "/plugins/DelDocsPlugin/jsp/End21AllOK.jsp";
String urlError = "/plugins/DelDocsPlugin/jsp/Error.jsp";
Ranch
ServletContext sc = getServletContext ();
if (sc == null) {
String returnSearchResultXXXList = "Failed in deleted!";
sc.setAttribute (KEY_RETURN_TYPE_ERROR_XXX, returnSearchResultXXXList);


try {
sc.getRequestDispatcher (urlError) .forward (request, response);

} catch (Exception e0000) {
e0000.printStackTrace ();
}
}


              ... 111;
              ... 222;
              ... 333;
 
       }
Reply

Use magic Report

0

Threads

18

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-6-22 18:00:01
| Show all posts
With JAVASCRIPT
Reply

Use magic Report

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-6-30 00:15:01
| Show all posts
forward

return;
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-6 22:00:01
| Show all posts
Still use goto this year?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-27 22:15:01
| Show all posts
Keyword to disrupt the process
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-29 18:30:02
| Show all posts
Use JavaScript and RequestDispatcher dispatcher=request.getRequestDispatcher("/admin.AddJob.jsp?id=5");
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list