| Author |
Message |
|
|
Post subject: quick jsp run/debug feature
Posted: May 07, 2003 - 05:46 PM
|
|
Joined: May 07, 2003
Posts: 8
|
|
when I edit jsp file, from time to time, maybe after fix a small bug, I need to view the result. So, the best way is to bind a hotkey (maybe F12) to the editor window. and when you press F12, it will show the jsp in IE (better within Eclipse IDE).
in the process, must do a local address and http url mapping.
like \web app\test\test1.jsp <==> http://localhost:81/testProject/test/test1.jsp |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 07, 2003 - 09:49 PM
|
|
Registered Member

Joined: May 05, 2003
Posts: 189
Location: in your JVM
|
|
since there is a small difference between JSP and HTML, that kind of preview would raise some questions:
1. how woudl you hanlde embedded Java code <% ... %>
- there is no request, so all request parameters might not exist
- there is no context, also session, application, page and request context might be invalid
2. how would you handle expressions <%= %>
- same questions as in 1.
- this often affects attributes of html tags, how would you handle this?
- there are also more complex variations possible, e.g
<<%=tagname%> <%=attrname%>=<%=attrvalue%>>
how would you display this, without having the values, which might depend on the work flow?
NOP |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 08, 2003 - 03:19 AM
|
|
Joined: May 07, 2003
Posts: 8
|
|
this kind of problem should be solved by program himself.
I use JRun Studio for more than 3 years, and I love the feature very much, it's really useful and reduce time.
I just need a F12 hotkey to begin preview and run. Don't worry about the session and workflow. If you provide the funtion, I am sure the programer will have his own way to use the function.
Yes, the jsp run result depends on session and workflow.
my work around is:
in development stage, I will bypass the authticate or other session related check using the following code:
// production stage
// String userId = session.getAttribute("sessionUser");
// debug stage
String userId = "SomeOne";
It is dirty but it works.
The Best solution is to let the IDE 'remember' request information for each page. programer can change the defult request values for a certain page.
If the page belongs to a work flow, then no way to work around.
Actually, Please don't treat the feature as a very strick feature and don't try to handle all the things that programer himself should handle. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 12, 2003 - 10:08 AM
|
|
Registered Member

Joined: May 05, 2003
Posts: 189
Location: in your JVM
|
|
Regarding some 'typical' development environment:
- IDE (e.g. Eclipse)
- Server (e.g. Tomcat)
- Browser (e.g. Phoenix)
where you just press STR+R in the browser to reload the page...
... which advantage would you get with this feature? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 23, 2003 - 04:42 AM
|
|
Joined: May 07, 2003
Posts: 8
|
|
just a quick 'show in Bowser' will save user's time to open a browser and type the address. |
|
|
| |
|
|
|
 |
|
|