MikeS Miller

Greenhorn
+ Follow
since Mar 06, 2009
Merit badge: grant badges
For More
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 MikeS Miller

I will check that out. That could be helpful. Thanks again for the help I understand it a lot better now. Still a million miles away from where I want to be, but this helps a lot!

Mike
15 years ago
JSP
Well, it would make sense that it looks amateurish as this is the first one that I have ever done for my web applciations class. I was under the assumption that had to be there, based on how my host has the server set up, but I may be misunderstanding. I am trying to learn the basics of how it works and then will fine tune using best practices. This is only for a test site at the moment, so that does not matter.

By the way, I figured out the correct path and it works great! Now the only thing is that all of my links and such in my menu, etc. all need to be updated that way. Or is there an easier way? I am sure that I am doing a lot of stuff the hard way initially, but like I said, I am learning.
15 years ago
JSP
Ha ha! Yeah, I was wondering if anyone would be able to figure that structure out! Anyhow, I think I understand what you are saying and I can play around with it until it works out right.

So, my only question that remains is where do I post this path? In the JSP where I have it coded already? But wait, that would be hardcoded then wouldn't it?

Just to clarify, when I get the JSP as passed to from the servlet, this is what the path is:



So, if the file is in a folder named styles, then would the following be way my path should be?



or would it be



If my web.xml is mapped like this:



I think I am getting close here

Mike
15 years ago
JSP
Bear -

Thanks for that - that is exactly my problem. Now my only question is - the FAQs seem to refer to the images or whatever linked file residing in the root folder of my webapp. However, I am sure this is the case in my webapp. I have the css sheets outside of the root folder of my webapp. For example:

public_html
-confirm.jsp
-referral.jsp
html
-index.html
-other.html
css
- style.css
scripts
flash
WEB-INF
-controller servlet


The names without dashes are directories obviously, and the dashed items are the files.

If I am reading the FAQ correctly, it is referencing the code to use as if the css was located in the WEB-INF folder? Or am I reading that wrong?

So I suppose my question is, given the above folder structure, what would I need to code in order to make this work? And where do I put that code at? In the JSP or in the servlet?

The funny thing is that I thought it might have been something like this, since there were no images getting pulled in except those that were referenced directly using an absolute URL (the W3C Validators).

Thanks again for your help!

Mike
15 years ago
JSP
Yes - I am still stuck on this. And I have checked and triple checked the paths and they are correct. In fact, they would have to be since the direct confirm.jsp file works right? Maybe I am missing something here.

Mike
15 years ago
JSP
Okay, I will try to explain this intelligently, even though I am a complete greenhorn when it comes to jsp and servlets.

I am working on a school assignment. I have a referral form that someone is supposed to fill in with a few pieces of information. This is then passed to a servlet (this is using an MVC setup), which then passes the properties to one of a few jsp pages.

The part of the assignment that I need to accomplish is done - the properties pass over correctly and the MVC set up works. However, the problem I am getting is very weird.

Here is the series:

referall.jsp submits to scoutReferral servlet. This servlet then responds with a confirm.jsp page that lists the entries for the person to confirm (I know this is not the best way, but the point here is just to get the MVC to work properly).

Well, the confirm.jsp has two css style sheets attached. However, when it displays using this method, the css does not render at all.

Now, what is weird is that if I go directly to the jsp, it not only renders the css properly, it still has the session variables there.

I have checked the source that is getting passed to the browser and it all looks perfect.

What am I missing here?

Here is the link: http://www.paradigmforward.com/pack111/referral.jsp

(Once you fill the form out and see the result using that method, the direct link to the confirm.jsp is http://www.paradigmforward.com/pack111/confirm.jsp)

If you use IE - I know the table is messed up, but I will fix that later.

Here is the code:

referral.jsp:


confirm.jsp


Thanks! Mike
15 years ago
JSP