Welcome to Dream.In.Code
Become a Java Expert!

Join 150,200 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,986 people online right now. Registration is fast and FREE... Join Now!




JSP: Getting the context value

 
Reply to this topicStart new topic

JSP: Getting the context value, More of a JSP/HTML question, I think.

pyrocubed
12 Sep, 2008 - 01:34 AM
Post #1

New D.I.C Head
*

Joined: 21 Aug, 2008
Posts: 4


My Contributions
Well I'm not sure if this fits in here or in the web developement part, but since it's a JSP question I thought I'd try it here.

I've created a bunch of JSP pages that rely heavily on retrieving values by passing them through the url with the
?context=value and then using request.getParameter(context) to use it in the second page.
This usually works with JSP alone, but now I'm using 'ssi include' and passing the context from other shtml pages, and the request.getParameter() is no longer working with these pages.

Any thoughts?

On the other hand, this might not be possible at all, since the ssi thing only takes the output of the jsp page. In that case, is there a way to work around passing the info through the url. Is there another way to get a value from a previous page?

This post has been edited by pyrocubed: 12 Sep, 2008 - 01:50 AM
User is offlineProfile CardPM
+Quote Post

1lacca
RE: JSP: Getting The Context Value
12 Sep, 2008 - 03:14 AM
Post #2

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
Could you post a sample, because I'm not sure I understand your problem clearly.
You can store some data in (JSP/Java) sessions, if you are dealing with JSPs.
Also, you could avoid using ssi include, JSP has two similar directives.
Finally, with Javascript it could be possible to collect parameters from all over your page, no matter what was used to assemble them, but I'd only use it as a last resort due to several difficulities.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:56AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month