Forum: JSP 14 Hours Ago |
| Replies: 3 Views: 109 Then after the user logs in put in the session the username and the user role (ADMIN or USER)
Then at every page get the info from the session and if someone has gone to an ADMIN page when in the... |
Forum: JSP 22 Hours Ago |
| Replies: 3 Views: 109 Have a login page. How else will you be able to distinguish them apart. There is a tutorial in this forum |
Forum: JSP 5 Days Ago |
| Replies: 3 Views: 249 And I was wondering why, especially you, didn't point him to that obvious resource. :) |
Forum: JSP 9 Days Ago |
| Replies: 4 Views: 4,723 It is not necessary to have a css file, but if you use this value:
css_xhtml
and you right click the page to View the Source code you will see div tags automatically added with some default class... |
Forum: JSP 12 Days Ago |
| Replies: 4 Views: 4,723 Yes:
Also I think that you can set the theme at each tag that you write. But that is not very helpful. It is better to have it in one prop file. |
Forum: JSP 16 Days Ago |
| Replies: 3 Views: 521 I already told you. If you have a table in jsp:
<table>
<tr>
<td>
</td>
</tr>
</table> |
Forum: JSP 19 Days Ago |
| Replies: 3 Views: 521 Check out the css tutorial at:
http://www.w3schools.com/css/default.asp |
Forum: JSP 20 Days Ago |
| Replies: 1 Views: 377 What kind of stored procedure. Do you know how to call that procedure from an sql editor?
I would suggest to use PreparedStatements or better:
CallableStatement... |
Forum: JSP 20 Days Ago |
| Replies: 12 Views: 11,880 |
Forum: JSP 27 Days Ago |
| Replies: 9 Views: 653 That's because you don't read what I say to you. You just copy paste:
I changed this:
...
<option value='CONFIG_SOURCE' <%= ("CONFIG_SOURCE".equals(choice)) ? ("selected='selected'") : ""%>... |
Forum: JSP 27 Days Ago |
| Replies: 10 Views: 1,316 Start your own thread, be more descriptive, did you put it in the session? |
Forum: JSP 28 Days Ago |
| Replies: 9 Views: 653 It is like I said. You lack the very basics and you should be ready to accept criticism:
Java is executed at the server. Then the page is generated and then send to the client pure html.
... |
Forum: JSP 28 Days Ago |
| Replies: 5 Views: 340 Do you know jsp, or how to submit a request using form.
If yes then maybe you can have the button ("Add Cart") submit the form that has the items the customer has selected and after you retrieve... |
Forum: JSP 28 Days Ago |
| Replies: 9 Views: 653 I usually don't work with frame and I don't have time to give it much thought right now.
But, have you tried submitting the form to the jsp that is the second frame?
I assume you have a page... |
Forum: JSP 28 Days Ago |
| Replies: 5 Views: 340 Here is how:
1) Post to correct forum
2) Be more descriptive on your problem
3) Show some effort
If you are talking about a web application
4) Learn about request, session
5) Learn about... |
Forum: JSP 29 Days Ago |
| Replies: 9 Views: 653 Given this:
document.getElementbyName('myCombo').selectedValue = session.getAttribute("choice");
I simply advised you to study a little more before trying things that are out of your league.... |
Forum: JSP 29 Days Ago |
| Replies: 9 Views: 653 You cannot combine java and javascript that way. They are NOT the same:
document.getElementbyName('myCombo').selectedValue = '<%= session.getAttribute("choice") %>';
I see from your previous... |
Forum: JSP 29 Days Ago |
| Replies: 4 Views: 487 First of all request.setAttribute is void. It doesn't return a value to put it in a string.
Secondly:
You just said that it works. Then what is the problem? You cannot just go to a page,... |
Forum: JSP 29 Days Ago |
| Replies: 4 Views: 487 I can't see a problem with your page. Does the page submits? Does it go from page A to page B? Is the name of the Test.jsp correct and are the pages in the same folder?
Does onChange works? Should... |
Forum: JSP 29 Days Ago |
| Replies: 1 Views: 377 When the user logs in, do you put that user in the session?
String username;
String password;
// check the database to see if the user is valid.
if (yes) {
... |
Forum: JSP 29 Days Ago |
| Replies: 1 Views: 438 Why don't you use the post method? |
Forum: JSP 32 Days Ago |
| Replies: 8 Views: 59,075 And what is the point of this post? This is a 4 year old thread which has been revived 1 year ago, with no useful information. Can someone please close this? |
Forum: JSP 32 Days Ago |
| Replies: 3 Views: 463 First of all when you have questions such as this, always search the API.
http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html#isNew()
... |
Forum: JSP 34 Days Ago |
| Replies: 1 Views: 397 First of all don't do an: ps.executeUpdate().
You don't update anything to the database, you do a select. So use the method that returns a ResultSet:
ResultSet rs = ps.executeQuery();
if... |
Forum: JSP Oct 25th, 2009 |
| Replies: 2 Views: 282 If you want to display data to html page then you use jsp.
Jsp is actually constructed using html tags. So if you don't know html how can you create a web page? If you don't know java how can you... |
Forum: JSP Oct 25th, 2009 |
| Replies: 1 Views: 239 Have you tried this:
../logoutpage.jsp ? |
Forum: JSP Oct 15th, 2009 |
| Replies: 6 Views: 420 I am sorry for not contributing much to your question apart for my comments to pardon_garden code.
The link that I provided should be able to help you start. Also try Peter_budo's link |
Forum: JSP Oct 15th, 2009 |
| Replies: 6 Views: 420 And the Statement? Where do you close it?
Also you have a Statement declared globally and inside the method I described you open one locally, and you don't have methods to close neither of them.
... |
Forum: JSP Oct 15th, 2009 |
| Replies: 6 Views: 420 To pardon_garden
ResultSet rs = s.executeQuery(sql);
return (rs == null) ? null : rs;
First of all, this:
ResultSet rs = s.executeQuery(sql);
never returns null |
Forum: JSP Oct 13th, 2009 |
| Replies: 1 Views: 503 Have you tried using another attribute than "disabled".
The input "text" has an attribute "readonly". Search what other attributes the checkbox has. |
Forum: JSP Oct 12th, 2009 |
| Replies: 7 Views: 706 |
Forum: JSP Oct 10th, 2009 |
| Replies: 7 Views: 706 First of all start a new thread with your new code. This kind of thread is only for posting working code as an idea of sharing code for educational purposes.
Start a new thread and don't select code... |
Forum: JSP Oct 9th, 2009 |
| Replies: 7 Views: 706 You forgot to add this:
<option value="user">User</option>
I haven't read your code; just stopped reading when I reached that part.
This is a site that helped me a lot to learn html and... |
Forum: JSP Oct 9th, 2009 |
| Replies: 6 Views: 598 Two questions?
- Did you start the server?
- What url are you using? |
Forum: JSP Sep 30th, 2009 |
| Replies: 3 Views: 714 I have been reading this thread and didn't notice the poll. I believe the "Read Me" thread with the MVC tutorial is very nice guide to start with.
But we do need a guide with links to tutorials that... |
Forum: JSP Sep 27th, 2009 |
| Replies: 10 Views: 823 <select name="selectedUniversity" >
<option>Brunel</option>
<option>Kingston</option>
<option>Kent</option>
</select>
Submit the form to the next page and at the next page have this... |
Forum: JSP Sep 25th, 2009 |
| Replies: 10 Views: 823 I never had to do something like this before, so frankly I am not in the mood to write code that does that.
But If I were to do this I would look at this site:
http://www.w3schools.com/default.asp... |
Forum: JSP Sep 25th, 2009 |
| Replies: 10 Views: 823 If it doesn't work then there is a problem with the "moveOptions" method for which you didn't provide code |
Forum: JSP Sep 25th, 2009 |
| Replies: 10 Views: 823 Please forgive but I don't understand what you mean by new layer. Can you post code or a picture indicating where you want the "uni" to be displayed? |
Forum: JSP Sep 25th, 2009 |
| Replies: 10 Views: 823 First of all this is a question for the JSP forum.
Secondly what do you mean when you say "heading". Explain better with some code.
Also you can submit the page and when you go at the the next page... |