nonowhy hailey

Greenhorn
+ Follow
since Jun 28, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nonowhy hailey

nonowhy hailey wrote:

Bear Bibeault wrote:Checking for the URL is not the right way to go about this.

Rather, you can send data from the controller to the JSP that can tell the JSP that it needs to do whatever it is you want it to do.

Concept: your form submits to a servlet, the servlet determines what to do with the form data and processes it. Somewhere along the way, it determines that a popup should appear when the view is displayed (but really, a popup? what is the purpose? it's not an idea that is used much in modern design). It places a scoped variable in the session to indicate this, then redirects to the page controller for the next view. Either the page controller, or the page view (the JSP), can look into the session to see if the scoped variable indicates that the popup should be shown.

If any of the concepts are unfamiliar, please see this article for information on structuring Java web applications.



hi, thanks for your information. by the way, do you have the coding example that I can reference.
Thanks.



how to set the scoped variable to session in login.jsp (first page) controller before going to next view?
6 days ago

Bear Bibeault wrote:Checking for the URL is not the right way to go about this.

Rather, you can send data from the controller to the JSP that can tell the JSP that it needs to do whatever it is you want it to do.

Concept: your form submits to a servlet, the servlet determines what to do with the form data and processes it. Somewhere along the way, it determines that a popup should appear when the view is displayed (but really, a popup? what is the purpose? it's not an idea that is used much in modern design). It places a scoped variable in the session to indicate this, then redirects to the page controller for the next view. Either the page controller, or the page view (the JSP), can look into the session to see if the scoped variable indicates that the popup should be shown.

If any of the concepts are unfamiliar, please see this article for information on structuring Java web applications.



hi, thanks for your information. by the way, do you have the coding example that I can reference.
Thanks.
6 days ago
let say i have login.jsp and home.jsp, when user input id and password and then click the normal button in logon.jsp, it will redirect to home.jsp page.
in home.jsp page, how can i get the url of the previous page (login.jsp) in home.jsp
and i need to check if the url=login.jsp, then i want to popup window, otherwise, it will hide the popup window.
any example coding for me for reference, i am beginner seeking for help. thanks.
1 week ago
for project java and jsp project, the system logic is based on the xml file below to decide the program's flow, but now i don't know how to read the following xml file, what is the node <htmlProcessor> and <htmlState>?

how can i get the previous redirect URL from the next page in jsp? if the login.jsp will redirect to Home.jsp, when i enter the Home.jsp, how can i get the login.jsp from home.jsp 's jsp coding?

-------------------------------------------------------------------------------------------
I am beginner of using java jsp project.

my project requirements is as below,

1. create a logon jsp page with userid and password field
and create 2 button , abnormal and normal button respectively. once the user click on it , it will submit form to servlet. it will redirect to the page home.jsp after successful logon.
2. form home.jsp, I want to prompt a popup window when home.jsp is redirected from logon.jsp and triggered from normal button? NOT triggered by abnormal button.
1 week ago
JSP