- This topic has 4 replies, 2 voices, and was last updated 21 years, 7 months ago by Cao Xiaogang.
-
AuthorPosts
-
Cao XiaogangMemberwhen 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
No OperationMembersince 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 invalid2. 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
Cao XiaogangMemberthis 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.
No OperationMemberRegarding 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?
Cao XiaogangMemberjust a quick ‘show in Bowser’ will save user’s time to open a browser and type the address.
-
AuthorPosts