Win a copy of Event Streams in Action this week in the Java in General forum!

Lester Carmelotes

Greenhorn
+ Follow
since Aug 26, 2013
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lester Carmelotes

Yes, I'm not using doGet.

But in JSP page I've setting this session.setMaxInactiveInterval(10) and after that when I try to access other JSP page the HTTP Status 405 will appear.

How can I make it work?


Thanks,
5 years ago
Thanks for the reply,

I don't much understand in Handling HTTP Request. I am still learning.

Here's my validation code:



I've added every jsp page to this code:

String name = (String) session.getAttribute("user");




Thanks,
5 years ago
Hi Guys,

Is it possible to HTTP Status 405 it will redirect to login?

I have setting my jsp page to this session.setMaxInactiveInterval(10) and when the session inactive then if the user will try to refresh the page or go to other page the HTTP Status 405 will appeared.
Instead of error HTTP Status 405 will appear, it will redirect to index page by setting refresh page to 1 second.

Is it possible? if so, what to do?


Thanks guys,
5 years ago
Thanks for the reply guys...

Its working now....
5 years ago
Hi Guys,

I'm trying to create PDF Downloadable file through Servlet. I am trying to pass a user session attribute from JSP to Servlet but it gives me null value.

Here's my code:



I'm trying to get data from database of specific person through the user.

Any ideas guys?

need help please!

Thanks...
5 years ago
I tried it but it gives me null results or an error:


wrong entrycom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''null'' at line 1

5 years ago
JSP
Hi Guys,

I need help in achieving this onClick button Search if it works.
This is how it goes, when I click the search button a table will show with a data fetching from the database. But I have a null results. I've used only one jsp page.
I tried to works this code but don't have luck.







Any ideas guys if it will work?


Thanks in Advanced
5 years ago
JSP

K. Tsang wrote:<session-config>
<session-timeout>30</session-timeout> <!-- in minutes -->
</session-config>

In the HttpSession class, there is a setMaxInactiveInterval(int) method that takes in "seconds". You may want to use this in your programming to "force" the timeout in 15 seconds.

But why you want to timeout in 15 seconds??




I want this timeout for security reason.

How to redirect to login page after timeout?

Thanks,
5 years ago

K. Tsang wrote:There are 2 ways to set timeout, in web.xml (in minutes) or in programming (in seconds).

How are you setting the session-timeout in web.xml?



Here's my web.xml



how to add here?
5 years ago
Hi Guys,

I found a working Login/Logout using session.
How can I make it auto logout after 15 seconds without activity happen in the page?

Here's the code:

Validate.java


Welcome.jsp


logout.java


login.html


Thanks guys,
5 years ago
Thanks for the reply guys, Very much appreciated.

I have found this code:



My problem is how can I change this code:



to this code:



I tried this one but won't worked. Sorry guys I am newbie and still learn this Java Servlet.



Any suggestion?

thanks guys!
5 years ago
Hi Guys,

I am newbie in Java Servlet. I start working on Login/Logout application. My Problem is that when I successfully login it will go to welcome page and try to logout then when I press the Back button at the browser, it will back to welcome page which shouldn't be.

How to fix this?


Please I need help.

Here's my code:
-Login.java


-Logout


-Validate


-Welcome


-index.html


-web.xml


Thanks Guys,
5 years ago